/* Responsive Styles - Complete & Enhanced */

/* Mobile menu toggle */
.mobile-menu {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary-color);
}

@media (max-width: 992px) {
    .mobile-menu {
        display: block;
        margin-left: 15px;
    }

    nav ul {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 20px;
        padding: 40px 20px;
        transition: left 0.3s ease;
        z-index: 999;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        overflow-y: auto;
        display: flex;
    }

    nav ul.active {
        left: 0;
    }

    nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    nav ul li a {
        display: block;
        padding: 12px;
        font-size: 1.1rem;
    }

    nav ul li a::before {
        display: none;
    }

    /* Header layout adjustments */
    .header-container {
        flex-wrap: wrap;
        position: relative;
        justify-content: space-between;
    }

    .logo {
        flex: 1;
    }

    .header-right {
        order: 2;
        margin-left: auto;
        gap: 10px;
    }

    .header-cart {
        order: 3;
        margin-left: 15px;
    }

    .mobile-menu {
        order: 4;
    }

    .search-box {
        width: 180px;
    }

    .search-box input {
        padding: 6px 12px;
        padding-right: 30px;
        font-size: 13px;
    }

    .search-box button {
        padding: 6px !important;
    }

    .language-toggle button {
        padding: 4px 10px;
        font-size: 12px;
    }

    /* Container padding */
    .container {
        padding: 1rem 15px;
    }

    /* Hero slider */
    .hero-slider {
        height: 350px;
    }

    .hero-slide img {
        object-fit: cover;
    }

    .hero-content-overlay {
        left: 5%;
        max-width: 90%;
    }

    .hero-content-overlay h1 {
        font-size: 2rem;
    }

    /* About section */
    .about-section .container {
        flex-direction: column;
        gap: 30px;
        padding: 20px;
    }

    .about-content {
        width: 100%;
        text-align: center;
    }

    .about-image img {
        height: auto;
        max-height: 300px;
    }

    /* Services grid */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .service-card {
        padding: 20px;
    }

    /* Partners section */
    .slider-track img {
        height: 70px;
        margin: 0 15px;
    }

    .partners-section h2 {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-block,
    .social-block {
        max-width: 100%;
        text-align: center;
    }

    .social-block {
        align-items: center;
        margin-top: 20px;
    }

    .contact-block p {
        justify-content: center;
    }

    /* Timeline */
    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 50px;
        padding-right: 20px;
        left: 0 !important;
    }

    .timeline-item:nth-child(odd) .timeline-year,
    .timeline-item:nth-child(even) .timeline-year {
        left: 0;
        right: auto;
        position: relative;
        display: inline-block;
        margin-bottom: 10px;
        top: auto;
    }

    .timeline-content {
        margin-left: 0;
    }

    /* Service tabs */
    .service-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .service-detail {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .service-image img {
        max-height: 300px;
        object-fit: cover;
    }

    /* Contact page */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .map-container iframe {
        height: 300px;
    }

    .departments-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Partners page */
    .partners-grid-logos {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .partner-logo {
        height: 120px;
        padding: 15px;
    }

    .partner-logo img {
        max-height: 80px;
    }

    /* Product page */
    .product-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .product-thumbnails {
        justify-content: center;
    }

    .tabs-nav {
        flex-wrap: wrap;
    }

    .tabs-nav li {
        padding: 10px 20px;
        font-size: 14px;
    }

    /* Cart page */
    .cart-table {
        display: block;
        overflow-x: auto;
    }

    .cart-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .cart-buttons a,
    .cart-buttons button {
        width: 100%;
        text-align: center;
    }
}

/* For screens up to 768px */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .page-banner h1 {
        font-size: 2rem;
    }
    
    .filter-options {
        justify-content: center;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .partners-grid {
        grid-template-columns: 1fr;
    }
    
    .partner-card {
        flex-direction: column;
        text-align: center;
    }
    
    .partner-card img {
        margin-bottom: 15px;
    }

    .departments-grid {
        grid-template-columns: 1fr;
    }

    .partners-grid-logos {
        grid-template-columns: 1fr;
    }

    .product-title {
        font-size: 1.8rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    .related-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* For screens up to 480px */
@media (max-width: 480px) {
    .hero-slider {
        height: 250px;
    }

    .hero-content-overlay h1 {
        font-size: 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .related-products-grid {
        grid-template-columns: 1fr;
    }

    .tabs-nav li {
        padding: 8px 16px;
        font-size: 12px;
    }

    .tab-pane {
        padding: 15px;
    }

    .cart-table th,
    .cart-table td {
        padding: 10px;
    }

    .product-thumbnails .thumb {
        width: 60px;
        height: 60px;
    }

    .quantity-input {
        width: 100%;
        justify-content: center;
    }

    .quantity-input button,
    .quantity-input input {
        height: 36px;
    }

    .quantity-input button {
        width: 36px;
    }

    .quantity-input input {
        width: 50px;
    }
}


/* Mobile menu overlay - hides all content with white background */
body.mobile-menu-open {
    overflow: hidden; /* prevent scrolling */
}

body.mobile-menu-open::before {
    content: '';
    position: fixed;
    top: 80px; /* height of header (adjust if needed) */
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 998;
}

/* Ensure the mobile menu itself stays above the overlay */
body.mobile-menu-open nav ul {
    z-index: 999;
}