/* ============================================================
   Apple-inspired E-commerce Store Design System
   ============================================================ */

html {
    scrollbar-gutter: stable;
    overflow-y: scroll;
}

/* ---- 1. CUSTOM PROPERTIES ---- */
:root {
    --store-bg: #F5F5F7;
    --surface: #FFFFFF;
    --navbar-bg: rgba(255,255,255,.88);
    --text-primary: #1D1D1F;
    --text-secondary: #6E6E73;
    --text-muted: #A1A1A6;
    --border: #D2D2D7;
    --border-light: #E8E8ED;
    --success: #34C759;
    --danger: #FF3B30;
    --nav-height: 56px;
    --container-width: 1200px;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --shadow-xs: 0 1px 3px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,.07), 0 4px 16px rgba(0,0,0,.04);
    --shadow-md: 0 8px 24px rgba(0,0,0,.09), 0 4px 12px rgba(0,0,0,.05);
    --shadow-lg: 0 20px 48px rgba(0,0,0,.14), 0 8px 24px rgba(0,0,0,.08);
    --ease: cubic-bezier(.4,0,.2,1);
    --ease-spring: cubic-bezier(.34,1.56,.64,1);
    --dur-fast: 180ms;
    --dur: 280ms;
    --dur-slow: 420ms;
}

/* ---- 2. BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--store-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; outline: none; }
input, textarea, select { font-family: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ---- 3. LAYOUT ---- */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---- 4. NAVBAR ---- */
.store-navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    height: var(--nav-height);
    background: var(--navbar-bg, rgba(255,255,255,.88));
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border-light);
}
.store-navbar .container {
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0;
}
.nav-col-brand {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-width: 0;
}
.nav-col-center {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.nav-col-end {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    min-width: 0;
}
.store-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    flex-shrink: 0;
    min-width: 0;
    max-width: 200px;
}
.store-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
    border-radius: 8px;
    flex-shrink: 0;
}
.store-brand-name {
    font-size: 17px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.store-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.store-nav-link {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.store-nav-link:hover { background: rgba(0,0,0,.05); color: var(--text-primary); }
.store-nav-link.active { color: var(--text-primary); font-weight: 600; }

.cart-trigger,
.wishlist-trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    flex-shrink: 0;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease);
}
.cart-trigger:hover,
.wishlist-trigger:hover { 
    background: rgba(0,0,0,.06); 
}
.cart-badge {
    position: absolute;
    top: 0;
    left: 0;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--ease-spring) var(--dur-fast);
}
.cart-badge.hidden { transform: scale(0); }
.cart-badge.bump { animation: badge-bump var(--dur-fast) var(--ease-spring); }
@keyframes badge-bump {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

@keyframes cart-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-3px); }
    20%, 40%, 60%, 80% { transform: translateX(3px); }
}

.cart-trigger.cart-shake {
    animation: cart-shake 0.6s ease-in-out;
}

.store-navbar-compact {
    margin: 12px 16px;
    border-radius: 999px;
    padding: 0 4px 0 16px;
    min-height: 48px;
    height: auto;
    border-bottom: none;
    background: rgba(245, 240, 235, 0.95);
}
.store-navbar-compact .store-navbar-inner {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 48px;
}
.store-navbar-compact .store-brand {
    flex: 1;
    min-width: 0;
    max-width: none;
    gap: 8px;
}
.store-navbar-compact .store-logo {
    width: 28px;
    height: 28px;
}
.store-logo-placeholder {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--text-primary);
    color: var(--surface);
    border-radius: 6px;
}
.store-navbar-compact .store-brand-name {
    font-size: 16px;
    font-weight: 700;
}
.nav-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), transform var(--dur) var(--ease);
}
.nav-expand-btn:hover {
    background: rgba(0,0,0,.06);
}
.nav-expand-btn[aria-expanded="true"] svg {
    transform: rotate(180deg);
}
.cart-trigger-pill {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px 0 12px;
    background: var(--text-primary);
    color: var(--surface);
    border-radius: 999px;
    border: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--dur-fast) var(--ease);
}
.cart-trigger-pill:hover {
    opacity: 0.9;
}
.cart-total-text {
    white-space: nowrap;
}
.cart-badge-pill {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--success);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--ease-spring) var(--dur-fast);
}
.cart-badge-pill.hidden { transform: scale(0); }
.cart-badge-pill.bump { animation: badge-bump var(--dur-fast) var(--ease-spring); }

.header-overlay {
    position: fixed;
    inset: 0;
    z-index: 300;
    display: flex;
    flex-direction: column;
    pointer-events: none;
}
.header-overlay.hidden {
    display: none;
}
.header-overlay:not(.hidden) {
    pointer-events: auto;
}
.header-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: overlayIn var(--dur-fast) var(--ease);
}
.header-overlay-panel {
    position: relative;
    flex: 1;
    margin: 12px 16px;
    margin-top: 60px;
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: overlaySlideIn var(--dur) var(--ease);
}
@keyframes overlaySlideIn {
    from { opacity: 0; transform: translateY(-12px); }
    to { opacity: 1; transform: translateY(0); }
}
.header-overlay-search {
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}
.header-search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 48px;
    padding: 0 14px;
    background: var(--store-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 999px;
    transition: border-color var(--dur-fast) var(--ease);
}
.header-search-form:focus-within {
    border-color: var(--primary-color);
}
.header-search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
}
.header-search-input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-primary);
}
.header-search-input::placeholder {
    color: var(--text-muted);
}
.header-search-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--text-primary);
    color: var(--surface);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    flex-shrink: 0;
}
.header-overlay-results {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 16px 16px;
    display: none;
}
.header-overlay-results:not(:empty) {
    display: block;
}
.header-overlay-results .search-result-item {
    padding: 12px 0;
}
.header-search-section {
    margin-bottom: 20px;
}
.header-search-section:last-child {
    margin-bottom: 0;
}
.header-search-section .search-section-label {
    padding: 0 0 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
}
.header-suggestion-item {
    padding: 12px 0;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: opacity var(--dur-fast) var(--ease);
    border-bottom: 1px solid var(--border-light);
}
.header-suggestion-item:last-child {
    border-bottom: none;
}
.header-suggestion-item:hover {
    opacity: 0.7;
}
.header-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    cursor: pointer;
    transition: opacity var(--dur-fast) var(--ease);
    border-bottom: 1px solid var(--border-light);
}
.header-product-item:last-child {
    border-bottom: none;
}
.header-product-item:hover {
    opacity: 0.8;
}
.header-product-img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--store-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.header-product-img-placeholder {
    color: var(--text-muted);
}
.header-product-info {
    flex: 1;
    min-width: 0;
}
.header-product-name {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.header-product-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.header-category-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 4px;
}
.header-category-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: var(--store-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--dur-fast) var(--ease);
}
.header-category-chip:hover {
    background: var(--text-primary);
    color: var(--surface);
    border-color: var(--text-primary);
}
.header-overlay-nav {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    padding: 8px 0;
    overflow-y: auto;
}
.header-overlay-nav::-webkit-scrollbar {
    width: 6px;
}
.header-overlay-nav::-webkit-scrollbar-track {
    background: transparent;
}
.header-overlay-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.header-overlay-nav::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
.header-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease);
}
.header-nav-link:hover {
    background: var(--store-bg);
}
.header-nav-link.active {
    color: var(--primary-color);
    font-weight: 600;
}
.header-nav-link-chevron svg {
    color: var(--text-muted);
    flex-shrink: 0;
}
.header-overlay-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid var(--border-light);
}
.header-footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--store-bg);
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    font-family: inherit;
}
.header-footer-btn:hover {
    background: var(--text-primary);
    color: var(--surface);
    border-color: var(--text-primary);
}
.header-footer-btn svg {
    flex-shrink: 0;
}
.header-country-flag {
    font-size: 18px;
}
.header-overlay-close {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--danger);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--dur-fast) var(--ease);
}
.header-overlay-close:hover {
    transform: translateX(-50%) scale(1.05);
}

/* ---- 5. BUTTONS ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    transition: all var(--dur-fast) var(--ease);
    white-space: nowrap;
    cursor: pointer;
    border: none;
}
.btn-dark { background: var(--text-primary); color: white; }
.btn-dark:hover { background: #333; }
.btn-white { background: white; color: #1D1D1F; }
.btn-white:hover { background: rgba(255,255,255,.88); }
.btn-primary { background: var(--primary-color); color: white; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary:active { filter: brightness(.95); transform: scale(.99); }
.btn-primary:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; filter: none; transform: none; }
.btn-link {
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    transition: color 0.2s;
}
.btn-link:hover {
    color: var(--primary-color);
}
.btn-secondary { background: rgba(0,0,0,.07); color: var(--text-primary); }
.btn-secondary:hover { background: rgba(0,0,0,.11); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text-primary); }
.btn-outline:hover { border-color: var(--text-primary); }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-full { width: 100%; }

/* ---- 6. HERO ---- */
.store-hero {
    position: relative;
    background: var(--text-primary);
    color: var(--store-bg);
    padding: 72px 0 64px;
    overflow: hidden;
}
.store-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,.05) 0%, transparent 60%);
    pointer-events: none;
}
.store-hero::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--primary-color);
    opacity: .7;
}
.store-hero .container { position: relative; z-index: 1; }

/* Image-based hero */
.store-hero-image {
    padding: 0;
    min-height: 480px;
    display: flex;
    align-items: stretch;
    color: white;
}
.store-hero-image::before,
.store-hero-image::after { display: none; }
.store-hero-image .hero-eyebrow { color: rgba(255,255,255,.45); }
.store-hero-image .hero-subtitle { color: rgba(255,255,255,.7); }

.hero-bg-picture {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.hero-image-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        to left,
        rgba(0,0,0,.55) 0%,
        rgba(0,0,0,.35) 50%,
        rgba(0,0,0,.15) 100%
    );
}
.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 80px;
    padding-bottom: 80px;
    min-height: 480px;
}

.hero-eyebrow {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: color-mix(in srgb, var(--store-bg) 55%, var(--text-primary));
    margin-bottom: 12px;
}
.hero-title {
    font-size: clamp(32px, 5.5vw, 64px);
    font-weight: 800;
    line-height: 1.06;
    letter-spacing: -.025em;
    margin-bottom: 14px;
}
.hero-subtitle {
    font-size: clamp(15px, 2vw, 18px);
    color: color-mix(in srgb, var(--store-bg) 72%, var(--text-primary));
    max-width: 480px;
    line-height: 1.65;
    margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 768px) {
    .store-hero-image { min-height: 320px; }
    .hero-content { min-height: 320px; padding-top: 60px; padding-bottom: 60px; }
    .hero-image-overlay {
        background: linear-gradient(to top, rgba(0,0,0,.6) 0%, rgba(0,0,0,.3) 100%);
    }
}

/* ---- 7. CATEGORY FILTER ---- */
.category-filter-section {
    background: var(--surface);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: var(--nav-height);
    z-index: 100;
}
.category-pills-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    padding: 12px 24px;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.category-pills-wrap::-webkit-scrollbar { display: none; }
.category-pill {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 600;
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    white-space: nowrap;
    font-family: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.category-pill:hover { border-color: var(--primary-color); color: var(--primary-color); }
.category-pill.active { background: var(--primary-color); border-color: var(--primary-color); color: white; }

/* ---- 8. PRODUCTS SECTION ---- */
.products-section { padding: 40px 0 64px; }
.section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 0 24px;
    gap: 12px;
    flex-wrap: wrap;
}
.section-title {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.025em;
}
.section-count { font-size: 14px; color: var(--text-muted); }

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    padding: 0 24px;
}

/* ---- 9. PRODUCT CARD ---- */
.product-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 1px solid transparent;
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
    text-decoration: none;
    color: inherit;
    display: block;
}
.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-light);
}
.product-card:active { transform: scale(.98); }

.product-image-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--store-bg);
}
.product-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slow) var(--ease);
}
.product-card:hover .product-image-wrap img { transform: scale(1.05); }
.product-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--store-bg);
    color: var(--border);
}
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}
.badge-out { background: rgba(255,255,255,.92); color: var(--danger); border: 1px solid rgba(255,59,48,.2); }

.product-info { padding: 14px 16px 16px; }
.product-category {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 4px;
}
.product-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.product-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.product-price { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.product-price-currency { font-size: 12px; font-weight: 500; color: var(--text-secondary); margin-inline-end: 2px; }
.product-stock-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    font-weight: 600;
    color: var(--success);
}
.product-stock-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    flex-shrink: 0;
}
.product-stock-badge.out-of-stock { color: var(--danger); }
.product-stock-badge.out-of-stock::before { background: var(--danger); }

/* ---- 10. SHARED OVERLAY ---- */
.store-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 400;
    pointer-events: none;
    transition: background var(--dur) var(--ease);
}
.store-overlay.active {
    background: rgba(0,0,0,.46);
    pointer-events: all;
}

/* ---- 11. CART PANEL ---- */
.cart-panel {
    position: fixed;
    top: 0;
    right: -440px;
    width: 420px;
    max-width: 100vw;
    height: 100vh;
    background: var(--surface);
    z-index: 500;
    display: flex;
    flex-direction: column;
    transition: right var(--dur) var(--ease);
    box-shadow: var(--shadow-lg);
}
.cart-panel.open { right: 0; }
.cart-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}
.cart-panel-title { font-size: 18px; font-weight: 700; }
.cart-count-label { font-size: 13px; color: var(--text-muted); font-weight: 500; margin-top: 2px; }
.panel-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--store-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: background var(--dur-fast) var(--ease);
}
.panel-close-btn:hover { background: var(--border-light); }

.cart-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 60%;
    gap: 14px;
    text-align: center;
    padding: 40px 0;
}
.cart-empty-icon {
    width: 64px;
    height: 64px;
    background: var(--store-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
}
.cart-empty h3 { font-size: 16px; font-weight: 700; }
.cart-empty p { font-size: 14px; color: var(--text-muted); }

.wishlist-empty-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, rgba(255,45,85,0.1) 0%, rgba(255,45,85,0.05) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    margin-bottom: 8px;
}
.wishlist-empty-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.wishlist-empty-text {
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 240px;
    line-height: 1.4;
}


.cart-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-light);
    animation: fadeSlideIn var(--dur) var(--ease);
}
@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(12px); }
    to { opacity: 1; transform: translateX(0); }
}
.cart-item-img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--store-bg);
    flex-shrink: 0;
}
.cart-item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
}
.cart-item-details { flex: 1; min-width: 0; }
.cart-item-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item-price { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; }
.cart-item-qty {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: 10px;
    width: fit-content;
    overflow: hidden;
    transition: all 0.2s;
}
.cart-item-qty:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}
.qty-btn {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}
.qty-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
}
.qty-btn:active:not(:disabled) {
    transform: scale(0.92);
}
.qty-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.qty-value {
    font-size: 15px;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    user-select: none;
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cart-item-remove {
    background: transparent;
    color: var(--text-muted);
    padding: 4px;
    display: flex;
    align-items: flex-start;
    border-radius: 6px;
    margin-top: 2px;
    transition: color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.cart-item-remove:hover { color: var(--danger); background: rgba(255,59,48,.07); }

.wishlist-item {
    background: var(--store-bg);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 12px;
    transition: all var(--dur-fast) var(--ease);
    animation: fadeSlideIn var(--dur) var(--ease);
    border: 1px solid var(--border-light);
}
.wishlist-item:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border-color: var(--border);
}
.wishlist-item:last-child { margin-bottom: 0; }

.wishlist-item-main {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.wishlist-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    flex-shrink: 0;
    border: 1px solid var(--border-light);
}
.wishlist-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wishlist-item-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
    background: var(--store-bg);
}

.wishlist-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.wishlist-item-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.wishlist-item-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 6px;
}

.wishlist-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    width: fit-content;
}
.wishlist-stock-badge.in {
    background: rgba(52, 199, 89, 0.1);
    color: #34C759;
}
.wishlist-stock-badge.in::before {
    content: '●';
    font-size: 10px;
}
.wishlist-stock-badge.out {
    background: rgba(255, 59, 48, 0.1);
    color: #FF3B30;
}
.wishlist-stock-badge.out::before {
    content: '●';
    font-size: 10px;
}

.wishlist-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.wishlist-add-cart-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    white-space: nowrap;
}
.wishlist-add-cart-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    filter: brightness(1.05);
}
.wishlist-add-cart-btn:active:not(:disabled) {
    transform: translateY(0);
}
.wishlist-add-cart-btn svg {
    flex-shrink: 0;
}

.wishlist-remove-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
    flex-shrink: 0;
}
.wishlist-remove-btn:hover {
    background: rgba(255, 59, 48, 0.08);
    border-color: rgba(255, 59, 48, 0.3);
    color: #FF3B30;
    transform: rotate(90deg);
}



.cart-panel-footer {
    padding: 20px 24px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
    background: var(--surface);
}
.cart-summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.cart-summary-label { font-size: 14px; color: var(--text-secondary); }
.cart-summary-value { font-size: 14px; font-weight: 600; }
.cart-total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    margin-top: 4px;
    border-top: 1px solid var(--border-light);
    margin-bottom: 16px;
}
.cart-total-label { font-size: 16px; font-weight: 700; }
.cart-total-amount { font-size: 20px; font-weight: 800; }

/* ---- 12. PRODUCT DETAIL SHEET ---- */
.product-sheet-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 600;
    pointer-events: none;
    transition: background var(--dur) var(--ease);
}
.product-sheet-overlay.active {
    background: rgba(0,0,0,.5);
    pointer-events: all;
}
.product-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68vh;
    background: var(--surface);
    border-radius: 24px 24px 0 0;
    z-index: 700;
    display: flex;
    flex-direction: column;
    transform: translateY(100%);
    transition: transform var(--dur-slow) var(--ease);
    overflow: hidden;
}
.product-sheet.open { transform: translateY(0); }
.sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 12px auto 0;
    flex-shrink: 0;
}

/* Side-by-side layout: image | details */
.sheet-layout {
    display: flex;
    flex-direction: row;
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

/* Image panel — fixed width on desktop */
.sheet-image-wrap {
    position: relative;
    width: 300px;
    flex-shrink: 0;
    background: var(--store-bg);
    display: flex;
    flex-direction: column;
    border-left: 1px solid var(--border-light);
    overflow: hidden;
}
.sheet-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--border);
}
.sheet-close-btn {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
    z-index: 3;
    border: none;
    cursor: pointer;
}
.sheet-close-btn:hover { background: white; }

/* Main carousel viewer */
.sheet-carousel {
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.sheet-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 320ms var(--ease);
}
.sheet-carousel-slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.sheet-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 20px;
}
.sheet-carousel-video-slide { padding: 0; }
.sheet-carousel-video-slide iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}
.sheet-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(8px);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
    z-index: 2;
    transition: background var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.sheet-carousel-btn:hover { background: white; }
.sheet-carousel-btn:disabled { opacity: .25; pointer-events: none; }
.sheet-carousel-prev { right: 8px; }
.sheet-carousel-next { left: 8px; }

/* Thumbnail strip */
.sheet-thumbs {
    flex-shrink: 0;
    height: 70px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    overflow-x: auto;
    border-top: 1px solid var(--border-light);
    background: var(--surface);
    scrollbar-width: none;
}
.sheet-thumbs::-webkit-scrollbar { display: none; }
.sheet-thumb {
    width: 52px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    cursor: pointer;
    border: 2px solid transparent;
    background: var(--store-bg);
    transition: border-color 180ms var(--ease);
    position: relative;
    padding: 0;
}
.sheet-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.sheet-thumb.active { border-color: var(--primary-color); }
.sheet-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.38);
    pointer-events: none;
}

/* Content panel — scrollable details + sticky CTA */
.sheet-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}
.sheet-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 16px;
}
.sheet-category { font-size: 11px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--primary-color); margin-bottom: 6px; }
.sheet-product-name { font-size: 20px; font-weight: 800; line-height: 1.25; margin-bottom: 12px; }
.sheet-price-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.sheet-price { font-size: 24px; font-weight: 800; }
.sheet-currency { font-size: 14px; color: var(--text-secondary); font-weight: 500; }
.sheet-stock {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
    padding: 5px 10px;
    background: rgba(52,199,89,.09);
    border-radius: 8px;
}
.sheet-stock::before { content: ''; width: 6px; height: 6px; background: var(--success); border-radius: 50%; flex-shrink: 0; }
.sheet-stock.out { color: var(--danger); background: rgba(255,59,48,.08); }
.sheet-stock.out::before { background: var(--danger); }
.sheet-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
    margin-bottom: 8px;
}
.sheet-qty-row { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.sheet-qty-label { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.sheet-qty-control {
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.2s;
}
.sheet-qty-control:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.08);
}
.sheet-qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--border);
    background: var(--surface);
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.2s;
}
.sheet-qty-btn:hover:not(:disabled) {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-1px);
}
.sheet-qty-btn:active:not(:disabled) {
    transform: translateY(0) scale(0.95);
}
.sheet-qty-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.4;
}
.sheet-qty-val {
    font-size: 16px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
    user-select: none;
}

/* Sticky CTA inside content panel */
.sheet-cta {
    padding: 14px 28px 20px;
    background: var(--surface);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}
.sheet-add-btn {
    width: 100%;
    padding: 16px;
    background: var(--primary-color);
    color: white;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}

.sheet-add-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.sheet-add-btn:hover::before {
    width: 300px;
    height: 300px;
}

.sheet-add-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.35);
}

.sheet-add-btn:active:not(:disabled) {
    transform: translateY(0);
}

.sheet-add-btn:disabled {
    background: var(--store-bg);
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.6;
}

.sheet-add-btn.added {
    background: #10b981;
    pointer-events: none;
    animation: btn-added-pop var(--dur-slow) var(--ease-spring);
}
@keyframes btn-added-pop {
    0%   { transform: scale(1); }
    35%  { transform: scale(1.05); }
    65%  { transform: scale(.98); }
    100% { transform: scale(1); }
}

/* ---- 13. CHECKOUT PAGE ---- */
.checkout-page { padding: 36px 0 80px; min-height: calc(100vh - var(--nav-height)); }
.checkout-breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.checkout-breadcrumb a { color: var(--primary-color); }
.checkout-breadcrumb a:hover { text-decoration: underline; }
.checkout-title { font-size: 30px; font-weight: 800; letter-spacing: -.025em; margin-bottom: 28px; }
.checkout-layout { display: grid; grid-template-columns: 1fr 360px; gap: 28px; align-items: start; }
.checkout-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    border: 1px solid var(--border-light);
    margin-bottom: 16px;
}
.checkout-card:last-child { margin-bottom: 0; }
.checkout-card-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-light);
}
.checkout-prefill-notice {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary-color);
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--primary-color) 20%, transparent);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    margin-bottom: 16px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-field { margin-bottom: 14px; }
.form-field:last-child { margin-bottom: 0; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}
.form-label .req { color: var(--danger); margin-inline-end: 2px; }
.form-label .opt { color: var(--text-muted); font-weight: 400; }
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface);
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
    outline: none;
}
.form-control:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent); }
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: none; min-height: 80px; }

.payment-methods-list { display: flex; flex-direction: column; gap: 10px; }
.payment-option { position: relative; cursor: pointer; }
.payment-option input { position: absolute; opacity: 0; pointer-events: none; }
.payment-option-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 15px 16px;
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius);
    transition: all var(--dur-fast) var(--ease);
}
.payment-option:has(input:checked) .payment-option-card { border-color: var(--primary-color); background: rgba(79,70,229,.03); }
.payment-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--input-border);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--dur-fast) var(--ease);
}
.payment-option:has(input:checked) .payment-radio { border-color: var(--primary-color); background: var(--primary-color); }
.payment-option:has(input:checked) .payment-radio::after { content: ''; width: 8px; height: 8px; background: white; border-radius: 50%; }
.payment-option-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--store-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-secondary);
}
.payment-option-info { flex: 1; }
.payment-option-name { font-size: 14px; font-weight: 700; margin-bottom: 1px; }
.payment-option-desc { font-size: 12px; color: var(--text-muted); }

.cliq-info-box {
    display: none;
    margin-top: 10px;
    padding: 16px;
    background: #F0F9FF;
    border: 1px solid #BAE6FD;
    border-radius: var(--radius-sm);
}
.cliq-info-box.visible { display: block; }
.cliq-info-box h4 { font-size: 14px; font-weight: 700; color: #0369A1; margin-bottom: 10px; }
.cliq-info-box ol { padding-inline-start: 20px; font-size: 13px; color: #0369A1; line-height: 2.2; }

/* Order Summary */
.order-summary-card {
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    background: var(--surface);
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1px solid var(--border-light);
}
.order-summary-title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.order-item-row { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-light); }
.order-item-thumb { width: 48px; height: 48px; border-radius: 8px; background: var(--store-bg); overflow: hidden; flex-shrink: 0; }
.order-item-thumb img { width: 100%; height: 100%; object-fit: cover; }
.order-item-info { flex: 1; min-width: 0; }
.order-item-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.order-item-qty { font-size: 12px; color: var(--text-muted); }
.order-item-subtotal { font-size: 14px; font-weight: 700; flex-shrink: 0; }
.summary-divider { border: none; border-top: 1px solid var(--border-light); margin: 14px 0 12px; }
.summary-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; font-size: 14px; }
.summary-row-label { color: var(--text-secondary); }
.summary-row-value { font-weight: 600; }
.summary-total-row { display: flex; justify-content: space-between; align-items: center; padding-top: 12px; border-top: 1px solid var(--border-light); margin-top: 4px; }
.summary-total-label { font-size: 16px; font-weight: 700; }
.summary-total-amount { font-size: 22px; font-weight: 800; }
.checkout-submit-btn {
    width: 100%;
    margin-top: 18px;
    padding: 15px;
    background: var(--primary-color);
    color: white;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: filter var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.checkout-submit-btn:hover { filter: brightness(1.08); }
.checkout-submit-btn:active { transform: scale(.99); }
.checkout-submit-btn:disabled { background: var(--border); color: var(--text-muted); cursor: not-allowed; filter: none; transform: none; }

/* ---- 14. SUCCESS MODAL ---- */
.success-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.success-modal-overlay.open { display: flex; }
.success-modal {
    background: var(--surface);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    max-width: 440px;
    width: 100%;
    text-align: center;
    animation: scaleIn var(--dur) var(--ease-spring);
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(.9); }
    to { opacity: 1; transform: scale(1); }
}
.success-icon {
    width: 72px;
    height: 72px;
    background: rgba(52,199,89,.12);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--success);
}

.success-icon-animated {
    animation: successPulse 0.6s ease-out;
}

@keyframes successPulse {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.success-confetti {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
    animation: confettiFall 2s ease-out forwards;
    animation-delay: var(--delay, 0s);
    left: var(--x, 50%);
    top: -20px;
    opacity: 0;
}

@keyframes confettiFall {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 1;
    }
    100% {
        transform: translateY(400px) rotate(720deg);
        opacity: 0;
    }
}

.success-order-details {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: left;
    background: var(--store-bg);
    padding: 12px;
    border-radius: 8px;
}

.success-title { font-size: 22px; font-weight: 800; margin-bottom: 8px; }
.success-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 20px; line-height: 1.6; }
.order-number-badge {
    display: inline-block;
    padding: 8px 20px;
    background: var(--store-bg);
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 24px;
    letter-spacing: .04em;
}

/* ---- 15. FOOTER ---- */
.store-footer {
    background: var(--text-primary);
    color: color-mix(in srgb, var(--store-bg) 60%, transparent);
    padding: 48px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; margin-bottom: 36px; }
.footer-brand h3 { font-size: 18px; font-weight: 700; color: var(--store-bg); margin-bottom: 8px; }
.footer-brand p { font-size: 13px; line-height: 1.6; max-width: 280px; }
.footer-links-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: color-mix(in srgb, var(--store-bg) 35%, transparent); margin-bottom: 14px; }
.footer-contact-item { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 8px; }
.footer-social { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-social-link {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: color-mix(in srgb, var(--store-bg) 10%, transparent); color: color-mix(in srgb, var(--store-bg) 75%, transparent);
    transition: background .18s, color .18s, transform .18s;
    flex-shrink: 0;
}
.footer-social-link:hover { background: color-mix(in srgb, var(--store-bg) 22%, transparent); color: var(--store-bg); transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid color-mix(in srgb, var(--store-bg) 10%, transparent); padding-top: 24px; text-align: center; font-size: 12px; color: color-mix(in srgb, var(--store-bg) 28%, transparent); }

/* ---- 16. TOAST ---- */
.toast-container {
    position: fixed;
    top: calc(var(--nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    align-items: center;
}
.store-toast {
    padding: 14px 24px;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: 0 10px 40px rgba(0,0,0,.22), 0 4px 12px rgba(0,0,0,.12);
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    animation: toastIn var(--dur) var(--ease-spring);
    backdrop-filter: blur(10px);
}
.store-toast.out { animation: toastOut var(--dur) var(--ease) forwards; }
@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(.85);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-15px) scale(.92);
    }
}
.store-toast-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}
.store-toast-error {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}
.store-toast-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}
.store-toast-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* ---- 17. EMPTY STATES ---- */
.store-empty {
    text-align: center;
    padding: 72px 24px;
    grid-column: 1 / -1;
}
.store-empty-icon {
    width: 80px;
    height: 80px;
    background: var(--store-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--border);
}
.store-empty h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.store-empty p { font-size: 14px; color: var(--text-muted); }

/* ---- 18. CATEGORIES PAGE ---- */
.categories-page-section {
    padding: 48px 0 64px;
}
.categories-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.category-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-xs);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
    cursor: pointer;
}
.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.category-card-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--surface);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}
.category-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--dur-slow) var(--ease);
}
.category-card:hover .category-card-image img {
    transform: scale(1.06);
}
.category-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
}
.category-card-info {
    padding: 12px 14px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-top: 1px solid var(--border-light);
}
.category-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.category-card-arrow {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--text-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0;
    transform: scale(0.6);
    transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.category-card:hover .category-card-arrow {
    opacity: 1;
    transform: scale(1);
}

/* ---- 19. HOME CATEGORIES CARDS ---- */
.home-categories-section {
    padding: 40px 0 8px;
}
.home-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}
.home-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.home-category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.home-category-card-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--store-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.home-category-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--dur-slow) var(--ease);
}
.home-category-card:hover .home-category-card-img img {
    transform: scale(1.05);
}
.home-category-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
}
.home-category-card-name {
    font-size: 13px;
    font-weight: 600;
    padding: 10px 12px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}

.home-categories-carousel-wrapper {
    position: relative;
    padding: 0 48px;
}
.home-categories-carousel {
    overflow: hidden;
    position: relative;
}
.home-categories-carousel-track {
    display: flex;
    gap: 14px;
    scroll-snap-type: x mandatory;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 8px;
}
.home-categories-carousel-track::-webkit-scrollbar {
    display: none;
}
.home-category-card-carousel {
    flex: 0 0 auto;
    width: 180px;
    scroll-snap-align: start;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--surface);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.home-category-card-carousel:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}
.carousel-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all var(--dur-fast) var(--ease);
    color: var(--text-primary);
}
.carousel-nav-btn:hover {
    box-shadow: var(--shadow-sm);
    border-color: var(--border);
    background: var(--surface);
}
.carousel-nav-btn:active {
    transform: translateY(-50%) scale(0.95);
}
.carousel-prev {
    left: 0;
}
.carousel-next {
    right: 0;
}
.carousel-nav-btn:disabled {
    opacity: 0.3;
    pointer-events: none;
}


/* ---- 20. RESPONSIVE ---- */
@media (max-width: 1024px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .order-summary-card { position: static; order: -1; }
}
@media (max-width: 768px) {
    .store-hero { padding: 56px 0 48px; }
    .products-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; padding: 0 16px; }
    .section-header { padding: 0 16px; }
    .container { padding: 0 16px; }
    .category-pills-wrap { padding: 10px 16px; }
    .categories-cards-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .home-categories-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .home-categories-carousel-wrapper { padding: 0 40px; }
    .home-category-card-carousel { width: 140px; }
    .carousel-nav-btn { width: 36px; height: 36px; }
    .cart-panel { width: 100%; max-width: 380px; }
    .product-sheet { height: auto; max-height: 88vh; }
    .sheet-layout { flex-direction: column; }
    .sheet-image-wrap { width: 100%; height: 220px; border-left: none; border-bottom: 1px solid var(--border-light); }
    .sheet-thumbs { height: 58px; }
    .sheet-thumb { width: 44px; height: 42px; }
    .sheet-carousel-slide img { padding: 12px; }
    .sheet-body { padding: 18px 20px 12px; }
    .sheet-cta { padding: 12px 20px 20px; }
    .checkout-page { padding: 24px 0 60px; }
    .checkout-card { padding: 18px 20px; }
    .checkout-title { font-size: 24px; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .section-title { font-size: 22px; }
}
@media (max-width: 480px) {
    .products-grid { gap: 10px; }
    .product-info { padding: 10px 12px 14px; }
    .product-name { font-size: 13px; }
    .product-price { font-size: 14px; }
    .hero-title { font-size: 30px; }
    .store-nav-links { display: none; }
    .categories-cards-grid { grid-template-columns: repeat(2, 1fr); }
    .home-categories-grid { grid-template-columns: repeat(2, 1fr); }
    .home-categories-carousel-wrapper { padding: 0 32px; }
    .home-category-card-carousel { width: 130px; }
}
@media (hover: none) {
    .product-card:hover { transform: none; box-shadow: none; border-color: transparent; }
    .product-card:active { transform: scale(.97); }
}

/* ---- 21. SEARCH ---- */
.search-wrap {
    position: relative;
    flex: 1;
    max-width: 260px;
    min-width: 0;
}
.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 8px 0 10px;
    background: var(--store-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 980px;
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.search-form:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 14%, transparent);
}
.search-icon {
    color: var(--text-muted);
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.search-input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    font-size: 14px;
    color: var(--text-primary);
}
.search-input::placeholder { color: var(--text-muted); }
.search-clear-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: background var(--dur-fast) var(--ease);
}
.search-clear-btn:hover { background: var(--border); filter: brightness(.9); }
.search-clear-btn.hidden { display: none; }

/* Dropdown */
.search-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: max(100%, 360px);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 300;
    animation: dropdownIn var(--dur-fast) var(--ease);
}
.search-dropdown.hidden { display: none; }
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-6px) scale(.98); }
    to   { opacity: 1; transform: translateY(0)  scale(1); }
}
.search-section-label {
    padding: 10px 16px 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--text-muted);
}
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 16px;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease);
    text-decoration: none;
    color: var(--text-primary);
}
.search-result-item:hover { background: var(--store-bg); }
.search-result-item.search-result-highlight {
    background: var(--primary-color);
    color: white;
}
.search-result-item.search-result-highlight .search-result-name,
.search-result-item.search-result-highlight .search-result-price {
    color: white;
}
.search-history-item.search-result-highlight {
    background: var(--primary-color);
    color: white;
}
.search-result-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: var(--store-bg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
}
.search-result-thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-cat-thumb { background: color-mix(in srgb, var(--primary-color) 10%, transparent); color: var(--primary-color); }
.search-result-info { flex: 1; min-width: 0; }
.search-result-name {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-result-price { font-size: 12px; color: var(--primary-color); font-weight: 600; margin-top: 1px; }

.search-recent-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: background var(--dur-fast) var(--ease);
}
.search-recent-item:hover { background: var(--store-bg); }
.search-recent-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: var(--store-bg);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}
.search-recent-text { flex: 1; font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-recent-remove {
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-muted);
    flex-shrink: 0;
    transition: opacity var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.search-recent-item:hover .search-recent-remove { opacity: 1; }
.search-recent-remove:hover { background: var(--border-light); }

.search-hint {
    padding: 18px 16px;
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
}
.search-empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
}
.search-view-all {
    display: block;
    text-align: center;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    border-top: 1px solid var(--border-light);
    transition: background var(--dur-fast) var(--ease);
    text-decoration: none;
}
.search-view-all:hover { background: var(--store-bg); }

/* Mobile search trigger */
.search-trigger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    color: var(--text-primary);
    flex-shrink: 0;
    transition: background var(--dur-fast) var(--ease);
}
.search-trigger:hover { background: rgba(0,0,0,.06); }

/* Mobile search overlay */
.mobile-search-overlay {
    position: fixed;
    inset: 0;
    z-index: 250;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    display: flex;
    flex-direction: column;
    animation: overlayIn var(--dur-fast) var(--ease);
}
.mobile-search-overlay.hidden { display: none; }
@keyframes overlayIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.mobile-search-bar {
    background: var(--surface);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-light);
}
.mobile-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 12px;
    background: var(--store-bg);
    border: 1.5px solid var(--input-border);
    border-radius: 980px;
    transition: border-color var(--dur-fast) var(--ease);
}
.mobile-search-input-wrap:focus-within { border-color: var(--primary-color); }
.mobile-search-input {
    flex: 1;
    min-width: 0;
    background: none;
    border: none;
    outline: none;
    font-size: 15px;
    color: var(--text-primary);
}
.mobile-search-input::placeholder { color: var(--text-muted); }
.mobile-search-clear {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-secondary);
    flex-shrink: 0;
}
.mobile-search-clear.hidden { display: none; }
.mobile-search-cancel {
    background: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-color);
    white-space: nowrap;
    flex-shrink: 0;
}
.mobile-search-results {
    background: var(--surface);
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Products page search context */
.section-header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.search-results-meta {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.search-clear-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 6px 12px;
    border-radius: 980px;
    background: var(--store-bg);
    border: 1px solid var(--border-light);
    transition: all var(--dur-fast) var(--ease);
    text-decoration: none;
}
.search-clear-link:hover { background: var(--border-light); color: var(--text-primary); }

@media (max-width: 768px) {
    .nav-col-center { display: none; }
}
@media (max-width: 480px) {
    .search-wrap { display: none; }
    .search-trigger { display: flex; }
    .store-brand-name { font-size: 15px; }
}

/* ---- 22. PRODUCTS PAGE FILTER LAYOUT ---- */
.products-page-wrap {
    padding: 40px 0 64px;
}

.products-layout {
    display: flex;
    align-items: flex-start;
    gap: 28px;
}

/* ---- 23. FILTER SIDEBAR ---- */
.filter-sidebar {
    width: 252px;
    flex-shrink: 0;
    position: sticky;
    top: calc(var(--nav-height) + 20px);
    max-height: calc(100vh - var(--nav-height) - 40px);
    overflow-y: auto;
    scrollbar-width: none;
    background: var(--surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}
.filter-sidebar::-webkit-scrollbar { display: none; }

.filter-drag-handle { display: none; }

.filter-inner { padding: 20px; }

.filter-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.filter-head-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.filter-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.filter-clear-all {
    background: none;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    cursor: pointer;
    border-radius: 6px;
    font-family: inherit;
    transition: background var(--dur-fast) var(--ease);
}
.filter-clear-all:hover { background: color-mix(in srgb, var(--primary-color) 10%, transparent); }

.filter-close-btn {
    display: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--store-bg);
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: background var(--dur-fast) var(--ease);
    flex-shrink: 0;
}
.filter-close-btn:hover { background: var(--border-light); }

.filter-section {
    padding: 16px 0;
    border-top: 1px solid var(--border-light);
}

.filter-section-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.filter-select {
    width: 100%;
    max-width: 260px;
    padding: 9px 34px 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface);
    outline: none;
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 10px center;
}
[dir="ltr"] .filter-select { background-position: right 10px center; }
.filter-select:focus { border-color: var(--primary-color); }

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-opt {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.filter-opt:hover { background: var(--store-bg); color: var(--text-primary); }
.filter-opt input { display: none; }

.filter-opt-dot {
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid var(--border);
    flex-shrink: 0;
    position: relative;
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.filter-opt input:checked ~ .filter-opt-dot {
    border-color: var(--primary-color);
    background: var(--primary-color);
}
.filter-opt input:checked ~ .filter-opt-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}
.filter-opt input:checked ~ span:last-child {
    color: var(--text-primary);
    font-weight: 600;
}

.filter-opt-check {
    width: 17px;
    height: 17px;
    border-radius: 4px;
    border: 2px solid var(--border);
    flex-shrink: 0;
    position: relative;
    transition: border-color var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease);
}
.filter-opt input:checked ~ .filter-opt-check {
    border-color: var(--primary-color);
    background: var(--primary-color);
}
.filter-opt input:checked ~ .filter-opt-check::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4px;
    width: 5px;
    height: 9px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.filter-price-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-price-input {
    flex: 1;
    padding: 8px 10px;
    border: 1.5px solid var(--input-border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface);
    outline: none;
    direction: ltr;
    text-align: center;
    transition: border-color var(--dur-fast) var(--ease);
    min-width: 0;
}
.filter-price-input:focus { border-color: var(--primary-color); }
.filter-price-input::placeholder { color: var(--text-muted); }

.filter-price-dash {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.filter-apply-row {
    padding-top: 16px;
    display: none;
}

/* ---- 24. PRODUCTS MAIN AREA ---- */
.products-main {
    flex: 1;
    min-width: 0;
}

.products-main .section-header { padding: 0; margin-bottom: 20px; }
.products-main .products-grid { padding: 0; }

.products-section-header {
    padding: 0 !important;
    margin-bottom: 20px !important;
    align-items: flex-start !important;
}

/* ---- 25. MOBILE FILTER BAR ---- */
.mobile-filter-bar {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.mobile-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 600;
    font-family: inherit;
    background: var(--surface);
    border: 1.5px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--dur-fast) var(--ease);
}
.mobile-filter-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

.filter-active-badge {
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: var(--primary-color);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---- 26. FILTER OVERLAY (MOBILE) ---- */
.filter-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0);
    z-index: 540;
    transition: background var(--dur) var(--ease);
}
.filter-overlay.active {
    display: block;
    background: rgba(0,0,0,.46);
    pointer-events: all;
}

/* ---- 27. FILTER RESPONSIVE ---- */
@media (max-width: 900px) {
    .filter-sidebar { width: 220px; }
}

@media (max-width: 768px) {
    .products-page-wrap { padding: 20px 0 48px; }
    .products-layout { display: block; }

    .mobile-filter-bar { display: flex; }

    .filter-drag-handle {
        display: block;
        width: 40px;
        height: 4px;
        background: var(--border);
        border-radius: 2px;
        margin: 12px auto 0;
        flex-shrink: 0;
    }

    .filter-sidebar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        max-height: 88vh;
        border-radius: 24px 24px 0 0;
        border-bottom: none;
        z-index: 550;
        transform: translateY(100%);
        transition: transform var(--dur-slow) var(--ease);
        top: auto;
        overflow-y: auto;
    }
    .filter-sidebar.open { transform: translateY(0); }

    .filter-close-btn { display: flex; }
    .filter-apply-row { display: block; }

    .products-main .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        padding: 0;
    }
    .products-main .section-header { padding: 0; }
}

.sheet-variations {
    padding: 0 0 4px;
}

.variation-selector {
    margin-bottom: 14px;
}

.variation-selector-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.variation-option-btn {
    padding: 7px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    line-height: 1;
}

.variation-option-btn:hover:not(:disabled) {
    border-color: var(--primary-color);
}

.variation-option-btn.selected {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

.variation-option-btn.out-of-stock,
.variation-option-btn:disabled {
    opacity: 0.38;
    cursor: not-allowed;
    text-decoration: line-through;
}

.cart-item-variation {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ---- HOME SECTIONS ---- */
.section-title-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary-color, #4F46E5);
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    margin-inline-start: 8px;
    vertical-align: middle;
}

.badge-featured {
    top: 10px;
    right: 10px;
    background: var(--primary-color, #4F46E5);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
}

/* ---- 28. PRODUCT CAROUSEL ---- */
.products-carousel-section {
    padding: 48px 0;
}

.products-carousel-section .section-header {
    padding: 0;
    margin-bottom: 20px;
}

.section-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-decoration: none;
    white-space: nowrap;
    transition: color var(--dur-fast) var(--ease);
    flex-shrink: 0;
}
.section-view-all:hover { color: var(--text-primary); }
.section-view-all svg { transition: transform var(--dur-fast) var(--ease); }
.section-view-all:hover svg { transform: translateX(3px); }
[dir='rtl'] .section-view-all:hover svg { transform: translateX(-3px); }

.products-carousel-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.products-carousel-viewport {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.products-carousel-track {
    display: flex;
    gap: 14px;
    transition: transform 340ms var(--ease);
    will-change: transform;
}

.products-carousel-section .product-card {
    flex: 0 0 210px;
    min-width: 210px;
}

.carousel-btn {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.carousel-btn:hover:not(:disabled) {
    background: var(--store-bg);
    box-shadow: var(--shadow-md);
}
.carousel-btn:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}
[dir='rtl'] .carousel-btn svg { transform: scaleX(-1); }

@media (max-width: 768px) {
    .products-carousel-section {
        padding: 32px 0;
    }
    .products-carousel-section .product-card {
        flex: 0 0 160px;
        min-width: 160px;
    }
    .carousel-btn {
        width: 30px;
        height: 30px;
    }
}

/* ---- ADS SECTION ---- */
.ads-section {
    padding: 48px 0;
}

.ads-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 14px;
    aspect-ratio: 3 / 1;
}

.ad-card {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    position: relative;
    background: var(--border-light);
    box-shadow: var(--shadow-xs);
    transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.ad-card[href='#'],
.ad-card[onclick] {
    cursor: default;
    pointer-events: none;
}

.ad-card:not([href='#']):not([onclick]):hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.ad-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ad-card-big {
    grid-column: 1;
    grid-row: 1 / 3;
}

.ad-card-small {
    grid-column: 2;
}

@media (max-width: 768px) {
    .ads-section {
        padding: 32px 0;
    }
    .ads-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        aspect-ratio: unset;
        gap: 10px;
    }
    .ad-card-big {
        grid-column: 1 / 3;
        grid-row: 1;
        aspect-ratio: 16 / 7;
    }
    .ad-card-small {
        grid-column: unset;
        grid-row: 2;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 480px) {
    .ads-section {
        padding: 24px 0;
    }
    .ads-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .ad-card-big {
        grid-column: 1;
        grid-row: 1;
        aspect-ratio: 16 / 7;
    }
    .ad-card-small {
        grid-column: 1;
        grid-row: unset;
        aspect-ratio: 16 / 7;
    }
}

@media (max-width: 480px) {
    .products-carousel-section .product-card {
        flex: 0 0 150px;
        min-width: 150px;
    }
    .carousel-btn {
        width: 28px;
        height: 28px;
    }
}


/* ============================================================
   CUSTOMER ACCOUNT SYSTEM
   ============================================================ */

/* ---- Account trigger button in navbar ---- */
.account-trigger {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-primary);
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
    flex-shrink: 0;
}
.account-trigger:hover {
    background: var(--border-light);
}
.account-trigger-named {
    width: auto;
    border-radius: 40px;
    padding: 0 10px 0 6px;
    gap: 5px;
    height: 36px;
    border: 1px solid var(--border);
    background: var(--surface);
}
.account-trigger-named:hover {
    background: var(--border-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}
.account-trigger-name {
    font-size: 0.8rem;
    font-weight: 600;
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1;
}
@media (max-width: 480px) {
    .account-trigger-name {
        display: none;
    }
    .account-trigger-named {
        width: 40px;
        padding: 0;
        border-radius: 50%;
    }
}

/* ---- Auth pages (login / register) ---- */
.auth-page {
    min-height: calc(100vh - var(--nav-height) - 120px);
    display: flex;
    align-items: center;
    padding: 48px 0;
}
.auth-card {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
}
.auth-card-wide {
    max-width: 600px;
}
.auth-header {
    margin-bottom: 28px;
    text-align: center;
}
.auth-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}
.auth-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.auth-submit-btn {
    margin-top: 4px;
}
.auth-footer {
    margin-top: 20px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
}
.auth-link {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.auth-link:hover {
    opacity: .8;
}
.auth-alert {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 16px;
}
.auth-alert-error {
    background: rgba(255,59,48,.08);
    color: var(--danger);
    border: 1px solid rgba(255,59,48,.18);
}
.auth-alert-success {
    background: rgba(52,199,89,.08);
    color: #1a8a38;
    border: 1px solid rgba(52,199,89,.2);
}

/* ---- Account layout ---- */
.account-page {
    padding: 32px 0 60px;
}
.account-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
    margin-top: 24px;
}
.account-sidebar {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}
.account-avatar {
    width: 64px;
    height: 64px;
    background: var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    margin-bottom: 4px;
}
.account-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
}
.account-email {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
    word-break: break-all;
    margin-bottom: 12px;
}
.account-nav {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--border-light);
    padding-top: 12px;
}
.account-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: none;
    border: none;
    width: 100%;
    text-align: right;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
}
.account-nav-item:hover,
.account-nav-item.active {
    background: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color);
}
.account-nav-logout {
    color: var(--danger);
    margin-top: 4px;
}
.account-nav-logout:hover {
    background: rgba(255,59,48,.08);
    color: var(--danger);
}
.account-logout-form {
    width: 100%;
}
.account-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    padding: 28px;
}
.account-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.account-save-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 4px;
}

/* ---- Orders list ---- */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.order-card {
    display: block;
    background: var(--store-bg);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 18px;
    transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
    cursor: pointer;
}
.order-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xs);
}
.order-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.order-card-number {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}
.order-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.order-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.order-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.order-card-total {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-color);
}
.order-card-arrow {
    color: var(--text-muted);
}
.orders-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-secondary);
}
.orders-empty-icon {
    color: var(--text-muted);
    margin-bottom: 16px;
    display: flex;
    justify-content: center;
}
.orders-empty h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
}
.orders-empty p {
    font-size: 0.875rem;
}

/* ---- Order status badges ---- */
.order-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
}
.order-status-pending  { background: rgba(255,159,10,.12); color: #b36a00; }
.order-status-confirmed { background: rgba(0,122,255,.1);  color: #005fb3; }
.order-status-processing { background: rgba(90,200,250,.15); color: #0070a3; }
.order-status-shipped  { background: rgba(100,210,255,.15); color: #0077a8; }
.order-status-delivered { background: rgba(52,199,89,.12); color: #1a8a38; }
.order-status-cancelled { background: rgba(255,59,48,.1);  color: #c9291e; }

/* ---- Order detail ---- */
.order-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.order-detail-header .account-section-title {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.order-detail-meta {
    display: flex;
    gap: 20px;
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}
.order-detail-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Timeline */
.order-status-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 28px;
    overflow-x: auto;
    padding-bottom: 4px;
}
.timeline-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    min-width: 64px;
}
.timeline-step::before {
    content: '';
    position: absolute;
    top: 9px;
    right: calc(50% + 10px);
    left: calc(-50% + 10px);
    height: 2px;
    background: var(--border);
}
.timeline-step:first-child::before { display: none; }
.timeline-step.passed::before,
.timeline-step.active::before {
    background: var(--primary-color);
}
.timeline-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: var(--surface);
    position: relative;
    z-index: 1;
    transition: all var(--dur-fast) var(--ease);
    flex-shrink: 0;
}
.timeline-step.passed .timeline-dot {
    background: var(--primary-color);
    border-color: var(--primary-color);
}
.timeline-step.active .timeline-dot {
    background: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary-color) 20%, transparent);
}
.timeline-step-cancelled .timeline-dot {
    background: var(--danger);
    border-color: var(--danger);
}
.timeline-label {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.3;
}
.timeline-step.active .timeline-label,
.timeline-step.passed .timeline-label {
    color: var(--text-primary);
    font-weight: 600;
}
.timeline-step-cancelled .timeline-label {
    color: var(--danger);
}

/* Order detail sections */
.order-detail-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}
.order-detail-section-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.order-items-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.order-item-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.order-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.order-item-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}
.order-item-variation {
    font-size: 0.82rem;
    color: var(--text-secondary);
    font-weight: 400;
}
.order-item-qty {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.order-item-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}
.order-totals {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 280px;
    margin-right: auto;
}
.order-totals-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: var(--text-secondary);
}
.order-totals-total {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    border-top: 1px solid var(--border);
    padding-top: 8px;
    margin-top: 4px;
}
.order-totals-discount {
    color: #166534;
    font-weight: 600;
}
.order-address {
    background: var(--store-bg);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.order-address-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}
.order-address-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.order-address-notes {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-style: italic;
}
.order-detail-back {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
    .account-sidebar {
        flex-direction: row;
        flex-wrap: wrap;
        padding: 16px;
        gap: 12px;
    }
    .account-avatar {
        width: 48px;
        height: 48px;
        margin-bottom: 0;
    }
    .account-nav {
        flex-direction: row;
        flex-wrap: wrap;
        border-top: none;
        padding-top: 0;
        border-top: 1px solid var(--border-light);
        padding-top: 8px;
        width: 100%;
        margin-top: 4px;
    }
    .account-nav-item {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    .account-logout-form {
        flex: 1;
        min-width: 120px;
    }
    .auth-card {
        padding: 28px 20px;
    }
    .order-status-timeline {
        gap: 0;
    }
    .order-detail-meta {
        flex-wrap: wrap;
        gap: 10px;
    }
    .order-totals {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .account-content {
        padding: 20px 16px;
    }
    .auth-card {
        padding: 24px 16px;
    }
    .account-sidebar {
        justify-content: center;
    }
    .account-nav-item span:not(:last-child) {
        display: none;
    }
}

.lang-switcher { display: flex; align-items: center; }
.lang-switcher form { margin: 0; }
.lang-btn {
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    cursor: pointer;
    transition: border-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
    line-height: 1;
}
.lang-btn:hover { border-color: var(--primary-color); color: var(--primary-color); }

.coupon-input-row {
    margin-bottom: 16px;
}
.coupon-field-wrap {
    display: flex;
    gap: 8px;
    align-items: center;
}
.coupon-field-input {
    flex: 1;
    height: 40px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0 12px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--text-primary);
    background: var(--surface);
    transition: border-color 0.2s;
    outline: none;
}
.coupon-field-input:focus { border-color: var(--primary-color); }
.coupon-apply-btn {
    height: 40px;
    padding: 0 16px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.coupon-apply-btn:hover { opacity: 0.88; }
.coupon-apply-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.coupon-feedback {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    padding: 6px 10px;
}
.coupon-feedback-success {
    background: #F0FDF4;
    color: #166534;
    border: 1px solid #BBF7D0;
}
.coupon-feedback-error {
    background: #FFF1F2;
    color: #BE123C;
    border: 1px solid #FECDD3;
}
.coupon-discount-row {
    align-items: center;
}
.coupon-discount-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #166534 !important;
    font-weight: 600;
}
.coupon-discount-value {
    color: #166534 !important;
    font-weight: 700;
}
.coupon-remove-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #9CA3AF;
    font-size: 16px;
    line-height: 1;
    padding: 0 2px;
    transition: color 0.15s;
}
.coupon-remove-btn:hover { color: #EF4444; }
.coupon-field-icon {
    flex-shrink: 0;
    color: var(--primary-color);
    opacity: 0.65;
}
@keyframes coupon-spin {
    to { transform: rotate(360deg); }
}
.coupon-spinner {
    animation: coupon-spin 0.75s linear infinite;
    display: block;
}
@keyframes coupon-row-in {
    from { opacity: 0; transform: translateY(-5px); }
    to   { opacity: 1; transform: translateY(0); }
}
.coupon-discount-row {
    animation: coupon-row-in 0.2s ease both;
}

.order-card-savings {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #166534;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 6px;
    padding: 5px 10px;
    margin: 6px 0 2px;
}
.order-card-coupon-code {
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    background: #DCFCE7;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 11px;
    color: #14532D;
}

.order-coupon-applied-banner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    margin-bottom: 16px;
}
.order-coupon-code-pill {
    background: #DCFCE7;
    color: #14532D;
    border-radius: 6px;
    padding: 2px 8px;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}
.order-coupon-saved {
    margin-inline-start: auto;
    color: #15803D;
    font-weight: 700;
    font-size: 13px;
}

.order-totals-discount-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #166534;
    font-weight: 600;
}
.order-totals-coupon-badge {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    background: #DCFCE7;
    color: #14532D;
    border-radius: 4px;
    padding: 1px 6px;
    letter-spacing: 0.5px;
}
.order-totals-discount-value {
    color: #166534;
    font-weight: 700;
}

.success-savings {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    background: #F0FDF4;
    border: 1px solid #BBF7D0;
    border-radius: 10px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #166534;
    margin: 8px auto 4px;
    max-width: 320px;
}
.success-coupon-code {
    font-family: 'Courier New', monospace;
    background: #DCFCE7;
    color: #14532D;
    border-radius: 5px;
    padding: 1px 6px;
    font-size: 12px;
    letter-spacing: 0.5px;
}

.nav-more-wrap {
    position: relative;
}
.nav-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 0;
}
.nav-more-chevron {
    transition: transform .2s var(--ease);
    flex-shrink: 0;
}
.nav-more-wrap.open .nav-more-chevron { transform: rotate(180deg); }
.nav-more-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    inset-inline-start: 0;
    min-width: 180px;
    background: var(--navbar-bg);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
    padding: 6px;
    display: none;
    z-index: 200;
    backdrop-filter: blur(12px);
}
.nav-more-wrap.open .nav-more-dropdown { display: block; }
.nav-more-item {
    display: block;
    padding: 9px 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 8px;
    transition: background .12s, color .12s;
    white-space: nowrap;
}
.nav-more-item:hover {
    background: color-mix(in srgb, var(--primary-color) 8%, transparent);
    color: var(--primary-color);
}

.footer-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding: 16px 0;
    border-top: 1px solid color-mix(in srgb, currentColor 12%, transparent);
    margin-top: 16px;
}
.footer-page-link {
    font-size: 12px;
    color: color-mix(in srgb, currentColor 55%, transparent);
    text-decoration: none;
    transition: color .15s;
}
.footer-page-link:hover { color: currentColor; }

/* ── WhatsApp floating chat button ─────────────────────────────── */
@keyframes wa-pulse {
    0%   { box-shadow: 0 4px 20px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.4); }
    70%  { box-shadow: 0 4px 20px rgba(37,211,102,.45), 0 0 0 14px rgba(37,211,102,0); }
    100% { box-shadow: 0 4px 20px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0); }
}
.wa-float-btn {
    position: fixed;
    bottom: 24px;
    z-index: 380;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(37,211,102,.45);
    transition: transform .2s ease, box-shadow .2s ease;
    animation: wa-pulse 2.4s ease-out 2.5s 3;
}
.wa-float-btn:hover,
.wa-float-btn:focus-visible {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(37,211,102,.58);
    outline: none;
}
.wa-float-btn.wa-pos-right { right: 24px; }
.wa-float-btn.wa-pos-left  { left: 24px; }
.wa-float-icon { flex-shrink: 0; }
.wa-float-tooltip {
    position: absolute;
    top: 50%;
    white-space: nowrap;
    background: rgba(15,15,15,.88);
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 8px;
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease, transform .15s ease;
    backdrop-filter: blur(4px);
}
.wa-float-btn.wa-pos-right .wa-float-tooltip {
    right: calc(100% + 10px);
    transform: translateY(-50%) translateX(6px);
}
.wa-float-btn.wa-pos-left .wa-float-tooltip {
    left: calc(100% + 10px);
    transform: translateY(-50%) translateX(-6px);
}
.wa-float-btn:hover .wa-float-tooltip,
.wa-float-btn:focus-visible .wa-float-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
@media (max-width: 767px) {
    .wa-float-btn {
        bottom: 20px;
        width: 48px;
        height: 48px;
    }
    .wa-float-btn.wa-pos-right { right: 16px; }
    .wa-float-btn.wa-pos-left  { left: 16px; }
}

/* ── Skeleton Loaders ─────────────────────────────────────────── */
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, var(--border-light) 25%, var(--border) 50%, var(--border-light) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
    position: relative;
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
}

.skeleton-product-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.skeleton-product-image {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
}

.skeleton-product-category {
    width: 60%;
    height: 12px;
    border-radius: 4px;
}

.skeleton-product-name {
    width: 85%;
    height: 16px;
    border-radius: 4px;
}

.skeleton-product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.skeleton-product-price {
    width: 45%;
    height: 20px;
    border-radius: 4px;
}

.skeleton-product-badge {
    width: 30%;
    height: 18px;
    border-radius: 12px;
}

.skeleton-category-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
}

.skeleton-category-image {
    width: 64px;
    height: 64px;
    border-radius: 50%;
}

.skeleton-category-name {
    width: 80%;
    height: 14px;
    border-radius: 4px;
}

.skeleton-text {
    height: 14px;
    border-radius: 4px;
}

.skeleton-text-lg {
    height: 20px;
    border-radius: 4px;
}

.skeleton-text-xl {
    height: 28px;
    border-radius: 6px;
}

.products-grid.loading {
    pointer-events: none;
}

.home-categories-grid.loading {
    pointer-events: none;
}

/* ── Pagination ──────────────────────────────────────────────── */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--border-light);
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    text-align: center;
}

.pagination {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.pagination-link,
.pagination-current {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all var(--dur-fast) var(--ease);
}

.pagination-link {
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
}

.pagination-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination-current {
    background: var(--primary-color);
    color: white;
    border: 1px solid var(--primary-color);
    cursor: default;
}

.pagination-ellipsis {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
}

.pagination-prev,
.pagination-next {
    padding: 0 16px;
    gap: 6px;
}

.pagination-link.pagination-disabled {
    opacity: 0.4;
    pointer-events: none;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .pagination-link,
    .pagination-current {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    .pagination-prev span,
    .pagination-next span {
        display: none;
    }
}

/* ── Network Banner ──────────────────────────────────────────── */
.network-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 500;
    transform: translateY(-100%);
    transition: transform var(--dur) var(--ease);
}

.network-banner.show {
    transform: translateY(0);
}

.network-banner-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 20px;
    min-height: 48px;
}

.network-banner-offline .network-banner-content {
    background: #FEF2F2;
    border-bottom: 1px solid #FECACA;
    color: #991B1B;
}

.network-banner-online .network-banner-content {
    background: #F0FDF4;
    border-bottom: 1px solid #BBF7D0;
    color: #166534;
}

.network-banner-icon {
    flex-shrink: 0;
}

.network-banner-text {
    font-size: 14px;
    font-weight: 500;
}

.network-banner-retry {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: currentColor;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--dur-fast);
}

.network-banner-retry:hover {
    opacity: 0.85;
}

.network-banner-offline .network-banner-retry {
    background: #991B1B;
}

.network-banner-online .network-banner-retry {
    background: #166534;
}

@media (max-width: 767px) {
    .network-banner-content {
        padding: 10px 16px;
        gap: 10px;
    }
    .network-banner-text {
        font-size: 13px;
    }
    .network-banner-retry {
        padding: 5px 10px;
        font-size: 12px;
    }
}

/* ── Inline Validation ───────────────────────────────────────── */
.input-error {
    border-color: #EF4444 !important;
    background: #FEF2F2 !important;
}

.input-success {
    border-color: #10B981 !important;
}

.field-error {
    display: block;
    font-size: 12px;
    color: #EF4444;
    margin-top: 4px;
    font-weight: 500;
}

.input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-success:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* ── Checkout Loading Overlay ────────────────────────────────── */
.checkout-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 600;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
}

.checkout-loading-overlay.active {
    display: flex;
}

.checkout-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.checkout-loading-text {
    color: white;
    font-size: 16px;
    font-weight: 600;
}

/* ============================================================
   HOMEPAGE V2
   ============================================================ */

.hp-hero {
    position: relative;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}
.hp-hero-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 45%, #1565c0 0%, #0d47a1 30%, #0a1929 65%, #000 100%);
    z-index: 0;
}
.hp-hero-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 100px 24px 48px;
    width: 100%;
    max-width: 500px;
}
.hp-hero-sub {
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 24px;
    text-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.hp-hero-product-img {
    width: 260px;
    height: 260px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-hero-product-img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 20px 40px rgba(0,0,0,.5));
}
.hp-hero-title {
    font-size: 36px;
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
    letter-spacing: -.02em;
    margin-bottom: 24px;
    text-shadow: 0 2px 20px rgba(0,0,0,.3);
}
.hp-hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    background: #34c759;
    color: #fff;
    border-radius: 980px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
    box-shadow: 0 4px 20px rgba(52,199,89,.4);
    margin-bottom: 20px;
}
.hp-hero-btn:hover { transform: scale(1.04); box-shadow: 0 6px 28px rgba(52,199,89,.5); }
.hp-hero-btn:active { transform: scale(.96); }
.hp-hero-desc {
    font-size: 12px;
    color: rgba(255,255,255,.55);
    line-height: 1.6;
    max-width: 320px;
}

.hp-brands {
    padding: 28px 20px 16px;
    display: flex;
    align-items: center;
    gap: 16px;
}
.hp-brands-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    flex-shrink: 0;
}
.hp-brands-track {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    cursor: grab;
}
.hp-brands-track::-webkit-scrollbar { display: none; }
.hp-brands-track.grabbing { cursor: grabbing; }
.hp-brand-chip {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    background: var(--surface);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hp-brand-chip img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}
.hp-brand-chip-accent {
    background: #34c759;
    border-color: #34c759;
}
.hp-brand-chip-accent img { filter: brightness(10); }
.hp-brand-fallback {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    align-items: center;
    justify-content: center;
}

.hp-new-products {
    padding: 8px 16px 16px;
}
.hp-dark-container {
    background: #111;
    border-radius: var(--radius-xl);
    padding: 16px;
}
.hp-new-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.hp-new-card {
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--dur-fast) var(--ease);
}
.hp-new-card:active { transform: scale(.96); }
.hp-new-card-img {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-new-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hp-new-card-placeholder {
    color: var(--border);
}
.hp-new-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 3px 10px;
    background: #34c759;
    color: #fff;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
}
[dir='rtl'] .hp-new-badge { right: auto; left: 8px; }
.hp-new-card-body {
    padding: 10px 12px 12px;
}
.hp-new-card-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hp-new-card-desc {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hp-new-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hp-new-stock {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    color: var(--success);
}
.hp-new-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.hp-new-price small {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.hp-cat-showcase {
    padding: 16px;
}
.hp-cat-track {
    display: flex;
    gap: 14px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    cursor: grab;
    padding-bottom: 8px;
}
.hp-cat-track::-webkit-scrollbar { display: none; }
.hp-cat-track.grabbing { cursor: grabbing; }
.hp-cat-card-wrap {
    flex: 0 0 auto;
    width: calc(100vw - 48px);
    max-width: 360px;
    scroll-snap-align: center;
}
.hp-cat-card {
    background: #f5f0eb;
    border-radius: var(--radius-xl);
    overflow: hidden;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    transition: transform var(--dur-fast) var(--ease);
}
.hp-cat-card:active { transform: scale(.97); }
.hp-cat-card-images {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ebe5df;
}
.hp-cat-card-images img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hp-cat-card-placeholder {
    color: var(--border);
}
.hp-cat-card-body {
    padding: 20px 24px 24px;
}
.hp-cat-tag {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(0,0,0,.06);
    border-radius: 980px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.hp-cat-name {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
    letter-spacing: -.02em;
}
.hp-cat-sub {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 500;
}
.hp-cat-card-wrap {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
}
.hp-cat-children {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 16px 14px;
}
.hp-cat-child-link {
    display: inline-block;
    padding: 5px 14px;
    background: var(--surface, #f5f5f5);
    border: 1px solid var(--border, #e5e5e5);
    border-radius: 980px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary, #666);
    text-decoration: none;
    transition: all 0.2s;
}
.hp-cat-child-link:hover {
    background: var(--primary-color, #4F46E5);
    color: #fff;
    border-color: var(--primary-color, #4F46E5);
}

.hp-promo-section { padding: 0 16px 8px; }

.hp-promo-ig {
    position: relative;
    background: linear-gradient(160deg, #111827 0%, #1e293b 100%);
    border-radius: var(--radius-xl);
    overflow: hidden;
    padding: 0;
}
.hp-promo-ig-icon {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    opacity: .7;
}
[dir='rtl'] .hp-promo-ig-icon { right: auto; left: 16px; }
.hp-promo-ig-img {
    width: 100%;
    aspect-ratio: 4/3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hp-promo-ig-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hp-promo-ig-product {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
}
.hp-promo-ig-product-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    background: #1e293b;
    flex-shrink: 0;
}
.hp-promo-ig-product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hp-promo-ig-product-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.hp-promo-ig-product-price {
    font-size: 12px;
    color: rgba(255,255,255,.6);
}
.hp-promo-cta-full {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    background: rgba(255,255,255,.1);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background var(--dur-fast) var(--ease);
    border-top: 1px solid rgba(255,255,255,.08);
}
.hp-promo-cta-full:hover { background: rgba(255,255,255,.15); }

.hp-promos {
    padding: 8px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.hp-promo {
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}
.hp-promo-img-area {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
}
.hp-promo-img-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hp-promo-pill {
    display: inline-block;
    padding: 4px 14px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(4px);
    border-radius: 980px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    margin: 16px 20px 8px;
}
.hp-promo-pill-blue {
    background: #2563eb;
    color: #fff;
}
.hp-promo-heading {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
    padding: 0 20px;
    margin-bottom: 6px;
}
.hp-promo-heading-dark { color: var(--text-primary); }
.hp-promo-text {
    font-size: 12px;
    color: rgba(255,255,255,.6);
    padding: 0 20px;
    line-height: 1.5;
    margin-bottom: 16px;
}
.hp-promo-text-dark { color: var(--text-secondary); }
.hp-promo-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0 20px 20px;
    padding: 10px 24px;
    border: 1.5px solid rgba(255,255,255,.3);
    border-radius: 980px;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--dur-fast) var(--ease);
    background: transparent;
}
.hp-promo-cta-outline:hover { background: rgba(255,255,255,.1); }
.hp-promo-cta-dark {
    border-color: rgba(0,0,0,.2);
    color: var(--text-primary);
}
.hp-promo-cta-dark:hover { background: rgba(0,0,0,.05); }

.hp-products-scroll-section {
    padding: 28px 0 16px;
}
.hp-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    margin-bottom: 16px;
}
.hp-section-title {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--text-primary);
}
.hp-view-all {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}
.hp-view-all svg { transition: transform var(--dur-fast) var(--ease); }
.hp-view-all:hover svg { transform: translateX(3px); }
[dir='rtl'] .hp-view-all:hover svg { transform: translateX(-3px); }

.hp-scroll-track {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 20px 12px;
    cursor: grab;
}
.hp-scroll-track::-webkit-scrollbar { display: none; }
.hp-scroll-track.grabbing { cursor: grabbing; }
.hp-scroll-card {
    flex: 0 0 auto;
    width: 150px;
    scroll-snap-align: start;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--border-light);
    transition: transform var(--dur-fast) var(--ease);
}
.hp-scroll-card:active { transform: scale(.96); }
.hp-scroll-card-img {
    aspect-ratio: 1;
    overflow: hidden;
    background: #f8f8f8;
}
.hp-scroll-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hp-scroll-card-body {
    padding: 10px 12px 12px;
}
.hp-scroll-card-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.hp-scroll-card-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}
.hp-scroll-card-price small {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.hp-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    gap: 12px;
}
.hp-empty-state .hp-empty-icon {
    width: 64px;
    height: 64px;
    background: var(--surface);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--border);
}
.hp-empty-state h3 { font-size: 18px; font-weight: 700; }
.hp-empty-state p { font-size: 14px; color: var(--text-secondary); }

@media (min-width: 769px) {
    .hp-hero-inner { padding: 120px 48px 64px; max-width: 600px; }
    .hp-hero-sub { font-size: 26px; }
    .hp-hero-title { font-size: 48px; }
    .hp-hero-product-img { width: 320px; height: 320px; }
    .hp-brands { padding: 32px 32px 16px; }
    .hp-new-products { padding: 8px 32px 16px; }
    .hp-new-grid { gap: 14px; }
    .hp-cat-showcase { padding: 16px 32px; }
    .hp-cat-card-wrap { width: 340px; }
    .hp-promo-section { padding: 0 32px 8px; }
    .hp-promos { padding: 8px 32px 16px; }
    .hp-promo-heading { font-size: 24px; }
    .hp-products-scroll-section { padding: 32px 0 20px; }
    .hp-section-header { padding: 0 32px; }
    .hp-scroll-track { padding: 0 32px 12px; gap: 16px; }
    .hp-scroll-card { width: 180px; }
}
@media (min-width: 1024px) {
    .hp-hero-inner { padding: 140px 64px 80px; max-width: 700px; }
    .hp-hero-sub { font-size: 30px; }
    .hp-hero-title { font-size: 56px; }
    .hp-hero-product-img { width: 380px; height: 380px; }
    .hp-brands { padding: 40px 48px 20px; }
    .hp-new-products { padding: 12px 48px 20px; }
    .hp-dark-container { padding: 20px; border-radius: 32px; }
    .hp-new-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
    .hp-cat-showcase { padding: 20px 48px; }
    .hp-cat-card-wrap { width: 380px; }
    .hp-promo-section { padding: 0 48px 12px; }
    .hp-promos { padding: 12px 48px 20px; gap: 18px; }
    .hp-promo-heading { font-size: 28px; }
    .hp-products-scroll-section { padding: 36px 0 24px; }
    .hp-section-header { padding: 0 48px; }
    .hp-scroll-track { padding: 0 48px 16px; gap: 18px; }
    .hp-scroll-card { width: 210px; }
}

/* ---- FOOTER V2 ---- */
.ft {
    background: #1a1a1a;
    color: #fff;
    padding: 40px 0 24px;
    position: relative;
    overflow: hidden;
}
.ft-inner {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 24px;
}
.ft-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 28px;
}
.ft-logo {
    width: 36px;
    height: 36px;
    object-fit: contain;
}
.ft-brand-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -.02em;
}
.ft-newsletter {
    margin-bottom: 32px;
}
.ft-newsletter-text {
    font-size: 14px;
    color: rgba(255,255,255,.7);
    line-height: 1.6;
    margin-bottom: 16px;
}
.ft-newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.ft-newsletter-row {
    display: flex;
    gap: 10px;
}
.ft-input {
    flex: 1;
    padding: 12px 14px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: var(--radius-sm);
    color: #fff;
    font-size: 14px;
    outline: none;
    transition: border-color var(--dur-fast) var(--ease);
}
.ft-input::placeholder { color: rgba(255,255,255,.35); }
.ft-input:focus { border-color: rgba(255,255,255,.3); }
.ft-newsletter-btn {
    width: 100%;
    padding: 12px 28px;
    background: #2563eb;
    color: #fff;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background var(--dur-fast) var(--ease);
}
.ft-newsletter-btn:hover { background: #1d4ed8; }

.ft-accordions {
    border-top: 1px solid rgba(255,255,255,.1);
    margin-bottom: 24px;
}
.ft-accordion {
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.ft-accordion-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}
.ft-accordion-btn svg {
    flex-shrink: 0;
    transition: transform var(--dur-fast) var(--ease);
    color: rgba(255,255,255,.4);
}
.ft-accordion.open .ft-accordion-btn svg {
    transform: rotate(45deg);
}
.ft-accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dur) var(--ease);
    padding-bottom: 0;
}
.ft-accordion.open .ft-accordion-body {
    max-height: 200px;
    padding-bottom: 12px;
}
.ft-accordion-body p,
.ft-accordion-body a {
    display: block;
    padding: 4px 0;
    font-size: 13px;
    color: rgba(255,255,255,.5);
    text-decoration: none;
    line-height: 1.6;
}
.ft-accordion-body a:hover { color: rgba(255,255,255,.8); }

.ft-account-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 0;
    color: rgba(255,255,255,.6);
}
.ft-account-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: rgba(255,255,255,.15);
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}
.ft-account-row a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}
.ft-account-row a:hover { color: #fff; }

.ft-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 0;
    flex-wrap: wrap;
}
.ft-lang-switcher {
    display: flex;
    gap: 6px;
}
.ft-lang-pill {
    padding: 6px 16px;
    border-radius: 980px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.6);
    border: none;
    cursor: pointer;
    font-family: inherit;
    transition: all var(--dur-fast) var(--ease);
}
.ft-lang-pill:hover { background: rgba(255,255,255,.12); }
.ft-lang-active {
    background: #2563eb !important;
    color: #fff !important;
    cursor: default;
}
.ft-country {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255,255,255,.08);
    border-radius: 980px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.7);
}

.ft-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 24px 0;
}
.ft-social-icon {
    color: rgba(255,255,255,.6);
    transition: color var(--dur-fast) var(--ease);
    display: flex;
}
.ft-social-icon:hover { color: #fff; }

.ft-copyright {
    text-align: center;
    font-size: 12px;
    color: rgba(255,255,255,.25);
    padding-top: 16px;
    border-top: 1px solid rgba(255,255,255,.06);
}

.ft-glow {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #7c3aed 0%, #2563eb 25%, #34c759 50%, #2563eb 75%, #7c3aed 100%);
    opacity: .6;
}
