

/* ============================================================
   COMPREHENSIVE RESPONSIVE FIXES — Mobile / Tablet / PC
   Added in v2.1: safe-area, touch targets, hover alternatives,
   better breakpoints, sticky header behavior, print styles.
   ============================================================ */

/* --- Safe Area Insets for notched devices (iPhone X+, Android 10+) --- */
.announcement-bar {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
.site-header {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}
.mobile-menu-panel {
    padding-top: max(1.5rem, env(safe-area-inset-top));
    padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
    padding-left: max(1.5rem, env(safe-area-inset-left));
    padding-right: max(1.5rem, env(safe-area-inset-right));
}
.mini-cart-widget {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}
.whatsapp-float {
    bottom: calc(1rem + env(safe-area-inset-bottom));
    right: calc(1rem + env(safe-area-inset-right));
}
.back-to-top {
    bottom: calc(1rem + env(safe-area-inset-bottom));
    left: calc(1rem + env(safe-area-inset-left));
}
.sticky-add-to-cart {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
}
.site-footer {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* --- Touch target minimum sizes (Apple HIG: 44x44px, Material: 48x48px) --- */
.header-icon-btn {
    min-width: 44px;
    min-height: 44px;
}
.mobile-menu-toggle {
    min-width: 44px;
    min-height: 44px;
}
.mobile-menu-close,
.mini-cart-close,
.search-close,
.qv-close {
    min-width: 44px;
    min-height: 44px;
}
.btn {
    min-height: 44px;
}
.hero-dot {
    min-width: 44px;
    min-height: 44px;
    background: transparent;
    position: relative;
}
.hero-dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 32px;
    height: 2px;
    background: rgba(255,255,255,0.4);
    transition: all var(--transition);
}
.hero-dot.active::before { background: #fff; width: 48px; }
.hero-dot:hover::before { background: rgba(255,255,255,0.7); }

/* --- Touch device hover disable (prevents sticky hover on mobile) --- */
@media (hover: none) {
    .product-card:hover,
    .flash-sale-card:hover,
    .category-card:hover,
    .blog-card:hover,
    .testimonial-card:hover {
        transform: none;
        box-shadow: var(--shadow-sm);
    }
    .product-card:hover .product-card-img,
    .flash-sale-card:hover .fs-image img,
    .category-card:hover .category-image img,
    .blog-card:hover .blog-card-image img {
        transform: none;
    }
    .product-card:hover .quick-view-btn,
    .product-card:hover .wishlist-toggle {
        opacity: 1;
        transform: translateY(0);
    }
    /* Always show quick-view button on touch devices */
    .quick-view-btn {
        opacity: 1;
        transform: translateY(0);
        position: static;
        width: 100%;
        margin-top: 0.5rem;
    }
    .product-card-image {
        display: flex;
        flex-direction: column;
    }
    .nav-menu > li > a:hover::after,
    .nav-menu > li:hover > a::after { width: 0; }
    .header-icon-btn:hover {
        background: transparent;
        color: var(--color-secondary);
        transform: none;
    }
    .footer-links a:hover { transform: none; }
    .footer-social a:hover { transform: none; }
    .btn:hover { transform: none; }
    .btn-primary:hover,
    .btn-outline:hover,
    .btn-hero:hover,
    .btn-add-cart:hover {
        transform: none;
    }
}

/* --- Better Container Scaling --- */
.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 480px) {
    .container { padding: 0 1.25rem; }
}
@media (min-width: 768px) {
    .container { padding: 0 1.5rem; }
}
@media (min-width: 1024px) {
    .container { padding: 0 2rem; }
}
@media (min-width: 1440px) {
    .container { padding: 0 2.5rem; }
}

/* --- Typography Fluid Scaling (clamp for graceful scaling) --- */
h1 { font-size: clamp(2rem, 5vw + 1rem, 4.5rem); }
h2 { font-size: clamp(1.75rem, 4vw + 0.5rem, 3.5rem); }
h3 { font-size: clamp(1.375rem, 2.5vw + 0.5rem, 2rem); }
h4 { font-size: clamp(1.125rem, 1vw + 0.875rem, 1.25rem); }
.section-title { font-size: clamp(1.75rem, 4vw + 0.5rem, 3.25rem); }

/* --- Better Mobile Hero --- */
@media (max-width: 768px) {
    .hero-slider {
        height: 70vh;
        min-height: 460px;
        max-height: 600px;
    }
    .hero-title {
        font-size: clamp(1.875rem, 8vw, 2.5rem);
        line-height: 1.05;
        margin-bottom: 0.875rem;
    }
    .hero-subtitle {
        font-size: 0.9375rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }
    .hero-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.625rem;
    }
    .hero-actions .btn {
        width: 100%;
        padding: 0.875rem 1.5rem;
        font-size: 0.75rem;
    }
    .hero-content .container { padding: 0 1.25rem; }
    .hero-dots { bottom: 1.25rem; }
}

/* --- Tablet (768px - 1024px) Specific Tuning --- */
@media (min-width: 768px) and (max-width: 1024px) {
    :root {
        --header-h: 72px;
        --announcement-h: 38px;
    }
    .nav-menu { gap: 1.75rem; }
    .nav-menu > li > a { font-size: 0.75rem; letter-spacing: 0.1em; }
    .header-icon-btn { width: 40px; height: 40px; }
    .hero-slider { height: clamp(520px, 75vh, 700px); }
    .hero-title { font-size: clamp(2.5rem, 6vw, 4rem); }
    .trust-grid { gap: 1.5rem; }
    .footer-grid { gap: 2rem; }
    .products-grid { gap: 1.25rem; }
    .flash-sale-grid { gap: 1.25rem; }
    .categories-grid { gap: 1.25rem; }
    .blog-grid { gap: 1.5rem; }
}

/* --- Desktop (1025px+) Specific Tuning --- */
@media (min-width: 1025px) {
    .header-container {
        grid-template-columns: 1fr auto 1fr;
        gap: 2rem;
    }
    .nav-menu { gap: 2.5rem; }
}

/* --- Large Desktop (1440px+) --- */
@media (min-width: 1440px) {
    :root {
        --header-h: 88px;
    }
    .container { max-width: 1440px; }
    .hero-slider { height: clamp(600px, 82vh, 800px); }
    .hero-title { font-size: clamp(3rem, 5.5vw, 5rem); }
    .section { padding: var(--space-3xl) 0; }
}

/* --- Mobile-only: better tap highlights and font size --- */
@media (max-width: 480px) {
    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    body { font-size: 14px; }
    /* Prevent iOS auto-zoom on input focus */
    input, textarea, select { font-size: 16px; }
    .container { padding: 0 1rem; }
    .section { padding: var(--space-lg) 0; }
    .section-header { margin-bottom: var(--space-lg); }
    .section-title { font-size: clamp(1.625rem, 7vw, 2rem); margin-bottom: 0.5rem; }
    .section-desc { font-size: 0.9375rem; }
    .section-eyebrow { font-size: 0.6875rem; letter-spacing: 0.15em; }
    .section-eyebrow::before, .section-eyebrow::after { width: 20px; }

    /* Trust badges: stack into 2 cols on small mobile */
    .trust-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .trust-item {
        padding: 0.5rem;
        gap: 0.875rem;
    }
    .trust-item h3 { font-size: 0.875rem; }
    .trust-item p { font-size: 0.75rem; line-height: 1.4; }
    .trust-icon { width: 40px; height: 40px; }

    /* Footer adjustments */
    .footer-grid { gap: 1.75rem; }
    .footer-newsletter { padding: var(--space-lg) 0; }
    .newsletter-inner h2 { font-size: clamp(1.5rem, 6vw, 2rem); }
    .newsletter-form {
        flex-direction: column;
        border-radius: var(--radius);
        padding: 0.5rem;
    }
    .newsletter-form input { text-align: center; padding: 0.625rem 1rem; }
    .newsletter-form .btn-primary { width: 100%; padding: 0.75rem; }

    /* Buttons: full-width on very small screens for primary CTAs */
    .hero-actions .btn,
    .newsletter-form .btn,
    .mobile-menu-footer .btn { width: 100%; }

    /* Categories: 2 cols on small mobile (was 1) */
    .categories-grid { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
    .category-card { aspect-ratio: 1/1.1; }
    .category-info { padding: 1rem; }
    .category-info h3 { font-size: 1rem; }
    .category-info p { font-size: 0.6875rem; }
    .category-card::after { width: 36px; height: 36px; top: 0.75rem; right: 0.75rem; font-size: 0.9375rem; }

    /* Instagram: 3 cols on mobile */
    .instagram-grid { grid-template-columns: repeat(3, 1fr); gap: 0.375rem; }

    /* FAQ: smaller text */
    .faq-item summary { font-size: 1rem; padding: 1.125rem 0; }
    .faq-item p { font-size: 0.9375rem; line-height: 1.65; }

    /* Testimonials */
    .testimonial-card { padding: 1.5rem; }
    .testimonial-text { font-size: 1rem; }
    .testimonial-card::before { font-size: 3.5rem; }

    /* About section */
    .about-grid { gap: 2rem; }
    .about-text p { font-size: 1rem; line-height: 1.7; }
    .about-stats { gap: 1rem; margin: 1.5rem 0; padding: 1.5rem 0; }
    .about-stats strong { font-size: 1.5rem; }
    .about-stats span { font-size: 0.6875rem; letter-spacing: 0.1em; }
    .about-image { aspect-ratio: 4/4; }

    /* CTA section */
    .cta-section h2 { font-size: clamp(1.875rem, 7vw, 2.5rem); }
    .cta-section p { font-size: 1rem; }

    /* Sticky add to cart */
    .sticky-add-to-cart .container { gap: 0.75rem; }
    .sticky-atc-left img { width: 48px; height: 60px; }
    .sticky-atc-left h4 { font-size: 0.875rem; }
    .sticky-atc-left .price { font-size: 0.875rem; }
    .sticky-atc-right .btn { padding: 0.625rem 1.25rem; font-size: 0.6875rem; }

    /* WhatsApp & Back to top: smaller on small screens */
    .whatsapp-float, .back-to-top {
        width: 44px;
        height: 44px;
        bottom: 0.75rem;
    }
    .whatsapp-float svg, .back-to-top svg { width: 22px; height: 22px; }
    .whatsapp-float { right: 0.75rem; }
    .back-to-top { left: 0.75rem; }

    /* Quick view modal */
    .quick-view-modal { padding: 0; }
    .qv-modal-content { max-height: 100vh; height: 100vh; border-radius: 0; }
    .quick-view-content { grid-template-columns: 1fr; max-height: 100vh; overflow-y: auto; }
    .qv-image img { max-height: 50vh; }
    .qv-info { padding: 1.5rem; }
    .qv-info h2 { font-size: 1.5rem; }
    .qv-price { font-size: 1.25rem; }

    /* Mini cart: full screen on mobile */
    .mini-cart-widget { max-width: 100%; }
    .mini-cart-header { padding: 1.125rem; }
    .mini-cart-items { padding: 0.875rem 1.125rem; }
    .mini-cart-footer { padding: 1.125rem; }
    .mini-cart-item { grid-template-columns: 64px 1fr; gap: 0.75rem; }
    .mini-cart-item-image img { width: 64px; height: 80px; }
    .mini-cart-total strong { font-size: 1.25rem; }
    .mini-cart-buttons { grid-template-columns: 1fr; gap: 0.5rem; }

    /* Search overlay */
    .search-overlay { padding: 1.25rem 0; }
    #ajaxSearchInput { font-size: 1.25rem; }
    .search-result-item { padding: 0.75rem; gap: 0.75rem; }
    .search-result-item img { width: 56px; height: 70px; }

    /* Pagination */
    .redbox-pagination a, .redbox-pagination span {
        width: 40px;
        height: 40px;
        font-size: 0.8125rem;
    }

    /* 404 page */
    .error-404-title { font-size: clamp(2.5rem, 12vw, 4rem); }
    .error-404-actions { flex-direction: column; }
    .error-404-actions .btn { width: 100%; }

    /* Blog layout */
    .blog-grid { grid-template-columns: 1fr; gap: 1.5rem; }
    .blog-card-info { padding: 1.25rem; }
    .blog-card-info h2 { font-size: 1.25rem; }
    .blog-card-info > p { font-size: 0.875rem; -webkit-line-clamp: 2; }

    /* Single post */
    .single-post-title { font-size: clamp(1.625rem, 7vw, 2.25rem); }
    .single-post-meta { font-size: 0.75rem; flex-wrap: wrap; justify-content: center; }
    .single-post-featured { aspect-ratio: 4/3; }
    .single-post-content p { font-size: 1rem; line-height: 1.75; }
    .single-post-content blockquote { padding: 1.25rem; font-size: 1.0625rem; }

    /* Page */
    .page-title { font-size: clamp(1.625rem, 7vw, 2.5rem); }
    .page-body p { font-size: 1rem; line-height: 1.75; }

    /* Header */
    .header-logo .logo-brand { font-size: 1.25rem; }
    .header-logo .logo-sub { font-size: 0.5625rem; }
    .header-icon-btn { width: 40px; height: 40px; }
    .header-icon-btn svg { width: 18px; height: 18px; }
    .cart-count {
        min-width: 16px;
        height: 16px;
        font-size: 0.5625rem;
        top: 2px;
        right: 2px;
    }

    /* Announcement bar */
    .announcement-marquee {
        font-size: 0.6875rem;
        letter-spacing: 0.1em;
        gap: 2rem;
        padding-left: 2rem;
    }

    /* Mobile menu panel */
    .mobile-menu-panel { max-width: 100%; }
    .mobile-nav-list li a { padding: 1rem 0; font-size: 1rem; }
}

/* --- Very small mobile (<=360px) --- */
@media (max-width: 360px) {
    body { font-size: 13px; }
    .container { padding: 0 0.875rem; }
    .hero-title { font-size: 1.625rem; }
    .section-title { font-size: 1.5rem; }
    .header-logo .logo-brand { font-size: 1.125rem; }
    .header-actions { gap: 0.125rem; }
    .header-icon-btn { width: 36px; height: 36px; min-width: 36px; min-height: 36px; }
    .header-icon-btn svg { width: 16px; height: 16px; }
    .categories-grid { gap: 0.5rem; }
    .instagram-grid { gap: 0.25rem; }
    .footer-grid { gap: 1.5rem; }
    .trust-grid { gap: 1rem; }
    .trust-item { gap: 0.625rem; padding: 0.375rem; }
    .trust-icon { width: 36px; height: 36px; }
}

/* --- Landscape Mobile (height < 500px) --- */
@media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    .hero-slider {
        height: 100vh;
        min-height: 360px;
    }
    .hero-title { font-size: 2rem; margin-bottom: 0.5rem; }
    .hero-subtitle { font-size: 0.875rem; margin-bottom: 1rem; -webkit-line-clamp: 2; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
    .hero-actions { flex-direction: row; flex-wrap: wrap; }
    .hero-actions .btn { width: auto; flex: 1; min-width: 180px; padding: 0.625rem 1.25rem; }
    .hero-dots { bottom: 0.5rem; }
    .mobile-menu-panel {
        max-width: 100%;
        max-height: 100vh;
    }
    .mobile-nav-list li a { padding: 0.75rem 0; font-size: 0.9375rem; }
    .quick-view-modal { padding: 0; }
    .qv-modal-content { max-height: 100vh; }
}

/* --- Print Styles --- */
@media print {
    .announcement-bar,
    .site-header,
    .mobile-menu-overlay,
    .mobile-menu-toggle,
    .search-overlay,
    .whatsapp-float,
    .back-to-top,
    .sticky-add-to-cart,
    .footer-newsletter,
    .footer-social,
    .quick-view-modal,
    .mini-cart-widget,
    .hero-dots,
    .cart-btn,
    .header-icon-btn,
    .quick-view-btn,
    .wishlist-toggle,
    .btn-add-cart,
    .newsletter-form,
    .ig-tile {
        display: none !important;
    }
    body {
        background: #fff;
        color: #000;
        font-size: 11pt;
        line-height: 1.5;
    }
    .container { max-width: 100%; padding: 0; }
    .site-content { padding: 0 !important; }
    .section { padding: 1rem 0 !important; page-break-inside: avoid; }
    .hero-slider {
        height: auto;
        max-height: 200px;
        background: #f0f0f0 !important;
    }
    .hero-slide { position: relative; opacity: 1; }
    .hero-overlay { background: rgba(255,255,255,0.7) !important; }
    .hero-title, .hero-subtitle { color: #000; text-shadow: none; }
    .hero-actions { display: none; }
    .product-card, .flash-sale-card, .blog-card, .testimonial-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    .products-grid, .flash-sale-grid, .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.5rem;
    }
    .categories-grid, .instagram-grid, .testimonials-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    a { color: #000; text-decoration: underline; }
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555;
    }
    a[href^="#"]:after, a[href^="javascript:"]:after { content: ""; }
    img { max-width: 100% !important; page-break-inside: avoid; }
    .site-footer {
        background: #fff !important;
        color: #000 !important;
        border-top: 2px solid #000;
    }
    .footer-main, .footer-bottom { padding: 1rem 0; }
    .footer-logo .logo-brand, .footer-widget-title, .footer-links a, .footer-contact p, .footer-bottom p {
        color: #000 !important;
    }
    .footer-grid { grid-template-columns: 1fr 1fr !important; gap: 1rem; }
}

/* --- Reduce motion preference --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .announcement-marquee { animation: none; }
    .whatsapp-float { animation: none; }
    .fade-in-up { opacity: 1; transform: none; }
    .hero-slide { transition: opacity 0.1s linear; }
}

/* --- High contrast mode (Windows) --- */
@media (forced-colors: active) {
    .btn, .product-card, .flash-sale-card, .blog-card, .testimonial-card,
    .mini-cart-widget, .qv-modal-content, .mobile-menu-panel {
        border: 1px solid ButtonText;
    }
    .header-icon-btn, .quick-view-btn, .wishlist-toggle {
        border: 1px solid ButtonText;
    }
    svg { color: ButtonText; }
}

/* --- Hover-only effects (desktop with mouse) --- */
@media (hover: hover) and (pointer: fine) {
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
    .product-card:hover .product-card-img { transform: scale(1.06); }
    .product-card:hover .quick-view-btn {
        transform: translateY(0);
        opacity: 1;
    }
}

/* --- Better focus styles for accessibility --- */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 2px;
}
.btn:focus-visible,
.header-icon-btn:focus-visible,
.mobile-menu-toggle:focus-visible,
.hero-dot:focus-visible,
.search-close:focus-visible,
.qv-close:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 10000;
    background: var(--color-secondary);
    color: #fff;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: top 0.2s var(--ease-out);
}
.skip-link:focus {
    top: 1rem;
    color: #fff;
}

/* --- Scrollbar styling (desktop) --- */
@media (min-width: 1025px) {
    ::-webkit-scrollbar {
        width: 12px;
        height: 12px;
    }
    ::-webkit-scrollbar-track {
        background: var(--color-bg-warm);
    }
    ::-webkit-scrollbar-thumb {
        background: var(--color-border);
        border-radius: var(--radius-full);
        border: 3px solid var(--color-bg-warm);
    }
    ::-webkit-scrollbar-thumb:hover {
        background: var(--color-muted);
    }
    * {
        scrollbar-width: thin;
        scrollbar-color: var(--color-border) var(--color-bg-warm);
    }
}

/* --- Image rendering optimization --- */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
.product-card-img,
.fs-image img,
.category-image img,
.blog-card-image img {
    image-rendering: auto;
}

/* --- Better spacing for content sections on mobile --- */
@media (max-width: 768px) {
    .featured-categories,
    .flash-sale-section,
    .product-section,
    .testimonials-section,
    .instagram-section,
    .faq-section,
    .cta-section,
    .home-about {
        padding: var(--space-xl) 0;
    }
    .home-about { padding: var(--space-xl) 0; }
    .cta-section { padding: var(--space-2xl) 0; }
    .flash-sale-section .section-header,
    .product-section .section-header,
    .featured-categories .section-header,
    .testimonials-section .section-header,
    .instagram-section .section-header,
    .faq-section .section-header {
        margin-bottom: var(--space-lg);
    }
}

/* --- Better grid behavior for product grids --- */
@media (max-width: 1024px) and (min-width: 769px) {
    .products-grid,
    .flash-sale-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 768px) and (min-width: 481px) {
    .products-grid,
    .flash-sale-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}
@media (max-width: 480px) {
    .products-grid,
    .flash-sale-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    .product-card-info { padding: 0.75rem 0.625rem 0.875rem; }
    .product-category { font-size: 0.5625rem; }
    .product-card-title { font-size: 0.8125rem; }
    .product-price { font-size: 0.875rem; }
    .btn-add-cart { padding: 0.5rem 0.5rem; font-size: 0.5625rem; letter-spacing: 0.08em; }
    .product-badge { font-size: 0.5625rem; padding: 0.25rem 0.5rem; top: 0.5rem; left: 0.5rem; }
    .quick-view-btn {
        font-size: 0.5625rem;
        padding: 0.5rem;
        top: auto;
        bottom: 0.5rem;
        left: 0.5rem;
        right: 0.5rem;
        width: calc(100% - 1rem);
    }
    .wishlist-toggle { top: 0.5rem; right: 0.5rem; width: 32px; height: 32px; }
    .wishlist-toggle svg { width: 16px; height: 16px; }
    .fs-image { aspect-ratio: 1/1.15; }
    .fs-info { padding: 0.75rem 0.625rem 0.875rem; }
    .fs-title { font-size: 0.8125rem; }
    .fs-sale { font-size: 0.9375rem; }
    .fs-regular { font-size: 0.75rem; }
    .fs-badge { font-size: 0.625rem; padding: 0.25rem 0.5rem; top: 0.5rem; left: 0.5rem; }
}

/* --- Fix: hero parallax shouldn't break on mobile --- */
@media (max-width: 768px) {
    .hero-slide {
        background-attachment: scroll !important;
    }
}

/* --- Better mobile menu animation --- */
.mobile-menu-panel {
    transition: transform 0.35s var(--ease-out);
    will-change: transform;
}
.mini-cart-widget {
    transition: transform 0.35s var(--ease-out);
    will-change: transform;
}
.search-overlay {
    transition: all 0.3s var(--ease-out);
}

/* --- Sticky header: better mobile behavior --- */
.site-header {
    transition: box-shadow 0.3s var(--ease-out), background 0.3s var(--ease-out), transform 0.35s var(--ease-out);
    will-change: transform;
}
.site-header.scrolled {
    background: rgba(255,255,255,0.98);
    box-shadow: var(--shadow-sm);
}
.site-header.hide {
    transform: translateY(-100%);
}
@media (max-width: 768px) {
    .site-header {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
    /* Announcement bar collapses on small mobile to save space */
    .announcement-bar {
        height: auto;
        min-height: var(--announcement-h);
        padding: 0.375rem 0;
    }
    .announcement-marquee {
        font-size: 0.6875rem;
        animation-duration: 35s;
    }
}

/* --- Better mobile nav: scrollable horizontal nav as fallback --- */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Tablet: show condensed nav if items fit */
    .header-nav { display: flex; }
    .nav-menu { gap: 1.5rem; }
    .nav-menu > li > a { font-size: 0.6875rem; letter-spacing: 0.08em; }
    .mobile-menu-toggle { display: none; }
    .header-container { grid-template-columns: auto 1fr auto; }
}

/* --- Better touch behavior: disable 300ms tap delay --- */
@media (hover: none) and (pointer: coarse) {
    a, button, input, select, textarea {
        touch-action: manipulation;
    }
}

/* --- Better form input sizing on mobile (prevent zoom) --- */
@media (max-width: 768px) {
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    textarea,
    select {
        font-size: 16px;
    }
    #ajaxSearchInput { font-size: 1.125rem; }
}

/* --- Better tablet product image aspect ratio --- */
@media (min-width: 481px) and (max-width: 1024px) {
    .product-card-image { aspect-ratio: 4/5; }
    .fs-image { aspect-ratio: 4/5; }
    .category-card { aspect-ratio: 4/4.5; }
}

/* --- RTL Support (basic) --- */
[dir="rtl"] .announcement-marquee { animation-direction: reverse; }
[dir="rtl"] .mobile-menu-panel { right: auto; left: 0; transform: translateX(-100%); }
[dir="rtl"] .mobile-menu-overlay.active .mobile-menu-panel { transform: translateX(0); }
[dir="rtl"] .mini-cart-widget { right: auto; left: 0; transform: translateX(-100%); }
[dir="rtl"] .mini-cart-widget.active { transform: translateX(0); }
[dir="rtl"] .whatsapp-float { right: auto; left: 1rem; }
[dir="rtl"] .back-to-top { left: auto; right: 1rem; }

/* --- Loading state for images (placeholder) --- */
.product-card-image,
.fs-image,
.category-image,
.blog-card-image,
.about-image,
.qv-image,
.mini-cart-item-image {
    background: linear-gradient(110deg, var(--color-bg-warm) 30%, var(--color-border-soft) 50%, var(--color-bg-warm) 70%);
    background-size: 200% 100%;
    animation: shimmer 1.6s linear infinite;
}
.product-card-image:has(img.loaded),
.product-card-image:has(img:not([src=""]) ) {
    animation: none;
    background: var(--color-bg-warm);
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- Better mobile sticky add to cart --- */
@media (max-width: 768px) {
    .sticky-add-to-cart {
        padding: 0.625rem 0;
    }
    .sticky-add-to-cart .container {
        flex-direction: row;
        gap: 0.75rem;
    }
    .sticky-atc-left {
        flex: 1;
        min-width: 0;
    }
    .sticky-atc-left h4 {
        font-size: 0.8125rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sticky-atc-left .price { font-size: 0.875rem; }
    .sticky-atc-left img { width: 44px; height: 56px; }
    .sticky-atc-right .btn {
        padding: 0.625rem 1rem;
        font-size: 0.6875rem;
        white-space: nowrap;
    }
}

/* --- Better WC product gallery on mobile --- */
@media (max-width: 768px) {
    .woocommerce div.product div.images,
    .woocommerce div.product div.summary {
        width: 100% !important;
        float: none !important;
        max-width: 100% !important;
    }
    .woocommerce div.product div.images {
        margin-bottom: 1.5rem;
    }
    .woocommerce div.product div.images .flex-control-thumbs li {
        width: 64px;
    }
    .woocommerce div.product div.images .flex-control-thumbs img {
        width: 64px;
        height: 80px;
        object-fit: cover;
    }
    .woocommerce div.product .product_title {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    .woocommerce div.product p.price,
    .woocommerce div.product span.price {
        font-size: 1.5rem;
    }
    .woocommerce div.product form.cart {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .woocommerce div.product form.cart .quantity {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .woocommerce .quantity .qty {
        width: 100%;
        flex: 1;
    }
    .woocommerce div.product form.cart .button {
        width: 100%;
        min-width: unset;
    }
}

/* --- Better WC cart page on mobile --- */
@media (max-width: 768px) {
    .woocommerce table.shop_table_responsive tr td {
        padding: 0.875rem 0.75rem;
    }
    .woocommerce table.shop_table_responsive tr td::before {
        font-size: 0.625rem;
        letter-spacing: 0.12em;
        margin-bottom: 0.25rem;
    }
    .woocommerce table.cart .product-thumbnail {
        width: 64px;
    }
    .woocommerce table.cart .product-thumbnail img {
        width: 64px;
        height: 80px;
    }
    .woocommerce .cart-collaterals .cart_totals {
        padding: 1.25rem;
    }
    .woocommerce .coupon {
        flex-direction: column;
        gap: 0.5rem;
    }
    .woocommerce .coupon input {
        width: 100%;
        min-width: 0;
    }
    .woocommerce .coupon button {
        width: 100%;
    }
}

/* --- Better WC checkout on mobile --- */
@media (max-width: 768px) {
    .woocommerce .checkout .col2-set {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .woocommerce form .form-row input.input-text,
    .woocommerce form .form-row textarea,
    .woocommerce form .form-row select {
        font-size: 16px;
        padding: 0.75rem 0.875rem;
    }
    .woocommerce-checkout-review-order {
        padding: 1.25rem;
    }
    #place_order {
        padding: 1rem;
        font-size: 0.8125rem;
    }
}

/* --- Better WC my account on mobile --- */
@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce-account .woocommerce-MyAccount-content {
        width: 100%;
        float: none;
    }
    .woocommerce-MyAccount-navigation {
        margin-bottom: 1.5rem;
    }
    .woocommerce-MyAccount-navigation ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .woocommerce-MyAccount-navigation li {
        border-bottom: none;
        flex: 1 1 auto;
    }
    .woocommerce-MyAccount-navigation li a {
        padding: 0.625rem 0.875rem;
        font-size: 0.75rem;
        text-align: center;
    }
}

/* --- Better WC notices on mobile --- */
@media (max-width: 768px) {
    .woocommerce-message,
    .woocommerce-info,
    .woocommerce-error {
        padding: 0.875rem 1rem;
        font-size: 0.875rem;
        flex-wrap: wrap;
    }
    .woocommerce-message a.button,
    .woocommerce-info a.button {
        float: none;
        margin-left: 0;
        margin-top: 0.5rem;
        width: 100%;
    }
}

/* --- Better pagination on mobile --- */
@media (max-width: 768px) {
    .redbox-pagination ul {
        gap: 0.25rem;
        padding: 1.5rem 0;
        flex-wrap: wrap;
        justify-content: center;
    }
    .redbox-pagination a, .redbox-pagination span {
        width: 40px;
        height: 40px;
        font-size: 0.8125rem;
    }
}

/* --- Free shipping notice mobile --- */
@media (max-width: 768px) {
    .free-shipping-notice {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        margin-bottom: 1rem;
    }
}

/* --- Order tracking CTA mobile --- */
@media (max-width: 768px) {
    .order-tracking-cta {
        padding: 1.5rem;
    }
    .order-tracking-cta h3 { font-size: 1.25rem; }
    .order-number-box {
        padding: 0.75rem 1.25rem;
    }
    .order-number-box strong { font-size: 1.25rem; }
}

/* --- Better 404 page on mobile --- */
@media (max-width: 768px) {
    .error-404 {
        min-height: 50vh;
        padding: var(--space-2xl) 0;
    }
    .error-404-eyebrow { font-size: 0.6875rem; }
    .error-404-desc { font-size: 1rem; }
    .error-404-actions .btn { width: 100%; }
}

/* --- Better search page on mobile --- */
@media (max-width: 768px) {
    .search-header h1 { font-size: clamp(1.5rem, 6vw, 2rem); }
    .redbox-search-form {
        flex-direction: column;
        gap: 0.5rem;
    }
    .redbox-search-form .btn { width: 100%; }
}

/* --- Better archive page on mobile --- */
@media (max-width: 768px) {
    .archive-title { font-size: clamp(1.625rem, 7vw, 2.25rem); }
    .archive-header { padding: var(--space-lg) 0 var(--space-md); }
}

/* --- Better comments on mobile --- */
@media (max-width: 768px) {
    .comment-list .children { padding-left: 1rem; }
    .comment-list .comment { padding: 1rem; }
    .comment-meta { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .comment-respond { padding: 1.25rem; }
}

/* --- Better widget areas on mobile --- */
@media (max-width: 768px) {
    .blog-sidebar .widget,
    .shop-sidebar-wrap .widget {
        padding: 1.25rem;
        margin-bottom: 1.25rem;
    }
}

/* --- Footer bottom mobile --- */
@media (max-width: 768px) {
    .footer-main { padding: var(--space-xl) 0; }
    .footer-bottom .container {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    .footer-bottom p { font-size: 0.75rem; }
}

/* --- Container maximums for very wide screens --- */
@media (min-width: 1920px) {
    :root {
        --container: 1600px;
    }
}

/* --- Better images: prevent layout shift --- */
img {
    max-width: 100%;
    height: auto;
}
.product-card-img,
.fs-image img,
.category-image img,
.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Better focus visible on dark backgrounds --- */
.hero-content :focus-visible,
.cta-section :focus-visible,
.flash-sale-section :focus-visible,
.site-footer :focus-visible {
    outline-color: #fff;
}

/* --- Better WC product loop on mobile --- */
@media (max-width: 480px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.625rem;
    }
    .woocommerce ul.products li.product .woocommerce-loop-product__title {
        font-size: 0.8125rem;
        padding: 0.5rem 0.625rem 0;
    }
    .woocommerce ul.products li.product .price {
        font-size: 0.875rem;
        padding: 0.125rem 0.625rem 0.625rem;
    }
    .woocommerce ul.products li.product .button {
        margin: 0 0.625rem 0.75rem;
        padding: 0.5rem 0.5rem;
        font-size: 0.5625rem;
        letter-spacing: 0.08em;
    }
    .woocommerce ul.products li.product .onsale {
        font-size: 0.5625rem;
        padding: 0.25rem 0.5rem;
        top: 0.5rem;
        left: 0.5rem;
    }
    .woocommerce ul.products li.product img {
        aspect-ratio: 1/1.15;
    }
}

/* --- Tablet WC product grid (3 cols) --- */
@media (min-width: 481px) and (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* --- Desktop WC product grid (4 cols) --- */
@media (min-width: 1025px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
}

/* --- iOS Safari quirks --- */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari 100vh fix */
    .hero-slider {
        height: 100svh;
        min-height: 480px;
        max-height: 800px;
    }
    .hero-slider, .mobile-menu-panel, .mini-cart-widget {
        height: 100svh;
    }
    /* Prevent iOS input zoom */
    input, textarea, select {
        font-size: 16px;
    }
    /* Fix sticky positioning on iOS */
    .site-header {
        position: sticky;
        top: 0;
        -webkit-position: sticky;
    }
    /* Fix 100% height modals on iOS */
    .quick-view-modal {
        position: fixed;
        inset: 0;
        -webkit-overflow-scrolling: touch;
    }
}

/* --- Use svh/lvh units for modern browsers (better mobile viewport) --- */
@supports (height: 100svh) {
    .hero-slider {
        height: clamp(460px, 75svh, 800px);
    }
    .mobile-menu-overlay,
    .quick-view-modal {
        height: 100svh;
    }
    .mobile-menu-panel,
    .mini-cart-widget {
        max-height: 100svh;
    }
}

/* --- Better body scroll lock when overlays are open --- */
body:has(.mobile-menu-overlay.active),
body:has(.quick-view-modal.active),
body:has(.mini-cart-widget.active) {
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

/* Fallback for browsers without :has() */
body.menu-open,
body.modal-open,
body.cart-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
}

/* --- Better image loading: blur-up placeholder --- */
img {
    background: var(--color-bg-warm);
}
img[data-src],
img.lazyloading {
    opacity: 0;
    transition: opacity 0.4s var(--ease-out);
}
img.lazyloaded,
img[src]:not([src=""]) {
    opacity: 1;
}

/* --- Better WC notices positioning on mobile --- */
@media (max-width: 768px) {
    .woocommerce-notices-wrapper {
        margin: 0 -1rem 1rem;
    }
    .woocommerce-notices-wrapper > * {
        margin-left: 1rem;
        margin-right: 1rem;
    }
}

/* --- Sticky add to cart: hide on very small screens to save space --- */
@media (max-width: 380px) {
    .sticky-add-to-cart .sticky-atc-left h4 {
        font-size: 0.75rem;
    }
    .sticky-add-to-cart .sticky-atc-left .price {
        font-size: 0.8125rem;
    }
    .sticky-add-to-cart .sticky-atc-left img {
        width: 40px;
        height: 50px;
    }
}

/* --- Newsletter form: stack on tablet --- */
@media (max-width: 768px) and (min-width: 481px) {
    .newsletter-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    .newsletter-inner > div:first-child { text-align: center; }
    .newsletter-form { max-width: 480px; margin: 0 auto; }
}

/* --- Better product tabs on mobile --- */
@media (max-width: 768px) {
    .woocommerce div.product .woocommerce-tabs ul.tabs {
        display: flex;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        white-space: nowrap;
        gap: 0;
        margin: 0 -1rem 1.5rem;
        padding: 0 1rem;
    }
    .woocommerce div.product .woocommerce-tabs ul.tabs::-webkit-scrollbar {
        display: none;
    }
    .woocommerce div.product .woocommerce-tabs ul.tabs li {
        margin: 0 1rem -1px 0;
        flex-shrink: 0;
    }
    .woocommerce div.product .woocommerce-tabs ul.tabs li a {
        padding: 0.875rem 0;
        font-size: 0.75rem;
    }
    .woocommerce div.product .woocommerce-tabs .panel h2 {
        font-size: 1.25rem;
    }
}

/* --- Better WC review form on mobile --- */
@media (max-width: 768px) {
    #review_form_wrapper {
        margin-top: 2rem;
    }
    #review_form_wrapper .comment-form input,
    #review_form_wrapper .comment-form textarea {
        font-size: 16px;
    }
}

/* --- Better product meta on mobile --- */
@media (max-width: 768px) {
    .woocommerce div.product .product_meta {
        font-size: 0.75rem;
        padding-top: 1rem;
        margin-top: 1.5rem;
    }
    .woocommerce div.product .product_meta span {
        margin-bottom: 0.375rem;
    }
}

/* --- Better related/upsell products on mobile --- */
@media (max-width: 768px) {
    .woocommerce .related.products,
    .woocommerce .upsells.products {
        margin-top: var(--space-xl);
        padding-top: var(--space-xl);
    }
    .woocommerce .related.products > h2,
    .woocommerce .upsells.products > h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: var(--space-md);
    }
}

/* --- Better mobile breadcrumb --- */
@media (max-width: 768px) {
    .redbox-breadcrumb .woocommerce-breadcrumb {
        font-size: 0.6875rem;
        letter-spacing: 0.05em;
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.25rem;
    }
}

/* --- Better shop toolbar on mobile --- */
@media (max-width: 768px) {
    .shop-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    .shop-toolbar-left,
    .shop-toolbar-right {
        text-align: center;
        display: flex;
        justify-content: center;
    }
    .woocommerce-ordering {
        width: 100%;
        max-width: 320px;
    }
    .woocommerce-ordering select {
        width: 100%;
    }
}

/* --- Better WC products header on mobile --- */
@media (max-width: 768px) {
    .woocommerce-products-header {
        padding: var(--space-lg) 0 var(--space-md);
    }
    .woocommerce-products-header h1 {
        font-size: clamp(1.875rem, 7vw, 2.5rem);
    }
    .woocommerce-products-header .term-description {
        font-size: 1rem;
    }
}

/* --- WC wrapper mobile spacing --- */
@media (max-width: 768px) {
    .woocommerce-wrapper {
        padding: var(--space-md) 0 var(--space-2xl);
    }
}

/* --- Better single product gallery thumbnails on mobile --- */
@media (max-width: 768px) {
    .woocommerce div.product div.images .flex-control-thumbs {
        gap: 0.5rem;
    }
    .woocommerce div.product div.images .flex-control-thumbs li {
        width: 56px;
    }
    .woocommerce div.product div.images .flex-control-thumbs img {
        width: 56px;
        height: 70px;
    }
}

/* --- WC quantity input on mobile --- */
@media (max-width: 768px) {
    .woocommerce .quantity .qty {
        height: 48px;
        font-size: 1rem;
    }
}

/* --- WC store notice mobile --- */
@media (max-width: 768px) {
    .woocommerce-store-notice, p.demo_store {
        padding: 0.625rem 1rem;
        font-size: 0.75rem;
        padding-bottom: calc(0.625rem + env(safe-area-inset-bottom));
    }
}

/* --- Better mobile hero slide content alignment --- */
@media (max-width: 768px) {
    .hero-content {
        padding: 0;
    }
    .hero-content .container {
        padding: 0 1.25rem;
    }
}

/* --- Fix: hero slide image background scaling on mobile --- */
@media (max-width: 768px) {
    .hero-slide {
        background-size: cover;
        background-position: center top;
    }
}

/* --- WC checkout: better review order table on mobile --- */
@media (max-width: 768px) {
    .woocommerce-checkout-review-order-table {
        font-size: 0.875rem;
    }
    .woocommerce-checkout-review-order-table th,
    .woocommerce-checkout-review-order-table td {
        padding: 0.625rem 0.5rem !important;
    }
    .woocommerce-checkout-review-order-table .product-name {
        font-size: 0.8125rem;
    }
    .woocommerce-checkout-review-order-table .product-total {
        font-size: 0.8125rem;
    }
}

/* --- WC login form on mobile --- */
@media (max-width: 768px) {
    .woocommerce form.login,
    .woocommerce form.register {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    .woocommerce form.login h2,
    .woocommerce form.register h2 {
        font-size: 1.5rem;
    }
}

/* --- Better mobile account navigation --- */
@media (max-width: 768px) {
    .woocommerce-account .woocommerce-MyAccount-content h2,
    .woocommerce-account .woocommerce-MyAccount-content h3 {
        font-size: 1.25rem;
    }
}

/* --- Disable hover effects on coarse pointer devices completely --- */
@media (pointer: coarse) {
    .nav-menu > li:hover .mega-menu-panel {
        opacity: 0;
        visibility: hidden;
    }
    /* On touch devices, mega menu opens via tap (handled by JS if needed) */
}

/* --- Better mobile FAQ accordion --- */
@media (max-width: 768px) {
    .faq-item summary {
        font-size: 1rem;
        padding: 1.125rem 0;
        line-height: 1.4;
    }
    .faq-item summary::after {
        font-size: 1.25rem;
    }
    .faq-item p {
        font-size: 0.9375rem;
        line-height: 1.65;
        padding-bottom: 1.25rem;
    }
}

/* --- Better mobile testimonial layout --- */
@media (max-width: 768px) {
    .testimonials-grid {
        gap: 1.25rem;
    }
    .testimonial-card {
        padding: 1.5rem;
    }
    .testimonial-text {
        font-size: 1rem;
        line-height: 1.65;
    }
}

/* --- Better mobile CTA section --- */
@media (max-width: 768px) {
    .cta-section {
        padding: var(--space-2xl) 0;
    }
    .cta-section h2 {
        font-size: clamp(1.875rem, 7vw, 2.5rem);
        line-height: 1.1;
        margin-bottom: 0.875rem;
    }
    .cta-section p {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
}

/* --- Better mobile Instagram section --- */
@media (max-width: 768px) {
    .instagram-section .section-header a.ig-handle {
        font-size: 0.8125rem;
    }
}

/* --- Better mobile about section --- */
@media (max-width: 768px) {
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
    }
    .about-stats strong {
        font-size: 1.5rem;
    }
    .about-stats span {
        font-size: 0.625rem;
        letter-spacing: 0.08em;
    }
}

/* --- Tablet footer: 2 cols --- */
@media (min-width: 641px) and (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .footer-brand {
        grid-column: 1 / -1;
    }
}

/* --- Desktop footer: 5 cols --- */
@media (min-width: 1025px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr;
        gap: 3rem;
    }
}

/* --- Very wide desktop optimization --- */
@media (min-width: 1920px) {
    .hero-slider {
        height: clamp(700px, 85vh, 900px);
    }
    .hero-title {
        font-size: clamp(3.5rem, 5vw, 6rem);
    }
    .section {
        padding: var(--space-3xl) 0;
    }
    .products-grid,
    .flash-sale-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

/* --- Fix: prevent horizontal scroll on mobile --- */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden;
        max-width: 100%;
    }
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }
    img, video, iframe {
        max-width: 100%;
    }
    table {
        max-width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    pre {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: pre;
    }
}

/* --- Better mobile mini-cart: full width with sliding animation --- */
@media (max-width: 480px) {
    .mini-cart-widget {
        max-width: 100%;
        width: 100%;
    }
    .mini-cart-header h3 {
        font-size: 1.25rem;
    }
    .mini-cart-item {
        grid-template-columns: 56px 1fr;
        gap: 0.625rem;
        padding: 0.75rem 0;
    }
    .mini-cart-item-image img {
        width: 56px;
        height: 70px;
    }
    .mini-cart-item-name {
        font-size: 0.875rem;
        -webkit-line-clamp: 2;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .mini-cart-total strong {
        font-size: 1.25rem;
    }
}

/* --- Better mobile search results --- */
@media (max-width: 480px) {
    .search-results {
        max-height: 60vh;
    }
    .search-result-item {
        padding: 0.625rem;
    }
    .search-result-item img {
        width: 48px;
        height: 60px;
    }
    .search-result-item-title {
        font-size: 0.875rem;
    }
    .search-result-item-price {
        font-size: 0.8125rem;
    }
}

/* --- Fix: dropdown arrow positioning on mobile WC ordering --- */
@media (max-width: 768px) {
    .woocommerce-ordering {
        position: relative;
    }
    .woocommerce-ordering::after {
        right: 1rem;
    }
}

/* --- Better mobile quantity selector --- */
@media (max-width: 768px) {
    .woocommerce .quantity {
        display: inline-flex;
        align-items: center;
        border: 1.5px solid var(--color-border);
        border-radius: var(--radius-full);
        overflow: hidden;
    }
    .woocommerce .quantity .qty {
        border: none;
        border-radius: 0;
        height: 44px;
    }
}

/* --- Mobile menu: full-height with scroll --- */
@media (max-width: 768px) {
    .mobile-menu-panel {
        max-width: 100%;
        width: 100%;
        max-height: 100vh;
        max-height: 100svh;
    }
    .mobile-nav-list li a {
        padding: 1rem 0;
        font-size: 1.0625rem;
    }
    .mobile-menu-footer {
        padding-top: 1.25rem;
        margin-top: auto;
    }
}

/* --- Better mobile pagination --- */
@media (max-width: 480px) {
    .redbox-pagination ul {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .redbox-pagination a, .redbox-pagination span {
        width: 36px;
        height: 36px;
        font-size: 0.75rem;
    }
    .redbox-pagination .next, .redbox-pagination .prev {
        width: auto;
        padding: 0 0.875rem;
    }
}

/* ============================================================
   IMAGE MANAGEMENT — Customizer-driven images
   ============================================================ */

/* --- Mobile vs Desktop Logo --- */
.custom-logo-wrap.mobile-logo { display: none; }
@media (max-width: 1024px) {
    .custom-logo-wrap.desktop-logo { display: none; }
    .custom-logo-wrap.mobile-logo { display: block; }
}

/* --- Footer Logo (image variant) --- */
.footer-logo-image {
    display: inline-block;
    margin-bottom: 1rem;
    line-height: 0;
}
.footer-logo-img {
    max-height: 56px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: transform var(--transition);
}
.footer-logo-image:hover .footer-logo-img { transform: scale(1.02); }

/* --- Testimonial Avatar --- */
.testimonial-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 1rem;
    border: 3px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}
.testimonial-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (max-width: 768px) {
    .testimonial-avatar {
        width: 56px;
        height: 56px;
    }
}

/* --- 404 Page Image --- */
.error-404-image {
    max-width: 100%;
    max-height: 400px;
    width: auto;
    height: auto;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}
@media (max-width: 768px) {
    .error-404-image { max-height: 280px; }
}

/* --- Trust Badge Custom Images --- */
.trust-icon img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}
@media (max-width: 768px) {
    .trust-icon img { width: 28px; height: 28px; }
}

/* --- About Image (when using attachment) --- */
.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Empty State Images --- */
.empty-state-image {
    max-width: 320px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}
.mini-cart-empty .empty-state-image {
    max-width: 240px;
    margin: 0 auto 1.5rem;
}
.search-empty .empty-state-image {
    max-width: 280px;
    margin: 0 auto 1.5rem;
}

/* --- Favicon sizing in admin (sanity) --- */
link[rel="icon"],
link[rel="shortcut icon"],
link[rel="apple-touch-icon"] {
    /* Browsers handle this automatically */
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */

/* About Hero */
.about-hero {
    position: relative;
    height: clamp(360px, 55vh, 560px);
    display: flex;
    align-items: center;
    background: var(--color-secondary);
    overflow: hidden;
}
.about-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.about-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.65) 100%);
}
.about-hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    width: 100%;
    text-align: center;
}
.about-hero-content .section-eyebrow {
    color: rgba(255,255,255,0.85);
    justify-content: center;
    margin-bottom: 1.25rem;
}
.about-hero-content .section-eyebrow::before,
.about-hero-content .section-eyebrow::after {
    background: rgba(255,255,255,0.5);
}
.about-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-shadow: 0 2px 16px rgba(0,0,0,0.3);
}
.about-hero-title span { color: var(--color-primary-light); font-style: italic; font-weight: 400; }
.about-hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.1875rem);
    font-weight: 300;
    max-width: 640px;
    margin: 0 auto;
    opacity: 0.95;
    line-height: 1.6;
}

/* About Story */
.about-story-section {
    padding: var(--space-3xl) 0;
    background: var(--color-bg);
}
.about-story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}
.about-story-text .section-eyebrow { margin-bottom: 1.25rem; }
.about-story-text .section-title {
    text-align: left;
    margin-bottom: 1.5rem;
    margin-left: 0;
}
.about-story-text p {
    color: var(--color-text-soft);
    font-size: 1.0625rem;
    line-height: 1.85;
    margin-bottom: 1.25rem;
}
.about-story-image {
    aspect-ratio: 4/5;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-bg-warm);
}
.about-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* About Stats Section */
.about-stats-section {
    padding: var(--space-2xl) 0;
    background: var(--color-secondary);
    color: #fff;
}
.about-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}
.about-stat-card {
    padding: 1.5rem;
}
.about-stat-card strong {
    display: block;
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--color-primary-light);
    line-height: 1;
    margin-bottom: 0.5rem;
}
.about-stat-card span {
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.7);
}

/* About Values */
.about-values-section {
    padding: var(--space-3xl) 0;
    background: #fff;
}
.about-values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}
.about-value-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--color-bg-warm);
    transition: all var(--transition);
}
.about-value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.about-value-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-full);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}
.about-value-icon img { width: 40px; height: 40px; object-fit: contain; }
.about-value-card h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}
.about-value-card p {
    font-size: 0.875rem;
    color: var(--color-text-soft);
    line-height: 1.5;
    margin: 0;
}

/* About Page Content (optional editor content) */
.about-page-content {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
}

/* Responsive: About */
@media (max-width: 1024px) {
    .about-story-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .about-story-image { aspect-ratio: 16/10; max-width: 100%; }
    .about-values-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .about-hero { height: clamp(320px, 45vh, 440px); }
    .about-story-section { padding: var(--space-xl) 0; }
    .about-story-text p { font-size: 1rem; line-height: 1.75; }
    .about-stats-section { padding: var(--space-xl) 0; }
    .about-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
    .about-stat-card { padding: 1rem; }
    .about-values-section { padding: var(--space-xl) 0; }
    .about-values-grid { grid-template-columns: 1fr; gap: 1rem; }
    .about-value-card { padding: 1.5rem 1.25rem; }
}
@media (max-width: 480px) {
    .about-stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .about-hero-title { font-size: 1.875rem; }
    .about-hero-subtitle { font-size: 0.9375rem; }
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */

/* Contact Hero */
.contact-hero {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-warm);
    text-align: center;
}
.contact-hero .section-eyebrow { justify-content: center; margin-bottom: 1.25rem; }
.contact-hero-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--color-secondary);
}
.contact-hero-title span { color: var(--color-primary); font-style: italic; font-weight: 400; }
.contact-hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.1875rem);
    color: var(--color-text-soft);
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Contact Info Cards */
.contact-info-section {
    padding: var(--space-2xl) 0;
    background: #fff;
}
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}
.contact-info-card {
    display: block;
    padding: 2rem 1.5rem;
    background: var(--color-bg-warm);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition);
    text-decoration: none;
    color: inherit;
}
.contact-info-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    background: #fff;
}
.contact-info-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-info-card h3 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}
.contact-info-card p {
    font-size: 0.9375rem;
    color: var(--color-text-soft);
    margin-bottom: 0.75rem;
    word-break: break-word;
}
.contact-info-link {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-primary);
    transition: gap var(--transition-fast);
}

/* Contact Form & Map */
.contact-form-section {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
}
.contact-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}
.contact-form-wrap .section-eyebrow { margin-bottom: 1rem; }
.contact-form-wrap .section-title {
    text-align: left;
    margin-bottom: 1rem;
    margin-left: 0;
}
.contact-form-desc {
    color: var(--color-text-soft);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Contact Form */
.redbox-contact-form {
    background: #fff;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-soft);
}
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-secondary);
    margin-bottom: 0.5rem;
}
.form-group label .required { color: var(--color-primary); }
.form-group input,
.form-group textarea {
    width: 100%;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.875rem 1rem;
    font-size: 1rem;
    color: var(--color-secondary);
    background: #fff;
    outline: none;
    transition: border var(--transition-fast);
    font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-secondary);
}
.form-group textarea {
    resize: vertical;
    min-height: 120px;
}
.form-note {
    font-size: 0.75rem;
    color: var(--color-muted);
    margin-top: 1rem;
    text-align: center;
}

/* Contact Map */
.contact-map-wrap {
    position: sticky;
    top: calc(var(--header-h) + var(--announcement-h) + 1.5rem);
}
.contact-map-embed {
    width: 100%;
    aspect-ratio: 4/3;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    background: var(--color-bg-warm);
}
.contact-map-embed iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    display: block;
}
.contact-map-placeholder {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--color-bg-warm);
    border: 2px dashed var(--color-border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-muted);
    margin-bottom: 1.5rem;
    padding: 2rem;
}
.contact-map-placeholder p {
    font-size: 1rem;
    color: var(--color-text-soft);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}
.contact-map-placeholder small {
    font-size: 0.75rem;
    color: var(--color-muted);
    max-width: 240px;
    line-height: 1.4;
}

/* Business Hours */
.contact-business-hours {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border-soft);
}
.contact-business-hours h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border-soft);
}
.contact-business-hours ul { list-style: none; padding: 0; margin: 0; }
.contact-business-hours li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--color-border-soft);
    font-size: 0.9375rem;
}
.contact-business-hours li:last-child { border-bottom: none; }
.contact-business-hours li span { color: var(--color-text-soft); }
.contact-business-hours li strong { color: var(--color-secondary); font-weight: 600; }

/* Contact Social */
.contact-social-links {
    background: var(--color-secondary);
    color: #fff;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    text-align: center;
}
.contact-social-links h3 {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    color: #fff;
    margin-bottom: 1rem;
}
.contact-social-links .footer-social {
    justify-content: center;
}

/* Contact Form Notice */
.contact-form-notice {
    position: fixed;
    top: calc(var(--header-h) + var(--announcement-h) + 1rem);
    left: 50%;
    transform: translateX(-50%);
    z-index: 5000;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-full);
    font-size: 0.9375rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    animation: slideDown 0.4s var(--ease-out);
    max-width: calc(100% - 2rem);
}
.contact-form-notice.success {
    background: var(--color-success);
    color: #fff;
}
.contact-form-notice.error {
    background: var(--color-primary);
    color: #fff;
}
@keyframes slideDown {
    from { transform: translateX(-50%) translateY(-100%); opacity: 0; }
    to { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Contact Page Content (optional editor) */
.contact-page-content {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
}

/* Responsive: Contact */
@media (max-width: 1024px) {
    .contact-info-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-form-grid { grid-template-columns: 1fr; gap: 2rem; }
    .contact-map-wrap { position: static; }
}
@media (max-width: 768px) {
    .contact-hero { padding: var(--space-xl) 0; }
    .contact-info-section { padding: var(--space-xl) 0; }
    .contact-info-grid { grid-template-columns: 1fr; }
    .contact-info-card { padding: 1.5rem 1.25rem; }
    .contact-form-section { padding: var(--space-xl) 0; }
    .redbox-contact-form { padding: 1.5rem; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .form-group input,
    .form-group textarea { font-size: 16px; }
    .contact-form-notice {
        top: 1rem;
        left: 1rem;
        right: 1rem;
        transform: none;
        max-width: none;
    }
}
@media (max-width: 480px) {
    .contact-hero-title { font-size: 1.875rem; }
    .contact-hero-subtitle { font-size: 0.9375rem; }
    .redbox-contact-form { padding: 1.25rem; }
    .contact-map-embed,
    .contact-map-placeholder { aspect-ratio: 1/1; }
}
