/* Responsive Styles */
@media (max-width: 1200px) {
    /* Navigation */
    .nav-menu > li {
        margin: 0 3px;
    }
    
    .nav-menu > li > a {
        padding: 8px 10px;
        font-size: 15px;
    }
    
    .cart-icon a {
        width: 38px;
        height: 38px;
    }
    .container {
        max-width: 100%;
        padding: 0 20px;
    }
    
    .hero-content h1 {
        font-size: 3.5rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
}

@media (max-width: 991px) {
    .hero {
        margin-top: 100px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-text h2 {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
    
    .about-features {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px 0;
    }
    
    .feature {
        padding: 20px 15px;
    }
    
    .about-image {
        order: -1;
        margin-top: 30px;
        min-height: 400px;
    }
    
    .experience {
        padding: 15px 25px;
    }
    
    .experience h3 {
        font-size: 2rem;
    }
    
    .experience p {
        font-size: 0.9rem;
    }
    
    .footer-top .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Header adjustments */
    .top-bar {
        font-size: 12px;
    }
    
    .contact-info span {
        margin-right: 10px;
    }
    
    .social-links a {
        margin-left: 10px;
    }
    
    .logo img {
        max-height: 40px;
    }
    
    .top-bar .container {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info {
        margin-bottom: 10px;
    }
    
    .social-links {
        margin-top: 10px;
    }
    
    /* ── Show hamburger button ────────────────────────────────────────── */
    .menu-toggle {
        display: flex;
    }

    /* ── Mobile nav panel (slides in from left) ───────────────────────── */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100%;
        background: #fff;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        /* padding-top set dynamically via JS to clear the fixed header */
        padding-bottom: 30px;
        margin-left: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
        overflow-y: auto;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    /* ── Overlay (created by JS, appended to body) ────────────────────── */
    #nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.45);
        z-index: 998;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    #nav-overlay.active {
        opacity: 1;
        pointer-events: auto;
    }

    /* ── Nav items ────────────────────────────────────────────────────── */
    .nav-menu > li {
        width: 100%;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-menu > li > a {
        padding: 14px 24px;
        display: block;
        width: 100%;
    }

    /* ── Dropdown on mobile ───────────────────────────────────────────── */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        padding: 0 0 8px 20px;
        margin-top: 0;
        min-width: unset;
        width: 100%;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    /* ── Hamburger → X animation ──────────────────────────────────────── */
    .menu-toggle.active .bar:nth-child(1) {
        transform: translateY(10.5px) rotate(45deg);
    }

    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }

    .menu-toggle.active .bar:nth-child(3) {
        transform: translateY(-10.5px) rotate(-45deg);
    }
    
    .hero {
        margin-top: 80px;
    }
    
    .hero-slide {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .category-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
}

@media (max-width: 576px) {
    /* Mobile optimizations */
    .top-bar .container {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-info {
        margin-bottom: 5px;
    }
    
    .nav-menu {
        width: 100%;
        right: -100%;
    }
    
    .cart-icon a {
        width: 36px;
        height: 36px;
    }
    .hero {
        margin-top: 70px;
    }
    
    .hero-slide {
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-top .container {
        grid-template-columns: 1fr;
    }
    
    .footer-widget {
        text-align: center;
    }
    
    .footer-widget h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .contact-info {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .contact-info li {
        justify-content: center;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 16px;
        bottom: 20px;
        right: 20px;
    }
}

/* Small devices (landscape phones, 320px and up) */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .btn {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .nav-menu {
        width: 90%;
    }
    
    .logo img {
        max-height: 50px;
    }
    
    .top-bar {
        font-size: 12px;
    }
    
    .social-links a {
        margin-left: 10px;
        font-size: 14px;
    }
    
    .testimonial-item {
        padding: 20px 15px;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    .testimonial-img {
        width: 50px;
        height: 50px;
    }
    
    .testimonial-author-info h4 {
        font-size: 1rem;
    }
    
    .testimonial-author-info p {
        font-size: 0.8rem;
    }
}
