/* =========================================================================
   AURELIA — MASTER STYLESHEET
   Single stylesheet driving storefront + admin, across 10 selectable themes.
   Themes are pure CSS custom-property swaps on [data-theme] — no extra files.
   ========================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700;800&family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=Montserrat:wght@500;600;700;800&display=swap');

/* -------------------------------------------------------------------------
   1. THEME TOKENS
   ------------------------------------------------------------------------- */
:root {
    --bg: #0b0b0d;
    --surface: #16161a;
    --surface-2: #1e1e23;
    --text: #f5f1e8;
    --text-muted: #a9a49a;
    --primary: #cba135;
    --primary-text: #14120a;
    --accent: #e8c766;
    --border: #2a2a2f;
    --radius: 6px;
    --radius-lg: 14px;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --success: #2fae66;
    --danger: #e5484d;
    --warning: #e8a13b;
    --shadow: 0 10px 30px -12px rgba(0,0,0,0.35);
    --shadow-sm: 0 2px 10px -4px rgba(0,0,0,0.25);
    --header-h: 72px;
}

/* Theme 1 — Luxe Noir (Black & Gold luxury) — default, root values above */
[data-theme="luxe-noir"] {
    --bg: #0b0b0d; --surface: #16161a; --surface-2: #1e1e23;
    --text: #f5f1e8; --text-muted: #a9a49a;
    --primary: #cba135; --primary-text: #14120a; --accent: #e8c766;
    --border: #2a2a2f; --radius: 6px; --radius-lg: 14px;
    --font-display: 'Playfair Display', Georgia, serif; --font-body: 'Inter', sans-serif;
}

/* Theme 2 — Azure SaaS (Modern Blue/White) */
[data-theme="azure-saas"] {
    --bg: #ffffff; --surface: #f3f6fb; --surface-2: #eaf0f9;
    --text: #0f172a; --text-muted: #64748b;
    --primary: #2563eb; --primary-text: #ffffff; --accent: #0ea5e9;
    --border: #e2e8f0; --radius: 12px; --radius-lg: 20px;
    --font-display: 'Montserrat', sans-serif; --font-body: 'Inter', sans-serif;
}

/* Theme 3 — Mono Editorial (Minimal Black & White) */
[data-theme="mono-editorial"] {
    --bg: #ffffff; --surface: #fafafa; --surface-2: #f0f0f0;
    --text: #0a0a0a; --text-muted: #6b6b6b;
    --primary: #0a0a0a; --primary-text: #ffffff; --accent: #0a0a0a;
    --border: #e2e2e2; --radius: 0px; --radius-lg: 0px;
    --font-display: Georgia, 'Times New Roman', serif; --font-body: Helvetica, Arial, sans-serif;
}

/* Theme 4 — Vivid Bloom (Colorful fashion) */
[data-theme="vivid-bloom"] {
    --bg: #fff7fb; --surface: #ffffff; --surface-2: #ffeef6;
    --text: #1a0e1f; --text-muted: #7a6274;
    --primary: #ff2d78; --primary-text: #ffffff; --accent: #ffb703;
    --border: #ffd6e8; --radius: 18px; --radius-lg: 26px;
    --font-display: 'Poppins', sans-serif; --font-body: 'Inter', sans-serif;
}

/* Theme 5 — Emerald Classic */
[data-theme="emerald-classic"] {
    --bg: #f6fbf7; --surface: #ffffff; --surface-2: #ecf6ee;
    --text: #0f2417; --text-muted: #587062;
    --primary: #0f7a4c; --primary-text: #ffffff; --accent: #c9a227;
    --border: #d8ece0; --radius: 8px; --radius-lg: 16px;
    --font-display: 'Playfair Display', serif; --font-body: 'Inter', sans-serif;
}

/* Theme 6 — Rose Quartz */
[data-theme="rose-quartz"] {
    --bg: #fff5f7; --surface: #ffffff; --surface-2: #ffe9ee;
    --text: #3a1f26; --text-muted: #8a6a72;
    --primary: #c2477d; --primary-text: #ffffff; --accent: #f4c2c2;
    --border: #f3d9e2; --radius: 20px; --radius-lg: 28px;
    --font-display: 'Poppins', sans-serif; --font-body: 'Inter', sans-serif;
}

/* Theme 7 — Ocean Breeze */
[data-theme="ocean-breeze"] {
    --bg: #f0f9fc; --surface: #ffffff; --surface-2: #e2f3f8;
    --text: #08313f; --text-muted: #4d7885;
    --primary: #0891b2; --primary-text: #ffffff; --accent: #14b8a6;
    --border: #cdeef5; --radius: 14px; --radius-lg: 22px;
    --font-display: 'Montserrat', sans-serif; --font-body: 'Inter', sans-serif;
}

/* Theme 8 — Terra Sunset */
[data-theme="terra-sunset"] {
    --bg: #fff8f0; --surface: #ffffff; --surface-2: #fbebd8;
    --text: #3a2113; --text-muted: #8a6a4f;
    --primary: #d2691e; --primary-text: #ffffff; --accent: #e07a3f;
    --border: #f2ddc4; --radius: 10px; --radius-lg: 18px;
    --font-display: 'Playfair Display', serif; --font-body: 'Inter', sans-serif;
}

/* Theme 9 — Forest Earth */
[data-theme="forest-earth"] {
    --bg: #f5f4ea; --surface: #ffffff; --surface-2: #ebe9d8;
    --text: #23291d; --text-muted: #6b7360;
    --primary: #4a6741; --primary-text: #ffffff; --accent: #8b6f47;
    --border: #e0ddc9; --radius: 6px; --radius-lg: 12px;
    --font-display: 'Montserrat', sans-serif; --font-body: 'Inter', sans-serif;
}

/* Theme 10 — Royal Orchid */
[data-theme="royal-orchid"] {
    --bg: #f8f6fc; --surface: #ffffff; --surface-2: #eee6fa;
    --text: #241b33; --text-muted: #74697f;
    --primary: #6d28d9; --primary-text: #ffffff; --accent: #a78bfa;
    --border: #e6dcf7; --radius: 16px; --radius-lg: 24px;
    --font-display: 'Poppins', sans-serif; --font-body: 'Inter', sans-serif;
}

/* -------------------------------------------------------------------------
   2. RESET & BASE
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.55;
    font-size: 15.5px;
    min-height: 100vh;
    transition: background .25s ease, color .25s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.2; font-weight: 700; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.section { padding-top: 56px; padding-bottom: 56px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); }
.section-head p { color: var(--text-muted); margin-top: 6px; font-size: 14.5px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 700; color: var(--primary); margin-bottom: 8px; display: inline-block; }
.text-muted { color: var(--text-muted); }
.link-more { font-weight: 600; font-size: 14px; color: var(--primary); white-space: nowrap; }
.link-more:hover { text-decoration: underline; }

/* -------------------------------------------------------------------------
   3. BUTTONS
   ------------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--radius); border: 1px solid transparent;
    font-weight: 600; font-size: 14.5px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, background .15s ease;
    white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--primary); color: var(--primary-text); box-shadow: var(--shadow-sm); }
.btn-primary:hover { opacity: .92; box-shadow: var(--shadow); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-lg { padding: 15px 30px; font-size: 15.5px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--border); cursor: pointer; }
.btn-icon:hover { border-color: var(--primary); color: var(--primary); }

/* -------------------------------------------------------------------------
   4. HEADER / NAV
   ------------------------------------------------------------------------- */
.topbar { background: var(--surface-2); border-bottom: 1px solid var(--border); font-size: 12.5px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 34px; color: var(--text-muted); }
.topbar-links { display: flex; gap: 18px; }
.topbar-links a:hover { color: var(--primary); }

/* Announcement bar — deliberately has NO mobile hide rule; shown on every device, unlike .topbar above. */
.announcement-bar { background: var(--primary); color: var(--primary-text); font-size: 12.5px; font-weight: 600; text-align: center; }
.announcement-bar .container { display: flex; align-items: center; justify-content: center; position: relative; min-height: 34px; padding-top: 6px; padding-bottom: 6px; }
.announcement-bar-text { color: inherit; text-decoration: none; padding: 0 30px; }
.announcement-bar a.announcement-bar-text:hover { text-decoration: underline; }
.announcement-bar-close { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); background: none; border: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; opacity: .8; padding: 4px; }
.announcement-bar-close:hover { opacity: 1; }

.site-header { position: sticky; top: 0; z-index: 500; background: var(--bg); border-bottom: 1px solid var(--border); backdrop-filter: blur(8px); }
.site-header .container { display: flex; align-items: center; gap: 22px; height: var(--header-h); }
.logo { font-family: var(--font-display); font-size: 24px; font-weight: 800; letter-spacing: .03em; color: var(--text); flex-shrink: 0; display: flex; align-items: center; }
.logo-img { max-height: 40px; max-width: 160px; object-fit: contain; }
.logo span { color: var(--primary); }

.main-nav { display: flex; gap: 26px; flex: 1; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.main-nav::-webkit-scrollbar { display: none; }
.main-nav a { font-weight: 600; font-size: 14.5px; color: var(--text); position: relative; padding: 6px 0; white-space: nowrap; flex-shrink: 0; }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }

.header-search { flex: 1; max-width: 420px; position: relative; }
.header-search input {
    width: 100%; padding: 11px 44px 11px 16px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text);
}
.header-search input:focus { border-color: var(--primary); }
.header-search button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); background: var(--primary); color: var(--primary-text); border: none; width: 34px; height: 34px; border-radius: 50%; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; margin-left: auto; }
@media (max-width: 700px) {
    .header-actions .pwa-install-btn, .header-actions .notify-toggle-btn { display: none !important; }
}
.icon-btn { position: relative; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 50%; }
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.active svg { stroke: var(--primary); }
.icon-btn svg { width: 21px; height: 21px; stroke: var(--text); fill: none; stroke-width: 1.8; }
.badge-count {
    position: absolute; top: 2px; right: 2px; background: var(--primary); color: var(--primary-text);
    font-size: 10px; font-weight: 800; width: 17px; height: 17px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.hamburger { display: none; width: 42px; height: 42px; border-radius: 50%; align-items: center; justify-content: center; }
.hamburger span, .hamburger span::before, .hamburger span::after { content: ''; display: block; width: 20px; height: 2px; background: var(--text); position: relative; transition: .2s; }
.hamburger span::before { position: absolute; top: -6px; }
.hamburger span::after { position: absolute; top: 6px; }

.mobile-search { display: none; padding: 10px 20px 14px; }

/* Mobile drawer nav */
.mobile-nav-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 900; opacity: 0; pointer-events: none; transition: opacity .2s; }
.mobile-nav-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-nav {
    position: fixed; top: 0; left: 0; height: 100%; width: 82%; max-width: 320px;
    background: var(--bg); z-index: 950; transform: translateX(-105%); transition: transform .25s ease;
    box-shadow: var(--shadow); overflow-y: auto; padding: 20px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.mobile-nav a { display: block; padding: 13px 4px; font-weight: 600; border-bottom: 1px solid var(--border); }
.mobile-nav .close-btn { font-size: 26px; cursor: pointer; line-height: 1; background: none; border: none; color: var(--text); }

/* -------------------------------------------------------------------------
   5. HERO / BANNERS
   ------------------------------------------------------------------------- */
.hero-slider { position: relative; overflow: hidden; border-radius: 0; }
.hero-slide { position: relative; height: min(60vw, 460px); min-height: 260px; display: none; }
.hero-slide.active { display: block; }
.hero-slide picture { display: block; width: 100%; height: 100%; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide .hero-overlay {
    position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center;
    padding: 6vw; background: linear-gradient(90deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
}
.hero-slide h1 { color: #fff; font-size: clamp(26px, 5vw, 48px); max-width: 560px; }
.hero-slide p { color: #f1f1f1; margin-top: 12px; max-width: 440px; font-size: 15.5px; }
.hero-slide .btn { margin-top: 22px; width: fit-content; }
.hero-dots { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.hero-dots button { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.5); border: none; cursor: pointer; }
.hero-dots button.active { background: #fff; width: 22px; border-radius: 4px; transition: .2s; }

/* -------------------------------------------------------------------------
   6. CATEGORY GRID
   ------------------------------------------------------------------------- */
.cat-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.cat-card { text-align: center; }
.cat-card .cat-thumb { border-radius: 50%; overflow: hidden; aspect-ratio: 1; margin-bottom: 10px; border: 2px solid var(--border); transition: border-color .2s, transform .2s; }
.cat-card:hover .cat-thumb { border-color: var(--primary); transform: translateY(-3px); }
.cat-card span { font-weight: 600; font-size: 13.5px; }

/* -------------------------------------------------------------------------
   7. PRODUCT CARDS / GRID
   ------------------------------------------------------------------------- */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.product-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    overflow: hidden; position: relative; transition: box-shadow .2s ease, transform .2s ease;
    display: flex; flex-direction: column;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.product-thumb { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--surface-2); }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.product-card:hover .product-thumb img { transform: scale(1.06); }
.product-badge {
    position: absolute; top: 10px; left: 10px; background: var(--primary); color: var(--primary-text);
    font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; letter-spacing: .02em;
}
.wishlist-toggle {
    position: absolute; top: 8px; right: 8px; width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.9);
    display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; color: #333;
}
.wishlist-toggle.active { color: #e5484d; }
.wishlist-toggle svg { width: 17px; height: 17px; }
/* When used as a standalone icon button outside a .product-thumb card (e.g. product
   detail page actions row), the absolute positioning above must be neutralized —
   otherwise it escapes to the nearest positioned ancestor (often the page itself). */
.btn-icon.wishlist-toggle { position: static; top: auto; right: auto; background: var(--surface-2); }
.btn-icon.wishlist-toggle.active { color: #e5484d; border-color: #e5484d; }
.product-info { padding: 14px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.product-cat { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); font-weight: 700; }
.product-name { font-size: 14.5px; font-weight: 600; line-height: 1.35; min-height: 39px; }
.product-name a:hover { color: var(--primary); }
.product-rating { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.stars { position: relative; display: inline-block; font-size: 13px; line-height: 1; white-space: nowrap; }
.stars-empty { color: var(--border); letter-spacing: 2px; }
.stars-fill { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; color: var(--accent); letter-spacing: 2px; }
.product-price { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.price-now { font-size: 17px; font-weight: 800; }
.price-old { font-size: 13px; color: var(--text-muted); text-decoration: line-through; }
.add-cart-btn {
    margin-top: 10px; width: 100%; padding: 10px; border-radius: var(--radius); border: 1px solid var(--primary);
    background: transparent; color: var(--primary); font-weight: 700; font-size: 13.5px; cursor: pointer; transition: .15s;
}
.add-cart-btn:hover { background: var(--primary); color: var(--primary-text); }
.add-cart-btn.added { background: var(--success); border-color: var(--success); color: #fff; }
.out-of-stock { opacity: .55; }
.out-of-stock .add-cart-btn { pointer-events: none; background: var(--surface-2); border-color: var(--border); color: var(--text-muted); }

/* -------------------------------------------------------------------------
   7b. REELS & SHORTS SCROLLER
   ------------------------------------------------------------------------- */
.reel-scroller-wrap { position: relative; }
.reel-scroller {
    display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x proximity; scroll-behavior: smooth;
    padding-bottom: 6px; scrollbar-width: none; -ms-overflow-style: none;
}
.reel-scroller::-webkit-scrollbar { display: none; }
.reel-card {
    flex: 0 0 180px; scroll-snap-align: start; aspect-ratio: 9 / 16; border-radius: var(--radius-lg);
    overflow: hidden; position: relative; display: block; background: var(--surface-2);
    border: 1px solid var(--border); transition: transform .2s ease, box-shadow .2s ease;
}
.reel-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.reel-play-trigger {
    position: absolute; inset: 0; width: 100%; height: 100%; display: block; border: 0; margin: 0; padding: 0;
    background: none; cursor: pointer; font: inherit; text-align: inherit; -webkit-appearance: none;
}
.reel-card.playing .reel-play-trigger { display: none; }
.reel-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.reel-close {
    display: none; position: absolute; top: 8px; right: 8px; width: 28px; height: 28px; border-radius: 50%;
    background: rgba(0,0,0,.6); color: #fff; align-items: center; justify-content: center; font-size: 18px;
    line-height: 1; cursor: pointer; z-index: 2;
}
.reel-card.playing .reel-close { display: flex; }
.reel-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reel-platform-badge {
    position: absolute; top: 10px; left: 10px; width: 26px; height: 26px; border-radius: 50%;
    background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center;
}
.reel-platform-badge svg { width: 15px; height: 15px; }
.reel-platform-youtube { color: #ff0000; }
.reel-play-icon {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 46px; height: 46px;
    border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center;
    opacity: .9; transition: opacity .2s ease, transform .2s ease;
}
.reel-play-icon svg { width: 20px; height: 20px; margin-left: 2px; }
.reel-card:hover .reel-play-icon { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
.reel-caption {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 20px 10px 10px; color: #fff; font-size: 12.5px;
    font-weight: 600; line-height: 1.3; background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.reel-arrow {
    display: none; position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px;
    border-radius: 50%; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
    align-items: center; justify-content: center; font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; color: var(--text);
}
.reel-arrow-prev { left: -18px; }
.reel-arrow-next { right: -18px; }
@media (min-width: 900px) {
    .reel-arrow { display: flex; }
}

/* -------------------------------------------------------------------------
   7c. SHOP THE LOOK — shoppable lifestyle photos with product hotspots
   ------------------------------------------------------------------------- */
.lookbook-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.lookbook-card {
    position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 4 / 5;
    background: var(--surface-2); border: 1px solid var(--border);
}
.lookbook-card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lookbook-title {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 14px 12px; color: #fff;
    font-weight: 700; font-size: 14px; background: linear-gradient(to top, rgba(0,0,0,.65), transparent);
    pointer-events: none;
}
.lookbook-dot {
    position: absolute; width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #111;
    border: none; box-shadow: 0 2px 8px rgba(0,0,0,.35); transform: translate(-50%, -50%); display: flex;
    align-items: center; justify-content: center; cursor: pointer; padding: 0; z-index: 2;
    transition: transform .15s ease;
}
.lookbook-dot svg { width: 14px; height: 14px; transition: transform .2s ease; }
.lookbook-dot:hover { transform: translate(-50%, -50%) scale(1.12); }
.lookbook-dot.active { background: var(--primary); color: var(--primary-text); transform: translate(-50%, -50%) scale(1.12); }
.lookbook-dot.active svg { transform: rotate(45deg); }
.lookbook-popup {
    position: absolute; width: 208px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; z-index: 5; display: flex; gap: 8px;
}
.lookbook-popup img { width: 54px; height: 54px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.lookbook-popup-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.lookbook-popup-info strong {
    font-size: 12.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
}
.lookbook-popup-price { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.lookbook-popup-price .price-now { font-size: 13px; font-weight: 800; }
.lookbook-popup-price .price-old { font-size: 11px; color: var(--text-muted); text-decoration: line-through; }
.lookbook-popup-actions { display: flex; gap: 10px; align-items: center; margin-top: 2px; flex-wrap: wrap; }
.lookbook-popup-close {
    position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; border-radius: 50%;
    background: var(--surface-2); border: none; cursor: pointer; font-size: 14px; line-height: 1;
    color: var(--text-muted);
}
.lookbook-add-btn {
    font-size: 11.5px; font-weight: 700; padding: 5px 9px; border-radius: 6px; border: 1px solid var(--primary);
    background: transparent; color: var(--primary); cursor: pointer; white-space: nowrap;
}
.lookbook-add-btn:hover { background: var(--primary); color: var(--primary-text); }
.lookbook-view-link { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-decoration: underline; white-space: nowrap; }
@media (max-width: 1080px) {
    .lookbook-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .lookbook-grid { grid-template-columns: 1fr; gap: 14px; }
    .lookbook-card { aspect-ratio: 3 / 4; }
}

/* -------------------------------------------------------------------------
   8. FILTER / SHOP LAYOUT
   ------------------------------------------------------------------------- */
.shop-layout { display: grid; grid-template-columns: 250px 1fr; gap: 30px; align-items: start; }
.filter-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px; }
.filter-box + .filter-box { margin-top: 16px; }
.filter-box h4 { font-size: 14px; margin-bottom: 12px; }
.filter-box label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; padding: 5px 0; cursor: pointer; color: var(--text-muted); }
.filter-box label:hover { color: var(--text); }
.price-range-inputs { display: flex; gap: 8px; align-items: center; }
.price-range-inputs input { width: 100%; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); }
.shop-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.shop-toolbar select { padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); }
.mobile-filter-btn { display: none; }
.breadcrumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; display: flex; gap: 6px; flex-wrap: wrap; }
.breadcrumbs a:hover { color: var(--primary); }

/* -------------------------------------------------------------------------
   9. PRODUCT DETAIL
   ------------------------------------------------------------------------- */
.pd-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.pd-gallery-main { position: relative; border-radius: var(--radius-lg); overflow: hidden; aspect-ratio: 1; background: var(--surface); border: 1px solid var(--border); margin-bottom: 12px; cursor: zoom-in; }
.pd-gallery-main img { transition: transform .15s ease; will-change: transform; cursor: zoom-in; }
.pd-zoom-hint {
    position: absolute; bottom: 10px; right: 10px; width: 38px; height: 38px; border-radius: 50%;
    background: rgba(0,0,0,.55); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.pd-thumbs { display: flex; gap: 10px; }
.pd-thumbs img { width: 68px; height: 68px; object-fit: cover; border-radius: var(--radius); border: 2px solid var(--border); cursor: pointer; }
.pd-thumbs img.active { border-color: var(--primary); }
.pd-title { font-size: clamp(22px, 3vw, 30px); margin: 4px 0 10px; }
.pd-price { display: flex; align-items: baseline; gap: 12px; margin: 14px 0; }
.pd-price .price-now { font-size: 28px; }
.pd-desc { color: var(--text-muted); margin: 16px 0; line-height: 1.7; }
.qty-selector { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); width: fit-content; }
.qty-selector button { width: 38px; height: 40px; background: none; border: none; font-size: 17px; cursor: pointer; color: var(--text); }
.qty-selector input { width: 46px; text-align: center; border: none; background: none; height: 40px; }
.pd-actions { display: flex; gap: 12px; margin: 22px 0; flex-wrap: wrap; }
.pd-actions .btn { flex: 1; min-width: 160px; }
.pd-actions .btn-icon { flex: 0 0 auto; min-width: 0; width: 52px; height: 52px; }
.pd-meta { font-size: 13.5px; color: var(--text-muted); display: flex; flex-direction: column; gap: 6px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.pd-tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--border); margin: 48px 0 22px; }

/* Share button dropdown menu */
.pd-share-wrap { position: relative; flex: 0 0 auto; }
.pd-share-wrap .btn-icon { width: 52px; height: 52px; }
.share-menu {
    position: absolute; z-index: 100; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 8px; display: none; flex-direction: column; min-width: 170px;
    top: calc(100% + 8px); right: 0;
}
.share-menu.open { display: flex; }
.share-menu a, .share-menu button {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 6px; font-size: 13.5px; font-weight: 600;
    color: var(--text); background: none; border: none; cursor: pointer; text-align: left; width: 100%;
}
.share-menu a:hover, .share-menu button:hover { background: var(--surface-2); }
.pd-tabs button { background: none; border: none; padding: 12px 2px; font-weight: 700; font-size: 14.5px; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; }
.pd-tabs button.active { color: var(--text); border-color: var(--primary); }
.pd-tab-panel { display: none; line-height: 1.8; color: var(--text-muted); }
.pd-tab-panel.active { display: block; }

/* Reviews */
.reviews-summary { display: flex; gap: 30px; align-items: center; margin-bottom: 24px; }
.reviews-avg { text-align: center; }
.reviews-avg-num { font-size: 40px; font-weight: 800; font-family: var(--font-display); color: var(--text); line-height: 1; margin-bottom: 6px; }
.review-form-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin-bottom: 26px; }
.star-input { display: inline-flex; gap: 4px; font-size: 26px; }
.star-input-star { color: var(--border); cursor: pointer; transition: color .1s; }
.star-input-star.filled { color: var(--accent); }
.review-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: none; }
.review-item-head { display: flex; justify-content: space-between; align-items: center; color: var(--text); }
@media (max-width: 500px) {
    .reviews-summary { gap: 18px; }
}
.stock-pill { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; display: inline-block; }
.stock-pill.in { background: rgba(47,174,102,.15); color: var(--success); }
.stock-pill.out { background: rgba(229,72,77,.15); color: var(--danger); }
.variant-pill {
    padding: 9px 16px; border-radius: var(--radius); border: 1.5px solid var(--border); background: var(--surface);
    color: var(--text); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: .15s;
}
.variant-pill:hover { border-color: var(--primary); }
.variant-pill.selected { border-color: var(--primary); background: var(--primary); color: var(--primary-text); }

/* Fullscreen product image lightbox */
.pd-lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 2000; display: none;
    align-items: center; justify-content: center; padding: 20px;
}
.pd-lightbox.open { display: flex; }
.pd-lightbox img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 6px; }
.pd-lightbox-close { position: absolute; top: 18px; right: 22px; background: none; border: none; color: #fff; font-size: 34px; cursor: pointer; line-height: 1; }
.pd-lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.12); color: #fff; border: none; width: 46px; height: 46px; border-radius: 50%; font-size: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pd-lightbox-nav.prev { left: 18px; }
.pd-lightbox-nav.next { right: 18px; }
.pd-lightbox-nav:hover { background: rgba(255,255,255,.25); }
.pd-lightbox-count { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: #fff; font-size: 13px; background: rgba(255,255,255,.12); padding: 5px 14px; border-radius: 999px; }
@media (max-width: 700px) {
    .pd-lightbox-nav { width: 38px; height: 38px; font-size: 22px; }
}

/* -------------------------------------------------------------------------
   10. CART / CHECKOUT
   ------------------------------------------------------------------------- */
.cart-layout { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; }
.cart-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--border); }
.cart-row img { width: 74px; height: 74px; object-fit: cover; border-radius: var(--radius); background: var(--surface-2); }
.cart-row .cart-name { font-weight: 600; font-size: 14.5px; }
.cart-row .cart-cat { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.cart-row-right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-remove { font-size: 12.5px; color: var(--danger); cursor: pointer; background: none; border: none; }
.summary-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; position: sticky; top: calc(var(--header-h) + 16px); }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; color: var(--text-muted); }
.summary-row.total { color: var(--text); font-weight: 800; font-size: 17px; border-top: 1px solid var(--border); margin-top: 8px; padding-top: 14px; }
.coupon-row { display: flex; gap: 8px; margin: 14px 0; }
.coupon-row input { flex: 1; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); }
.empty-state { text-align: center; padding: 80px 20px; }
.empty-state svg { width: 72px; height: 72px; stroke: var(--text-muted); margin: 0 auto 18px; }
.empty-state h3 { margin-bottom: 8px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.order-view-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; min-width: 0; }
.order-view-layout > div { min-width: 0; }
.form-group { margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 700; }
.form-group input, .form-group select, .form-group textarea {
    padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: var(--primary); }
.form-group .hint { font-size: 12px; color: var(--text-muted); }
.pay-options { display: flex; flex-direction: column; gap: 10px; }
.pay-option { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.pay-option.selected { border-color: var(--primary); background: var(--surface-2); }
.pay-option.disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }
.pay-option input { accent-color: var(--primary); width: 18px; height: 18px; }
.upi-box { background: var(--surface-2); border-radius: var(--radius); padding: 14px; margin-top: 10px; font-size: 13.5px; }
.upi-box code { background: var(--bg); padding: 3px 8px; border-radius: 4px; font-weight: 700; }

/* Desktop shows a scannable UPI QR code; mobile shows a tap-to-pay button.
   Swapped purely with CSS so it works with no JS layout logic. */
.upi-desktop-qr { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 20px; background: var(--surface-2); border-radius: var(--radius-lg); }
.upi-desktop-qr #upiQrCode { background: #fff; padding: 12px; border-radius: var(--radius); }
.upi-desktop-qr #upiQrCode img, .upi-desktop-qr #upiQrCode canvas { display: block; }
.upi-mobile-btn { display: none; }
@media (max-width: 700px) {
    .upi-desktop-qr { display: none; }
    .upi-mobile-btn { display: block; }
}

/* -------------------------------------------------------------------------
   11. AUTH / ACCOUNT
   ------------------------------------------------------------------------- */
.auth-wrap { max-width: 420px; margin: 60px auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 34px; }
.auth-wrap h2 { text-align: center; margin-bottom: 6px; }
.auth-wrap p.text-muted { text-align: center; margin-bottom: 24px; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 14px; color: var(--text-muted); }
.auth-switch a { color: var(--primary); font-weight: 700; }
.account-layout { display: grid; grid-template-columns: 240px 1fr; gap: 26px; }
.account-nav { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 10px; height: fit-content; }
.account-nav a { display: block; padding: 12px 14px; border-radius: var(--radius); font-weight: 600; font-size: 14px; }
.account-nav a:hover, .account-nav a.active { background: var(--surface-2); color: var(--primary); }
.account-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; }

/* -------------------------------------------------------------------------
   12. ORDER TRACKING / TABLES (shared storefront + admin)
   ------------------------------------------------------------------------- */
.order-track { display: flex; justify-content: space-between; margin: 26px 0 34px; position: relative; }
.order-track::before { content: ''; position: absolute; top: 14px; left: 0; right: 0; height: 2px; background: var(--border); }
.track-step { position: relative; z-index: 1; text-align: center; flex: 1; }
.track-step .dot { width: 28px; height: 28px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border); margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; color: var(--text-muted); }
.track-step.done .dot { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.track-step span.label { font-size: 12px; color: var(--text-muted); }
.track-step.done span.label { color: var(--text); font-weight: 700; }

table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th { text-align: left; padding: 12px 14px; background: var(--surface-2); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); border-bottom: 1px solid var(--border); }
table.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data-table tr:hover td { background: var(--surface-2); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }

.status-pill { font-size: 11.5px; font-weight: 800; padding: 4px 11px; border-radius: 999px; text-transform: capitalize; display: inline-block; }
.status-pending { background: rgba(232,161,59,.16); color: var(--warning); }
.status-processing { background: rgba(37,99,235,.15); color: #2563eb; }
.status-shipped { background: rgba(14,165,233,.15); color: #0ea5e9; }
.status-delivered, .status-active, .status-paid { background: rgba(47,174,102,.15); color: var(--success); }
.status-cancelled, .status-inactive, .status-failed { background: rgba(229,72,77,.15); color: var(--danger); }

/* -------------------------------------------------------------------------
   13. FOOTER
   ------------------------------------------------------------------------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 30px; padding: 50px 0 30px; }
.footer-grid h4 { font-size: 14px; margin-bottom: 16px; }
.footer-grid ul li { margin-bottom: 10px; }
.footer-grid ul li a { color: var(--text-muted); font-size: 13.5px; }
.footer-grid ul li a:hover { color: var(--primary); }
.footer-social { display: flex; gap: 10px; margin-top: 16px; }
.footer-social a { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: flex; align-items: center; justify-content: center; }
.footer-bottom { border-top: 1px solid var(--border); padding: 18px 0; display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: var(--text-muted); flex-wrap: wrap; gap: 10px; }
.payment-icons { display: flex; gap: 8px; font-size: 11px; }
.payment-icons span { border: 1px solid var(--border); padding: 3px 8px; border-radius: 4px; }

/* -------------------------------------------------------------------------
   14. TOASTS / MODALS
   ------------------------------------------------------------------------- */
.toast-wrap { position: fixed; top: 18px; right: 18px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
    background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--success);
    padding: 14px 18px; border-radius: var(--radius); box-shadow: var(--shadow); font-size: 13.5px; min-width: 240px;
    animation: toast-in .25s ease;
}
.toast.error { border-left-color: var(--danger); }
@keyframes toast-in { from { transform: translateX(30px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1500; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal-box { background: var(--surface); border-radius: var(--radius-lg); max-width: 480px; width: 100%; padding: 26px; box-shadow: var(--shadow); max-height: 88vh; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-head button { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); }

/* Offers pop-up (includes/footer.php, toggled from admin/settings.php) */
.offer-popup-box { position: relative; max-width: 420px; padding: 0; overflow: hidden; }
.offer-popup-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(0,0,0,.45); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.offer-popup-close:hover { background: rgba(0,0,0,.65); }
.offer-popup-img { width: 100%; aspect-ratio: 1.4; object-fit: cover; display: block; }
.offer-popup-body { padding: 24px 26px 28px; text-align: center; }
.offer-popup-body h3 { font-size: 21px; margin-bottom: 10px; }
.offer-popup-body p { color: var(--text-muted); font-size: 14px; line-height: 1.6; margin-bottom: 18px; }

/* -------------------------------------------------------------------------
   15. ADMIN LAYOUT
   ------------------------------------------------------------------------- */
.admin-body { background: var(--surface-2); }
.admin-shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
.admin-sidebar { background: var(--bg); border-right: 1px solid var(--border); padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-logo { font-family: var(--font-display); font-size: 20px; font-weight: 800; padding: 10px 10px 22px; display: flex; align-items: center; gap: 8px; }
.admin-logo span { color: var(--primary); }
.admin-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 12px; border-radius: var(--radius); font-weight: 600; font-size: 14px; color: var(--text-muted); margin-bottom: 3px; }
.admin-nav a svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.admin-nav a:hover { background: var(--surface-2); color: var(--text); }
.admin-nav a.active { background: var(--primary); color: var(--primary-text); }
.admin-nav .nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--text-muted); margin: 18px 10px 8px; font-weight: 700; }

.admin-main { padding: 24px 28px 60px; min-width: 0; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 22px; gap: 12px; flex-wrap: wrap; }
.admin-topbar h1 { font-size: 22px; }
.admin-burger { display: none; }

.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 26px; }
.stat-grid-auto { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.analytics-2col, .analytics-3col { display: grid; gap: 20px; align-items: start; margin-bottom: 20px; }
.analytics-2col { grid-template-columns: 1fr 1fr; }
.analytics-2col-wide { grid-template-columns: 1.3fr 1fr; }
.analytics-3col { grid-template-columns: 1fr 1fr 1fr; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; }
.stat-card .stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value { font-size: 26px; font-weight: 800; margin-top: 8px; font-family: var(--font-display); }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); margin-bottom: 10px; }
.stat-card .stat-icon svg { width: 20px; height: 20px; stroke: var(--primary); fill: none; stroke-width: 1.8; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 22px; }
.card + .card { margin-top: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.card-head h3 { font-size: 16px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 12px; flex-wrap: wrap; }
.toolbar .search-box input { padding: 10px 14px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--bg); min-width: 240px; }

.theme-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.theme-swatch { border: 2px solid var(--border); border-radius: var(--radius); padding: 10px; cursor: pointer; text-align: center; background: var(--surface); font-family: inherit; width: 100%; }
.theme-swatch.selected { border-color: var(--primary); }
.theme-swatch .swatch-preview { height: 46px; border-radius: 6px; margin-bottom: 8px; display: flex; overflow: hidden; }
.theme-swatch .swatch-preview i { flex: 1; }
.theme-swatch span { font-size: 12px; font-weight: 600; }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: var(--border); border-radius: 999px; transition: .2s; }
.switch .slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row strong { font-size: 14px; display: block; }
.toggle-row p { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.sound-uploader.uploading, .img-uploader.uploading { opacity: .6; pointer-events: none; }

/* Product image slots (admin/product-edit.php) — click a slot to open the media picker modal */
.product-img-slot { border: 1px dashed var(--border); border-radius: var(--radius); padding: 8px; text-align: center; cursor: pointer; position: relative; transition: border-color .15s; }
.product-img-slot:hover { border-color: var(--primary); }
.product-img-slot .slot-preview { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; display: block; }
.product-img-slot .slot-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; aspect-ratio: 1; gap: 6px; color: var(--text-muted); font-size: 11.5px; }
.product-img-slot .slot-empty svg { width: 22px; height: 22px; }
.product-img-slot .slot-remove { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: none; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 15px; line-height: 1; padding: 0; }
.slot-label { font-size: 11px; color: var(--text-muted); margin-top: 6px; text-align: center; }

/* Small per-row optional variant image (admin/product-edit.php variant table) */
.variant-img-slot { width: 54px; height: 54px; border: 1px dashed var(--border); border-radius: 8px; cursor: pointer; position: relative; overflow: hidden; }
.variant-img-slot:hover { border-color: var(--primary); }
.variant-img-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.variant-img-slot .slot-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); }
.variant-img-slot .slot-remove { width: 17px; height: 17px; font-size: 12px; top: 2px; right: 2px; }

/* Media picker modal grid (inside the product-images modal) */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr)); gap: 12px; max-height: 400px; overflow-y: auto; padding: 4px 2px; }
.media-item { position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer; border: 2px solid transparent; background: var(--surface-2); }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item input[type="checkbox"] { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; z-index: 2; }
.media-item.selected { border-color: var(--primary); }
.media-item.disabled { opacity: .35; cursor: not-allowed; }

/* Media Manager page (admin/media.php) */
.media-manager-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.media-manager-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.media-manager-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; background: var(--surface-2); }
.media-manager-item .mm-info { padding: 8px 10px; }
.media-manager-item .mm-name { font-size: 10.5px; word-break: break-all; color: var(--text-muted); margin-bottom: 8px; }
.media-manager-item .mm-actions { display: flex; gap: 6px; }
.media-manager-item .mm-actions .btn { flex: 1; padding: 6px 8px; font-size: 11.5px; }

.thumb-sm { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: var(--surface-2); }
.action-icons { display: flex; gap: 6px; }
.action-icons button, .action-icons a { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; background: var(--surface-2); border: none; cursor: pointer; }
.action-icons button svg, .action-icons a svg { width: 15px; height: 15px; stroke: var(--text); fill: none; stroke-width: 1.8; }
.action-icons .del:hover { background: rgba(229,72,77,.15); }
.action-icons .del:hover svg { stroke: var(--danger); }
.action-icons .edit:hover svg { stroke: var(--primary); }

.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.pagination a, .pagination span { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius); border: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--surface-2); padding: 20px; }
.login-card { background: var(--surface); border-radius: var(--radius-lg); padding: 40px; max-width: 400px; width: 100%; box-shadow: var(--shadow); border: 1px solid var(--border); }
.login-card .logo { display: block; text-align: center; margin-bottom: 6px; font-size: 26px; }
.login-card p.text-muted { text-align: center; margin-bottom: 26px; }
.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px; margin-bottom: 16px; }
.alert-error { background: rgba(229,72,77,.12); color: var(--danger); border: 1px solid rgba(229,72,77,.3); }
.alert-success { background: rgba(47,174,102,.12); color: var(--success); border: 1px solid rgba(47,174,102,.3); }
.alert-warning { background: rgba(217,164,6,.12); color: #b8860b; border: 1px solid rgba(217,164,6,.3); }

/* -------------------------------------------------------------------------
   16. RESPONSIVE
   ------------------------------------------------------------------------- */
.why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

@media (max-width: 1080px) {
    .product-grid { grid-template-columns: repeat(3, 1fr); }
    .cat-grid { grid-template-columns: repeat(4, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar { position: fixed; left: -270px; top: 0; width: 250px; z-index: 950; transition: left .25s ease; box-shadow: var(--shadow); }
    .admin-sidebar.open { left: 0; }
    .admin-burger { display: flex; }
}

@media (max-width: 860px) {
    .pd-layout, .shop-layout, .cart-layout, .account-layout, .order-view-layout { grid-template-columns: 1fr; }
    .filter-sidebar { display: none; }
    .filter-sidebar.open { display: block; }
    .mobile-filter-btn { display: inline-flex; }
    .summary-box { position: static; }
    .stat-grid { grid-template-columns: 1fr 1fr; }
    .theme-grid { grid-template-columns: repeat(3, 1fr); }
    .analytics-3col { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 700px) {
    .topbar { display: none; }
    .main-nav { display: none; }
    .header-search { display: none; }
    .hamburger { display: flex; }
    .mobile-search { display: block; padding: 6px 14px 12px; }
    .site-header .container { height: 62px; gap: 10px; }
    :root, [data-theme] { --header-h: 62px; }
    .logo { font-size: 20px; }
    .logo-img { max-height: 30px; }
    .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .section { padding-top: 44px; padding-bottom: 44px; }
    .section-head { margin-bottom: 22px; }
    .footer-grid { grid-template-columns: 1fr 1fr; padding: 34px 0 20px; gap: 24px; }
    .hero-slide { height: 76vw; }
    .why-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
    .form-grid { grid-template-columns: 1fr; }
    .pd-actions .btn { min-width: 100%; }
    .pd-actions .btn-icon { min-width: 0; width: 52px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-card .stat-value { font-size: 20px; }
    .admin-main { padding: 16px 14px 40px; }
    .order-track span.label { font-size: 10px; }
    .container { padding: 0 14px; }

    /* Admin panel — mobile */
    .product-img-grid { grid-template-columns: repeat(3, 1fr) !important; gap: 10px; }
    .toolbar .search-box { width: 100%; }
    .toolbar .search-box input { width: 100%; min-width: 0; }
    .data-table { font-size: 12.5px; }
    .data-table th, .data-table td { padding: 9px 10px; }
    .action-icons button, .action-icons a { width: 36px; height: 36px; }
    .modal-box { padding: 20px; }
    .analytics-2col, .analytics-3col { grid-template-columns: 1fr; }
    .form-actions { flex-wrap: wrap; }
    .form-actions .btn { flex: 1 1 auto; min-width: 140px; text-align: center; }
}

@media (max-width: 420px) {
    .cat-grid { grid-template-columns: repeat(3, 1fr); }
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .product-img-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .form-actions { flex-direction: column; }
    .form-actions .btn { width: 100%; }
}
