/* ============================================================
   FILE LOCATION: zasocks/assets/css/style.css
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --black: #111111;
    --white: #FAFAF8;
    --cream: #F5F4F0;
    --gray-light: #E8E7E3;
    --gray-mid: #C8C7C3;
    --gray-dark: #888884;
    --accent: #111111;
    --border: #E0DFD9;
    --shadow: 0 2px 16px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
    --radius: 12px;
    --radius-sm: 8px;
    --font-display: 'Poppins', sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;
    --header-h: 60px;
    --ann-h: 36px;
    --catnav-h: 49px;
    --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
img { max-width: 100%; display: block; object-fit: cover; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul { list-style: none; }

/* ── Announcement Bar ───────────────────────────────────────── */
.announcement-bar {
    background: var(--black);
    color: var(--white);
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    padding: 0 16px;
    height: var(--ann-h);
    display: flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
}

/* ── Sticky Header ──────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 8px rgba(0,0,0,0.05);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
    padding: 0 16px;
    max-width: 1400px;
    margin: 0 auto;
}
.logo-link { display: flex; align-items: center; }
.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    filter: contrast(1.05);
}
.logo-text {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--black);
}
.logo-text-lg { font-size: 36px; }
.header-right { display: flex; align-items: center; gap: 8px; }

/* hamburger */
.hamburger-btn {
    width: 40px; height: 40px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 5px;
}
.hamburger-btn span {
    display: block; width: 22px; height: 2px;
    background: var(--black);
    transition: var(--transition);
}

/* search / cart icon buttons */
.search-btn, .cart-btn {
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    border-radius: 50%;
    transition: background var(--transition);
}
.search-btn:hover, .cart-btn:hover { background: var(--gray-light); }

.cart-badge {
    position: absolute;
    top: 4px; right: 4px;
    background: var(--black);
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    line-height: 1;
}

/* Desktop nav row */
.desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 44px;
    padding: 0 16px;
    border-top: 1px solid var(--border);
    max-width: 1400px;
    margin: 0 auto;
    overflow-x: auto;
}
.nav-link {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.02em;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
    transition: all var(--transition);
    color: var(--black);
}
.nav-link:hover { background: var(--gray-light); }
.nav-link.active { font-weight: 700; }

/* ── Responsive Helpers ─────────────────────────────────────── */
@media (max-width: 768px) {
    .desktop-hide { display: flex !important; }
    .mobile-hide  { display: none !important; }
    /* Center logo precisely on mobile regardless of left/right icon widths */
    .header-inner { position: relative; }
    .logo-link    { position: absolute; left: 50%; transform: translateX(-50%); }
}
@media (min-width: 769px) {
    .desktop-hide { display: none !important; }
    .mobile-hide  { display: flex !important; }
}

/* ── Sidebar (mobile) ───────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: min(300px, 85vw);
    height: 100%;
    background: var(--white);
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column;
    padding: 0 0 24px;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}
.sidebar.open { transform: translateX(0); }

.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}
.sidebar-logo { height: 36px; }
.sidebar-close {
    font-size: 20px; color: var(--black);
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
}
.sidebar-close:hover { background: var(--gray-light); }

.sidebar-nav { flex: 1; padding: 16px 0; }
.sidebar-link {
    display: block;
    padding: 14px 24px;
    font-size: 17px;
    font-weight: 400;
    color: var(--black);
    transition: background var(--transition);
    border-left: 3px solid transparent;
}
.sidebar-link:hover { background: var(--cream); }
.sidebar-link.active { font-weight: 700; border-left-color: var(--black); }

.sidebar-social {
    display: flex; gap: 16px;
    padding: 16px 24px 0;
}
.social-icon {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
    color: var(--black);
}
.social-icon:hover { background: var(--gray-light); }

/* ── Overlay BG ─────────────────────────────────────────────── */
.overlay-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.overlay-bg.active { opacity: 1; pointer-events: all; }

/* ── Search Overlay ─────────────────────────────────────────── */
/* ── Search Bar Dropdown ─────────────────────────────────────── */
.search-bar-dropdown {
    position: fixed;
    top: calc(var(--ann-h) + var(--header-h));
    left: 0; right: 0;
    z-index: 1200;
    display: flex;
    justify-content: center;
    padding: 0 16px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 0.22s cubic-bezier(0.4,0,0.2,1),
                transform 0.22s cubic-bezier(0.4,0,0.2,1);
}
.search-bar-dropdown.open {
    pointer-events: all;
    opacity: 1;
    transform: translateY(0);
}
/* when announcement bar is hidden, shift up */
body:not(.has-announcement) .search-bar-dropdown {
    top: var(--header-h);
}

.search-bar-wrap {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 12px;
}

/* pill input row */
.search-input-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    border: 1.5px solid var(--border);
    border-radius: 999px;
    padding: 10px 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    transition: border-color var(--transition), box-shadow var(--transition);
}
.search-input-pill:focus-within {
    border-color: var(--black);
    box-shadow: 0 6px 32px rgba(0,0,0,0.16);
}
.search-pill-icon {
    flex-shrink: 0;
    color: var(--gray-dark);
}
#searchInput {
    flex: 1;
    font-size: 15px;
    font-family: var(--font-body);
    border: none; outline: none;
    background: transparent;
    color: var(--black);
    min-width: 0;
}
#searchInput::placeholder { color: var(--gray-mid); }

.search-close {
    flex-shrink: 0;
    font-size: 16px;
    color: var(--gray-dark);
    width: 28px; height: 28px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background var(--transition), color var(--transition);
}
.search-close:hover { background: var(--gray-light); color: var(--black); }

/* results dropdown card */
.search-results-dropdown {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.13);
    overflow: hidden;
    display: none;
}
.search-results-dropdown.has-results { display: block; }

/* each result row */
.search-result-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    border-bottom: 1px solid var(--border);
    transition: background var(--transition);
    cursor: pointer;
}
.search-result-row:last-child { border-bottom: none; }
.search-result-row:hover { background: var(--cream); }

.search-result-img {
    width: 44px; height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--gray-light);
}
.search-result-info { flex: 1; min-width: 0; }
.search-result-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--black);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}
.search-result-price {
    font-size: 12px;
    color: var(--gray-dark);
    margin-top: 2px;
}
.search-result-price .price-sale { color: var(--black); font-weight: 600; }
.search-result-price .price-original {
    text-decoration: line-through;
    margin-right: 5px;
    color: var(--gray-mid);
}
.search-result-arrow {
    color: var(--gray-mid);
    flex-shrink: 0;
    font-size: 14px;
}
.search-no-results {
    padding: 20px 16px;
    font-size: 13px;
    color: var(--gray-dark);
    text-align: center;
}

/* ── Cart Drawer ─────────────────────────────────────────────── */
.cart-drawer {
    position: fixed;
    top: 0; right: 0;
    width: min(420px, 100vw);
    height: 100%;
    background: var(--white);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-lg);
}
.cart-drawer.open { transform: translateX(0); }

.cart-drawer-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
}
.cart-drawer-header h2 { font-size: 16px; font-weight: 700; }
.cart-close {
    font-size: 20px;
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    transition: background var(--transition);
}
.cart-close:hover { background: var(--gray-light); }

.cart-upsell {
    background: var(--cream);
    padding: 10px 16px;
    font-size: 12px;
    display: flex; flex-direction: column; gap: 6px;
    align-items: flex-start;
    border-bottom: 1px solid var(--border);
}
.cart-upsell strong { font-weight: 700; }
.upsell-bar {
    width: 100%; height: 3px;
    background: var(--gray-light);
    border-radius: 2px; overflow: hidden;
}
.upsell-fill { height: 100%; background: var(--black); transition: width 0.5s; }

.cart-items { flex: 1; overflow-y: auto; padding: 16px; }
.cart-empty { text-align: center; color: var(--gray-dark); padding: 40px 0; }

.cart-item {
    display: flex; gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; flex-shrink: 0; }
.cart-item-info { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.cart-item-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.cart-item-var { font-size: 11px; color: var(--gray-dark); }
.cart-item-price { font-size: 13px; font-weight: 500; }

.cart-qty-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.qty-btn {
    width: 26px; height: 26px;
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 600;
    transition: all var(--transition);
}
.qty-btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.qty-val { font-size: 13px; font-weight: 600; min-width: 20px; text-align: center; }
.cart-remove { color: var(--gray-dark); margin-left: auto; transition: color var(--transition); }
.cart-remove:hover { color: #e00; }

.order-summary {
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    background: var(--cream);
}
.order-summary h3 { font-size: 14px; font-weight: 700; margin-bottom: 10px; }
.summary-row {
    display: flex; justify-content: space-between;
    font-size: 13px; padding: 4px 0;
    color: var(--gray-dark);
}
.total-row { color: var(--black); font-size: 15px; padding-top: 8px; border-top: 1px solid var(--border); margin-top: 6px; }
.free-tag { color: #1a7a2e; font-weight: 700; font-size: 11px; text-transform: uppercase; }

.btn-checkout {
    display: block; width: 100%;
    background: var(--black); color: var(--white);
    text-align: center; font-size: 13px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    padding: 14px; border-radius: var(--radius-sm);
    margin-top: 14px;
    transition: opacity var(--transition);
}
.btn-checkout:hover { opacity: 0.85; }

.continue-shopping {
    display: flex; align-items: center; justify-content: center; gap: 4px;
    width: 100%; margin-top: 10px;
    font-size: 12px; color: var(--gray-dark);
    text-decoration: underline;
    transition: color var(--transition);
}
.continue-shopping:hover { color: var(--black); }

/* ── Toast Notification ─────────────────────────────────────── */
.toast {
    position: fixed;
    bottom: 24px; left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--black); color: var(--white);
    padding: 10px 20px;
    border-radius: 100px;
    font-size: 13px; font-weight: 500;
    z-index: 2000;
    white-space: nowrap;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
    opacity: 0;
    pointer-events: none;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ── WhatsApp FAB ───────────────────────────────────────────── */
.wa-fab {
    position: fixed;
    bottom: 24px; right: 24px;
    width: 56px; height: 56px;
    background: #25d366;
    color: var(--white);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    z-index: 800;
    box-shadow: 0 4px 20px rgba(37,211,102,0.4);
    transition: transform var(--transition), box-shadow var(--transition);
}
.wa-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,0.5); }

/* ── Hero Slider ─────────────────────────────────────────────── */
.hero-section { position: relative; overflow: hidden; background: var(--gray-light); }
.hero-track {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4,0,0.2,1);
}
.hero-slide { flex-shrink: 0; width: 100%; }
.hero-slide img { width: 100%; aspect-ratio: 16/6; object-fit: fill; display: block; }

@media (max-width: 768px) {
    .hero-slide img { aspect-ratio: 16/9; object-fit: fill; }
}

.hero-dots {
    position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 6px;
}
.hero-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: rgba(255,255,255,0.5);
    transition: all var(--transition);
}
.hero-dot.active { background: var(--white); width: 20px; border-radius: 4px; }

.hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    opacity: 0;
    transition: opacity var(--transition);
    z-index: 2;
    box-shadow: var(--shadow);
}
.hero-section:hover .hero-arrow { opacity: 1; }
.hero-arrow-prev { left: 16px; }
.hero-arrow-next { right: 16px; }
.hero-arrow:hover { background: var(--white); }

/* ── Navigation Row (mobile — home + category pages) ────────── */
.category-nav-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
    position: sticky;
    top: var(--header-h);
    background: var(--white);
    z-index: 890;
    height: var(--catnav-h);
    align-items: center;
}
.category-nav-row::-webkit-scrollbar { display: none; }
.cat-nav-link {
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: all var(--transition);
    color: var(--black);
}
.cat-nav-link:hover, .cat-nav-link.active {
    background: var(--black); color: var(--white); border-color: var(--black);
}

/* ── Product Section Grid ────────────────────────────────────── */
.product-section {
    padding: 24px 16px 8px;
    max-width: 1400px;
    margin: 0 auto;
}
.section-header {
    display: flex; align-items: baseline;
    justify-content: space-between;
    margin-bottom: 14px;
}
.section-title {
    font-family: 'DM Sans', sans-serif;
    font-size: 20px; font-weight: 800;
}
.see-all-link {
    font-size: 12px; font-weight: 500;
    text-decoration: underline;
    color: var(--gray-dark);
    transition: color var(--transition);
}
.see-all-link:hover { color: var(--black); }

/* Mobile: horizontal scroll */
.product-scroll-wrap {
    position: relative;
}
.product-scroll {
    display: flex; gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}
.product-scroll::-webkit-scrollbar { display: none; }

/* Desktop: grid */
@media (min-width: 769px) {
    .product-scroll {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        overflow: visible;
        gap: 16px;
    }
    .product-section { padding: 32px 40px 16px; }
    .section-title { font-size: 24px; }
}

/* Scroll arrows (desktop) */
.scroll-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: none;
    align-items: center; justify-content: center;
    z-index: 5;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    font-size: 14px;
}
.scroll-arrow:hover { background: var(--black); color: var(--white); }
@media (min-width: 769px) {
    .scroll-arrow { display: flex; }
}
.scroll-arrow-prev { left: -18px; }
.scroll-arrow-next { right: -18px; }

/* ── Product Card ────────────────────────────────────────────── */
.product-card {
    flex-shrink: 0;
    width: 160px;
    scroll-snap-align: start;
    display: flex; flex-direction: column;
}
@media (min-width: 769px) {
    .product-card { width: auto; }
}

.product-card-img-wrap {
    position: relative;
    aspect-ratio: 1;
    background: var(--cream);
    border-radius: var(--radius);
    overflow: hidden;
}
.product-card-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.product-card:hover .product-card-img { transform: scale(1.04); }

.wishlist-btn {
    position: absolute; top: 10px; right: 10px;
    width: 32px; height: 32px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    transition: all var(--transition);
    backdrop-filter: blur(4px);
    line-height: 1;
    color: var(--black);
}
.wishlist-btn:hover { background: var(--white); transform: scale(1.1); }
.wishlist-btn.active { background: var(--black); color: var(--white); }

.out-of-stock-badge {
    position: absolute; inset: 0;
    background: rgba(250,250,248,0.7);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--gray-dark);
}

.product-card-body { padding: 8px 2px; flex: 1; display: flex; flex-direction: column; gap: 4px; }

.stars { display: flex; align-items: center; gap: 2px; }
.star { font-size: 11px; color: var(--gray-mid); }
.star.filled { color: #F0A500; }
.rating-count { font-size: 10px; color: var(--gray-dark); margin-left: 3px; }

.price-wrap { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
.price-original { font-size: 10px; color: var(--gray-dark); text-decoration: line-through; }
.price-sale { font-size: 12px; font-weight: 600; color: var(--black); }
.price-single { font-size: 14px; font-weight: 600; }

.btn-add-cart {
    display: flex; align-items: center; justify-content: center; gap: 7px;
    width: 100%;
    background: var(--white);
    color: var(--black);
    border: 1px solid var(--black);
    border-radius: 12px;
    padding: 10px 12px;
    font-family: var(--font-body);
    font-size: 12px; font-weight: 500;
    text-transform: none;
    letter-spacing: 0.01em;
    text-align: center;
    margin-top: 6px;
    transition: all var(--transition);
}
.btn-add-cart svg { flex-shrink: 0; transition: stroke var(--transition); }
.btn-add-cart:hover { background: var(--black); color: var(--white); }
.btn-add-cart:hover svg { stroke: var(--white); }
.btn-add-cart:disabled {
    opacity: 0.4; cursor: not-allowed;
    border-color: var(--gray-mid); color: var(--gray-dark);
}

/* ── Category Filter Bar ─────────────────────────────────────
   The bar itself must have overflow:visible so the sort drawer
   can escape below it. The chips live in their own child div
   that handles horizontal scrolling independently.
─────────────────────────────────────────────────────────── */
.cat-filter-bar {
    display: flex; align-items: center;
    gap: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    /* Mobile: below sticky header + sticky category nav row */
    top: calc(var(--header-h) + var(--catnav-h));
    background: var(--white);
    z-index: 1095; /* above sort backdrop (1090) */
    overflow: visible; /* MUST be visible — never auto/hidden */
}
@media (min-width: 769px) {
    /* Desktop: category-nav-row is hidden; account for header-inner (60px) + desktop-nav (44px) */
    .cat-filter-bar { top: calc(var(--header-h) + 44px); }
}

/* Scrollable chip strip — overflow only here, not on the bar */
.filter-chips-scroll {
    display: flex; align-items: center;
    gap: 6px;
    flex: 1; min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.filter-chips-scroll::-webkit-scrollbar { display: none; }

.filter-label {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 8px;
    color: var(--black);
}

/* Sort button wrapper — position:relative so the drawer anchors to it */
.sort-btn-wrap {
    position: relative;
    flex-shrink: 0;
    margin-left: 8px;
}

.filter-chip {
    white-space: nowrap;
    font-size: 13px; font-weight: 600;
    padding: 6px 14px;
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: all var(--transition);
    color: var(--black);
    background: var(--white);
    flex-shrink: 0;
}
.filter-chip:hover, .filter-chip.active {
    background: var(--black); color: var(--white); border-color: var(--black);
}

.sort-btn {
    flex-shrink: 0;
    width: 36px; height: 36px;
    border: 1px solid var(--border);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    transition: all var(--transition);
}
.sort-btn:hover { background: var(--black); color: var(--white); border-color: var(--black); }
.sort-btn.open  { background: var(--black); color: var(--white); border-color: var(--black); }

/* ── Sort Backdrop ───────────────────────────────────────────
   top is set by JS to filterBar.getBoundingClientRect().bottom
   so the filter bar row stays visible above it.
─────────────────────────────────────────────────────────── */
.sort-backdrop {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    top: 0; /* overridden by JS */
    background: rgba(0,0,0,0.52);
    z-index: 1090;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.sort-backdrop.active { opacity: 1; pointer-events: all; }

/* ── Sort Drawer ─────────────────────────────────────────────
   Mobile  : position:fixed bottom sheet sliding up.
   Desktop : position:absolute dropdown anchored to .sort-btn-wrap,
             so it always appears just below the button without
             any JS coordinate calculation needed.
─────────────────────────────────────────────────────────── */
.sort-drawer {
    /* Mobile — full-width bottom sheet */
    position: fixed;
    bottom: 0; left: 0; right: 0; top: auto;
    background: var(--white);
    border-radius: 20px 20px 0 0;
    padding: 20px 24px 32px;
    z-index: 1100;
    transform: translateY(100%);
    opacity: 1;
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    box-shadow: var(--shadow-lg);
}
.sort-drawer.open { transform: translateY(0); }

@media (min-width: 769px) {
    .sort-drawer {
        /* Desktop — small dropdown anchored below the sort button */
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        left: auto; bottom: auto;
        width: 260px;
        border-radius: var(--radius);
        z-index: 400; /* above content, below backdrop (1090) — backdrop is behind drawer */
        transform: translateY(-6px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.2s cubic-bezier(0.4,0,0.2,1),
                    opacity  0.2s cubic-bezier(0.4,0,0.2,1);
        box-shadow: 0 8px 40px rgba(0,0,0,0.18);
    }
    .sort-drawer.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
        z-index: 1100; /* raise above backdrop when open */
    }
}

.sort-drawer-title {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.1em; text-transform: uppercase;
    margin-bottom: 14px;
}
.sort-option {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 0;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    color: var(--gray-dark);
    transition: color var(--transition);
}
.sort-option:last-child { border-bottom: none; }
.sort-option:hover { color: var(--black); font-weight: 600; }
.sort-option.active {
    font-weight: 700;
    color: var(--black);
}
.sort-option.active::before {
    content: '';
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--black);
    border-radius: 50%;
    flex-shrink: 0;
}

/* Category products grid */
.cat-products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    padding: 16px;
    max-width: 1400px;
    margin: 0 auto;
}
@media (min-width: 769px) {
    .cat-products-grid { grid-template-columns: repeat(3, 1fr); padding: 24px 40px; gap: 24px; }
}
@media (min-width: 1100px) {
    .cat-products-grid { grid-template-columns: repeat(4, 1fr); }
}
.cat-products-grid .product-card { width: auto; }

/* ── Product Detail Page ─────────────────────────────────────── */
.pdp-layout {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
@media (min-width: 769px) {
    .pdp-layout { flex-direction: row; padding: 40px; gap: 48px; }
}

.pdp-images { flex: 1; }
.pdp-main-img-wrap {
    aspect-ratio: 1;
    background: var(--cream);
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
}
.pdp-main-img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.3s; }

.pdp-img-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 36px; height: 36px;
    background: rgba(255,255,255,0.85);
    border-radius: 50%;
    display: none;
    align-items: center; justify-content: center;
    font-size: 16px;
    box-shadow: var(--shadow);
    z-index: 2;
}
@media (min-width: 769px) { .pdp-img-arrow { display: flex; } }
.pdp-img-arrow-prev { left: 12px; }
.pdp-img-arrow-next { right: 12px; }

.pdp-thumbnails {
    display: flex; gap: 10px;
    overflow-x: auto;
    padding: 12px 0;
    scrollbar-width: none;
}
.pdp-thumbnails::-webkit-scrollbar { display: none; }
@media (min-width: 769px) {
    .pdp-thumbnails { flex-wrap: wrap; gap: 12px; }
}

.pdp-thumb {
    width: 64px; height: 64px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--transition);
}
@media (min-width: 769px) { .pdp-thumb { width: 80px; height: 80px; } }
.pdp-thumb.active { border-color: var(--black); }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }

.pdp-info { flex: 1; display: flex; flex-direction: column; gap: 14px; }
.pdp-product-name { font-family: var(--font-display); font-size: 26px; font-weight: 800; line-height: 1.2; }
@media (min-width: 769px) { .pdp-product-name { font-size: 32px; } }

.pdp-variation-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-dark);
    margin-top: -6px;
    min-height: 20px;
}

.pdp-price-wrap { display: flex; align-items: center; gap: 10px; }
.pdp-price-sale { font-size: 22px; font-weight: 700; }
.pdp-price-orig { font-size: 14px; color: var(--gray-dark); text-decoration: line-through; }

.pdp-qty-row {
    display: flex; align-items: center; gap: 12px;
}
.pdp-qty-ctrl {
    display: flex; align-items: center;
    border: 1px solid var(--black);
    border-radius: 100px;
    overflow: hidden;
}
.pdp-qty-btn {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 300;
    transition: background var(--transition);
    background: var(--black); color: var(--white);
}
.pdp-qty-btn:first-child { border-right: none; }
.pdp-qty-btn:last-child  { border-left: none; }
.pdp-qty-num {
    min-width: 40px; text-align: center;
    font-size: 15px; font-weight: 600;
    background: var(--white); color: var(--black);
    height: 36px; display: flex; align-items: center; justify-content: center;
}

.pdp-add-cart {
    flex: 1;
    background: var(--black); color: var(--white);
    border-radius: 100px;
    padding: 0 24px; height: 44px;
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    transition: opacity var(--transition);
}
.pdp-add-cart:hover { opacity: 0.85; }

.pdp-buy-now {
    width: 100%;
    border: 2px solid var(--black);
    border-radius: 100px;
    padding: 12px;
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    text-align: center;
    display: block;
    transition: all var(--transition);
    color: var(--black);
}
.pdp-buy-now:hover { background: var(--black); color: var(--white); }

.pdp-description h3 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.pdp-description p, .pdp-description div { font-size: 14px; color: var(--gray-dark); line-height: 1.7; }

/* ── Checkout Page ───────────────────────────────────────────── */
.checkout-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 24px;
}
.checkout-title {
    font-family: var(--font-display);
    font-size: 32px; font-weight: 800;
    margin-bottom: 24px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--black);
    display: inline-block;
}

.checkout-layout {
    display: flex; flex-direction: column; gap: 20px;
}
@media (min-width: 769px) {
    .checkout-layout { flex-direction: row; gap: 32px; align-items: flex-start; }
    .checkout-left { flex: 1.2; }
    .checkout-right { flex: 1; position: sticky; top: calc(var(--header-h) + 20px); }
}

.checkout-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.checkout-card h2 {
    font-size: 16px; font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--black);
    display: inline-block;
}
.order-summary-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid var(--black);
    padding-bottom: 10px;
    margin-bottom: 16px;
}
.order-summary-header h2 {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
    display: block;
}

/* Floating label inputs */
.form-field {
    position: relative;
    margin-bottom: 14px;
}
.form-field input,
.form-field select {
    width: 100%;
    padding: 22px 14px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: var(--font-body);
    background: var(--cream);
    color: var(--black);
    outline: none;
    transition: border-color var(--transition);
    appearance: none;
}
.form-field input:focus,
.form-field select:focus { border-color: var(--black); }

.form-field label {
    position: absolute;
    top: 50%; left: 14px;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--gray-dark);
    pointer-events: none;
    transition: all 0.2s;
}
.form-field input:focus ~ label,
.form-field input:not(:placeholder-shown) ~ label,
.form-field select:focus ~ label,
.form-field select:not([value=""]) ~ label {
    top: 7px;
    transform: translateY(0);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0.01em;
    text-transform: none;
    color: var(--gray-dark);
}
.form-field input::placeholder { color: transparent; }

.select-arrow {
    position: absolute; right: 14px; top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gray-dark);
    font-size: 12px;
}

.save-info-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--gray-dark);
    margin-top: 4px;
}
.save-info-row input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--black); }

.info-card-row {
    display: flex; justify-content: space-between;
    align-items: center;
    font-size: 14px;
    padding: 4px 0;
}
.info-card-row span:last-child { font-weight: 500; }

.payment-method-display {
    background: var(--cream);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 14px; font-weight: 500;
    color: var(--black);
    margin-top: 4px;
}

/* Order summary card in checkout */
.co-summary-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; }
.co-summary-items { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.co-summary-thumb { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; position: relative; }
.co-item-badge {
    position: absolute; top: -6px; right: -6px;
    background: var(--black); color: var(--white);
    width: 18px; height: 18px;
    border-radius: 50%; font-size: 10px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.co-summary-math { font-size: 12px; color: var(--gray-dark); display: flex; gap: 8px; align-items: center; }
.co-summary-math span { font-weight: 600; color: var(--black); }

.discount-toggle-btn {
    background: none; border: none;
    font-size: 12px; color: var(--gray-dark);
    text-decoration: underline;
    cursor: pointer; margin-left: auto; display: flex; align-items: center; gap: 4px;
    transition: color var(--transition);
}
.discount-toggle-btn:hover { color: var(--black); }
.discount-input-row {
    display: none;
    gap: 8px; margin-top: 8px;
}
.discount-input-row.show { display: flex; }
.discount-input-row input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    background: var(--cream);
}
.discount-input-row input:focus { border-color: var(--black); }
.btn-apply-discount {
    background: var(--black); color: var(--white);
    border-radius: var(--radius-sm);
    padding: 0 14px; font-size: 12px; font-weight: 600;
    letter-spacing: 0.04em;
    transition: opacity var(--transition);
}
.btn-apply-discount:hover { opacity: 0.8; }
.discount-msg { font-size: 12px; margin-top: 4px; }
.discount-msg.success { color: #1a7a2e; }
.discount-msg.error { color: #c0392b; }

.btn-complete-order {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%;
    background: var(--black); color: var(--white);
    border-radius: 100px;
    padding: 15px;
    font-size: 14px; font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    margin-top: 16px;
    transition: opacity var(--transition);
}
.btn-complete-order:hover { opacity: 0.85; }
.btn-complete-order svg { flex-shrink: 0; }

/* ── Track Order Page ────────────────────────────────────────── */
.track-page {
    max-width: 560px; margin: 60px auto; padding: 0 16px;
    text-align: center;
}
.track-page h1 {
    font-family: var(--font-display);
    font-size: 32px; font-weight: 800;
    margin-bottom: 8px;
}
.track-page p { color: var(--gray-dark); margin-bottom: 28px; font-size: 15px; }

.track-form { display: flex; gap: 10px; max-width: 420px; margin: 0 auto 24px; }
.track-form input {
    flex: 1; padding: 13px 16px;
    border: 2px solid var(--black); border-radius: 100px;
    font-size: 14px; outline: none;
    font-family: var(--font-body);
    background: var(--white);
}
.btn-track {
    background: var(--black); color: var(--white);
    border-radius: 100px;
    padding: 13px 24px;
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.05em;
    transition: opacity var(--transition);
}
.btn-track:hover { opacity: 0.85; }

.track-result {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 24px;
    text-align: left;
    border: 1px solid var(--border);
    margin-top: 16px;
}
.track-status-badge {
    display: inline-block;
    background: var(--black); color: var(--white);
    border-radius: 100px; padding: 4px 14px;
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.06em; text-transform: uppercase;
    margin-bottom: 12px;
}
.track-info-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid var(--border); }
.track-info-row:last-child { border-bottom: none; }

/* ── Legal/Info Pages ────────────────────────────────────────── */
.page-content-wrap {
    max-width: 760px; margin: 0 auto;
    padding: 40px 16px;
}
.page-content-wrap h2 {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 800; margin-bottom: 20px;
}
.page-content-wrap h3 { font-size: 17px; margin: 18px 0 8px; }
.page-content-wrap p { font-size: 14px; color: var(--gray-dark); line-height: 1.8; margin-bottom: 12px; }
.page-content-wrap ul { padding-left: 20px; margin-bottom: 12px; }
.page-content-wrap ul li { font-size: 14px; color: var(--gray-dark); line-height: 1.8; margin-bottom: 4px; }
.page-content-wrap a { text-decoration: underline; }

/* ── Wishlist Page ───────────────────────────────────────────── */
.wishlist-page {
    max-width: 1400px; margin: 0 auto;
    padding: 32px 16px;
}
.wishlist-empty {
    text-align: center;
    padding: 80px 16px;
    color: var(--gray-dark);
}
.wishlist-empty h2 {
    font-family: var(--font-display);
    font-size: 24px; font-weight: 800; margin-bottom: 8px;
    color: var(--black);
}

/* ── Page Main Wrapper (keeps footer at bottom) ─────────────── */
.site-main { flex: 1; }

/* ── Footer ─────────────────────────────────────────────────── */
.site-footer {
    background: var(--black);
    color: var(--white);
    padding: 40px 16px;
    margin-top: 0;
}
.footer-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}
@media (min-width: 769px) {
    .footer-inner { flex-direction: row; align-items: flex-start; text-align: left; gap: 48px; }
}

.footer-logo-img { height: 48px; filter: invert(1); }
.footer-logo .logo-text { color: var(--white); }

.footer-social { display: flex; gap: 12px; }
.footer-social .social-icon { color: var(--white); }
.footer-social .social-icon:hover { background: rgba(255,255,255,0.15); }

.footer-links {
    display: flex; flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    font-size: 12px;
}
@media (min-width: 769px) { .footer-links { justify-content: flex-start; } }
.footer-links a {
    color: rgba(255,255,255,0.7);
    transition: color var(--transition);
    text-decoration: underline;
}
.footer-links a:hover { color: var(--white); }
.footer-links span { color: rgba(255,255,255,0.5); }

/* ── Misc Utilities ─────────────────────────────────────────── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 769px) { .container { padding: 0 40px; } }

.visually-hidden { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* Order Confirm Page */
.order-confirm-page {
    max-width: 560px; margin: 60px auto;
    padding: 40px 24px; text-align: center;
    background: var(--cream);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.order-confirm-page h1 {
    font-family: var(--font-display);
    font-size: 28px; font-weight: 800; margin-bottom: 12px;
}
.order-confirm-page p { color: var(--gray-dark); font-size: 15px; line-height: 1.7; }
.order-confirm-page .order-num {
    font-size: 22px; font-weight: 800;
    font-family: var(--font-display);
    margin: 16px 0;
}
.btn-primary {
    display: inline-block;
    background: var(--black); color: var(--white);
    border-radius: 100px;
    padding: 12px 28px;
    font-size: 13px; font-weight: 700;
    letter-spacing: 0.06em;
    margin-top: 20px;
    transition: opacity var(--transition);
}
.btn-primary:hover { opacity: 0.85; }

/* Scrollbar styling */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-light); border-radius: 3px; }