/* ============================================================
   JEVANI STORE — COMPLETE RESPONSIVE SYSTEM
   Breakpoints: 1440 | 1280 | 1024 | 768 | 480 | 414 | 390 | 375 | 360 | 320
   ============================================================ */

/* ── Utility ── */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.hide-mobile { display: block; }
.show-mobile { display: none; }

/* ── Smooth scroll ── */
html { scroll-behavior: smooth; }

/* ── Focus styles for accessibility ── */
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

/* ── Mobile Nav Drawer ── */
.mobile-nav-drawer {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    pointer-events: none;
    visibility: hidden;
    transition: visibility 0.4s;
}
.mobile-nav-drawer.open { pointer-events: all; visibility: visible; }

.mobile-nav-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.mobile-nav-drawer.open .mobile-nav-backdrop { opacity: 1; }

.mobile-nav-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 400px;
    height: 100%;
    background: linear-gradient(135deg, #27272a 0%, #18181b 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    box-shadow: 20px 0 50px rgba(0,0,0,0.6);
}
.mobile-nav-drawer.open .mobile-nav-panel { transform: translateX(0); }

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.mobile-nav-close {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.3s ease, color 0.3s ease, background 0.3s ease;
}
.mobile-nav-close:hover {
    transform: rotate(90deg);
    color: var(--accent);
    background: rgba(255, 255, 255, 0.08);
}
.mobile-nav-links {
    flex: 1;
    padding: 40px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.mobile-nav-links a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 0;
    font-size: 0.95rem;
    font-family: var(--font-primary);
    font-weight: 400;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav-links a:last-child {
    border-bottom: none;
}
.mobile-nav-links a:hover {
    color: var(--accent);
    padding-left: 8px;
    opacity: 1;
}
.mobile-nav-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 16px;
    background: rgba(0, 0, 0, 0.2);
}
.mobile-nav-footer a {
    flex: 1;
    text-align: center;
    padding: 14px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.mobile-nav-footer a:first-child {
    background-color: var(--accent);
    color: #000000;
    border: 1px solid var(--accent);
    border-radius: 30px;
}
.mobile-nav-footer a:first-child:hover {
    background-color: transparent;
    color: var(--accent);
    box-shadow: 0 4px 15px rgba(173, 255, 47, 0.25);
}
.mobile-nav-footer a:last-child {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    font-weight: 600;
}
.mobile-nav-footer a:last-child:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── Admin Collapsible Sidebar ── */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 499;
    backdrop-filter: blur(4px);
}
.admin-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px;
    align-items: center;
    justify-content: center;
}

/* ── Shop / Accessories: Mobile Filter Drawer ── */
.filter-drawer-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 800;
    backdrop-filter: blur(4px);
}
.filter-drawer-overlay.open { display: block; }
.filter-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 85vw;
    height: 100%;
    background: #0a0a0a;
    border-right: 1px solid rgba(255,255,255,0.08);
    z-index: 801;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 24px;
}
.filter-drawer.open { transform: translateX(0); }
.filter-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.filter-drawer-header h3 {
    font-size: 0.9rem;
    letter-spacing: 2px;
    text-transform: uppercase;
}
.filter-drawer-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 4px;
}
.mobile-filter-btn {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    font-size: 0.8rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 4px;
    transition: background 0.2s;
}
.mobile-filter-btn:hover { background: rgba(255,255,255,0.1); }

/* ── Sticky Mobile Add To Cart ── */
.sticky-atc-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: rgba(5,5,5,0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 14px 20px;
    flex-direction: column;
    gap: 10px;
}
.sticky-atc-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.sticky-atc-name {
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.sticky-atc-price {
    font-size: 0.95rem;
    font-weight: 600;
}
.sticky-atc-btn {
    width: 100%;
    padding: 14px;
    background: #fff;
    color: #000;
    border: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}
.sticky-atc-btn:hover { background: #e0e0e0; }

/* ================================================================
   BREAKPOINT: 1440px — Wide Desktop
   ================================================================ */
@media (max-width: 1440px) {
    :root { --container-max: 1280px; }
}

/* ================================================================
   BREAKPOINT: 1280px — Standard Desktop
   ================================================================ */
@media (max-width: 1280px) {
    :root { --container-padding: 32px; }
    .product-info-panel { width: 360px; }
    .product-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .shop-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .product-grid-3 { gap: 24px; }
}

/* ================================================================
   BREAKPOINT: 1024px — Tablet Landscape / Small Laptop
   ================================================================ */
@media (max-width: 1024px) {
    :root {
        --container-padding: 24px;
        --header-height: 75px;
    }

    /* Header */
    .nav-links { display: none !important; }
    .header-inner {
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        position: relative;
    }
    .menu-toggle { display: flex !important; align-items: center; }
    .logo-wrapper {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        justify-self: center;
    }
    .header-icons { display: flex; gap: 15px; }
    
    /* Hide specific icons on mobile header to match screenshot */
    .header-user-icon, .header-wishlist-icon { display: none !important; }

    /* Hero */
    .hero { height: 75vh; min-height: 600px; max-height: 800px; }
    .hero-subtitle { font-size: 1rem; }

    /* Grids */
    .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
    .product-grid-3 { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .category-grid { grid-template-columns: repeat(2, 1fr); }
    .lookbook-grid { grid-template-columns: repeat(2, 1fr); }
    .lb-tall, .lb-wide { grid-row: auto; grid-column: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }

    /* Shop */
    .shop-layout { grid-template-columns: 1fr; }
    .sidebar-filter { display: none; } /* hidden — opened via drawer */
    .sidebar-filter-ref { 
        position: fixed; top: 0; left: 0; width: 300px; max-width: 85vw; height: 100%;
        background: linear-gradient(135deg, #27272a 0%, #18181b 100%); z-index: 9001; overflow-y: auto; padding: 24px;
        transform: translateX(-100%); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
        border-right: 1px solid var(--border-color); 
        box-shadow: 20px 0 50px rgba(0,0,0,0.6);
        visibility: hidden;
    }
    .sidebar-filter-ref.open, .sidebar-filter-ref.active { transform: translateX(0); visibility: visible; }
    .filter-drawer-overlay {
        display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 9000; backdrop-filter: blur(10px);
    }
    .filter-drawer-overlay.open { display: block; }
    .filter-drawer-header.hide-desktop { display: flex !important; align-items: center; justify-content: space-between; margin-bottom: 20px; border-bottom: 1px solid var(--border-color); padding-bottom: 15px; }
    .mobile-filter-btn { display: flex !important; background: var(--bg-secondary); color: var(--text-primary); border: 1px solid var(--border-color); padding: 12px 24px; font-weight: 600; font-size: 0.85rem; letter-spacing: 1.5px; align-items: center; gap: 8px; cursor: pointer; width: 100%; justify-content: center; margin-bottom: 20px; text-transform: uppercase; transition: border-color 0.3s, color 0.3s; }
    .mobile-filter-btn:hover { border-color: var(--accent); color: var(--accent); }
    .shop-header-row.hide-desktop { display: block !important; margin-bottom: 10px; }

    /* Product detail */
    .product-split-layout { flex-direction: column; gap: 20px; display: flex; }
    .product-thumbnails { order: 2; width: 100%; flex-direction: row; overflow-x: auto; position: static; padding-bottom: 10px; gap: 10px; }
    .product-thumbnails a { display: block; flex-shrink: 0; }
    .product-thumbnails img { width: 80px; aspect-ratio: 3/4; height: auto; object-fit: cover; opacity: 0.5; transition: all 0.2s; border: 1px solid transparent; }
    .product-thumbnails a.active-thumb img { opacity: 1; border-color: var(--text-primary); }
    .product-gallery { order: 1; width: 100%; }
    .product-info-panel { order: 3; width: 100% !important; position: static; padding-right: 0; padding-top: 10px; }
    .product-meta-tabs { grid-template-columns: 1fr; gap: 20px; margin-top: 50px; padding-top: 30px; }

    /* Cart */
    .cart-panel { max-width: 420px; }

    /* Dashboard */
    .dashboard-layout { grid-template-columns: 1fr; gap: 0; }
    .dashboard-nav {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        margin-bottom: 30px;
        padding-bottom: 0;
    }
    .dashboard-nav a {
        padding: 12px 16px;
        border-bottom: 2px solid transparent;
        font-size: 0.8rem;
    }
    .dashboard-nav a:hover, .dashboard-nav a.active {
        border-bottom-color: #fff;
        border-right: none;
    }

    /* Admin */
    .admin-menu-toggle { display: flex !important; }
    .admin-sidebar-overlay { display: block; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
    .admin-sidebar-overlay.open { opacity: 1; pointer-events: all; }
    .admin-layout { flex-direction: column !important; }
    .admin-sidebar {
        position: fixed !important;
        top: 0;
        left: -300px;
        width: 260px !important;
        height: 100vh;
        z-index: 500;
        transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        overflow-y: auto;
    }
    .admin-sidebar.open { left: 0 !important; }
    .admin-main { padding: 1.5rem !important; }
    .admin-header h2 { font-size: 1.1rem !important; }

    /* QV Modal */
    .qv-modal { flex-direction: column; width: 95vw; max-height: 92vh; }
    .qv-image-side { width: 100%; padding: 24px; }
    .qv-info-side { width: 100%; padding: 0 24px 24px 24px; }

    /* Contact / About inline grids */
    .contact-info-grid,
    .about-features-grid { grid-template-columns: 1fr !important; gap: 40px !important; }
}

/* ================================================================
   BREAKPOINT: 768px — Tablet Portrait
   ================================================================ */
@media (max-width: 768px) {
    :root {
        --container-padding: 20px;
        --header-height: 65px;
    }

    /* Typography */
    .section-title { font-size: clamp(1.5rem, 5vw, 2.2rem); margin-bottom: 2rem; }
    .hero-subtitle { font-size: 0.9rem; letter-spacing: 1.5px; }
    .hero-actions { flex-direction: column; width: 100%; max-width: 280px; gap: 12px; }
    .hero-actions .btn { width: 100%; }

    /* Section padding */
    .section { padding: 4rem 0; }

    /* Product grids — Horizontal Scroll */
    .product-grid, .product-grid-3 { 
        display: flex; 
        flex-wrap: nowrap;
        overflow-x: auto; 
        scroll-snap-type: x mandatory; 
        -webkit-overflow-scrolling: touch; 
        gap: 15px; 
        padding-bottom: 20px;
        scrollbar-width: none; /* Firefox */
    }
    .product-grid::-webkit-scrollbar, .product-grid-3::-webkit-scrollbar { display: none; }
    .product-card { 
        flex: 0 0 85%; 
        scroll-snap-align: start; 
    }
    .shop-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; }

    /* Footer */
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .footer { padding: 3rem 0 2rem; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }

    /* Cart panel */
    .cart-panel { max-width: 100%; width: 100%; }

    /* Cart page */
    .cart-table-wrapper { overflow-x: auto; }
    .cart-order-summary { width: 100% !important; max-width: 100% !important; }

    /* Page headers */
    .page-header { padding: 4rem 0 2rem; }

    /* Dashboard */
    .dashboard-nav a { font-size: 0.75rem; padding: 10px 12px; }
    .dashboard-card { padding: 20px; }

    /* Contact page */
    .contact-hero { height: 25vh; min-height: 180px; }

    /* Lookbook */
    .lookbook-grid { grid-template-columns: 1fr; gap: 12px; }

    /* Marquee */
    .marquee-section { padding: 2rem 0; }

    /* Wishlist header */
    .wishlist-header-bar { flex-wrap: wrap; gap: 12px; }

    /* Admin */
    .admin-main { padding: 1rem !important; }
    .admin-header { flex-wrap: wrap; gap: 10px; margin-bottom: 1.5rem !important; }
    .admin-header h2 { font-size: 1rem !important; }

    /* Tables — wrap in scroll container */
    .table { font-size: 0.82rem; }
    .table th, .table td { padding: 10px 12px !important; }

    /* Modals */
    #add-modal, #view-modal { padding: 20px 16px !important; }
    #add-modal > div, #view-modal > div { padding: 20px !important; }
}

/* ================================================================
   BREAKPOINT: 480px — Large Mobile
   ================================================================ */
@media (max-width: 480px) {
    :root { --container-padding: 16px; }

    /* Hero */
    .hero { height: 75vh; min-height: 500px; }
    .hero-content { justify-content: center !important; padding-bottom: 0 !important; align-items: center !important; }
    .hero-actions { max-width: 100%; align-items: center; justify-content: center; }
    .hero-mobile-actions { width: 100%; text-align: center; }
    .hero-link-underline {
        color: #fff; text-decoration: none; text-transform: uppercase;
        font-size: 0.8rem; letter-spacing: 2px; border-bottom: 1px solid #fff; padding-bottom: 4px;
    }
    .mobile-hero-footer {
        background: #050505; color: #fff; text-align: center; padding: 40px 20px;
    }
    .mh-sub { font-size: 0.85rem; letter-spacing: 2px; margin-bottom: 10px; color: #aaa; }
    .mh-title { font-size: 1.8rem; font-weight: 500; letter-spacing: 2px; }

    /* Product grids — Horizontal Scroll */
    .product-grid, .product-grid-3 { 
        display: flex; 
        flex-wrap: nowrap;
        overflow-x: auto; 
        scroll-snap-type: x mandatory; 
        -webkit-overflow-scrolling: touch; 
        gap: 10px; 
        padding-bottom: 20px;
    }
    .product-card { 
        flex: 0 0 85%; 
        scroll-snap-align: start; 
    }
    .shop-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .shop-grid .product-card { flex: auto; scroll-snap-align: none; }
    .product-info { padding: 12px 0; }
    .product-title { font-size: 0.8rem; }
    .product-price { font-size: 0.8rem; }

    /* Sticky ATC show on mobile */
    .sticky-atc-bar { display: flex; }

    /* Product detail: single image with thumbnails below */
    .product-gallery img:not(:first-child) { display: none; }
    .product-detail-title { font-size: 1.8rem; }
    .product-detail-price { font-size: 1.25rem; }
    
    .detail-actions { display: flex; flex-direction: column; gap: 15px; }
    .quantity-selector { width: 100%; }
    .quantity-selector .qty-btn-large { flex: 1; width: auto; }
    .quantity-selector input { flex: 1; width: auto; }
    
    /* Cart */
    .cart-body { padding: 20px 16px; }
    .cart-header { padding: 20px 16px; }
    .cart-footer { padding: 20px 16px; }
    .cart-item-img { width: 70px; }

    /* Buttons */
    .btn { padding: 14px 24px; font-size: 0.8rem; }

    /* Our Craft Section */
    .craft-section { padding: 4rem 0; }
    .craft-container { grid-template-columns: 1fr; gap: 40px; }
    .craft-collage { height: 360px; margin-bottom: 20px; }
    .craft-img-horizontal { height: 240px; width: 60%; }
    .craft-img-vertical { height: 360px; width: 45%; right: 0; }
    .craft-image-caption { bottom: 15px; left: 15px; font-size: 0.85rem; }
    .craft-details { text-align: center; align-items: center; }
    .craft-headline { text-align: center; }

    /* Dashboard */
    .dashboard-nav { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
    .dashboard-nav a { white-space: nowrap; flex-shrink: 0; }

    /* Admin stats */
    .admin-stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .admin-stats-value { font-size: 1.5rem !important; }

    /* Filter */
    .sidebar-filter { grid-template-columns: 1fr !important; }
    .filter-group { margin-bottom: 1.5rem !important; }

    /* Quick view modal */
    .qv-modal { max-height: 95vh; }
    .qv-title { font-size: 1.2rem; }

    /* Footer */
    .newsletter-form { flex-direction: column; gap: 10px; border-bottom: none; }
    .newsletter-btn { border: 1px solid rgba(255,255,255,0.2); padding: 10px; text-align: center; }

    /* Login / Register */
    .container[style*="max-width: 500px"] { padding: 60px var(--container-padding) 100px !important; }

    /* Hide/show helpers */
    .hide-mobile { display: none !important; }
    .show-mobile { display: block !important; }
}

/* ================================================================
   BREAKPOINT: 414px — iPhone Pro Max
   ================================================================ */
@media (max-width: 414px) {
    .hero-title { letter-spacing: -0.03em; }
    .product-grid { gap: 8px; }
    .product-grid-3 { gap: 8px; }
    .category-grid { grid-template-columns: 1fr 1fr; gap: 8px; }

    /* Admin tables on small phone */
    .table th, .table td { padding: 8px 10px !important; font-size: 0.78rem; }

    /* Cart item */
    .cart-item { gap: 12px; }
}

/* ================================================================
   BREAKPOINT: 390px — iPhone 14
   ================================================================ */
@media (max-width: 390px) {
    :root { --container-padding: 14px; }
    .section-title { font-size: 1.4rem; }
    .product-info-panel { padding: 0; }
    .detail-actions { display: flex; flex-direction: column; gap: 10px; }
}

/* ================================================================
   BREAKPOINT: 375px — Standard Mobile
   ================================================================ */
@media (max-width: 375px) {
    :root { --container-padding: 12px; }
    .product-detail-title { font-size: 1.6rem; }
    .dashboard-nav a { font-size: 0.7rem; padding: 8px 10px; }
    .admin-header h2 { font-size: 0.9rem !important; }
}

/* ================================================================
   BREAKPOINT: 360px — Android Standard
   ================================================================ */
@media (max-width: 360px) {
    :root { --container-padding: 12px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
    .footer-bottom { font-size: 0.72rem; }
    .btn { padding: 12px 18px; font-size: 0.75rem; }
    .mobile-nav-panel { width: 85vw; }
}

/* ================================================================
   BREAKPOINT: 320px — Smallest Supported
   ================================================================ */
@media (max-width: 320px) {
    :root { --container-padding: 10px; }
    .product-grid { grid-template-columns: 1fr 1fr; gap: 6px; }
    .shop-grid { grid-template-columns: 1fr; gap: 10px; }
    .product-title { font-size: 0.72rem; }
    .hero-title { font-size: clamp(2rem, 10vw, 3rem); }
    .sticky-atc-bar { padding: 10px 12px; }
    .sticky-atc-name { font-size: 0.78rem; }
}

/* ================================================================
   Y2K CARD — MOBILE RESPONSIVE
   new-arrivals-grid, y2k-card, y2k-info, y2k-title, y2k-price
   ================================================================ */

/* Tablet (768px) — 2 columns, tighter gaps */
@media (max-width: 768px) {
    .new-arrivals-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px !important;
    }
    .y2k-card {
        border-radius: 12px;
    }
    .y2k-info {
        padding: 12px;
        gap: 6px;
    }
    .y2k-title {
        font-size: 0.8rem;
        min-height: 2.4em;
    }
    .y2k-price-sale {
        font-size: 0.85rem;
    }
    .y2k-price-compare {
        font-size: 0.75rem;
    }
    .y2k-discount-badge {
        font-size: 0.65rem;
    }
    .y2k-add-btn {
        padding: 10px 12px;
        font-size: 0.7rem;
        letter-spacing: 1px;
        gap: 5px;
    }
    .y2k-add-btn i,
    .y2k-add-btn svg {
        width: 13px !important;
        height: 13px !important;
    }
    .y2k-wishlist-btn {
        width: 30px;
        height: 30px;
        top: 10px;
        right: 10px;
    }
    .y2k-badge {
        font-size: 0.58rem;
        padding: 3px 7px;
    }
    /* Hide Quick View on touch screens */
    .y2k-quickview-btn {
        display: none !important;
    }
}

/* Large Mobile (480px) — still 2 columns, more compact */
@media (max-width: 480px) {
    .new-arrivals-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .y2k-card {
        border-radius: 10px;
    }
    .y2k-info {
        padding: 10px 10px 12px;
        gap: 5px;
    }
    .y2k-brand {
        font-size: 0.58rem;
        letter-spacing: 0.5px;
        margin-bottom: 1px;
    }
    .y2k-title {
        font-size: 0.75rem;
        min-height: 2.2em;
        -webkit-line-clamp: 2;
    }
    .y2k-price-row {
        flex-wrap: wrap;
        gap: 4px;
        margin-top: 2px;
    }
    .y2k-price-sale {
        font-size: 0.8rem;
    }
    .y2k-price-compare {
        font-size: 0.7rem;
    }
    .y2k-discount-badge {
        display: none; /* too cramped at this size */
    }
    .y2k-add-btn {
        padding: 9px 8px;
        font-size: 0.65rem;
        letter-spacing: 0.5px;
        border-radius: 5px;
        gap: 4px;
    }
    .y2k-add-btn i,
    .y2k-add-btn svg {
        width: 12px !important;
        height: 12px !important;
    }
    .y2k-wishlist-btn {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
    }
    .y2k-badge {
        font-size: 0.55rem;
        padding: 3px 6px;
    }
    .y2k-badges {
        top: 8px;
        left: 8px;
        gap: 4px;
    }
}

/* Small Mobile (375px and below) — ultra compact */
@media (max-width: 375px) {
    .new-arrivals-grid {
        gap: 8px !important;
    }
    .y2k-info {
        padding: 8px 8px 10px;
    }
    .y2k-title {
        font-size: 0.72rem;
    }
    .y2k-price-sale {
        font-size: 0.75rem;
    }
    .y2k-add-btn {
        padding: 8px 6px;
        font-size: 0.62rem;
        letter-spacing: 0;
    }
}

/* Tiny (320px) */
@media (max-width: 320px) {
    .new-arrivals-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 6px !important;
    }
    .y2k-info {
        padding: 7px 7px 9px;
        gap: 4px;
    }
    .y2k-title {
        font-size: 0.68rem;
    }
    .y2k-add-btn {
        font-size: 0.6rem;
        padding: 7px 5px;
    }
}

/* ================================================================
   PAGE-SPECIFIC RESPONSIVE FIXES
   ================================================================ */

/* — Cart page: table → card layout on mobile — */
@media (max-width: 640px) {
    .minimal-table thead { display: none; }
    .minimal-table, .minimal-table tbody, .minimal-table tr, .minimal-table td {
        display: block;
        width: 100%;
    }
    .minimal-table tr {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        padding: 16px 0;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        align-items: flex-start;
    }
    .minimal-table td {
        padding: 0;
        border: none;
    }
    .minimal-table td:first-child { flex: 0 0 100px; }
    .minimal-table td:nth-child(2) { flex: 1; }
    .minimal-table td:nth-child(3) { flex: 0 0 auto; margin-left: auto; }
    .minimal-table td:last-child { flex: 0 0 auto; }
}

/* — Product page: sticky ATC overlap fix — */
@media (max-width: 480px) {
    .product-page-body-pad { padding-bottom: 130px !important; }
}

/* — Admin: table scroll on all small screens — */
@media (max-width: 900px) {
    .admin-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 4px; }
}

/* — Admin products modal: fullscreen on mobile — */
@media (max-width: 600px) {
    #add-modal, #edit-modal, #view-modal {
        padding: 0 !important;
    }
    #add-modal > div, #edit-modal > div, #view-modal > div {
        max-width: 100% !important;
        min-height: 100vh;
        border-radius: 0 !important;
        margin: 0 !important;
    }
}

/* — Checkout overlay: full height on mobile — */
@media (max-width: 480px) {
    .checkout-login-overlay {
        padding: 0 !important;
        align-items: stretch !important;
    }
    .checkout-login-card {
        max-width: 100% !important;
        min-height: 100svh;
        border-radius: 0 !important;
    }
}

/* — Contact inline grid collapse — */
@media (max-width: 768px) {
    /* Targets the inline-styled contact grid */
    .contact-main-grid {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

/* — Order history: timeline on small screens — */
@media (max-width: 480px) {
    .order-timeline-wrapper {
        overflow-x: auto;
        padding-bottom: 10px;
    }
    .order-header { font-size: 0.82rem; }
    .order-header-label { font-size: 0.68rem; }
}

/* — Wishlist header bar — */
@media (max-width: 480px) {
    .wishlist-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .wishlist-count-text { font-size: 0.85rem; }
}

/* — Lookbook masonry — */
@media (max-width: 768px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    .masonry-item { margin-bottom: 0 !important; }
}
@media (max-width: 1024px) and (min-width: 769px) {
    .masonry-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
}

/* — Admin categories layout — */
@media (max-width: 768px) {
    .admin-categories-layout {
        flex-direction: column !important;
    }
    .admin-categories-layout > div {
        min-width: 100% !important;
    }
}

/* — Admin header bar — */
@media (max-width: 768px) {
    .admin-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ================================================================
   PRINT MEDIA
   ================================================================ */
@media print {
    .header, .footer, .cart-overlay, .cart-panel,
    .sticky-atc-bar, .mobile-nav-drawer,
    .admin-sidebar, .admin-sidebar-overlay { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
}

/* ================================================================
   LOOKBOOK EDITORIAL GRID
   ================================================================ */
@media (max-width: 1024px) {
    .editorial-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-auto-rows: 250px;
    }
    .ed-large { grid-column: span 2; grid-row: span 2; }
    .ed-wide { grid-column: span 2; grid-row: span 1; }
    .ed-small { grid-column: span 1; grid-row: span 1; }
    #lb-masonry {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .lookbook-hero {
        min-height: 400px;
        height: 50vh;
    }
    .editorial-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
        grid-auto-rows: auto !important;
    }
    .ed-large {
        grid-column: span 2 !important;
        grid-row: span 1 !important;
        height: 380px !important;
    }
    .ed-small {
        grid-column: span 1 !important;
        grid-row: span 1 !important;
        height: auto !important;
        aspect-ratio: 1 / 1 !important;
    }
    .ed-wide {
        grid-column: span 2 !important;
        grid-row: span 1 !important;
        height: 220px !important;
    }
    .ed-overlay {
        opacity: 1 !important;
        padding: 20px !important;
        background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.3) 60%, transparent 100%) !important;
    }
    .ed-tag {
        font-size: 0.75rem !important;
        margin-bottom: 10px !important;
    }
    .ed-btn {
        padding: 8px 16px !important;
        font-size: 0.75rem !important;
    }
    .ed-btn-small {
        width: 38px !important;
        height: 38px !important;
    }
    .ed-btn-small svg {
        width: 18px !important;
        height: 18px !important;
    }
    #lb-masonry {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
}

@media (max-width: 480px) {
    .editorial-grid {
        gap: 12px !important;
    }
    .ed-large {
        height: 320px !important;
    }
    .ed-wide {
        height: 180px !important;
    }
    .ed-overlay {
        padding: 15px !important;
    }
    #lb-masonry {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
}
