/* KRXN Website - Responsive Styles */

/* Tablet Styles */
@media screen and (max-width: 1024px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }


    /* Adjust hero content for tablet */
    .hero-content {
        left: 2rem;
        max-width: 60%;
        padding: 1.5rem 0;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }

    .contact-info {
        margin-bottom: 2rem;
    }
}

/* Mobile Styles */
@media screen and (max-width: 768px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-link {
        padding: 1rem;
        display: block;
        font-size: 1.1rem;
    }

    .hamburger {
        display: flex;
        margin-left: auto; /* push hamburger (and thus cart that follows) to the right */
    }
    .header-cart { margin-left: 8px; }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* Hero Section */
    .hero {
        min-height: 375px;
    }

    /* Adjust hero content for mobile */
    .hero-content {
        left: 1rem;
        right: 1rem;
        max-width: none;
        width: auto;
        text-align: center;
        padding: 1rem 0;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
        /* Improve readability on mobile hero */
        background: var(--white);
        color: var(--primary-blue);
        border-color: var(--white);
        box-shadow: 0 6px 16px rgba(0,0,0,0.15);
    }

    /* Disable gradient hover sweep on mobile for clarity */
    .cta-button::before { display: none; }

    .cta-button:hover,
    .cta-button:focus {
        color: var(--primary-blue);
        border-color: var(--white);
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    }


    /* Typography */
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    /* Sections */
    .products-overview,
    .about,
    .contact {
        padding: 3rem 0;
    }

    .section-title {
        margin-bottom: 2rem;
    }

    /* Product Grid */
    .product-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .product-card {
        max-width: 400px;
        margin: 0 auto;
    }

    /* About Section */
    .about-text p {
        font-size: 1rem;
        line-height: 1.7;
        text-align: center;
    }

    /* Contact Section */
    .contact-info {
        margin-bottom: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem;
        font-size: 0.95rem;
    }

    /* Footer */
    .footer {
        padding: 1.5rem 0;
    }

    .footer-content {
        gap: 0.8rem;
    }

    .footer-text {
        font-size: 1rem;
    }

    .footer-copyright {
        font-size: 0.85rem;
    }
}

/* Small Mobile Styles */
@media screen and (max-width: 480px) {
    .container {
        padding: 0 10px;
    }

    .nav-container {
        padding: 1rem 10px;
    }

    .logo-img {
        height: 40px;
    }

    .hero {
        min-height: 340px;
        margin-top: 70px;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }


    .products-overview,
    .about,
    .contact {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .product-info {
        padding: 1.2rem;
    }

    .price {
        font-size: 1.1rem;
    }

    .product-link {
        padding: 0.7rem 1.2rem;
        font-size: 0.9rem;
    }

    .contact-form {
        padding: 1.2rem;
    }

    .form-group {
        margin-bottom: 1.2rem;
    }

    .submit-btn {
        padding: 0.9rem 1.5rem;
        font-size: 0.95rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }
}

/* Very Small Mobile Styles */
@media screen and (max-width: 360px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .cta-button {
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.5rem;
    }


    .contact-form {
        padding: 1rem;
    }
}

/* Landscape Mobile Styles */
@media screen and (max-height: 480px) and (orientation: landscape) {
    .hero {
        min-height: 300px;
    }

    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
}

/* High Resolution Displays */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1400px;
        padding: 0 40px;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .slide-content {
        padding: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

/* Product Pages Responsive Styles */
@media screen and (max-width: 1024px) {
    .product-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .coming-soon-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

}

@media screen and (max-width: 768px) {
    .product-hero {
        padding: 2rem 0;
    }

    .main-image {
        height: 250px;
    }

    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }

    .thumb-img {
        height: 60px;
        font-size: 0.7rem;
    }

    .spec-table,
    .weight-table,
    .tube-table {
        font-size: 0.9rem;
    }

    .spec-table th,
    .weight-table th,
    .tube-table th {
        padding: 0.8rem;
    }

    .spec-table td,
    .weight-table td,
    .tube-table td {
        padding: 0.6rem 0.8rem;
    }

    .tube-table .table-controls {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }

    .tube-table .table-controls .order-btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }

    .price {
        font-size: 2rem;
    }

    .order-section,
    .pre-order-info {
        padding: 2rem 1.5rem;
    }

    .order-section h3 {
        font-size: 1.3rem;
    }

    .order-section ul {
        max-width: 100%;
    }

    .order-section li {
        padding: 0.8rem 0;
        font-size: 0.95rem;
    }

    .order-section li:before {
        width: 1.3rem;
        height: 1.3rem;
        font-size: 1rem;
        line-height: 1.3rem;
        margin-right: 1rem;
    }

    .tube-category {
        padding: 1rem;
    }

    .placeholder-large {
        height: 200px;
    }

    .placeholder-icon {
        font-size: 3rem;
    }

    .timeline {
        padding: 1rem;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .timeline-date {
        margin-bottom: 0.5rem;
    }
}

@media screen and (max-width: 480px) {
    .product-hero {
        padding: 1.5rem 0;
    }

    .main-image {
        height: 200px;
    }

    .placeholder-product-img {
        font-size: 1.5rem;
    }

    .image-gallery {
        grid-template-columns: 1fr 1fr;
    }

    .thumb-img {
        height: 50px;
        font-size: 0.6rem;
    }

    .price-section {
        padding: 1rem;
    }

    .price {
        font-size: 1.8rem;
    }

    .spec-table,
    .weight-table,
    .tube-table {
        font-size: 0.8rem;
    }

    .spec-table th,
    .weight-table th,
    .tube-table th {
        padding: 0.6rem 0.5rem;
    }

    .spec-table td,
    .weight-table td,
    .tube-table td {
        padding: 0.5rem;
    }

    .order-btn {
        width: 100%;
        text-align: center;
    }

    .tube-category {
        padding: 0.8rem;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .coming-soon-badge {
        width: 100%;
        text-align: center;
    }

    .placeholder-large {
        height: 150px;
    }

    .placeholder-icon {
        font-size: 2rem;
    }

    .development-status,
    .timeline {
        padding: 1rem;
    }

}

/* Cart Page Responsive Styles */
@media screen and (max-width: 768px) {
    /* Hide table headers on mobile */
    .cart-table thead {
        display: none;
    }

    /* Convert table rows to card layout */
    .cart-table tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        padding: 1rem;
        background: var(--light-gray);
        border-radius: 0.5rem;
        border-bottom: none;
    }

    .cart-table td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        text-align: left;
    }

    /* Style each row element */
    .cart-table td:first-child {
        font-weight: 600;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e5e7eb;
        margin-bottom: 0.75rem;
    }

    .cart-table td:nth-child(2)::before {
        content: "Preis: ";
        font-weight: 600;
        display: inline-block;
        width: 100px;
    }

    .cart-table td:nth-child(3)::before {
        content: "Menge: ";
        font-weight: 600;
        display: inline-block;
        width: 100px;
    }

    .cart-table td:nth-child(4)::before {
        content: "Summe: ";
        font-weight: 600;
        display: inline-block;
        width: 100px;
    }

    .cart-table td:nth-child(3) {
        display: flex;
        align-items: center;
    }

    /* Quantity input styling for mobile */
    .cart-table .qty-input {
        width: 80px;
        padding: 0.5rem;
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    /* Remove button styling */
    .cart-table td:nth-child(5) {
        padding-top: 1rem;
    }

    .cart-table td:nth-child(5) button {
        width: 100%;
        padding: 0.75rem;
        background: var(--accent-petrol);
        color: white;
        border-radius: 0.5rem;
        font-size: 0.95rem;
        position: relative;
        overflow: hidden;
        transition: all 0.3s ease;
    }

    .cart-table td:nth-child(5) button:active {
        transform: scale(0.98);
        background: var(--primary-dark-blue);
    }

    /* Cart summary mobile layout */
    .cart-summary {
        flex-direction: column;
        gap: 1.5rem;
        padding: 1.5rem 0;
    }

    .cart-total-row {
        display: flex;
        justify-content: space-between;
        width: 100%;
        font-size: 1.2rem;
        font-weight: 700;
        padding: 1rem;
        background: var(--light-gray);
        border-radius: 0.5rem;
    }

    .cart-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;
        width: 100%;
    }

    .cart-actions .btn {
        width: 100%;
        padding: 0.9rem;
        text-align: center;
        font-size: 1rem;
    }

    /* Primary button more prominent on mobile */
    .cart-actions .btn-primary {
        order: -1;
        padding: 1rem;
        font-size: 1.05rem;
    }

    /* Cart container padding adjustment */
    .cart-container {
        padding: 0.75rem;
    }

    /* Cart note styling */
    .cart-note {
        padding: 1rem;
        font-size: 0.9rem;
        text-align: center;
        margin-top: 1rem;
    }
}

@media screen and (max-width: 480px) {
    /* Even smaller screens */
    .cart-table tbody tr {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .cart-table td {
        padding: 0.4rem 0;
        font-size: 0.95rem;
    }

    .cart-table .qty-input {
        width: 70px;
        padding: 0.4rem;
        font-size: 0.95rem;
    }

    .cart-total-row {
        font-size: 1.1rem;
        padding: 0.75rem;
    }

    .cart-actions .btn {
        padding: 0.8rem;
        font-size: 0.95rem;
    }

    .cart-actions .btn-primary {
        padding: 0.9rem;
        font-size: 1rem;
    }

    .cart-container {
        padding: 0.5rem;
        border-radius: 0.5rem;
    }

    .cart-note {
        font-size: 0.85rem;
        padding: 0.75rem;
    }

    /* Empty cart state */
    .cart-empty {
        text-align: center;
        padding: 2rem 1rem;
    }

    .cart-empty h2 {
        font-size: 1.3rem;
    }

    .cart-empty p {
        font-size: 0.95rem;
        margin: 1rem 0;
    }

    .cart-empty .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* Tubes Product Page Mobile Responsive Styles */
@media screen and (max-width: 768px) {
    /* Make tube tables responsive */
    .tube-table {
        display: block;
        width: 100%;
        overflow-x: visible;
    }

    .tube-table thead {
        display: none;
    }

    .tube-table tbody {
        display: block;
    }

    .tube-table tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        padding: 1rem;
        background: var(--light-gray);
        border-radius: 0.5rem;
        border: 1px solid #e5e7eb;
    }

    .tube-table td {
        display: block;
        padding: 0.5rem 0;
        border: none;
        text-align: left;
        width: 100%;
    }

    /* Add labels for mobile */
    .tube-table td:nth-child(1)::before {
        content: "Laufradgröße: ";
        font-weight: 600;
        display: inline-block;
    }

    .tube-table td:nth-child(2)::before {
        content: "Breite: ";
        font-weight: 600;
        display: inline-block;
    }

    .tube-table td:nth-child(3)::before {
        content: "Ventillänge: ";
        font-weight: 600;
        display: inline-block;
    }

    .tube-table td:nth-child(4)::before {
        content: "Ventilart: ";
        font-weight: 600;
        display: inline-block;
    }

    /* Price and controls section */
    .tube-table td:nth-child(5) {
        padding-top: 1rem;
        border-top: 1px solid #e5e7eb;
        margin-top: 0.5rem;
    }

    .tube-table .table-controls {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }

    .tube-table .table-controls strong {
        font-size: 1.3rem;
        color: var(--primary-dark-blue);
        text-align: center;
        padding: 0.5rem;
        background: white;
        border-radius: 0.25rem;
    }

    .tube-table .table-controls .qty-input {
        width: 100%;
        padding: 0.6rem;
        font-size: 1rem;
        text-align: center;
        border: 1px solid #d1d5db;
        border-radius: 0.5rem;
    }

    .tube-table .table-controls .order-btn {
        width: 100%;
        padding: 0.9rem;
        font-size: 0.95rem;
        background: linear-gradient(135deg, var(--secondary-turquoise), var(--accent-petrol));
        color: white;
        border-radius: 0.5rem;
        border: none;
        position: relative;
        overflow: hidden;
        font-weight: 600;
    }

    .tube-table .table-controls .order-btn span {
        position: relative;
        z-index: 1;
    }

    .tube-table .table-controls .order-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, var(--accent-petrol), var(--primary-dark-blue));
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .tube-table .table-controls .order-btn:active {
        transform: scale(0.98);
    }

    /* Tube categories section */
    .tube-categories {
        padding: 0;
    }

    .tube-category {
        margin-bottom: 2rem;
        padding: 1rem;
    }

    .tube-category h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
        padding-bottom: 0.5rem;
        border-bottom: 2px solid var(--primary-dark-blue);
    }

    /* Features list mobile */
    .tube-features {
        padding: 1.5rem;
    }

    .tube-features h3 {
        font-size: 1.3rem;
        margin-bottom: 1rem;
    }

    .features-list {
        padding-left: 1.5rem;
    }

    .features-list li {
        font-size: 0.95rem;
        margin-bottom: 0.75rem;
        line-height: 1.5;
    }
}

@media screen and (max-width: 480px) {
    /* Even smaller screens */
    .tube-table tbody tr {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }

    .tube-table td {
        padding: 0.3rem 0;
        font-size: 0.9rem;
    }

    .tube-table .table-controls strong {
        font-size: 1.2rem;
        padding: 0.4rem;
    }

    .tube-table .table-controls .qty-input {
        padding: 0.5rem;
        font-size: 0.95rem;
    }

    .tube-table .table-controls .order-btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .tube-category {
        padding: 0.75rem;
    }

    .tube-category h3 {
        font-size: 1.2rem;
    }

    .tube-features {
        padding: 1rem;
    }

    .tube-features h3 {
        font-size: 1.2rem;
    }

    .features-list {
        padding-left: 1.2rem;
    }

    .features-list li {
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }
}
