/* ===== Mobile Responsive Styles ===== */

@media screen and (max-width: 992px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .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-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .location-info {
        grid-template-columns: 1fr;
    }
    
    .product-detail-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .main-image {
        height: 400px;
    }
}

@media screen and (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .about-features {
        flex-direction: column;
        gap: 15px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .add-to-cart-section {
        flex-direction: column;
    }
    
    .delivery-badge {
        position: relative;
        top: 0;
        right: 0;
        margin: 20px auto;
        width: fit-content;
    }
    
    .theme-toggle {
        top: 80px;
        right: 10px;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .page-header {
        padding: 120px 16px 70px;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .page-header p {
        font-size: 0.98rem;
    }

    .products-section {
        padding: 60px 0 80px;
    }

    .products-filter {
        padding: 16px;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group input,
    .filter-group select {
        width: 100%;
        min-width: 0;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }

    .product-actions .btn-view {
        width: 100%;
    }
    
    .size-options-detail {
        flex-direction: column;
    }
    
    .size-btn {
        width: 100%;
        text-align: center;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .theme-toggle {
        top: auto;
        bottom: 20px;
        right: 16px;
    }
}

/* ===== Tablet Styles ===== */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== Animation Enhancements for Mobile ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Touch Device Optimizations ===== */
@media (hover: none) {
    .product-card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .feature-card:hover {
        transform: none;
    }
}

/* ===== Global image and touch optimizations ===== */
img { max-width: 100%; height: auto; display: block; }

/* Larger touch targets and reduced visual weight on small screens */
@media screen and (max-width: 480px) {
    .btn, .size-btn, .qty-btn { padding: 14px 18px; min-height: 48px; font-size: 1rem; }
    .nav-menu a { padding: 14px 8px; }
    .hamburger { width: 48px; height: 48px; align-items: center; justify-content: center; }

    /* Reduce heavy shadows and animations for battery/perf savings */
    .product-image, .product-image-shell, .feature-card, .main-image {
        box-shadow: none !important;
    }

    /* Make main images slightly smaller for faster paint and less layout shift */
    .main-image { max-height: 360px; height: auto; object-fit: contain; }

    /* Ensure product grid is single column with comfortable spacing */
    .products-grid { grid-template-columns: 1fr; gap: 18px; }

    /* Avoid large transforms on mobile */
    .main-image:hover { transform: none; }
}

/* Prefetch/Preload hint: recommend inlining a critical font or preloading main font in production build. */