/* =============================================
   ZooLo — Premium Stores Page
   Light: "Clean & Organic" — #059669 emerald
   Dark:  "Midnight"        — #10B981 + #F59E0B amber CTAs
   Grid: 8px base unit throughout
   ============================================= */

/* ─────────────────────────────────────────────
   LIGHT MODE — "Clean & Organic"
   Accent: Deep Emerald #059669
   ───────────────────────────────────────────── */
:root {
    /* Surfaces */
    --bg:              #F8FAFC;
    --bg-surface:      #FFFFFF;
    --bg-elevated:     #F1F5F9;

    /* Typography — contrast ≥ 4.5:1 throughout */
    --text:            #0F172A;   /* Slate-900 */
    --text-secondary:  #64748B;   /* Slate-500 */
    --text-muted:      #94A3B8;   /* Slate-400 */

    /* Borders */
    --border:          #E2E8F0;
    --border-card:     #F1F5F9;

    /* Primary Accent — Deep Emerald */
    --accent:          #059669;
    --accent-dim:      #047857;
    --accent-light:    rgba(5, 150, 105, 0.08);
    --accent-glow:     rgba(5, 150, 105, 0.18);

    /* CTA — same accent, rounded-full, white text */
    --cta-bg:          #059669;
    --cta-text:        #FFFFFF;
    --cta-radius:      9999px;    /* rounded-full */

    /* Search */
    --search-bg:       #F1F5F9;
    --search-text:     #64748B;

    /* Cards — very soft shadow + 1px border */
    --card-shadow:     0 1px 3px rgba(0,0,0,0.06), 0 0 0 1px #F1F5F9;
    --card-shadow-hover: 0 6px 22px rgba(0,0,0,0.09);

    /* Banner */
    --banner-gradient: linear-gradient(135deg, #047857 0%, #059669 55%, #10B981 100%);

    /* Tags */
    --tag-bg:          rgba(5, 150, 105, 0.08);
    --tag-text:        #065F46;   /* Emerald-900, high contrast on light */
    --tag-border:      rgba(5, 150, 105, 0.14);

    /* Bottom nav */
    --nav-bg:          rgba(255, 255, 255, 0.96);
    --nav-border:      #E2E8F0;
    --nav-text:        #64748B;
    --nav-active:      #059669;
    --nav-active-glow: rgba(5, 150, 105, 0.16);

    /* Status badges */
    --badge-open-bg:   #059669;
    --badge-open-text: #FFFFFF;

    /* Rating star */
    --rating-bg:       rgba(15, 23, 42, 0.70);
    --rating-star:     #F59E0B;

    /* Locked */
    --locked-bg:       #F1F5F9;
    --locked-border:   #E2E8F0;
    --soon-label:      #64748B;

    /* Icon buttons */
    --icon-btn-bg:     #F1F5F9;
    --icon-btn-text:   #334155;

    /* Delivery chip */
    --delivery-bg:     #F8FAFC;
    --delivery-text:   #64748B;
    --delivery-border: #E2E8F0;
}

/* ─────────────────────────────────────────────
   DARK MODE — "Midnight"
   Primary: Emerald #10B981
   CTAs only: Amber #F59E0B
   ───────────────────────────────────────────── */
[data-theme="dark"] {
    /* Surfaces */
    --bg:              #0F172A;   /* Deep Navy */
    --bg-surface:      #1E293B;   /* Dark Slate */
    --bg-elevated:     #162032;

    /* Typography */
    --text:            #FFFFFF;
    --text-secondary:  #94A3B8;   /* Slate-400 */
    --text-muted:      #475569;   /* Slate-600 */

    /* Borders — 0.5px feel via semi-transparent */
    --border:          rgba(51, 65, 85, 0.55);
    --border-card:     rgba(51, 65, 85, 0.70);  /* #334155 */

    /* Primary Accent — Emerald */
    --accent:          #10B981;
    --accent-dim:      #059669;
    --accent-light:    rgba(16, 185, 129, 0.10);
    --accent-glow:     rgba(16, 185, 129, 0.22);

    /* CTA — Amber Gold (strictly for action buttons) */
    --cta-bg:          #F59E0B;
    --cta-text:        #0F172A;
    --cta-radius:      14px;

    /* Search */
    --search-bg:       #162032;
    --search-text:     #475569;

    /* Cards — blue-tinted shadow (shadow-blue-900/20) */
    --card-shadow:     0 4px 20px rgba(30, 58, 138, 0.20),
                       0 1px 4px rgba(0, 0, 0, 0.40);
    --card-shadow-hover: 0 12px 36px rgba(30, 58, 138, 0.28),
                         0 4px 12px rgba(0, 0, 0, 0.55);

    /* Banner */
    --banner-gradient: linear-gradient(135deg, #064E3B 0%, #065F46 55%, #047857 100%);

    /* Tags */
    --tag-bg:          rgba(16, 185, 129, 0.10);
    --tag-text:        #34D399;
    --tag-border:      rgba(16, 185, 129, 0.18);

    /* Bottom nav — elevated slate so the floating pill stands out */
    --nav-bg:          rgba(30, 41, 59, 0.95);
    --nav-border:      rgba(71, 85, 105, 0.50);
    --nav-text:        #94A3B8;
    --nav-active:      #10B981;
    --nav-active-glow: rgba(16, 185, 129, 0.28);

    /* Status badges */
    --badge-open-bg:   #059669;
    --badge-open-text: #FFFFFF;

    /* Rating */
    --rating-bg:       rgba(0, 0, 0, 0.60);
    --rating-star:     #FBBF24;

    /* Locked */
    --locked-bg:       rgba(255, 255, 255, 0.02);
    --locked-border:   rgba(255, 255, 255, 0.05);
    --soon-label:      #334155;

    /* Icon buttons */
    --icon-btn-bg:     rgba(255, 255, 255, 0.05);
    --icon-btn-text:   #94A3B8;

    /* Delivery chip */
    --delivery-bg:     rgba(255, 255, 255, 0.04);
    --delivery-text:   #94A3B8;
    --delivery-border: rgba(51, 65, 85, 0.50);
}

/* ─────────────────────────────────────────────
   RESET & BASE
   ───────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    padding-bottom: calc(6.5rem + env(safe-area-inset-bottom));
}

.hidden { display: none !important; }
a { text-decoration: none; color: inherit; }

/* ─────────────────────────────────────────────
   HEADER
   ───────────────────────────────────────────── */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg);
    padding: 8px 20px 12px;
    transition: background-color 0.3s ease;
}

@supports (backdrop-filter: blur(16px)) {
    .app-header {
        background: color-mix(in srgb, var(--bg) 88%, transparent);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    min-height: 48px;
}

.header-left  { display: flex; align-items: center; flex-shrink: 0; min-width: 90px; }

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    overflow: hidden;
}

.location { display: flex; align-items: center; gap: 5px; min-width: 0; max-width: 100%; }
.location__icon { color: var(--accent); flex-shrink: 0; }
/* Wrapper: icon dan keyin qolgan joy, ikonni ustiga chiqib ketmaydi */
.location__text-wrap { flex: 1; min-width: 0; overflow: hidden; }
.location__text {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
    white-space: nowrap;
}
/* Location matn sig'masa wrapper ichida aylanib chiqadi */
.location--scrolling .location__text {
    animation: locTextScroll 8s ease-in-out infinite;
}
@keyframes locTextScroll {
    0%, 15%  { transform: translateX(0); }
    70%, 85% { transform: translateX(calc(-1 * var(--loc-excess, 60px))); }
    100%     { transform: translateX(0); }
}

.header-brand-logo {
    height: 60px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    display: block;
}

.header-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-shrink: 0;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--border);
    background: var(--icon-btn-bg);
    border-radius: 12px;
    color: var(--icon-btn-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: background 0.2s, transform 0.15s;
}
.header-icon-btn:active { transform: scale(0.93); }

.bell-dot {
    position: absolute;
    top: 9px; right: 9px;
    width: 7px; height: 7px;
    background: #EF4444;
    border-radius: 50%;
    border: 2px solid var(--icon-btn-bg);
}

/* ─────────────────────────────────────────────
   CATALOG (all-stores list tab)
   ───────────────────────────────────────────── */
.catalog-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 2rem;
}

.catalog-list-item {
    display: flex;
    align-items: center;
    background: var(--bg-surface);
    border: 1px solid var(--border-card);
    border-radius: 18px;
    padding: 10px 12px 10px 10px;
    color: var(--text);
    transition: transform 0.15s, box-shadow 0.15s;
    gap: 0;
    overflow: hidden;
}
.catalog-list-item:active { transform: scale(0.97); }
.catalog-list-item:hover { box-shadow: var(--card-shadow-hover); }

/* Logo wrapper — rasm to'liq, to'ldirilgan holda */
.catalog-list-item__logo-wrap {
    width: 80px;
    height: 80px;
    border-radius: 14px;
    overflow: hidden;
    background: var(--bg-elevated);
    flex-shrink: 0;
    margin-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.catalog-list-item__logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.catalog-list-item__logo-wrap .no-icon-inner {
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Eski img/no-icon — orqaga moslik uchun */
.catalog-list-item > img {
    width: 80px; height: 80px;
    object-fit: contain;
    margin-right: 14px;
    background: var(--bg-elevated);
    border-radius: 14px;
    flex-shrink: 0;
}
.catalog-list-item > .no-icon {
    width: 80px; height: 80px;
    margin-right: 14px;
    background: var(--bg-elevated);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.catalog-list-item-info { flex: 1; min-width: 0; }
.catalog-list-item-text {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.catalog-list-item-loc {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--accent);
    opacity: 0.85;
    margin-top: 4px;
    line-height: 1.45;
    white-space: normal;
}
.catalog-list-item-icon { color: var(--text-muted); display: flex; align-items: center; flex-shrink: 0; margin-left: 8px; }

/* ─────────────────────────────────────────────
   SEARCH BAR — integrated, inner-shadow
   ───────────────────────────────────────────── */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--search-bg);
    border-radius: 14px;
    padding: 0 16px;
    height: 46px;
    border: 1.5px solid var(--border);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-bar:focus-within {
    border-color: var(--accent);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06), 0 0 0 3px var(--accent-glow);
}

.search-bar__icon { color: var(--search-text); flex-shrink: 0; }

.search-bar__input {
    flex: 1; min-width: 0;
    border: none; outline: none;
    background: transparent;
    font-size: 0.9rem;
    color: var(--text);
    font-family: inherit;
    font-weight: 500;
}
.search-bar__input::placeholder { color: var(--search-text); font-weight: 400; }

/* ─────────────────────────────────────────────
   MAIN CONTENT
   ───────────────────────────────────────────── */
.main-content { padding: 8px 16px 2rem; }

/* ─────────────────────────────────────────────
   SECTION HEADER
   ───────────────────────────────────────────── */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

/* text-xl + font-bold — Visual hierarchy rule */
.section-title {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    color: var(--text);
}

.section-count {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
}

.section-header--center {
    justify-content: center;
    margin-top: 24px;
    margin-bottom: 16px;
    position: relative;
}
.section-header--center::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 50%;
    height: 1px;
    background: var(--border);
    z-index: 1;
}
.section-label {
    background: var(--bg);
    padding: 0 12px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--soon-label);
    text-transform: uppercase;
    z-index: 2;
    position: relative;
}

/* ─────────────────────────────────────────────
   STORE CARD — 24px radius, 8px internal grid
   ───────────────────────────────────────────── */
.store-card {
    display: block;
    background: var(--bg-surface);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin-bottom: 16px;
    border: 1px solid var(--border-card);
    transition: transform 0.2s ease;
    content-visibility: auto;
    contain-intrinsic-size: 0 280px;
}

/* Dark mode — 0.5px-feel border via semi-transparent #334155 */
[data-theme="dark"] .store-card {
    border: 1px solid rgba(51, 65, 85, 0.55);
}

.store-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow-hover);
}
.store-card:active { transform: scale(0.98); }

/* --- Banner --- */
.store-card__banner {
    height: 176px;
    position: relative;
    overflow: hidden;
}

.store-card__banner-img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}
.store-card:hover .store-card__banner-img { transform: scale(1.04); }

.store-card__banner-default {
    width: 100%; height: 100%;
    background: var(--banner-gradient);
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden;
}
.store-card__banner-default::before {
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.10) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    opacity: 0.55;
}

.store-card__cart-icon {
    color: rgba(255,255,255,0.88);
    filter: drop-shadow(0 4px 16px rgba(0,0,0,0.25));
}

/* --- Status Badge --- */
.store-card__badge {
    position: absolute;
    top: 12px; left: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 20px;
    display: flex; align-items: center; gap: 5px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    letter-spacing: 0.1px;
}
.store-card__badge--open  { background: var(--badge-open-bg); color: var(--badge-open-text); }
.store-card__badge--closed { background: rgba(239, 68, 68, 0.88); color: #ffffff; }

.badge-dot {
    width: 5px; height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.88);
    animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 0.6; transform: scale(1); }
    50%       { opacity: 1;   transform: scale(1.35); }
}

/* --- Rating --- */
.store-card__rating {
    position: absolute;
    top: 12px; right: 12px;
    background: var(--rating-bg);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 5px 9px;
    border-radius: 10px;
    display: flex; align-items: center; gap: 4px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.store-card__rating svg { color: var(--rating-star); }

/* --- Info — 16px padding on all sides --- */
.store-card__info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 16px 8px;
    gap: 12px;
}
.store-card__info-left { flex: 1; min-width: 0; }

/* text-xl + font-bold — Visual hierarchy */
.store-card__name {
    font-size: 1.1rem;          /* ~text-lg, readable on all widths */
    font-weight: 700;           /* font-bold */
    margin-bottom: 3px;
    color: var(--text);
    letter-spacing: -0.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.store-card__name--muted { color: var(--text-muted); }

/* Do'kon manzili: Shahar › Tuman › Joy (to'liq ko'rinishi) */
.store-card__loc {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--accent);
    opacity: 0.82;
    margin: 0 0 3px;
    white-space: normal;
    overflow: visible;
    line-height: 1.45;
}

/* font-medium, Slate-500/400 — secondary hierarchy */
.store-card__category {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
}

/* Delivery time chip */
.store-card__delivery {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--delivery-text);
    white-space: nowrap;
    flex-shrink: 0;
    background: var(--delivery-bg);
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--delivery-border);
}

/* --- Tags --- */
.store-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 16px;    /* 16px minimum from edge */
}
.tag {
    font-size: 0.72rem;
    font-weight: 600;            /* font-medium per spec */
    padding: 5px 10px;
    border-radius: 8px;
    background: var(--tag-bg);
    color: var(--tag-text);
    border: 1px solid var(--tag-border);
}

/* ─────────────────────────────────────────────
   LOCKED CARD (Coming Soon)
   ───────────────────────────────────────────── */
.store-card--locked {
    opacity: 0.62;
    pointer-events: none;
    background: var(--bg);
    border: 1px solid var(--locked-border);
    box-shadow: none;
}
.store-card__banner--locked {
    background: var(--locked-bg);
    border-bottom: 1px solid var(--locked-border);
    height: 120px;
}
.locked-overlay {
    width: 100%; height: 100%;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 8px; color: var(--text-muted);
}
.locked-icon { opacity: 0.32; }
.soon-badge {
    font-size: 0.72rem; font-weight: 700;
    padding: 5px 14px;
    border-radius: 10px;
    background: var(--icon-btn-bg);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

/* ─────────────────────────────────────────────
   EMPTY STATE
   ───────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 48px 16px;
    color: var(--text-muted);
    background: var(--bg-surface);
    border-radius: 20px;
    border: 1.5px dashed var(--border);
}
.empty-state p { font-weight: 600; font-size: 0.95rem; }

/* ─────────────────────────────────────────────
   BOTTOM NAVIGATION — Telegram-style floating pill
   Chetlardan ajralgan, yumaloq, suzuvchi panel
   ───────────────────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: calc(12px + env(safe-area-inset-bottom));
    left: 12px; right: 12px;
    z-index: 100;
    display: flex;
    background: var(--nav-bg);
    border: 1px solid var(--nav-border);
    border-radius: 28px;
    padding: 8px 6px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.14),
                0 2px 8px rgba(15, 23, 42, 0.08);
}

.bottom-nav__item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; gap: 2px;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--nav-text);
    padding: 2px 0;
    transition: color 0.2s;
    cursor: pointer;
    position: relative;
    letter-spacing: 0.1px;
}

/* Telegram-style pill highlight behind the active icon */
.bottom-nav__icon-wrapper {
    padding: 5px 16px;
    border-radius: 9999px;
    transition: background-color 0.25s ease, transform 0.15s ease;
}

.bottom-nav__item--active .bottom-nav__icon-wrapper {
    background: var(--nav-active-glow);
}

/* Tap feedback — bosilganda yumaloq highlight + kichik siqilish */
.bottom-nav__item:active .bottom-nav__icon-wrapper {
    background: var(--nav-active-glow);
    transform: scale(0.9);
}

.bottom-nav__item--active {
    color: var(--nav-active);
    font-weight: 700;
}

.bottom-nav__item--active svg {
    stroke: var(--nav-active);
    filter: drop-shadow(0 2px 6px var(--nav-active-glow));
}

[data-theme="dark"] .bottom-nav__item--active svg {
    opacity: 1;
    filter: drop-shadow(0 0 8px rgba(16, 185, 129, 0.45));
}

.bottom-nav__icon-wrapper {
    position: relative;
    display: flex; align-items: center; justify-content: center;
}

.cart-badge {
    position: absolute;
    top: -2px; right: 6px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 9px; font-weight: 800;
    border-radius: 50%;
    min-width: 16px; height: 16px;
    display: flex; align-items: center; justify-content: center;
    padding: 0 3px;
    border: 2px solid var(--nav-bg);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */
@media (max-width: 480px) {
    .app-header    { padding: 8px 16px 12px; }
    .main-content  { padding: 8px 12px 2rem; }
    .store-card__banner { height: 158px; }
    .location__text-wrap { max-width: 130px; }
}

@media (min-width: 1024px) {
    body {
        max-width: 480px;
        margin: 0 auto;
        border-left: 1px solid var(--border);
        border-right: 1px solid var(--border);
        box-shadow: 0 0 60px rgba(0,0,0,0.08);
    }
    .bottom-nav {
        max-width: 456px;
        width: calc(100% - 24px);
        left: 50%; right: auto;
        transform: translateX(-50%);
    }
    .app-header { padding-top: 16px; }
}

/* ─────────────────────────────────────────────
   UTILITY
   ───────────────────────────────────────────── */
.cat-all-icon {
    position: absolute;
    bottom: 10px; right: 10px;
    width: 32px; height: 32px;
    background: color-mix(in srgb, var(--text) 10%, transparent);
    color: var(--text);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: none; cursor: pointer;
}

/* ─────────────────────────────────────────────
   Qo'shimchalar / Souslar strip (mahsulot detali & savat)
   ───────────────────────────────────────────── */
.addon-block { margin-top: 16px; }
.addon-block-title {
    font-size: 14px; font-weight: 700; color: var(--text);
    margin: 0 0 10px 2px;
}
.addon-strip {
    display: flex; gap: 10px;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    padding: 2px 2px 8px;
    scrollbar-width: none;
}
.addon-strip::-webkit-scrollbar { display: none; }
.addon-card {
    flex: 0 0 auto; width: 138px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 8px;
    display: flex; flex-direction: column; gap: 5px;
    position: relative;
}
.addon-card-img {
    width: 100%; height: 112px;
    object-fit: cover; border-radius: 10px;
    background: color-mix(in srgb, var(--text) 6%, transparent);
}
.addon-card-name {
    font-size: 11.5px; font-weight: 600; color: var(--text);
    line-height: 1.25; min-height: 28px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.addon-card-price { font-size: 12px; font-weight: 800; color: var(--accent); }

/* Pastdagi keng harakat maydoni: "Qo'shish" tugmasi yoki −N+ stepper */
.addon-card-action { margin-top: auto; }
.addon-add-btn {
    width: 100%; height: 32px;
    border-radius: 10px;
    background: var(--accent); color: #fff;
    border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 4px;
    font-size: 12px; font-weight: 700;
    box-shadow: 0 3px 10px var(--accent-glow);
    transition: transform .12s;
}
.addon-add-btn:active { transform: scale(.95); }
.addon-add-btn.hidden { display: none; }

.addon-qty-ctrl {
    width: 100%; height: 32px;
    display: none; align-items: center; justify-content: space-between;
    background: var(--accent-light);
    border: 1px solid var(--accent);
    border-radius: 10px; overflow: hidden;
}
.addon-qty-ctrl.active { display: flex; }
.addon-qty-btn {
    width: 36px; height: 100%;
    border: none; background: transparent;
    color: var(--accent); font-size: 19px; font-weight: 800;
    line-height: 1; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.addon-qty-btn:active { background: var(--accent-light); }
.addon-qty-val {
    flex: 1; text-align: center;
    font-size: 13px; font-weight: 800; color: var(--text);
}

/* =============================================================
   PRODUCT DETAIL DRAWER — unified premium bottom-sheet
   "Large image + gradient" — shared across store_detail,
   favorites, category & search pages.
   ============================================================= */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 6, 23, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}
.drawer-overlay.active { opacity: 1; visibility: visible; }

.product-drawer {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-radius: 28px 28px 0 0;
    z-index: 1001;
    max-height: 94vh;
    overflow-y: auto;
    overflow-x: hidden;
    transition: bottom 0.46s cubic-bezier(0.32, 0.72, 0, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 0 -24px 70px rgba(0, 0, 0, 0.28);
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.product-drawer::-webkit-scrollbar { display: none; }
.product-drawer.active { bottom: 0; }

/* --- Hero image --- */
.drawer-img-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: var(--bg-elevated, var(--bg-surface));
    flex-shrink: 0;
}
.drawer-img-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #ffffff;
}
/* Smooth gradient blending image into the sheet body */
.drawer-img-hero::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 120px;
    background: linear-gradient(to top, var(--bg) 6%, transparent);
    pointer-events: none;
}

.drawer-handle {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 5px;
    background: rgba(255, 255, 255, 0.65);
    border-radius: 10px;
    z-index: 1004;
    backdrop-filter: blur(2px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.drawer-header-btns {
    position: absolute;
    top: 16px;
    left: 14px;
    right: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1003;
}
.drawer-circular-btn {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.16);
    color: #0f172a;
    transition: transform 0.15s ease, background 0.2s ease;
}
.drawer-circular-btn:active { transform: scale(0.88); }
[data-theme="dark"] .drawer-circular-btn {
    background: rgba(28, 28, 32, 0.82);
    color: #fff;
}
#favBtnModal.faved { background: #fff0f0; }
[data-theme="dark"] #favBtnModal.faved { background: #3a1a1a; }

/* Discount chip floating on the hero */
.drawer-hero-badge {
    position: absolute;
    top: 68px;
    left: 16px;
    background: #ef4444;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: -0.2px;
    padding: 5px 11px;
    border-radius: 10px;
    z-index: 1003;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.4);
}

/* --- Content --- */
.drawer-content { padding: 6px 20px 8px; }

.drawer-title {
    font-size: 24px;
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -0.6px;
    color: var(--text);
    margin: 0 0 8px;
}
.drawer-price-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}
.drawer-price-main {
    font-size: 28px;
    font-weight: 900;
    color: var(--text);
    letter-spacing: -1px;
    line-height: 1;
}
.drawer-price-old {
    font-size: 16px;
    color: var(--text-muted);
    text-decoration: line-through;
}
.drawer-save-badge {
    font-size: 12px;
    font-weight: 800;
    color: var(--tag-text, var(--accent));
    background: var(--tag-bg, var(--accent-light));
    border: 1px solid var(--tag-border, transparent);
    padding: 4px 9px;
    border-radius: 8px;
}

.drawer-desc {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0 0 18px;
    line-height: 1.6;
}
.drawer-desc:empty { display: none; }

.drawer-divider {
    height: 1px;
    background: var(--border);
    margin: 0 -20px 18px;
}

/* Attribute chips — "Brend · 2kg · 12 dona" */
.drawer-attr-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}
.drawer-attr-chips:empty { display: none; margin: 0; }
.drawer-attr-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-elevated, var(--bg-surface));
    border: 1px solid var(--border);
    padding: 7px 12px;
    border-radius: 10px;
}
.drawer-attr-chip b { color: var(--text); font-weight: 700; }
.drawer-attr-chip.is-new {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
}

/* Variant / option groups */
.opt-group {
    margin-bottom: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.opt-group-title {
    flex: 0 0 100%;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 2px;
}
.opt-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    flex: 0 1 auto;
    transition: border-color 0.15s, background 0.15s;
}
.opt-item:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-light);
}
.opt-item input { accent-color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.opt-item span { font-size: 14px; color: var(--text); white-space: nowrap; }

/* Pullik hisoblash — summa kiritib olish */
.price-entry-block {
    margin-bottom: 20px;
    padding: 14px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: var(--bg-elevated, var(--bg-surface));
}
.price-entry-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}
.price-entry-hint {
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}
.price-entry-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.price-entry-input {
    flex: 1;
    min-width: 0;
    padding: 11px 12px;
    border: 1.5px solid var(--border);
    border-radius: 12px;
    background: var(--bg-surface);
    color: var(--text);
    font-size: 16px;
    font-weight: 700;
    font-family: inherit;
    outline: none;
}
.price-entry-input:focus { border-color: var(--accent); }
.price-entry-currency {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    flex-shrink: 0;
}
.price-entry-add-btn {
    flex-shrink: 0;
    padding: 11px 16px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s;
}
.price-entry-add-btn:disabled { opacity: 0.4; cursor: default; }
.price-entry-result {
    margin-top: 8px;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--accent);
    min-height: 18px;
}
.price-entry-result:empty { display: none; }
.price-entry-result.warn { color: #ef4444; }

/* --- Sticky footer --- */
.drawer-footer {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 20px calc(18px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    z-index: 1003;
}
.footer-price-block { display: flex; flex-direction: column; }
.footer-price-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.footer-price {
    font-size: 26px;
    font-weight: 900;
    letter-spacing: -1px;
    color: var(--text);
    line-height: 1;
}
.add-to-cart-btn {
    flex: 1;
    max-width: 62%;
    background: #FFD600;
    color: #111;
    border: none;
    height: 54px;
    padding: 0 24px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.12s, box-shadow 0.12s, filter 0.12s;
    box-shadow: 0 6px 20px rgba(255, 214, 0, 0.4);
    white-space: nowrap;
}
.add-to-cart-btn:active { transform: scale(0.96); box-shadow: 0 2px 8px rgba(255, 214, 0, 0.25); }
.qty-controls {
    display: flex;
    align-items: center;
    background: #FFD600;
    border-radius: 16px;
    height: 54px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 6px 20px rgba(255, 214, 0, 0.4);
}
.qty-btn {
    width: 54px;
    height: 54px;
    border: none;
    background: transparent;
    color: #111;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.1s;
}
.qty-btn:active { background: rgba(0, 0, 0, 0.08); }
.qty-value {
    font-size: 19px;
    font-weight: 800;
    min-width: 42px;
    text-align: center;
    color: #111;
}
