/* ============================================================
   Zamshed — Global Stylesheet
   Design tokens live in :root. Change values here to re-theme
   the whole site from a single place.
   ============================================================ */

/* ------------------------------------------------------------
   0. Scrollbar (subtle)
   ------------------------------------------------------------ */
* {
    scrollbar-width: thin;
}
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: var(--color-text-tertiary);
    opacity: 0.5;
    border-radius: 9999px;
}

/* ------------------------------------------------------------
   1. Design Tokens
   ------------------------------------------------------------ */
:root {
    /* Brand colors */
    --color-primary: #C5A059;        /* Gold accent */
    --color-primary-hover: #B38E47;  /* Darker gold */
    --color-primary-tint: #FDFCF8;   /* Warm off-white for hover surfaces */
    --color-danger: #8B1818;         /* Sale badges, HOT labels */
    --color-danger-soft: #FEF2F2;    /* Soft red background */

    /* Neutrals */
    --color-bg: #FAFAFA;             /* Page background */
    --color-surface: #FFFFFF;        /* Cards, header, footer */
    --color-neutral-100: #F5F5F5;    /* Input / skeleton background */
    --color-border: #EAE8E3;         /* Soft warm border */
    --color-text: #111111;           /* Headings, product names */
    --color-text-secondary: #555555; /* Body text, icons */
    --color-text-tertiary: #777777;  /* Muted body text, labels */
    --color-text-muted: #888888;     /* Placeholders, icons */
    --color-text-faint: #999999;     /* Old prices */

    /* Utility */
    --color-whatsapp: #25D366;

    /* Typography */
    --font-family-base: 'Inter', sans-serif;
    --font-size-section-title: 2rem;
    --font-size-section-subtitle: 0.8rem;

    /* Radii */
    --radius-xs: 4px;
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 100px;
    --radius-circle: 50%;

    /* Shadows */
    --shadow-xs: 0 1px 3px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 48px -12px rgba(0, 0, 0, 0.12);

    /* Motion */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ------------------------------------------------------------
   2. Base
   ------------------------------------------------------------ */
* {
    font-family: var(--font-family-base);
}

body {
    background: var(--color-bg);
    padding-bottom: 70px;
    color: var(--color-text);
}

.container-custom {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
@media (min-width: 640px) {
    .container-custom { padding-left: 1.5rem; padding-right: 1.5rem; }
}
@media (min-width: 1024px) {
    .container-custom { padding-left: 80px; padding-right: 80px; }
}
@media (min-width: 1536px) {
    .container-custom { padding-left: 100px; padding-right: 100px; }
}

/* ------------------------------------------------------------
   3. Mobile Bottom Navigation
   ------------------------------------------------------------ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 6px 0 env(safe-area-inset-bottom, 6px) 0;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.04);
    height: 64px;
}
.bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--color-text-tertiary);
    font-size: 0.55rem;
    font-weight: 500;
    transition: color var(--transition-base);
    padding: 2px 8px;
    position: relative;
    min-width: 48px;
}
.bottom-nav .nav-item i,
.bottom-nav .nav-item svg {
    width: 20px;
    height: 20px;
    transition: transform var(--transition-base);
}
.bottom-nav .nav-item.active { color: var(--color-primary); }
.bottom-nav .nav-item.active i,
.bottom-nav .nav-item.active svg { transform: scale(1.05); }
.bottom-nav .nav-item .badge {
    position: absolute;
    top: 0px;
    right: 2px;
    background: var(--color-primary);
    color: var(--color-surface);
    font-size: 0.45rem;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (min-width: 768px) {
    .bottom-nav { display: none; }
    body { padding-bottom: 0; }
}

/* ------------------------------------------------------------
   4. Floating Buttons (back-to-top + WhatsApp)
   ------------------------------------------------------------ */
.floating-buttons {
    position: fixed;
    bottom: 90px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 99;
}
@media (min-width: 768px) { .floating-buttons { bottom: 30px; } }

.back-top-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-circle);
    background: rgba(255, 255, 255, 0.4);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
    cursor: pointer;
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    position: relative;
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}
.back-top-btn.visible { opacity: 1; transform: scale(1); pointer-events: auto; }
.back-top-btn:hover { transform: scale(1.05); }
.back-top-btn .progress-ring {
    position: absolute;
    inset: -2px;
    width: 48px;
    height: 48px;
    transform: rotate(-90deg);
}
/* Dash length slightly exceeds the true circumference (2 * PI * 22 = 138.23)
   so a fully-scrolled page never leaves a visible sliver of gap */
.back-top-btn .progress-ring circle {
    fill: none;
    stroke: var(--color-primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: 139;
    stroke-dashoffset: 139;
    transition: stroke-dashoffset var(--transition-base);
}
.back-top-btn svg { width: 20px; height: 20px; }

.whatsapp-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-circle);
    background: var(--color-whatsapp);
    border: none;
    box-shadow: 0 4px 20px color-mix(in srgb, var(--color-whatsapp) 35%, transparent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-surface);
    cursor: pointer;
    transition: all var(--transition-slow);
    position: relative;
    z-index: 1; /* stacking context so the ripple pseudo-elements stay behind the icon */
}
.whatsapp-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px color-mix(in srgb, var(--color-whatsapp) 45%, transparent);
}
.whatsapp-btn svg { width: 20px; height: 20px; }

/* Subtle water-drop ripple around the WhatsApp button */
@keyframes whatsapp-ripple {
    0% {
        transform: scale(1);
        opacity: 0.45;
    }
    100% {
        transform: scale(1.7);
        opacity: 0;
    }
}
.whatsapp-btn::before,
.whatsapp-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-circle);
    background: var(--color-whatsapp);
    z-index: -1;
    animation: whatsapp-ripple 2.4s ease-out infinite;
    pointer-events: none;
}
.whatsapp-btn::after { animation-delay: 1.2s; }

@media (prefers-reduced-motion: reduce) {
    .whatsapp-btn::before,
    .whatsapp-btn::after { animation: none; opacity: 0; }
}

/* ------------------------------------------------------------
   5. Desktop Category Dropdown
   ------------------------------------------------------------ */
.dropdown-group { position: relative; z-index: 50; }
.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 18px;
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--color-text);
    box-shadow: var(--shadow-xs);
    width: 100%;
    min-width: 200px;
    justify-content: space-between;
}
.dropdown-trigger:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-tint);
}
.dropdown-trigger .left-content { display: flex; align-items: center; gap: 10px; }
.dropdown-trigger .cat-icon { width: 18px; height: 18px; color: var(--color-primary); }
.dropdown-trigger .chevron-icon {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    transition: transform var(--transition-base);
}
.dropdown-group.active .dropdown-trigger .chevron-icon { transform: rotate(180deg); }
/* Square the trigger's bottom corners while the menu is open so
   trigger and menu connect seamlessly as one surface */
.dropdown-group:hover .dropdown-trigger,
.dropdown-group.active .dropdown-trigger {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--color-surface);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0;
    min-width: 100%;
    width: 100%;
    z-index: 100;
    border: 1px solid var(--color-border);
    overflow: visible;
}
.dropdown-group:hover .dropdown-menu,
.dropdown-group.active .dropdown-menu { display: block; }
.dropdown-menu .menu-item { position: relative; }
.dropdown-menu .menu-item > a,
.dropdown-menu > a.single-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
    border-left: 3px solid transparent;
    width: 100%;
    box-sizing: border-box;
}
.dropdown-menu .menu-item > a:hover,
.dropdown-menu > a.single-item:hover {
    background: var(--color-primary-tint);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

.dropdown-menu .sub-menu {
    display: none;
    position: absolute;
    left: 100%;
    top: -1px;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    padding: 6px 0;
    min-width: 200px;
    border: 1px solid var(--color-border);
    z-index: 101;
}
.dropdown-menu .menu-item:hover .sub-menu { display: block; }
.dropdown-menu .sub-menu a {
    display: block;
    padding: 10px 18px;
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    transition: all var(--transition-fast);
    border-left: 3px solid transparent;
}
.dropdown-menu .sub-menu a:hover {
    background: var(--color-primary-tint);
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}
.dropdown-menu .menu-item > a .item-arrow {
    width: 14px;
    height: 14px;
    color: var(--color-text-muted);
    transition: transform var(--transition-base), color var(--transition-fast);
}
.dropdown-menu .menu-item > a:hover .item-arrow {
    color: var(--color-primary);
    transform: translateX(2px);
}
/* Bottom CTA sits flush like the last menu row */
.dropdown-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 18px;
    border-top: 1px solid var(--color-border);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    transition: all var(--transition-base);
}
/* Same soft hover as the menu items — no solid fill */
.dropdown-view-all:hover {
    background: var(--color-primary-tint);
    border-color: var(--color-primary);
}
.dropdown-view-all svg {
    width: 14px;
    height: 14px;
}

/* ------------------------------------------------------------
   6. Mobile Drawer
   ------------------------------------------------------------ */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}
.drawer-overlay.open { opacity: 1; visibility: visible; }
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    max-width: 80vw;
    background: var(--color-surface);
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform var(--transition-slow) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow-y: auto;
    padding: 1.5rem 1.25rem;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.08);
    text-align: left !important;
}
.drawer.open { transform: translateX(0); }
.drawer-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-circle);
    border: none;
    background: var(--color-neutral-100);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
}
.drawer-close svg { width: 20px; height: 20px; }
.drawer-logo {
    display: block;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.drawer-nav-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    border-bottom: 1px solid var(--color-neutral-100);
    transition: color var(--transition-base);
    cursor: pointer;
    width: 100%;
}
.drawer-nav-item:hover { color: var(--color-primary); }
.drawer-nav-item .left-group { display: flex; align-items: center; gap: 12px; }
.drawer-nav-item .left-group svg { width: 18px; height: 18px; color: var(--color-primary); }
.drawer-nav-item .toggle-icon svg {
    width: 16px;
    height: 16px;
    color: var(--color-text-muted);
    transition: transform var(--transition-slow);
}

.drawer-sub-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
    background: transparent;
}
.drawer-sub-items.open { max-height: 800px; }
.drawer-sub-item {
    display: block;
    padding: 0.5rem 0 0.5rem 1rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
    border-bottom: 1px solid var(--color-bg);
}
.drawer-sub-item:last-child { border-bottom: none; }
.drawer-sub-item:hover { color: var(--color-primary); }

/* ------------------------------------------------------------
   6b. Cart Drawer (right side)
   ------------------------------------------------------------ */
.cart-drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-slow);
}
.cart-drawer-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 380px;
    max-width: 92vw;
    background: var(--color-surface);
    z-index: 1000;
    transform: translateX(100%);
    transition: transform var(--transition-slow) cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.08);
}
.cart-drawer.open { transform: translateX(0); }

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.15rem 1.4rem;
    border-bottom: 1px solid var(--color-border);
}
.cart-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
}
.cart-count-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    border-radius: var(--radius-full);
    background: var(--color-primary);
    color: #FFFFFF;
    font-size: 0.72rem;
    font-weight: 700;
}
.cart-close {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-circle);
    border: none;
    background: var(--color-neutral-100);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
}
.cart-close:hover { color: var(--color-text); }
.cart-close svg { width: 18px; height: 18px; }

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem 1.4rem;
}
#cartDrawerContent {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}
.cart-item {
    display: flex;
    gap: 0.9rem;
    padding: 1.05rem 0;
    border-bottom: 1px solid var(--color-neutral-100);
}
.cart-item:last-child { border-bottom: none; }
.cart-item-img {
    width: 78px;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: var(--color-neutral-100);
    flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--transition-base); }
.cart-item-img:hover img { transform: scale(1.06); }
.cart-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.cart-item-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}
.cart-item-top h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.35;
}
.cart-item-remove {
    border: none;
    background: none;
    padding: 0 2px;
    font-size: 1.05rem;
    line-height: 1;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}
.cart-item-remove:hover { color: var(--color-danger); }
.cart-item-meta {
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--color-text-muted);
}
.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 0.6rem;
}
.qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.qty-stepper button {
    width: 27px;
    height: 27px;
    border: none;
    background: transparent;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.qty-stepper button:hover:not(:disabled) {
    background: var(--color-primary-tint);
    color: var(--color-primary);
}
.qty-stepper button:disabled { color: var(--color-text-faint); cursor: not-allowed; }
.qty-stepper span {
    min-width: 26px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
}
.cart-item-price {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-text);
}

.cart-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    padding: 2rem;
    text-align: center;
}
.cart-empty svg { width: 44px; height: 44px; stroke-width: 1.25; color: var(--color-text-faint); }
.cart-empty p { font-size: 0.95rem; color: var(--color-text-secondary); }

.cart-footer {
    padding: 1.2rem 1.4rem 1.5rem;
    border-top: 1px solid var(--color-border);
}
.cart-subtotal {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}
.cart-subtotal strong {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
}
.cart-note {
    margin: 0.4rem 0 1.1rem;
    font-size: 0.72rem;
    color: var(--color-text-muted);
}
.cart-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--color-text);
    color: var(--color-surface);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-base);
}
.cart-checkout-btn:hover { background: var(--color-primary); }
.cart-checkout-btn svg { width: 14px; height: 14px; }
.cart-view-btn { margin-top: 0.6rem; }

/* Wishlist-specific bits */
.wishlist-old-price {
    margin-left: 5px;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--color-text-muted);
}
.move-to-bag-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 7px 12px;
    border: none;
    border-radius: var(--radius-full);
    background: var(--color-text);
    color: var(--color-surface);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-base), opacity var(--transition-base);
}
.move-to-bag-btn:hover { background: var(--color-primary); }
.move-to-bag-btn:disabled { opacity: 0.85; cursor: default; }
.move-to-bag-btn svg { width: 12px; height: 12px; }

@media (min-width: 1024px) {
    .drawer-overlay,
    .drawer,
    .mobile-menu-btn { display: none !important; }
}

/* ------------------------------------------------------------
   7. Buttons & Search
   ------------------------------------------------------------ */
.btn-outline-dark {
    background: transparent;
    color: var(--color-text);
    border: 1.5px solid var(--color-text);
    padding: 8px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.8rem;
    transition: all var(--transition-base);
}
.btn-outline-dark:hover { background: var(--color-text); color: var(--color-surface); }

.search-bar {
    background: var(--color-neutral-100);
    border-radius: var(--radius-full);
    padding: 8px 16px 8px 20px;
    border: 1.5px solid transparent;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}
.search-bar:focus-within {
    border-color: var(--color-primary);
    background: var(--color-surface);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--color-primary) 12%, transparent);
}
.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.9rem;
    width: 100%;
    color: var(--color-text);
}
.search-bar input::placeholder { color: var(--color-text-muted); font-weight: 400; }
.search-bar .search-icon { width: 18px; height: 18px; color: var(--color-text-muted); }

.desktop-search-wrap { flex: 1; max-width: 600px; margin: 0 1.5rem; }
@media (max-width: 1024px) { .desktop-search-wrap { display: none; } }

/* --- Navbar live-search suggestions --- */
.search-suggest { position: relative; width: 100%; }
.search-results-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 120;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}
.search-results-list { max-height: 360px; overflow-y: auto; padding: 6px; }
.search-results-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: var(--radius-md);
    transition: background var(--transition-base);
}
.search-results-item:hover { background: var(--color-neutral-100); }
.search-results-thumb {
    width: 40px;
    height: 50px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-neutral-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    color: var(--color-text-muted);
}
.search-results-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-results-thumb i { width: 18px; height: 18px; }
.search-results-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.search-results-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-results-price {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.search-results-price s { color: var(--color-text-faint); font-weight: 400; }
.search-results-price b { color: var(--color-text); font-weight: 700; }
.search-results-arrow { width: 16px; height: 16px; color: var(--color-text-faint); flex-shrink: 0; }
.search-results-see-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    border-top: 1px solid var(--color-border);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-primary);
    transition: background var(--transition-base);
}
.search-results-see-all:hover { background: var(--color-neutral-100); }
.search-results-see-all i { width: 15px; height: 15px; }
.search-results-state {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 14px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}
.search-results-state i { width: 18px; height: 18px; }
.search-results-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: search-spin 0.7s linear infinite;
}
@keyframes search-spin { to { transform: rotate(360deg); } }

.nav-link {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}
.nav-link:hover,
.nav-link.active { color: var(--color-primary); border-bottom-color: var(--color-primary); }

.icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    transition: all var(--transition-base);
    position: relative;
    padding: 4px 8px;
    border-radius: var(--radius-md);
    min-width: 44px;
}
.icon-btn:hover { background: var(--color-neutral-100); color: var(--color-primary); }
.icon-btn .badge {
    position: absolute;
    top: -2px;
    /* Anchor to the centered 20px icon, not the button edge,
       so wider labels ("Wishlist") don't drag the badge away */
    left: calc(50% + 5px);
    background: var(--color-primary);
    color: var(--color-surface);
    font-size: 0.5rem;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: var(--radius-circle);
    display: flex;
    align-items: center;
    justify-content: center;
}
.icon-btn .icon-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    margin-top: 1px;
}
.icon-btn svg { width: 20px; height: 20px; }

/* ------------------------------------------------------------
   8. Hero Slider
   ------------------------------------------------------------ */
.slider-wrapper {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-neutral-100);
}
.slider-container {
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 380px;
    background: var(--color-neutral-100);
    width: 100%;
}
@media (min-width: 768px) { .slider-container { min-height: 420px; } }
@media (min-width: 1024px) { .slider-container { min-height: 460px; } }
@media (max-width: 767px) { .slider-container { min-height: 200px; } }

.slider-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease;
    width: 100%;
    height: 100%;
}
.slider-slide.active { opacity: 1; }
.slider-slide a { display: block; width: 100%; height: 100%; }
.slider-slide img { width: 100%; height: 100%; object-fit: cover; }

.slider-dots {
    position: absolute;
    bottom: 0.75rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.4rem;
    z-index: 10;
}
.slider-dots button {
    width: 7px;
    height: 7px;
    border-radius: var(--radius-circle);
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all var(--transition-slow);
}
.slider-dots button.active { background: var(--color-primary); width: 20px; border-radius: 4px; }

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-circle);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
}
.slider-arrow svg { width: 18px; height: 18px; }
.slider-arrow.prev { left: 0.5rem; }
.slider-arrow.next { right: 0.5rem; }

.add-banner {
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    flex: 1;
    min-height: 180px;
    background: var(--color-neutral-100);
}
@media (min-width: 768px) { .add-banner { min-height: 200px; } }
@media (min-width: 1024px) { .add-banner { min-height: 220px; } }
@media (max-width: 767px) { .add-banner { min-height: 120px; } }
.add-banner img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.add-banner a { display: block; position: relative; width: 100%; height: 100%; }

/* Full-width slider when no ad banners — aspect-ratio scales height at lg+ */
@media (min-width: 1024px) {
    .slider--full .slider-wrapper { aspect-ratio: 16 / 9; }
    .slider--full .slider-container { min-height: 0; }
}

/* ------------------------------------------------------------
   9. Categories & Section Headings
   ------------------------------------------------------------ */
.category-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--color-neutral-100);
    transition: box-shadow var(--transition-base);
}
.category-card img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; transition: transform 0.5s ease; }
.category-card:hover img { transform: scale(1.08); }
.category-card:hover { box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.28); }
.category-card .cat-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 0.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: #FFFFFF;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
}
@media (max-width: 767px) {
    .category-card .cat-name {
        font-size: 0.8rem;
        padding: 0.5rem;
    }
}

.section-title {
    font-size: var(--font-size-section-title);
    font-weight: 700;
    color: var(--color-text);
}
@media (max-width: 767px) {
    .section-title {
        font-size: 1.15rem;
    }
}
.section-subtitle {
    font-size: var(--font-size-section-subtitle);
    color: var(--color-text-muted);
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ------------------------------------------------------------
   10. Product Cards
   ------------------------------------------------------------ */
.product-card {
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: transparent;
}
.product-card .product-img-wrap {
    position: relative;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--color-neutral-100);
    border-radius: var(--radius-sm);
    transition: box-shadow var(--transition-base);
}
.product-card .product-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}
.product-card:hover .product-img-wrap img { transform: scale(1.08); }
.product-card:hover .product-img-wrap {
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.28);
}
.product-card .discount-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: var(--color-danger);
    color: var(--color-surface);
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
    z-index: 5;
}
.product-card .product-actions {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 5;
}
.product-card .product-actions button {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-circle);
    border: none;
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}
.product-card .product-actions button:hover {
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: var(--color-text);
    transform: scale(1.1);
}
.product-card .product-actions button svg { width: 18px; height: 18px; }
.product-card .product-actions button.active { color: var(--color-primary); }
.product-card .product-actions button.active svg { fill: var(--color-primary); }
.product-card .add-cart-btn {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    background: rgba(255, 255, 255, 0.92);
    border: none;
    border-radius: var(--radius-xs);
    padding: 0.5rem;
    color: var(--color-text);
    cursor: pointer;
    z-index: 5;
    transition: background var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-card .add-cart-btn svg { width: 18px; height: 18px; }
.product-card .add-cart-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.65);
    color: var(--color-text);
    transform: scale(1.05);
}

.product-info {
    padding: 0.75rem 0.25rem 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}
.product-info .product-name { font-weight: 600; font-size: 0.95rem; color: var(--color-text); }
.product-info .price-wrap { display: flex; align-items: center; gap: 0.5rem; }
.product-info .product-price { font-weight: 700; font-size: 1rem; color: var(--color-text); }
.product-info .product-price .currency { font-weight: 400; font-size: 0.75rem; color: var(--color-text-muted); }
.product-info .old-price { font-size: 0.8rem; color: var(--color-text-faint); text-decoration: line-through; }
.product-info .old-price del { text-decoration: line-through; }

/* ------------------------------------------------------------
   11. Flash Sale Countdown Timer
   ------------------------------------------------------------ */
.flash-timer {
    display: flex;
    align-items: center;
    gap: 6px;
}
.flash-timer .timer-caption {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-right: 4px;
}
.flash-timer-box {
    min-width: 46px;
    padding: 5px 6px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.flash-timer-box .time-value {
    font-weight: 700;
    font-size: 1rem;
    color: var(--color-danger);
    font-variant-numeric: tabular-nums;
}
.flash-timer-box .time-label {
    font-size: 0.55rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
}
.flash-timer .timer-separator {
    font-weight: 700;
    color: var(--color-danger);
}

/* ------------------------------------------------------------
   12. Newsletter
   ------------------------------------------------------------ */
.newsletter-section {
    position: relative;
    overflow: hidden;
    /* Semi-transparent charcoal glass with a warm gold-tinted edge */
    background: linear-gradient(
        120deg,
        rgba(17, 17, 17, 0.94) 0%,
        rgba(17, 17, 17, 0.82) 55%,
        rgba(34, 29, 20, 0.88) 100%
    );
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 2.5rem 1.5rem;
    color: var(--color-surface);
}
/* Soft gold glows for depth */
.newsletter-section::before,
.newsletter-section::after {
    content: '';
    position: absolute;
    width: 280px;
    height: 280px;
    border-radius: var(--radius-circle);
    background: radial-gradient(
        circle,
        color-mix(in srgb, var(--color-primary) 22%, transparent),
        transparent 70%
    );
    pointer-events: none;
}
.newsletter-section::before { top: -130px; right: -70px; }
.newsletter-section::after { bottom: -150px; left: -90px; }
.newsletter-section > * { position: relative; z-index: 1; }
.newsletter-input {
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-full);
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    width: 100%;
    outline: none;
    color: var(--color-text);
}
.newsletter-btn {
    background: var(--color-primary);
    color: var(--color-surface);
    border: none;
    border-radius: var(--radius-full);
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background var(--transition-base);
}
.newsletter-btn:hover { background: var(--color-primary-hover); }

/* ------------------------------------------------------------
   13. Footer
   ------------------------------------------------------------ */
.footer-link { color: var(--color-text-tertiary); font-size: 0.85rem; }
.footer-link:hover { color: var(--color-primary); }
.footer-heading {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}
.footer-social-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-circle);
    border: 1.5px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-tertiary);
    transition: all var(--transition-base);
}
.footer-social-btn svg { width: 18px; height: 18px; }
.footer-social-btn:hover { border-color: var(--color-primary); color: var(--color-primary); }

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
}
.footer-contact-item svg {
    width: 15px;
    height: 15px;
    color: var(--color-primary);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ------------------------------------------------------------
   14. Auth Pages (Sign In / Register)
   ------------------------------------------------------------ */
.auth-wrap {
    min-height: calc(100vh - 220px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1rem 3.5rem;
}
.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 2.5rem 2.25rem;
}
@media (max-width: 480px) {
    .auth-card { padding: 2rem 1.5rem; }
}
.auth-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--color-text);
    text-align: center;
    letter-spacing: -0.3px;
}
.auth-subtitle {
    margin: 0.45rem 0 1.8rem;
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    text-align: center;
}
.form-field { margin-bottom: 1.1rem; }
.form-field label .required-star {
    color: var(--color-danger);
    margin-left: 2px;
}
.form-field label {
    display: block;
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--color-text-secondary);
}
.form-control-group {
    display: flex;
    align-items: stretch;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.form-control-group:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.12);
}
.form-control-group.error { border-color: var(--color-danger); }
.phone-prefix {
    display: flex;
    align-items: center;
    padding: 0 12px;
    border-right: 1.5px solid var(--color-border);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
    user-select: none;
}
.form-control-group input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 11px 14px;
    font-size: 0.9rem;
    color: var(--color-text);
    letter-spacing: 0.3px;
}
.form-control-group input::placeholder { color: var(--color-text-faint); }
.password-toggle {
    border: none;
    background: none;
    padding: 0 12px;
    cursor: pointer;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}
.password-toggle:hover { color: var(--color-text); }
.field-error {
    margin-top: 0.35rem;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--color-danger);
}
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.2rem 0 1.4rem;
    font-size: 0.78rem;
    color: var(--color-text-secondary);
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    user-select: none;
}
.remember-me input { accent-color: var(--color-primary); width: 14px; height: 14px; cursor: pointer; }
.auth-link {
    color: var(--color-primary);
    font-weight: 600;
    transition: color var(--transition-fast);
}
.auth-link:hover { color: var(--color-primary-hover); text-decoration: underline; }
.auth-submit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 13px 20px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--color-text);
    color: var(--color-surface);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-base), transform var(--transition-fast);
}
.auth-submit-btn:hover:not(:disabled) { background: var(--color-primary); }
.auth-submit-btn:active:not(:disabled) { transform: scale(0.99); }
.auth-submit-btn:disabled { opacity: 0.65; cursor: wait; }
.form-success {
    margin-top: 1rem;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-tint);
    border: 1px solid rgba(197, 160, 89, 0.35);
    font-size: 0.78rem;
    color: var(--color-primary-hover);
    text-align: center;
}
#formSuccess {
    margin-top: 0;
    margin-bottom: 1rem;
}
.auth-switch {
    margin-top: 1.6rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--color-border);
    font-size: 0.82rem;
    color: var(--color-text-tertiary);
    text-align: center;
}
.terms-row { font-size: 0.78rem; color: var(--color-text-secondary); }

/* ------------------------------------------------------------
   15. OTP Verification (Forgot Password flow)
   ------------------------------------------------------------ */
.otp-group {
    display: flex;
    gap: 8px;
}
.otp-input {
    flex: 1;
    min-width: 0;
    max-width: 52px;
    height: 56px;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
}
.otp-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.12);
}
.otp-group.error .otp-input { border-color: var(--color-danger); }
.otp-resend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.4rem;
    font-size: 0.78rem;
    color: var(--color-text-tertiary);
}
.otp-resend-row strong { color: var(--color-text-secondary); }
.resend-btn {
    border: none;
    background: none;
    padding: 0;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    cursor: pointer;
    transition: color var(--transition-fast);
}
.resend-btn:hover { color: var(--color-primary-hover); text-decoration: underline; }
.otp-note {
    margin-bottom: 0.9rem;
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--color-primary-hover);
}

/* ------------------------------------------------------------
   16. Contact Page
   ------------------------------------------------------------ */
.contact-form-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 2rem 2rem 2.25rem;
}
@media (max-width: 480px) {
    .contact-form-card { padding: 1.5rem 1.25rem; }
}
.form-control-group textarea {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 11px 14px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--color-text);
    resize: vertical;
    min-height: 120px;
}
.form-control-group textarea::placeholder { color: var(--color-text-faint); }
.contact-form-card .auth-submit-btn {
    display: flex;
    width: auto;
    min-width: 180px;
}
.contact-map {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    min-height: 320px;
    box-shadow: var(--shadow-xs);
}
.contact-map iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    filter: grayscale(0.85) contrast(1.02);
    transition: filter var(--transition-slow);
}
.contact-map:hover iframe { filter: grayscale(0); }

/* ------------------------------------------------------------
   17. About Page
   ------------------------------------------------------------ */
.about-story-media {
    position: relative;
    max-width: 520px;
    margin: 0 auto;
}
.about-story-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}
.about-story-badge {
    position: absolute;
    bottom: -14px;
    right: 18px;
    background: var(--color-primary);
    color: #FFFFFF;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
}
.about-stats {
    background: rgba(253, 252, 248, 0.65);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 2.5rem 2rem;
}
.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}
.stat-item strong {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(120deg, var(--color-primary-hover), var(--color-primary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
@media (min-width: 768px) {
    .stat-item strong { font-size: 2.5rem; }
}
.stat-item span {
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--color-text-tertiary);
}
.about-value-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 2rem 1.75rem;
    text-align: center;
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}
.about-value-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.about-value-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 1rem;
    border-radius: var(--radius-circle);
    background: var(--color-primary-tint);
    display: flex;
    align-items: center;
    justify-content: center;
}
.about-value-icon svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
    color: var(--color-primary);
}
.about-value-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.about-value-card p {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--color-text-tertiary);
}

/* ------------------------------------------------------------
   18. Brand Page
   ------------------------------------------------------------ */
.brand-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
}
.brand-card {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}
.brand-card:hover {
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.28);
    border-color: var(--color-primary);
    transform: translateY(-2px);
}
.brand-card-logo {
    max-width: 62%;
    max-height: 60%;
    object-fit: contain;
}
.brand-card-placeholder {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-circle);
    background: var(--color-neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
}
.brand-card-placeholder svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.75;
    color: var(--color-text-tertiary);
}
.brand-card-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    text-align: center;
    max-width: 95%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ------------------------------------------------------------
   18. Gallery Page + Lightbox
   ------------------------------------------------------------ */
.gallery-masonry {
    column-count: 2;
    column-gap: 0.75rem;
}
@media (min-width: 768px) {
    .gallery-masonry {
        column-count: 3;
        column-gap: 1rem;
    }
}
@media (min-width: 1280px) {
    .gallery-masonry {
        column-count: 4;
    }
}
.gallery-item {
    break-inside: avoid;
    margin-bottom: 0.75rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: zoom-in;
    position: relative;
    background: var(--color-neutral-100);
}
@media (min-width: 768px) {
    .gallery-item {
        margin-bottom: 1rem;
    }
}
.gallery-item img {
    width: 100%;
    display: block;
    transition: transform var(--transition-slow);
}
.gallery-item:hover img {
    transform: scale(1.05);
}
.gallery-masonry {
    min-height: 12rem;
}
.gallery-empty {
    column-span: all;
    text-align: center;
    color: var(--color-neutral-500);
    padding: 3rem 1rem;
    font-size: 0.95rem;
}

/* --- Lightbox --- */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 120;
    background: rgba(12, 11, 9, 0.94);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}
.gallery-lightbox.open {
    opacity: 1;
    visibility: visible;
}
.lightbox-stage {
    position: relative;
    overflow: hidden;
    width: min(1100px, calc(100vw - 120px));
    height: min(82vh, 900px);
}
@media (max-width: 640px) {
    .lightbox-stage {
        width: 100vw;
    }
}
.lightbox-track {
    display: flex;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.33, 1, 0.68, 1);
}
.lightbox-slide {
    min-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
}
.lightbox-slide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}
.lightbox-arrow,
.lightbox-close {
    position: absolute;
    z-index: 2;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-circle);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.lightbox-arrow svg,
.lightbox-close svg {
    width: 22px;
    height: 22px;
}
.lightbox-arrow:hover,
.lightbox-close:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.lightbox-prev {
    left: max(1rem, calc((100vw - 1100px) / 2 - 70px));
    top: 50%;
    transform: translateY(-50%);
}
.lightbox-next {
    right: max(1rem, calc((100vw - 1100px) / 2 - 70px));
    top: 50%;
    transform: translateY(-50%);
}
.lightbox-close {
    top: 1.25rem;
    right: 1.25rem;
}
@media (max-width: 640px) {
    .lightbox-arrow {
        width: 40px;
        height: 40px;
    }
    .lightbox-prev { left: 0.5rem; }
    .lightbox-next { right: 0.5rem; }
}
.lightbox-counter {
    position: absolute;
    bottom: 1.25rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.85);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 5px 14px;
    border-radius: var(--radius-full);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ------------------------------------------------------------
   19. Shop Page — Sidebar Filters + Load More
   ------------------------------------------------------------ */
.shop-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (min-width: 1024px) {
    .shop-layout {
        grid-template-columns: 250px 1fr;
        gap: 2rem;
    }
}

.filters-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    padding: 9px 16px;
    border-radius: var(--radius-full);
    transition: border-color var(--transition-fast), color var(--transition-fast);
    width: fit-content;
}
.filters-toggle-btn svg { width: 16px; height: 16px; }
.filters-toggle-btn:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
@media (min-width: 1024px) {
    .filters-toggle-btn { display: none; }
}

/* Sidebar: off-canvas drawer on mobile, static column on lg+ */
.shop-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 90;
    width: min(320px, 85vw);
    background: var(--color-surface);
    padding: 1.25rem 1.25rem 0;
    transform: translateX(-105%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}
.shop-sidebar.open { transform: translateX(0); }
@media (min-width: 1024px) {
    .shop-sidebar {
        position: sticky;
        top: 144px;
        left: auto;
        bottom: auto;
        width: auto;
        transform: none;
        transition: none;
        overflow-y: visible;
        box-shadow: none;
        background: transparent;
        padding: 0;
        /* Stay BELOW the sticky header (z-50) + navbar (z-40) */
        z-index: 30;
    }
}
.shop-filter-overlay {
    position: fixed;
    inset: 0;
    z-index: 89;
    background: rgba(17, 17, 17, 0.45);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
}
.shop-filter-overlay.visible {
    opacity: 1;
    visibility: visible;
}
@media (min-width: 1024px) {
    .shop-filter-overlay { display: none; }
}

.filter-group {
    border-bottom: 1px solid var(--color-neutral-100);
    padding-bottom: 1.1rem;
    margin-bottom: 1.1rem;
}
.shop-sidebar .filter-group:last-of-type {
    border-bottom: none;
}
.filter-title {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: var(--color-text);
    margin-bottom: 0.85rem;
}
.clear-all-btn {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-danger);
    transition: color var(--transition-fast);
}
.clear-all-btn:hover { color: var(--color-primary-hover); }

.filter-check {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    padding: 5px 0;
    cursor: pointer;
    user-select: none;
}
.filter-check input {
    accent-color: var(--color-primary);
    width: 15px;
    height: 15px;
    cursor: pointer;
}
.filter-check:hover { color: var(--color-text); }
.filter-check .count {
    margin-left: auto;
    font-size: 0.72rem;
    color: var(--color-text-faint);
}

.swatch-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.swatch {
    width: 26px;
    height: 26px;
    border-radius: var(--radius-circle);
    border: 2px solid var(--color-border);
    cursor: pointer;
    position: relative;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.swatch:hover { transform: scale(1.12); }
.swatch.active {
    box-shadow: 0 0 0 2px var(--color-surface), 0 0 0 4px var(--color-primary);
}

.size-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.size-pill {
    min-width: 40px;
    padding: 6px 10px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    user-select: none;
    transition: all var(--transition-fast);
}
.size-pill:hover { border-color: var(--color-primary); }
.size-pill.active {
    background: var(--color-text);
    border-color: var(--color-text);
    color: #FFFFFF;
}

.price-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}
.price-inputs input {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xs);
    padding: 8px 10px;
    font-size: 0.85rem;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast);
    -moz-appearance: textfield;
    appearance: textfield;
}
.price-inputs input::-webkit-outer-spin-button,
.price-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.price-inputs input:focus { border-color: var(--color-primary); }

.shop-drawer-footer {
    position: sticky;
    bottom: 0;
    background: var(--color-surface);
    margin: 0 -1.25rem;
    padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--color-neutral-100);
}
.show-results-btn {
    width: 100%;
    background: var(--color-text);
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    padding: 13px;
    border-radius: var(--radius-sm);
    transition: background var(--transition-base);
}
.show-results-btn:hover { background: var(--color-primary); }

.shop-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.result-count {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
}
.sort-wrap {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sort-select {
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    border-radius: var(--radius-xs);
    padding: 8px 30px 8px 12px;
    font-size: 0.85rem;
    color: var(--color-text);
    outline: none;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23555555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    transition: border-color var(--transition-fast);
}
.sort-select:focus { border-color: var(--color-primary); }

.load-more-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.load-more-spinner span {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: load-more-spin 0.7s linear infinite;
}
@keyframes load-more-spin {
    to { transform: rotate(360deg); }
}
.load-more-end {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    color: var(--color-text-muted);
}
.empty-state svg {
    width: 44px;
    height: 44px;
    margin: 0 auto 1rem;
    stroke-width: 1.5;
    color: var(--color-text-faint);
}
.empty-state h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.35rem;
}
.empty-state p {
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

/* Category tiles are anchors on the shop deep-link */
a.category-card {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* ------------------------------------------------------------
   19b. Shop refinements — price slider, category tree,
        light sidebar card
   ------------------------------------------------------------ */
/* Sidebar becomes a light card on desktop too */
@media (min-width: 1024px) {
    .shop-sidebar {
        background: var(--color-surface);
        border: 1px solid var(--color-border);
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-xs);
        padding: 1.25rem;
    }
}

/* --- Dual-thumb price slider --- */
.price-slider {
    position: relative;
    height: 22px;
    margin-bottom: 0.6rem;
}
.range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    transform: translateY(-50%);
    background: var(--color-neutral-100);
    border-radius: var(--radius-full);
}
.range-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--color-primary);
    border-radius: var(--radius-full);
}
.price-slider input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 22px;
    margin: 0;
    background: none;
    appearance: none;
    -webkit-appearance: none;
    pointer-events: none;
}
.price-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    pointer-events: auto;
    width: 16px;
    height: 16px;
    border-radius: var(--radius-circle);
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-xs);
    cursor: grab;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.price-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: var(--shadow-sm, 0 2px 8px rgba(0,0,0,.12));
}
.price-slider input[type="range"]::-moz-range-thumb {
    pointer-events: auto;
    width: 14px;
    height: 14px;
    border-radius: var(--radius-circle);
    background: var(--color-surface);
    border: 2px solid var(--color-primary);
    box-shadow: var(--shadow-xs);
    cursor: grab;
}
.price-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* --- Category tree with +/- expand collapse --- */
.filter-tree-item {
    border-bottom: 1px solid var(--color-neutral-100);
}
.filter-tree-item:last-child { border-bottom: none; }
.filter-tree-head {
    display: flex;
    align-items: center;
}
.filter-tree-head .filter-check {
    flex: 1;
    padding: 7px 0;
}
.filter-tree-head .filter-check > span:nth-child(2) {
    font-weight: 600;
    color: var(--color-text);
}
.filter-tree-item.selected > .filter-tree-head .filter-check > span:nth-child(2),
.filter-tree-item.selected > .filter-tree-head .filter-check:hover > span:nth-child(2) {
    color: var(--color-primary);
}
.tree-toggle {
    width: 26px;
    height: 26px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
    border-radius: var(--radius-circle);
    transition: color var(--transition-fast), background var(--transition-fast);
    flex-shrink: 0;
}
.tree-toggle:hover {
    color: var(--color-text);
    background: var(--color-neutral-100);
}
.tree-toggle svg {
    width: 15px;
    height: 15px;
}
.tree-toggle .icon-minus { display: none; }
.filter-tree-item.expanded .tree-toggle .icon-plus { display: none; }
.filter-tree-item.expanded .tree-toggle .icon-minus { display: block; }

.filter-sub-list {
    display: none;
    padding: 0 0 8px 25px;
}
.filter-tree-item.expanded .filter-sub-list {
    display: block;
}
.filter-sub-list .filter-check {
    font-size: 0.82rem;
    padding: 4px 0;
}

/* Category page tile counts */
.cat-count {
    display: block;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.4px;
    color: rgba(255, 255, 255, 0.75);
    margin-top: 2px;
}

/* ==========================================================
   20. Product Details Page
   ========================================================== */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}
.breadcrumb a {
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .current {
    color: var(--color-text);
    font-weight: 600;
}

.product-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
}
.product-detail-grid > * { min-width: 0; }
@media (min-width: 1024px) {
    .product-detail-grid {
        grid-template-columns: minmax(0, 35fr) minmax(0, 40fr) minmax(0, 25fr);
        gap: 2.5rem;
    }
}

.pd-gallery {
    display: flex;
    flex-direction: column-reverse;
    gap: 0.75rem;
}
@media (min-width: 1024px) {
    .pd-gallery {
        flex-direction: row;
        gap: 1rem;
    }
}

.pd-thumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    overflow-x: auto;
    min-width: 0;
    padding-bottom: 2px;
}
@media (max-width: 1023px) {
    .pd-thumbs {
        overflow-x: visible;
    }
}
@media (min-width: 1024px) {
    .pd-thumbs {
        flex-wrap: nowrap;
        flex-direction: column;
        overflow-x: visible;
        width: 72px;
        flex-shrink: 0;
    }
}
.pd-thumb {
    width: 64px;
    aspect-ratio: 4 / 5;
    flex-shrink: 0;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-neutral-100);
    cursor: pointer;
    opacity: 0.65;
    overflow: hidden;
    transition: opacity var(--transition-fast), border-color var(--transition-fast);
}
@media (min-width: 1024px) {
    .pd-thumb { width: 72px; }
}
.pd-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pd-thumb:hover { opacity: 1; }
.pd-thumb.active {
    opacity: 1;
    border-color: var(--color-primary);
    box-shadow: inset 0 0 0 1px var(--color-primary);
}

.pd-main-wrap {
    position: relative;
    flex: 1;
    min-width: 0;
}

.pd-img-wrap {
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--color-neutral-100);
    border: 1px solid var(--color-border);
    aspect-ratio: 4 / 5;
}
.pd-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pd-main-wrap:hover .pd-nav-btn { opacity: 1; }

.pd-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-circle);
    background: transparent;
    color: #FFFFFF;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
    z-index: 4;
}
.pd-nav-btn svg { width: 17px; height: 17px; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5)); }
.pd-nav-btn.prev { left: 0.6rem; }
.pd-nav-btn.next { right: 0.6rem; }
.pd-nav-btn:hover { background: rgba(0, 0, 0, 0.32); }

.pd-play-btn {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-circle);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(6px);
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
    z-index: 4;
}
.pd-play-btn svg { width: 17px; height: 17px; fill: currentColor; margin-left: 2px; }
.pd-play-btn:hover {
    background: var(--color-primary);
    color: #FFFFFF;
}

.pd-video-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.82);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}
.pd-video-modal.open {
    opacity: 1;
    pointer-events: auto;
}
.pd-video-box {
    position: relative;
    width: min(880px, 100%);
}
.pd-video-frame {
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.pd-video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
.pd-video-close {
    position: absolute;
    top: -44px;
    right: -4px;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-circle);
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
    transition: background var(--transition-fast);
}
.pd-video-close:hover { background: rgba(255, 255, 255, 0.3); }

/* Magnifier lens (desktop hover) */
@media (hover: hover) and (min-width: 1024px) {
    .pd-main-wrap { cursor: crosshair; }
}
.pd-zoom-lens {
    position: absolute;
    width: 220px;
    height: 220px;
    background-repeat: no-repeat;
    background-color: var(--color-surface);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-fast);
    z-index: 3;
}
.pd-zoom-lens.active { opacity: 1; }
.pd-zoom-lens .corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 0 solid var(--color-primary);
}
.pd-zoom-lens .tl { top: 6px; left: 6px; border-top-width: 2.5px; border-left-width: 2.5px; border-top-left-radius: 5px; }
.pd-zoom-lens .tr { top: 6px; right: 6px; border-top-width: 2.5px; border-right-width: 2.5px; border-top-right-radius: 5px; }
.pd-zoom-lens .bl { bottom: 6px; left: 6px; border-bottom-width: 2.5px; border-left-width: 2.5px; border-bottom-left-radius: 5px; }
.pd-zoom-lens .br { bottom: 6px; right: 6px; border-bottom-width: 2.5px; border-right-width: 2.5px; border-bottom-right-radius: 5px; }

/* Tap fullscreen viewer (touch devices) */
.pd-zoom-overlay {
    position: fixed;
    inset: 0;
    z-index: 190;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.92);
    touch-action: pinch-zoom;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}
.pd-zoom-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.pd-zoom-overlay img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: var(--radius-sm);
}
.pd-zoom-close {
    position: absolute;
    top: 0.9rem;
    right: 0.9rem;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: var(--radius-circle);
    background: rgba(255, 255, 255, 0.14);
    color: #FFFFFF;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.pd-zoom-close:hover { background: rgba(255, 255, 255, 0.3); }
.pd-zoom-hint {
    position: absolute;
    bottom: 1.4rem;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    white-space: nowrap;
}
.pd-zoom-hint svg { width: 15px; height: 15px; }

.pd-name {
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-text);
    margin-bottom: 0.85rem;
}

.pd-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}
.pd-discount-badge {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    background: var(--color-danger);
    color: #FFFFFF;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-xs);
}
.pd-old-price {
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--color-text-muted);
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}
.pd-old-price del {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}
.pd-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-text);
}
.pd-price-wrap { display: contents; }

.pd-option { margin-bottom: 1.4rem; }
.option-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-secondary);
    margin-bottom: 0.65rem;
}
.option-label b {
    color: var(--color-text);
    text-transform: none;
    letter-spacing: 0;
}
.pd-option.error .option-label {
    color: var(--color-danger);
}
.pd-option.error .option-label::after {
    content: ' — required';
    font-weight: 600;
}
@keyframes pdShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}
.pd-option.shake { animation: pdShake 0.4s ease; }

.option-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}
.option-head .option-label { margin-bottom: 0; }

.size-chart-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    background: transparent;
    padding: 0;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
    transition: color var(--transition-fast);
}
.size-chart-link svg {
    width: 14px;
    height: 14px;
}
.size-chart-link:hover,
.size-chart-link.open { color: var(--color-primary); }

/* Size chart — drops into the dedicated right column on desktop;
   under lg the modal path is used instead, so it stays hidden there. */
.pd-sizechart {
    display: none;
}
@media (min-width: 1024px) {
    .pd-sizechart {
        display: block;
        position: sticky;
        top: 140px;
        align-self: start;
        opacity: 0;
        transform: translateX(16px);
        pointer-events: none;
        transition: opacity var(--transition-base), transform var(--transition-base);
    }
    .pd-sizechart.open {
        opacity: 1;
        transform: translateX(0);
        pointer-events: auto;
    }
}
.pd-sizechart img {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
}

.pd-sizechart-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.82);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}
.pd-sizechart-modal.open {
    opacity: 1;
    pointer-events: auto;
}
.pd-sizechart-box {
    position: relative;
    width: min(480px, 100%);
}
.pd-sizechart-box img {
    display: block;
    width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* Overview / Description tabs */
.pd-tab-nav {
    display: flex;
    gap: 2rem;
    border-bottom: 1px solid var(--color-border);
}
.pd-tab-btn {
    position: relative;
    padding: 0.9rem 0.15rem;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color var(--transition-fast);
}
.pd-tab-btn::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--color-primary);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}
.pd-tab-btn:hover { color: var(--color-text-secondary); }
.pd-tab-btn.active { color: var(--color-text); }
.pd-tab-btn.active::after { transform: scaleX(1); }

@keyframes pdTabFade {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
.pd-tab-panel {
    display: none;
    max-width: 860px;
    padding-top: 1.75rem;
}
.pd-tab-panel.active {
    display: block;
    animation: pdTabFade var(--transition-base) ease both;
}

.pd-tab-panel p {
    font-size: 0.92rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}
.pd-tab-panel p:last-child { margin-bottom: 0; }

.qty-stepper.lg button {
    width: 42px;
    height: 42px;
    font-size: 1.05rem;
}
.qty-stepper.lg span {
    min-width: 40px;
    font-size: 0.95rem;
}

.pd-stock {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 1.1rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #1B7A43;
}
.pd-stock svg { width: 15px; height: 15px; flex-shrink: 0; }
.pd-stock.low { color: var(--color-danger); }
.pd-stock.hidden { display: none; }

.pd-actions-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.6rem;
}
.btn-buy-now,
.add-cart-main-btn {
    flex: 1;
    min-width: 150px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    background: var(--color-text);
    color: #FFFFFF;
    font-family: inherit;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    padding: 0.95rem 1.25rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background var(--transition-base), transform var(--transition-fast);
}
.btn-buy-now { background: var(--color-primary); }
.add-cart-main-btn:hover { background: var(--color-primary); }
.btn-buy-now:hover { background: var(--color-primary-hover); }
.add-cart-main-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}
.pd-wish-btn {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: border-color var(--transition-fast), color var(--transition-fast);
}
.pd-wish-btn svg {
    width: 19px;
    height: 19px;
    fill: none;
    transition: fill var(--transition-fast);
}
.pd-wish-btn:hover,
.pd-wish-btn.active {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.pd-wish-btn.active svg { fill: var(--color-primary); }
.pd-wish-inline {
    margin-left: auto;
    width: 42px;
    height: 42px;
}

.pd-meta {
    list-style: none;
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    display: grid;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--color-text);
}
.pd-meta span {
    display: inline-block;
    min-width: 92px;
    color: var(--color-text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.68rem;
    letter-spacing: 0.06em;
}
.pd-meta a {
    color: var(--color-text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition-fast);
}
.pd-meta a:hover { color: var(--color-primary); }
.pd-meta li.pd-meta-tags {
    display: flex;
    gap: 0.5rem;
}
.pd-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.pd-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-text-secondary);
    background: var(--color-neutral-100);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
}

@media (max-width: 540px) {
    .pd-actions-row {
        flex-direction: column;
        align-items: stretch;
    }
    .pd-actions-row .qty-stepper {
        align-self: center;
    }
    .pd-actions-row .btn-buy-now,
    .pd-actions-row .add-cart-main-btn {
        width: 100%;
        min-width: 0;
    }
    .pd-actions-row .pd-wish-btn {
        width: 100%;
        height: 44px;
    }
}

.pd-trust {
    margin-top: 1.75rem;
    display: grid;
    gap: 0.9rem;
}
.pd-trust-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}
.pd-trust-item svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
    flex-shrink: 0;
}
.pd-trust-item b {
    display: block;
    font-size: 0.82rem;
    color: var(--color-text);
}
.pd-trust-item small {
    font-size: 0.74rem;
    color: var(--color-text-muted);
}

.product-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* ------------------------------------------------------------
   30. Quick-Add Modal (product cards)
   ------------------------------------------------------------ */
.qc-modal {
    position: fixed;
    inset: 0;
    z-index: 1800;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.65);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}
.qc-modal.open {
    opacity: 1;
    pointer-events: auto;
}
.qc-box {
    position: relative;
    background: var(--color-surface);
    border-radius: var(--radius-md);
    width: min(480px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    transform: translateY(20px) scale(0.97);
    transition: transform var(--transition-base);
}
.qc-modal.open .qc-box {
    transform: translateY(0) scale(1);
}
.qc-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-circle);
    border: none;
    background: var(--color-neutral-100);
    color: var(--color-text-secondary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background var(--transition-fast);
}
.qc-close:hover { background: var(--color-border); }
.qc-body {
    display: flex;
    gap: 1rem;
    padding: 1.25rem;
}
@media (max-width: 540px) {
    .qc-body { flex-direction: column; }
}
.qc-img {
    width: 160px;
    aspect-ratio: 4 / 5;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-neutral-100);
}
.qc-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qc-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.qc-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}
.qc-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.qc-price {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
}
.qc-price .currency { font-weight: 400; font-size: 0.8rem; color: var(--color-text-muted); }
.qc-old-price {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    text-decoration: none;
}
.qc-old-price del {
    text-decoration: line-through;
    text-decoration-thickness: 1.5px;
}
.qc-discount {
    font-size: 0.7rem;
    font-weight: 700;
    background: var(--color-danger);
    color: #fff;
    padding: 0.2rem 0.5rem;
    border-radius: var(--radius-xs);
}
.qc-option { }
.qc-option .option-label { margin-bottom: 0.5rem; }
.qc-option.error .option-label { color: var(--color-danger); }
.qc-option.error .option-label::after { content: ' — required'; font-weight: 600; }
.qc-option.shake { animation: pdShake 0.4s ease; }
.qc-stock {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1B7A43;
}
.qc-stock svg { width: 14px; height: 14px; flex-shrink: 0; }
.qc-stock.low { color: var(--color-danger); }
.qc-stock.hidden { display: none; }
.qc-actions {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    padding: 0 1.25rem 1.25rem;
    margin-top: auto;
}
.qc-actions-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}
.qc-actions-row .qty-stepper {
    flex-shrink: 0;
}
.qc-actions .btn-buy-now,
.qc-actions .add-cart-main-btn {
    flex: 1;
    min-width: 0;
}
.qc-actions .add-cart-main-btn svg { width: 16px; height: 16px; }

@media (max-width: 540px) {
    .qc-img {
        width: 80px;
        aspect-ratio: 4 / 5;
    }
    .qc-actions-row .qty-stepper {
        flex-shrink: 0;
    }
    .qc-actions .btn-buy-now,
    .qc-actions .add-cart-main-btn {
        flex: 1;
        min-width: 0;
        padding: 0.7rem 0.6rem;
        font-size: 0.72rem;
        letter-spacing: 0.04em;
    }
}

/* ------------------------------------------------------------
   31. Cart Page
   ------------------------------------------------------------ */
.cart-page-empty {
    text-align: center;
    padding: 4rem 1rem;
}
.cart-page-empty svg { width: 56px; height: 56px; color: var(--color-text-faint); margin: 0 auto 1rem; }
.cart-page-empty h4 { font-size: 1.1rem; font-weight: 700; color: var(--color-text); margin-bottom: 0.4rem; }
.cart-page-empty p { font-size: 0.9rem; color: var(--color-text-tertiary); margin-bottom: 1.25rem; }

.cart-page-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (min-width: 768px) {
    .cart-page-layout { grid-template-columns: 1fr 320px; }
}

/* ---- Table wrapper (card shell) ---- */
.cart-page-table-wrap {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.cart-page-table-wrap table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}
.cart-page-table-wrap colgroup { display: none; }
@media (min-width: 768px) {
    .cart-page-table-wrap colgroup { display: table-column-group; }
}

/* ---- thead ---- */
.cart-page-table-wrap thead {
    background: var(--color-neutral-100);
}
.cart-page-table-wrap th {
    padding: 0.7rem 1.25rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--color-text-muted);
    text-align: left;
}

/* ---- td ---- */
.cart-page-table-wrap td {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--color-border);
    vertical-align: middle;
}

/* Product cell */
.cp-product {
    display: flex;
    gap: 0.85rem;
    align-items: center;
}
.cp-img {
    width: 64px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--color-neutral-100);
    flex-shrink: 0;
}
.cp-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-info { min-width: 0; }
.cp-name {
    display: block;
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--color-text);
    text-decoration: none;
    line-height: 1.35;
    transition: color var(--transition-fast);
}
.cp-name:hover { color: var(--color-primary); }
.cp-meta {
    display: block;
    font-size: 0.75rem;
    color: var(--color-text-muted);
    margin-top: 3px;
}

.cp-price,
.cp-total {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--color-text);
    white-space: nowrap;
}

.cp-remove {
    background: none;
    border: none;
    color: var(--color-text-faint);
    cursor: pointer;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.cp-remove svg { width: 16px; height: 16px; }
.cp-remove:hover { color: var(--color-danger); background: var(--color-danger-soft); }

/* ---- Mobile responsive table ---- */
@media (max-width: 767px) {
    .cart-page-table-wrap thead { display: none; }
    .cart-page-table-wrap tbody,
    .cart-page-table-wrap tr,
    .cart-page-table-wrap td {
        display: block;
    }
    .cart-page-table-wrap tr {
        position: relative;
        padding: 1rem 1.25rem 0.75rem;
        border-bottom: 1px solid var(--color-border);
    }
    .cart-page-table-wrap tr:last-child { border-bottom: none; }
    .cart-page-table-wrap td {
        padding: 0;
        border: none;
        text-align: left;
    }

    /* Product row */
    .cart-page-table-wrap td:first-child {
        display: flex;
        gap: 0.75rem;
        align-items: center;
        margin-bottom: 0.75rem;
    }

    /* Price / Qty / Total: side by side with labels */
    .cart-page-table-wrap td:not(:first-child) {
        display: inline-block;
        width: auto;
        padding: 0;
        margin-right: 1.25rem;
    }
    .cart-page-table-wrap td:not(:first-child)::before {
        content: attr(data-label);
        display: block;
        font-size: 0.68rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: var(--color-text-muted);
        margin-bottom: 2px;
    }

    /* Remove: top right */
    .cart-page-table-wrap td:last-child {
        position: absolute;
        top: 1rem;
        right: 1rem;
        width: auto;
    }
}

/* ---- Summary card (sticky like shop-sidebar) ---- */
.cart-page-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 1.5rem;
}
@media (min-width: 768px) {
    .cart-page-summary {
        position: sticky;
        top: 144px;
    }
}
.cart-page-summary-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.cart-page-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.7rem;
}
.cart-page-summary-total {
    padding-top: 0.9rem;
    margin-top: 0.5rem;
    margin-bottom: 1.25rem;
    border-top: 1.5px solid var(--color-border);
    font-size: 1rem;
    color: var(--color-text);
}
.cart-page-summary-total strong { font-size: 1.15rem; }
.cart-page-checkout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.8rem;
    background: var(--color-text);
    color: var(--color-surface);
    border: none;
    border-radius: var(--radius-xs);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: background var(--transition-base);
}
.cart-page-checkout-btn svg { width: 15px; height: 15px; }
.cart-page-checkout-btn:hover { background: var(--color-primary); }
.cart-page-continue {
    display: block;
    text-align: center;
    margin-top: 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}
.cart-page-continue:hover { color: var(--color-text); }

/* ==========================================================
   32. Checkout Page
   ========================================================== */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    align-items: start;
}
@media (min-width: 1024px) {
    .checkout-layout {
        grid-template-columns: 1fr 380px;
        gap: 2rem;
    }
}

.checkout-empty {
    text-align: center;
    padding: 4rem 1rem;
}
.checkout-empty svg { width: 56px; height: 56px; color: var(--color-text-faint); margin: 0 auto 1rem; }
.checkout-empty h4 { font-size: 1.1rem; font-weight: 700; color: var(--color-text); margin-bottom: 0.4rem; }
.checkout-empty p { font-size: 0.9rem; color: var(--color-text-tertiary); margin-bottom: 1.25rem; }

/* ---- Section cards ---- */
.checkout-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 480px) {
    .checkout-section { padding: 1.25rem 1rem; }
}
.checkout-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1.25rem;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid var(--color-border);
}
.checkout-section-title svg {
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

/* ---- Select styling (matches form-control-group) ---- */
.form-select-group {
    position: relative;
}

/* ---- Searchable dropdown ---- */
.search-select {
    position: relative;
}
.search-select-trigger {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface);
    cursor: pointer;
    transition: border-color var(--transition-base), box-shadow var(--transition-base);
    min-height: 44px;
}
.search-select-trigger:focus-within,
.search-select.open .search-select-trigger {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.12);
}
.search-select-trigger.error {
    border-color: var(--color-danger);
}
.search-select-display {
    flex: 1;
    padding: 11px 14px;
    font-size: 0.9rem;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    line-height: 1.4;
}
.search-select-display.placeholder {
    color: var(--color-text-faint);
}
.search-select-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: transform var(--transition-base);
}
.search-select-arrow svg { width: 16px; height: 16px; }
.search-select.open .search-select-arrow { transform: rotate(180deg); }

.search-select-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 60;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: ssDropIn 0.18s ease both;
}
.search-select.open .search-select-panel { display: block; }
@keyframes ssDropIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}
.search-select-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border);
}
.search-select-search svg { width: 16px; height: 16px; color: var(--color-text-muted); flex-shrink: 0; }
.search-select-search input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.88rem;
    font-family: inherit;
    color: var(--color-text);
}
.search-select-search input::placeholder { color: var(--color-text-faint); }

.search-select-list {
    max-height: 220px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 0;
}
.search-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}
.search-select-option:hover {
    background: var(--color-primary-tint);
    color: var(--color-primary);
}
.search-select-option.active {
    background: var(--color-primary-tint);
    color: var(--color-primary);
    font-weight: 600;
}
.search-select-option .check-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--color-primary);
    opacity: 0;
}
.search-select-option.active .check-icon { opacity: 1; }

.search-select-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    font-size: 0.82rem;
    color: var(--color-text-muted);
}

/* ---- Hidden native select for form submission ---- */
.search-select input[type="hidden"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

/* ---- Checkbox rows ---- */
.checkout-checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}
.checkout-checkbox-row input {
    accent-color: var(--color-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* ---- Shipping fields reveal ---- */
.shipping-fields {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--color-border);
    animation: checkoutSlideIn 0.3s ease both;
}
@keyframes checkoutSlideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ---- Payment options ---- */
.payment-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.payment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.payment-option {
    cursor: pointer;
    user-select: none;
}
.payment-option.disabled {
    cursor: not-allowed;
    opacity: 0.55;
}
.payment-option-inner {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1rem 1.15rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: border-color var(--transition-base), background var(--transition-base);
}
.payment-option:hover:not(.disabled) .payment-option-inner {
    border-color: var(--color-primary);
    background: var(--color-primary-tint);
}
.payment-option.selected .payment-option-inner {
    border-color: var(--color-primary);
    background: var(--color-primary-tint);
}
.payment-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    background: var(--color-neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.payment-icon-wrap svg {
    width: 20px;
    height: 20px;
    color: var(--color-text-secondary);
}
.payment-option.selected .payment-icon-wrap {
    background: var(--color-primary);
}
.payment-option.selected .payment-icon-wrap svg {
    color: #FFFFFF;
}
.payment-option-text {
    flex: 1;
    min-width: 0;
}
.payment-option-text strong {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
}
.payment-option-text span {
    font-size: 0.76rem;
    color: var(--color-text-muted);
}
.payment-check {
    width: 22px;
    height: 22px;
    border-radius: var(--radius-circle);
    border: 1.5px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition-base);
}
.payment-check svg {
    width: 13px;
    height: 13px;
    color: transparent;
    transition: color var(--transition-base);
}
.payment-option.selected .payment-check {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.payment-option.selected .payment-check svg {
    color: #FFFFFF;
}
.payment-coming-soon {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    background: var(--color-neutral-100);
    padding: 4px 8px;
    border-radius: var(--radius-full);
    flex-shrink: 0;
}

/* ---- Order summary card ---- */
.checkout-summary {
    min-width: 0;
}
@media (min-width: 1024px) {
    .checkout-summary {
        position: sticky;
        top: 144px;
    }
}
.checkout-summary-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xs);
    padding: 1.5rem;
}
.checkout-summary-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

/* ---- Item list ---- */
.checkout-items {
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 1rem;
}
.checkout-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0;
    border-bottom: 1px solid var(--color-neutral-100);
}
.checkout-item:last-child { border-bottom: none; }
.checkout-item-img {
    position: relative;
    width: 52px;
    aspect-ratio: 4 / 5;
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: var(--color-neutral-100);
    flex-shrink: 0;
}
.checkout-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.checkout-item-qty {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--color-text);
    color: #FFFFFF;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}
.checkout-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.checkout-item-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}
.checkout-item-meta {
    font-size: 0.7rem;
    color: var(--color-text-muted);
}
.checkout-item-price {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}

/* ---- Coupon ---- */
.checkout-coupon {
    padding: 1rem 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 1rem;
}
.checkout-coupon-row {
    display: flex;
    gap: 0.5rem;
}
.checkout-coupon-row input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xs);
    padding: 9px 12px;
    font-size: 0.85rem;
    font-family: inherit;
    color: var(--color-text);
    outline: none;
    transition: border-color var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.checkout-coupon-row input:focus { border-color: var(--color-primary); }
.checkout-coupon-row input::placeholder { text-transform: none; letter-spacing: 0; color: var(--color-text-faint); }
.checkout-coupon-btn {
    padding: 9px 18px;
    border: 1px solid var(--color-text);
    border-radius: var(--radius-xs);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}
.checkout-coupon-btn:hover { background: var(--color-text); color: var(--color-surface); }
.checkout-coupon-btn:disabled { opacity: 0.6; cursor: default; }
.checkout-coupon-msg {
    margin-top: 0.5rem;
    font-size: 0.76rem;
    font-weight: 500;
}

/* ---- Summary lines ---- */
.checkout-summary-lines {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.checkout-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    color: var(--color-text-secondary);
}
.checkout-summary-line strong {
    font-weight: 600;
    color: var(--color-text);
}
.checkout-discount strong {
    color: #1B7A43 !important;
}
.checkout-total {
    padding-top: 0.85rem;
    margin-top: 0.3rem;
    border-top: 1.5px solid var(--color-border);
    font-size: 1rem;
    color: var(--color-text);
}
.checkout-total strong {
    font-size: 1.15rem;
    font-weight: 800;
}

/* ---- Place order button ---- */
.checkout-place-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    margin-top: 1.25rem;
    padding: 14px 20px;
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-base);
}
.checkout-place-btn:hover { background: var(--color-primary-hover); }
.checkout-place-btn:disabled { opacity: 0.6; cursor: wait; }
.checkout-place-btn svg { width: 15px; height: 15px; }

/* ---- Checkout terms & conditions row ---- */
.checkout-terms {
    margin-top: 1.15rem;
    margin-bottom: 0.55rem;
}
.checkout-terms label.terms-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 0;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
    color: var(--color-text-secondary);
}
.checkout-terms .field-error {
    margin: 0.4rem 0 0;
    font-size: 0.72rem;
}

.checkout-secure-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 0.75rem;
    font-size: 0.72rem;
    color: var(--color-text-muted);
    text-align: center;
}
.checkout-secure-note svg { width: 13px; height: 13px; }

/* ---- Success modal ---- */
.checkout-success-modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.6);
}
.checkout-success-box {
    background: var(--color-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    max-width: 420px;
    width: 100%;
}
.checkout-success-icon { margin-bottom: 1rem; }
.checkout-success-icon svg {
    width: 60px;
    height: 60px;
    color: #1B7A43;
}
.checkout-success-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.checkout-success-box p {
    font-size: 0.88rem;
    color: var(--color-text-tertiary);
    margin-bottom: 0.5rem;
}
.checkout-order-id {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem !important;
}
.checkout-order-id strong {
    color: var(--color-primary);
    font-weight: 700;
}
.checkout-success-box .auth-submit-btn {
    margin-top: 0;
    text-decoration: none;
}

/* ================================================================
   ORDER SUCCESS PAGE  (#orderSuccessPage)
   ================================================================ */

.order-success-wrap {
    max-width: 520px;
    margin: 0 auto;
    text-align: center;
}

/* ---- Animated check ring + tick ---- */
.order-success-icon {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}
.order-success-ring {
    position: absolute;
    inset: 0;
    border-radius: var(--radius-circle);
    border: 3px solid var(--color-primary);
    opacity: 0.2;
    animation: osRingPulse 2s ease-in-out infinite;
}
@keyframes osRingPulse {
    0%, 100% { transform: scale(1); opacity: 0.2; }
    50% { transform: scale(1.12); opacity: 0.08; }
}
.order-success-check {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 18px;
    color: var(--color-primary);
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: osCheckDraw 0.6s 0.3s ease forwards;
}
@keyframes osCheckDraw {
    to { stroke-dashoffset: 0; }
}

.order-success-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.order-success-subtitle {
    font-size: 0.88rem;
    color: var(--color-text-tertiary);
    line-height: 1.6;
    margin-bottom: 1rem;
}
.order-success-id {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--color-text-muted);
    background: var(--color-primary-tint);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    margin-bottom: 2rem;
}
.order-success-id strong {
    color: var(--color-primary);
    font-weight: 700;
}

/* ---- Order summary card ---- */
.order-success-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: left;
    margin-bottom: 1.5rem;
}
.order-success-card-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    padding-bottom: 0.85rem;
    margin-bottom: 0.85rem;
    border-bottom: 1px solid var(--color-border);
}
.order-success-items {
    margin-bottom: 0.85rem;
}
.order-success-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-neutral-100);
}
.order-success-item:last-child { border-bottom: none; }
.order-success-item-img {
    position: relative;
    width: 44px;
    height: 55px;
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: var(--color-neutral-100);
    flex-shrink: 0;
}
.order-success-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.order-success-item-qty {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--color-text);
    color: #FFFFFF;
    font-size: 0.55rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}
.order-success-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.order-success-item-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}
.order-success-item-meta {
    font-size: 0.68rem;
    color: var(--color-text-muted);
}
.order-success-item-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}
.order-success-lines {
    border-top: 1px solid var(--color-border);
    padding-top: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.order-success-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}
.order-success-total {
    padding-top: 0.6rem;
    margin-top: 0.2rem;
    border-top: 1.5px solid var(--color-border);
    font-size: 0.95rem;
    color: var(--color-text);
}
.order-success-total strong {
    font-weight: 800;
}
.order-success-payment {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding: 0.6rem 0.85rem;
    background: var(--color-neutral-100);
    border-radius: var(--radius-xs);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}
.order-success-payment svg { width: 16px; height: 16px; color: var(--color-text-muted); }

/* ---- What's next steps ---- */
.order-success-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
    text-align: left;
}
.order-success-step {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    animation: osStepFadeIn 0.4s ease both;
}
.order-success-step:nth-child(2) { animation-delay: 0.15s; }
.order-success-step:nth-child(3) { animation-delay: 0.3s; }
@keyframes osStepFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.order-success-step-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.order-success-step-icon svg { width: 18px; height: 18px; color: var(--color-primary); }
.order-success-step-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.order-success-step-text strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
}
.order-success-step-text span {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* ---- Action buttons ---- */
.order-success-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.order-success-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
}
.order-success-btn svg { width: 16px; height: 16px; }
.order-success-btn.primary {
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
}
.order-success-btn.primary:hover { background: var(--color-primary-hover); }
.order-success-btn.outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.order-success-btn.outline:hover { border-color: var(--color-text); }

/* ================================================================
   TRACK ORDER PAGE  (#trackOrderPage)
   ================================================================ */

.track-search {
    max-width: 560px;
    margin: 0 auto 2rem;
}
.track-search-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px 6px 6px 16px;
    transition: border-color var(--transition-base);
}
.track-search-inner:focus-within { border-color: var(--color-primary); }
.track-search-inner svg { width: 18px; height: 18px; color: var(--color-text-muted); flex-shrink: 0; }
.track-search-inner input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    padding: 8px 0;
}
.track-search-inner input::placeholder { color: var(--color-text-faint); }
.track-search-btn {
    padding: 10px 24px;
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-xs);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-base);
    white-space: nowrap;
}
.track-search-btn:hover { background: var(--color-primary-hover); }

/* ---- Status header ---- */
.track-result {
    max-width: 560px;
    margin: 0 auto;
    animation: trackFadeIn 0.4s ease both;
}
@keyframes trackFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.track-status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: var(--color-primary-tint);
    border: 1px solid rgba(197, 160, 89, 0.2);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}
.track-status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-primary);
}
.track-status-badge svg { width: 20px; height: 20px; }
.track-eta { text-align: right; }
.track-eta-label {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.track-eta-date {
    display: block;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 2px;
}

/* ---- Timeline ---- */
.track-timeline-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem 1rem;
    margin-bottom: 1.5rem;
}
.track-timeline {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-top: 8px;
}
.track-timeline::-webkit-scrollbar { display: none; }
.track-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 0;
    min-width: 96px;
    max-width: 180px;
    position: relative;
    scroll-snap-align: center;
}
.track-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 15px;
    left: calc(50% + 16px);
    right: calc(-50% + 16px);
    border-top: 2px dashed var(--color-border);
    z-index: 0;
}
.track-step.completed:not(:last-child)::after {
    border-top-color: var(--color-primary);
}
.track-step.active:not(:last-child)::after {
    border-top-color: var(--color-primary);
}
.track-step-dot {
    position: relative;
    z-index: 1;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-circle);
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-text-muted);
}
.track-step-dot svg { width: 14px; height: 14px; color: transparent; }
.track-step.completed .track-step-dot {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.track-step.completed .track-step-dot svg { color: #FFFFFF; }
.track-step.active .track-step-dot {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.15);
}
.track-step.active .track-step-dot svg { color: #FFFFFF; }
.track-step-dot.pulse { animation: trackPulse 2s ease-in-out infinite; }
@keyframes trackPulse {
    0%, 100% { box-shadow: 0 0 0 4px rgba(197, 160, 89, 0.18); }
    50% { box-shadow: 0 0 0 7px rgba(197, 160, 89, 0.06); }
}
.track-step-content {
    text-align: center;
    padding-top: 0.55rem;
    min-width: 0;
    max-width: 100%;
}
.track-step-content strong {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-step:not(.completed):not(.active) .track-step-content strong {
    color: var(--color-text-muted);
}
.track-step.active .track-step-content strong {
    color: var(--color-primary);
}
.track-step.active .track-step-content > span {
    color: var(--color-primary);
}
.track-step-content > span {
    display: block;
    font-size: 0.66rem;
    color: var(--color-text-muted);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.track-step-content p {
    font-size: 0.7rem;
    color: var(--color-text-secondary);
    margin-top: 4px;
    line-height: 1.4;
    display: none;
}
.track-step:not(.completed):not(.active) .track-step-content p { display: none; }

/* ---- Order details card ---- */
.track-details-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.track-details-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.track-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.track-detail-label {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 2px;
}
.track-detail-value {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
}
.track-items {
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
    margin-bottom: 1rem;
}
.track-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--color-neutral-100);
}
.track-item:last-child { border-bottom: none; }
.track-item-img {
    position: relative;
    width: 44px;
    height: 55px;
    border-radius: var(--radius-xs);
    overflow: hidden;
    background: var(--color-neutral-100);
    flex-shrink: 0;
}
.track-item-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.track-item-qty {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: var(--color-text);
    color: #FFFFFF;
    font-size: 0.55rem;
    font-weight: 700;
    min-width: 16px;
    height: 16px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
}
.track-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.track-item-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.3;
}
.track-item-meta {
    font-size: 0.68rem;
    color: var(--color-text-muted);
}
.track-item-price {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text);
    white-space: nowrap;
}
.track-summary-lines {
    border-top: 1px solid var(--color-border);
    padding-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.track-summary-line {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}
.track-summary-total {
    padding-top: 0.6rem;
    margin-top: 0.2rem;
    border-top: 1.5px solid var(--color-border);
    font-size: 0.95rem;
    color: var(--color-text);
}
.track-summary-total strong { font-weight: 800; }

/* ---- Payment badges & rows ---- */
.pay-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    vertical-align: middle;
}
.pay-badge.pay-paid { background: #D1FAE5; color: #065F46; }
.pay-badge.pay-partial { background: #FEF3C7; color: #92400E; }
.pay-badge.pay-pending { background: var(--color-danger-soft); color: var(--color-danger); }
.pay-badge.pay-refunded { background: var(--color-neutral-100); color: var(--color-text-secondary); }
.pay-badge.pay-failed { background: var(--color-danger-soft); color: var(--color-danger); }
.track-payments-list {
    border-top: 1px solid var(--color-border);
    margin-top: 0.75rem;
    padding-top: 0.25rem;
}
.track-pay-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--color-neutral-100);
}
.track-pay-row:last-child { border-bottom: none; }
.track-pay-info { flex: 1; min-width: 0; }
.track-pay-amount {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}
.track-pay-prefix {
    font-weight: 400;
    color: var(--color-text-muted);
    margin-left: 0.35rem;
    font-size: 0.76rem;
}
.track-pay-txn {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0 0;
}
.track-pay-date {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    margin: 0.25rem 0 0;
}

/* ---- Address blocks ---- */
.track-addr {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    line-height: 1.65;
}
.track-addr-name {
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 0.15rem;
}
.track-addr-line { margin: 0; }

/* ---- Need help ---- */
.track-help {
    text-align: center;
    padding: 1.25rem;
    background: var(--color-neutral-100);
    border-radius: var(--radius-sm);
}
.track-help p {
    font-size: 0.82rem;
    color: var(--color-text-secondary);
    margin-bottom: 0.75rem;
}
.track-help-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.track-help-link:hover { color: var(--color-primary-hover); }
.track-help-link svg { width: 16px; height: 16px; }

/* ---- Empty state / Not found ---- */
.track-empty,
.track-not-found {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
    padding: 2rem 1rem;
}
.track-empty-icon,
.track-not-found-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius-circle);
    background: var(--color-primary-tint);
    display: flex;
    align-items: center;
    justify-content: center;
}
.track-empty-icon svg,
.track-not-found-icon svg { width: 32px; height: 32px; color: var(--color-primary); }
.track-not-found-icon { background: var(--color-danger-soft); }
.track-not-found-icon svg { color: var(--color-danger); }
.track-empty h3,
.track-not-found h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}
.track-empty p,
.track-not-found p {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    line-height: 1.6;
}
.track-example {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
}
.track-example span {
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.track-example-btn {
    display: inline-block;
    padding: 5px 14px;
    background: var(--color-primary-tint);
    border: 1px solid rgba(197, 160, 89, 0.3);
    border-radius: var(--radius-full);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--color-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.04em;
}
.track-example-btn:hover {
    background: var(--color-primary);
    color: #FFFFFF;
    border-color: var(--color-primary);
}
    

/* ================================================================
   FAQS PAGE  (#faqsPage)
   ================================================================ */

.faq-search {
    max-width: 520px;
    margin: 0 auto 2.5rem;
}
.faq-search-inner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--color-surface);
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 6px 6px 6px 16px;
    transition: border-color var(--transition-base);
}
.faq-search-inner:focus-within { border-color: var(--color-primary); }
.faq-search-inner svg { width: 18px; height: 18px; color: var(--color-text-muted); flex-shrink: 0; }
.faq-search-inner input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--color-text);
    padding: 8px 0;
}
.faq-search-inner input::placeholder { color: var(--color-text-faint); }

/* ---- FAQ grid ---- */
.faq-grid {
    max-width: 740px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ---- Section ---- */
.faq-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 1rem;
}
.faq-section-title svg { width: 18px; height: 18px; color: var(--color-primary); }

/* ---- Items ---- */
.faq-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.faq-item {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: border-color var(--transition-base);
}
.faq-item:last-child { margin-bottom: 0; }
.faq-item.hidden { display: none; }
.faq-item.open { border-color: rgba(197, 160, 89, 0.3); }

/* ---- Question button ---- */
.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    background: var(--color-surface);
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background var(--transition-fast);
}
.faq-question:hover { background: var(--color-primary-tint); }
.faq-question span {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text);
    line-height: 1.4;
}
.faq-question svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: transform var(--transition-base);
}
.faq-item.open .faq-question svg { transform: rotate(180deg); color: var(--color-primary); }

/* ---- Answer ---- */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}
.faq-item.open .faq-answer {
    max-height: 500px;
}
.faq-answer p {
    padding: 0 1.15rem 1.15rem;
    font-size: 0.84rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
}
.faq-answer p a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.faq-answer p a:hover { color: var(--color-primary-hover); }
.faq-answer p strong { color: var(--color-text); font-weight: 600; }

/* ---- No results ---- */
.faq-no-results {
    text-align: center;
    padding: 2.5rem 1rem;
}
.faq-no-results.hidden { display: none; }
.faq-no-results svg { width: 40px; height: 40px; color: var(--color-text-faint); display: block; margin: 0 auto 0.75rem; }
.faq-no-results p {
    font-size: 0.88rem;
    color: var(--color-text-muted);
}

/* ---- Contact CTA ---- */
.faq-contact {
    max-width: 740px;
    margin: 3rem auto 0;
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--color-primary-tint);
    border-radius: var(--radius-md);
}
.faq-contact p:first-child {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
}
.faq-contact-sub {
    font-size: 0.84rem;
    color: var(--color-text-tertiary);
    margin-top: 0.25rem;
    margin-bottom: 1.25rem;
}
.faq-contact-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.faq-contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-base);
}
.faq-contact-btn svg { width: 15px; height: 15px; }
.faq-contact-btn.primary {
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
}
.faq-contact-btn.primary:hover { background: var(--color-primary-hover); }
.faq-contact-btn.outline {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
}
.faq-contact-btn.outline:hover { border-color: var(--color-text); }

/* ================================================================
   TERMS & CONDITIONS PAGE  (#termsPage)
   ================================================================ */

.terms-content {
    max-width: 740px;
    margin: 0 auto;
}
/* Dynamic terms/privacy content (admin Quill HTML: bare h3/p/ul/ol/li,
   no .terms-section wrappers) styles the same as the static sections. */
.terms-content > h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 1.75rem 0 0.65rem;
}
.terms-content > h3:first-child {
    margin-top: 0;
}
.terms-content > p {
    font-size: 0.84rem;
    line-height: 1.75;
    color: var(--color-text-secondary);
    margin: 0 0 0.5rem;
}
.terms-content > ul,
.terms-content > ol {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}
.terms-content > ol {
    list-style: decimal;
}
.terms-content > li {
    font-size: 0.84rem;
    line-height: 1.75;
    color: var(--color-text-secondary);
    margin-bottom: 0.35rem;
}
.terms-content a {
    color: var(--color-primary);
    text-decoration: underline;
}
.terms-modal {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: rgba(0, 0, 0, 0.6);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-base);
}
.terms-modal.open {
    opacity: 1;
    pointer-events: auto;
}
.terms-modal-box {
    position: relative;
    width: min(640px, 100%);
    max-height: min(85vh, 720px);
    background: var(--color-surface, #fff);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.terms-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border, #ececec);
}
.terms-modal-head h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
}
.terms-modal-close {
    border: none;
    background: none;
    cursor: pointer;
    color: var(--color-text-secondary);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-circle);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.terms-modal-close:hover {
    background: var(--color-bg-hover, #f2f2f2);
    color: var(--color-text);
}
.terms-modal-body {
    overflow-y: auto;
    padding: 1.25rem;
    -webkit-overflow-scrolling: touch;
}
.terms-modal-body .terms-content {
    max-width: none;
    margin: 0;
}
/* Address modal is a short form — keep its search-select dropdowns un-clipped so
   the absolutely-positioned panel is not cut off or scrolled with the body. */
.terms-modal-box.address-modal-box {
    overflow: visible;
}
.terms-modal-box.address-modal-box .terms-modal-body {
    overflow-y: visible;
}
.terms-modal-box.address-modal-box .search-select-panel {
    z-index: 80;
}
.terms-modal-body .terms-section h3 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.terms-modal-body .terms-section p,
.terms-modal-body .terms-section li {
    font-size: 0.82rem;
}
.terms-section {
    margin-bottom: 1.75rem;
}
.terms-section:last-child { margin-bottom: 0; }
.terms-section h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.65rem;
}
.terms-section p {
    font-size: 0.84rem;
    line-height: 1.75;
    color: var(--color-text-secondary);
    margin-bottom: 0.5rem;
}
.terms-section p:last-child { margin-bottom: 0; }
.terms-section ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}
.terms-section li {
    font-size: 0.84rem;
    line-height: 1.75;
    color: var(--color-text-secondary);
    margin-bottom: 0.25rem;
}
.terms-section a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.terms-section a:hover { color: var(--color-primary-hover); }

/* ================================================================
   DASHBOARD PAGE  (#dashboardPage)
   ================================================================ */

.dash-layout {
    display: flex;
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

/* ---- Sidebar ---- */
.dash-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem 0;
    position: sticky;
    top: 144px;
    height: fit-content;
}
.dash-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 1.25rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0.75rem;
}
.dash-avatar {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-circle);
    background: var(--color-primary);
    color: #FFFFFF;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-circle);
}
.dash-profile-photo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.dash-avatar-upload {
    width: 68px;
    height: 68px;
    cursor: pointer;
    border: 2px dashed var(--color-border);
    background: var(--color-surface);
    overflow: hidden;
    position: relative;
    transition: border-color 0.15s ease;
}
.dash-avatar-upload:hover {
    border-color: var(--color-primary);
}
.dash-avatar-upload.error {
    border-color: var(--color-danger);
}
.dash-avatar-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
}
.dash-avatar-camera {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.dash-avatar-camera svg {
    width: 18px;
    height: 18px;
    color: var(--color-text);
}
.dash-profile-photo-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}
.dash-profile-photo-meta strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
}
.dash-profile-photo-meta span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}
.dash-profile-photo-remove {
    align-self: flex-start;
    margin-top: 0.35rem;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-danger);
    text-decoration: underline;
}
.dash-profile-photo-meta .field-error {
    margin-top: 0.35rem;
}
.dash-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.dash-user-info strong {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-user-info span {
    font-size: 0.72rem;
    color: var(--color-text-muted);
}

/* ---- Nav ---- */
.dash-nav {
    display: flex;
    flex-direction: column;
    padding: 0 0.5rem;
}
.dash-nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-xs);
    font-size: 0.84rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: all var(--transition-fast);
}
.dash-nav-link:hover {
    background: var(--color-primary-tint);
    color: var(--color-primary);
}
.dash-nav-link.active {
    background: var(--color-primary-tint);
    color: var(--color-primary);
    font-weight: 700;
}
.dash-nav-link svg { width: 17px; height: 17px; }
.dash-logout {
    margin-top: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-danger) !important;
}
.dash-logout:hover { background: var(--color-danger-soft) !important; }

/* ---- Mobile sidebar toggle (hamburger in page header) ---- */
.dash-menu-btn {
    display: none;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    color: var(--color-text-secondary);
    transition: background var(--transition-fast);
}
.dash-menu-btn:hover { background: var(--color-neutral-100); }
.dash-menu-btn svg { width: 18px; height: 18px; }

@media (max-width: 767px) {
    .dash-menu-btn { display: flex; }
    .dash-sidebar {
        position: fixed;
        top: 50%;
        right: 0;
        width: 260px;
        max-height: 70vh;
        z-index: 200;
        border-radius: var(--radius-lg) 0 0 var(--radius-lg);
        transform: translateY(-50%) translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
    }
    .dash-sidebar.open { transform: translateY(-50%) translateX(0); }
    .dash-sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 199;
    }
    .dash-sidebar-overlay.open { display: block; }
}

/* ---- Main ---- */
.dash-main {
    flex: 1;
    min-width: 0;
}

/* ---- Welcome ---- */
.dash-welcome {
    margin-bottom: 1.5rem;
}
.dash-welcome h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--color-text);
}
.dash-welcome p {
    font-size: 0.85rem;
    color: var(--color-text-tertiary);
    margin-top: 0.15rem;
}

/* ---- Stats ---- */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}
.dash-stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.dash-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-tint);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.dash-stat-icon svg { width: 18px; height: 18px; color: var(--color-primary); }
.dash-stat-value {
    display: block;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text);
    line-height: 1;
}
.dash-stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-top: 2px;
}

@media (max-width: 767px) {
    .dash-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---- Cards ---- */
.dash-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}
.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}
.dash-card-header h3 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
}
.dash-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}
.dash-card-link:hover { color: var(--color-primary-hover); }
.dash-card-link svg { width: 14px; height: 14px; }
.dash-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text);
    padding-bottom: 0.85rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

/* ---- Orders table ---- */
.dash-orders-table {
    width: 100%;
}
.dash-order-row {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.2fr auto;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-neutral-100);
    font-size: 0.82rem;
    color: var(--color-text-secondary);
}
.dash-order-row:last-child { border-bottom: none; }
.dash-order-head {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted);
    padding-bottom: 0.5rem;
}
.dash-order-id { font-weight: 600; color: var(--color-text); }
.dash-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.dash-badge.ongoing { background: #FEF3C7; color: #92400E; }
.dash-badge.pending { background: #FEF3C7; color: #92400E; }
.dash-badge.processing { background: #DBEAFE; color: #1E40AF; }
.dash-badge.shipped { background: #EDE9FE; color: #6D28D9; }
.dash-badge.delivered { background: #D1FAE5; color: #065F46; }
.dash-badge.cancelled { background: var(--color-danger-soft); color: var(--color-danger); }
.dash-badge.returned { background: #FFEDD5; color: #C2410C; }
.dash-row-link {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-primary);
    text-decoration: none;
}
.dash-row-link:hover { text-decoration: underline; }

.dash-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding-top: 1rem;
}
.dash-page-link {
    min-width: 1.6rem;
    height: 1.6rem;
    padding: 0 0.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.dash-page-link:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}
.dash-page-link.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #fff;
}
.dash-page-ellipsis {
    padding: 0 0.25rem;
    font-size: 0.78rem;
    color: var(--color-text-muted);
}
.dash-page-link:disabled {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
}
.dash-pagination-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    border-top: 1px solid var(--color-neutral-100);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
}
.dash-pagination-info {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin: 0;
}

@media (max-width: 767px) {
    .dash-order-head { display: none; }
    .dash-order-row {
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        row-gap: 0.2rem;
        font-size: 0.75rem;
    }
    .dash-badge { font-size: 0.6rem; padding: 2px 6px; }
}

/* ---- Page head ---- */
.dash-page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}
.dash-head-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.dash-head-right {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.dash-page-head h2 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text);
    margin: 0;
}
.dash-order-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.dash-order-title span {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--color-text);
}
.dash-copy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    color: var(--color-text-muted);
    background: var(--color-surface);
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.dash-copy-btn:hover {
    background: var(--color-neutral-100);
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.dash-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: var(--color-neutral-100);
    color: var(--color-text);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.dash-back-btn:hover {
    background: var(--color-neutral-200);
    color: var(--color-primary);
    border-color: var(--color-primary);
}
.dash-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 8px 16px;
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-xs);
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-base);
}
.dash-add-btn:hover { background: var(--color-primary-hover); }
.dash-add-btn svg { width: 15px; height: 15px; }

/* ---- Addresses ---- */
.dash-address-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (max-width: 640px) { .dash-address-grid { grid-template-columns: 1fr; } }
.dash-address-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    position: relative;
}
.dash-address-edit {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 30px;
    height: 30px;
    border-radius: var(--radius-xs);
    background: var(--color-neutral-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.dash-address-edit:hover { background: var(--color-primary-tint); }
.dash-address-edit svg { width: 14px; height: 14px; color: var(--color-text-muted); }
.dash-address-edit:hover svg { color: var(--color-primary); }
.dash-address-type {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.5rem;
}
.dash-address-card h4 {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.35rem;
}
.dash-address-card p {
    font-size: 0.82rem;
    line-height: 1.6;
    color: var(--color-text-secondary);
}
.dash-address-phone {
    display: block;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-top: 0.35rem;
}
.dash-address-empty {
    color: var(--color-text-tertiary);
    font-style: italic;
}


/* ---- Settings form ---- */
.dash-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.25rem;
}
@media (max-width: 640px) { .dash-form-grid { grid-template-columns: 1fr; } }
.dash-save-btn {
    padding: 10px 24px;
    background: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: background var(--transition-base);
}
.dash-save-btn:hover { background: var(--color-primary-hover); }

/* ── Dashboard Wishlist ─────────────────────── */
.dash-wishlist-count {
    font-size: 0.78rem;
    color: var(--color-text-muted);
    font-weight: 500;
}
.dash-wishlist-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 0.75rem;
}
.dash-wishlist-card {
    transition: opacity 0.3s, transform 0.3s;
}
.dash-wishlist-card .product-card {
    background: var(--color-surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xs);
}
.dash-wishlist-card .product-info {
    justify-content: space-between;
    align-items: center;
}
.dash-wishlist-card .product-info .product-name-link {
    text-decoration: none;
    color: var(--color-text);
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dash-wishlist-card .product-info .product-name-link:hover { color: var(--color-primary); }
.dash-wishlist-empty {
    text-align: center;
    padding: 3rem 1rem;
}
.dash-wishlist-empty svg {
    width: 48px;
    height: 48px;
    color: var(--color-text-faint);
    margin-bottom: 1rem;
}
.dash-wishlist-empty h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}
.dash-wishlist-empty p {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
}
@media (min-width: 768px) {
    .dash-wishlist-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem 1rem; }
}
@media (min-width: 1200px) {
    .dash-wishlist-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Toasts ───────────────────────────────────────── */
.toast-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: min(360px, calc(100vw - 2rem));
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.85rem 1rem;
    border: 1.5px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    box-shadow: var(--shadow-lg);
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text);
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity var(--transition-base), transform var(--transition-base);
    pointer-events: auto;
}
.toast.show {
    opacity: 1;
    transform: translateY(0);
}
.toast.leaving {
    opacity: 0;
    transform: translateY(-8px);
}
.toast-icon {
    display: flex;
    flex-shrink: 0;
    margin-top: 1px;
}
.toast-icon svg { width: 16px; height: 16px; }
.toast p {
    margin: 0;
    flex: 1;
    line-height: 1.45;
}
.toast.success .toast-icon { color: #16A34A; }
.toast.error .toast-icon { color: var(--color-danger); }
.toast.warning .toast-icon { color: #D97706; }
