/* IDEAS CONCEPT STORE — Telegram Mini App */

:root {
  --bg:        #f2f3f5;
  --surface:   #ffffff;
  --surface-2: #f7f7f9;
  --text:      #14161a;
  --text-2:    #6b7280;
  --text-3:    #9ca3af;
  --line:      #e8e9ed;
  --brand:     #5b4be8;
  --brand-ink: #ffffff;
  --brand-soft:#ece9ff;
  --danger:    #e8453c;
  --success:   #12a150;
  --radius:    16px;
  --radius-sm: 12px;
  --shadow:    0 1px 2px rgba(16,18,24,.06), 0 8px 24px rgba(16,18,24,.05);
  --tabbar-h:  62px;
  --safe-b:    env(safe-area-inset-bottom, 0px);
}

body.dark {
  --bg:        #0f1115;
  --surface:   #181b21;
  --surface-2: #21252d;
  --text:      #f2f3f5;
  --text-2:    #9aa1ad;
  --text-3:    #6b7280;
  --line:      #262b33;
  --brand:     #7b6cf6;
  --brand-soft:#241f52;
  --shadow:    0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.3);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

/* hidden atributi har doim display ni yengsin */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
  overscroll-behavior-y: none;
}

svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9;
      stroke-linecap: round; stroke-linejoin: round; }

button, .tab, .btn, .add-btn, .pill, .opt, .cat-chip, .row {
  -webkit-user-select: none; user-select: none;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

/* ─────────── Yuqori panel ─────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.icon-btn {
  display: grid; place-items: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--text); flex: none;
}
.icon-btn:active { background: var(--surface-2); }

.search {
  flex: 1; display: flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px;
  background: var(--surface-2); border-radius: 12px;
}
.search-ico { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.search input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px;
}
.search input::-webkit-search-cancel-button { display: none; }
.clear-btn { color: var(--text-3); display: grid; place-items: center; }
.clear-btn svg { width: 16px; height: 16px; }

/* ─────────── Pastki navigatsiya ─────────── */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--surface);
  border-top: 1px solid var(--line);
}
.tab {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 3px;
  font-size: 10px; color: var(--text-3); font-weight: 500;
}
.tab.active { color: var(--brand); }
.tab svg { width: 23px; height: 23px; }
.badge-wrap { position: relative; display: block; }
.badge {
  position: absolute; top: -5px; right: -9px;
  min-width: 17px; height: 17px; padding: 0 5px;
  display: grid; place-items: center;
  background: var(--danger); color: #fff;
  font-size: 10px; font-style: normal; font-weight: 700;
  border-radius: 9px;
}

/* ─────────── Umumiy bloklar ─────────── */
.section { padding: 14px 12px 4px; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 10px;
}
h1 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
h2 { font-size: 17px; font-weight: 700; margin: 0; letter-spacing: -.2px; }
.link { color: var(--brand); font-size: 13px; font-weight: 600; }

.hero {
  margin: 12px;
  padding: 20px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #5b4be8, #8b5cf6 60%, #a855f7);
  color: #fff;
}
.hero h1 { font-size: 19px; letter-spacing: .4px; }
.hero p { margin: 6px 0 0; font-size: 13px; opacity: .9; }

/* ─────────── Kategoriya doiralari (bosh sahifa) ─────────── */
.cat-scroll {
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(2, auto);
  gap: 14px 10px; overflow-x: auto; padding: 4px 12px 14px;
  scroll-snap-type: x proximity; scrollbar-width: none;
  touch-action: pan-x pan-y; overscroll-behavior-x: contain;
}
.cat-scroll::-webkit-scrollbar { display: none; }
.cat-chip { width: 68px; text-align: center; scroll-snap-align: start; }
.cat-chip .ico {
  width: 60px; height: 60px; margin: 0 auto 6px;
  display: grid; place-items: center; font-size: 26px;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow);
}
.cat-chip span { font-size: 11px; color: var(--text-2); line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ─────────── Mahsulot to'ri ─────────── */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 10px; padding: 0 12px 20px;
}
.card {
  background: var(--surface); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); position: relative;
  display: flex; flex-direction: column;
}
.card:active { transform: scale(.985); }
.card .thumb {
  position: relative; aspect-ratio: 3 / 4; background: var(--surface-2);
  display: grid; place-items: center; overflow: hidden;
}
.card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.card .thumb .ph { font-size: 34px; opacity: .35; }
.card .body { padding: 8px 10px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card .name {
  font-size: 13px; color: var(--text); line-height: 1.3; min-height: 34px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.price { font-size: 15px; font-weight: 700; letter-spacing: -.2px; }
.old-price { font-size: 12px; color: var(--text-3); text-decoration: line-through; }
.discount {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 8px;
}
.fav-btn {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.85); color: #6b7280; backdrop-filter: blur(6px);
}
body.dark .fav-btn { background: rgba(24,27,33,.8); }
.fav-btn.on { color: var(--danger); }
.fav-btn.on svg { fill: var(--danger); }
.fav-btn svg { width: 18px; height: 18px; }

.add-btn {
  margin-top: auto; height: 34px; border-radius: 10px;
  background: var(--brand-soft); color: var(--brand);
  font-size: 13px; font-weight: 600;
  display: grid; place-items: center;
}
.add-btn:active { opacity: .7; }
.add-btn.in-cart { background: var(--brand); color: var(--brand-ink); }

/* ─────────── Katalog ro'yxati ─────────── */
.list { padding: 8px 12px 20px; display: flex; flex-direction: column; gap: 8px; }
.row {
  display: flex; align-items: center; gap: 12px;
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 13px 14px; box-shadow: var(--shadow);
}
.row:active { background: var(--surface-2); }
.row .emoji { font-size: 22px; width: 30px; text-align: center; flex: none; }
.row .t { flex: 1; min-width: 0; }
.row .t b { display: block; font-size: 14.5px; font-weight: 600; }
.row .t small { color: var(--text-3); font-size: 12px; }
.row .chev { color: var(--text-3); flex: none; }
.row .chev svg { width: 18px; height: 18px; }

/* ─────────── Mahsulot sahifasi ─────────── */
.gallery { position: relative; background: var(--surface); }
.gallery .slides {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  /* Yon tomonga ham, pastga ham surish mumkin bo'lsin — brauzer
     barmoq yo'nalishiga qarab o'zi tanlaydi. Ilovaning pastga
     sudralishini Telegram tomonida disableVerticalSwipes to'sadi. */
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
}
.gallery .slides::-webkit-scrollbar { display: none; }
/* Har bir kadr qat'iy 3:4 — rasmdan videoga o'tganda balandlik o'zgarmasin,
   sahifa tepaga-pastga sakramasin. */
.gallery .slides > * {
  flex: 0 0 100%; aspect-ratio: 3 / 4; scroll-snap-align: center;
  position: relative; overflow: hidden; background: var(--surface-2);
  display: grid; place-items: center;
}
/* Media kadr o'lchamiga ta'sir qilmasin — shuning uchun absolyut joylashadi.
   contain: rasm ham, video ham kesilmay, butun holicha ko'rinadi. */
.gallery img,
.gallery video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: contain;
}
.gallery video { background: #000; }
.gallery .ph { position: relative; }

/* Ro'yxatdagi kartochkada «video bor» belgisi */
.video-badge {
  position: absolute; bottom: 8px; left: 8px; z-index: 2;
  width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(20,22,26,.65); color: #fff;
  font-size: 11px; padding-left: 2px; backdrop-filter: blur(4px);
}
.gallery .ph { font-size: 64px; opacity: .3; }
.dots { position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(0,0,0,.2); }
.dots i.on { background: var(--brand); width: 16px; border-radius: 3px; }

.p-info { background: var(--surface); padding: 16px 14px 20px; margin-bottom: 10px; }
.p-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.p-price .price { font-size: 24px; }
.p-title { font-size: 16px; font-weight: 600; line-height: 1.35; margin: 0 0 8px; }
.p-meta { display: flex; gap: 14px; color: var(--text-3); font-size: 12.5px; }
.p-desc { background: var(--surface); padding: 16px 14px; margin-bottom: 10px; }
.p-desc h2 { margin-bottom: 8px; }
.p-desc p { margin: 0; color: var(--text-2); font-size: 14px; white-space: pre-wrap; }
.p-desc .desc-var { color: var(--text); font-weight: 500; margin-bottom: 10px; }

.sticky-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b));
  z-index: 55; display: flex; gap: 10px; align-items: center;
  padding: 10px 12px;
  background: var(--surface); border-top: 1px solid var(--line);
}

.btn {
  flex: 1; height: 48px; border-radius: 12px;
  background: var(--brand); color: var(--brand-ink);
  font-size: 15px; font-weight: 600;
  display: grid; place-items: center;
}
.btn:active { opacity: .85; }
.btn[disabled] { opacity: .45; }
.btn.ghost { background: var(--surface-2); color: var(--text); }

/* ─────────── Sotuvga yordam beruvchi bloklar ─────────── */

/* Reyting yulduzchalari */
.stars { color: #f5a623; font-size: 14px; letter-spacing: 1px; white-space: nowrap; }
.stars.sm { font-size: 12px; }
.stars b { color: var(--text); font-weight: 600; margin-left: 4px; letter-spacing: 0; }
.stars i { color: var(--text-3); font-style: normal; font-size: .92em; letter-spacing: 0; }
.rating-link { display: inline-block; margin-bottom: 8px; }
.social-line { font-size: 13px; color: var(--brand); font-weight: 500; margin: 2px 0 8px; }

/* Tejash — foizdan kuchliroq ishlaydi */
.save {
  display: inline-block; margin-bottom: 6px;
  background: #e9f7ef; color: var(--success);
  font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px;
}
body.dark .save { background: #10331f; }
.till {
  display: inline-block; margin-left: 6px; margin-bottom: 6px;
  background: #fff4e5; color: #b45309;
  font-size: 12.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px;
}
body.dark .till { background: #3a2c12; color: #f5c26b; }

/* Kam qolgani — faqat haqiqatan kam bo'lganda chiqadi */
.p-meta .urgent { color: var(--danger); font-weight: 600; }

/* Yetkazish va boshqa ma'lumot qatorlari */
.info-row { display: flex; gap: 11px; align-items: flex-start; padding: 7px 0; }
.info-row .ico { font-size: 19px; width: 24px; flex: none; }
.info-row b { display: block; font-size: 14px; font-weight: 600; }
.info-row small { color: var(--text-2); font-size: 12.5px; }

/* ─────────── Aksiya banneri ─────────── */
.promo-band {
  display: flex; align-items: center; gap: 11px;
  background: linear-gradient(135deg, #fff4e0, #ffe9cc);
  color: #8a5300; border-radius: var(--radius-sm);
  padding: 12px 14px; margin: 0 12px 10px;
}
body.dark .promo-band { background: #3a2c12; color: #f5c26b; }
.promo-band.small { margin: 0; }
.promo-band .ico { font-size: 20px; flex: none; }
.promo-band b { display: block; font-size: 13.5px; font-weight: 600; }
.promo-band small { font-size: 12px; opacity: .85; }

/* ─────────── Savatga qo'shilgandan keyingi oyna ─────────── */
.sheet {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15,17,21,.45);
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity .2s;
}
.sheet.show { opacity: 1; pointer-events: auto; }
.sheet-card {
  width: 100%; background: var(--surface);
  border-radius: 20px 20px 0 0; padding: 16px 14px;
  padding-bottom: calc(16px + var(--safe-b));
  transform: translateY(14px); transition: transform .25s;
  max-height: 82vh; overflow-y: auto;
}
.sheet.show .sheet-card { transform: translateY(0); }
.sheet-top { display: flex; align-items: center; gap: 11px; margin-bottom: 14px; }
.sheet-top .ok {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  background: var(--success); color: #fff;
  display: grid; place-items: center; font-size: 16px; font-weight: 700;
}
.sheet-top .t { flex: 1; min-width: 0; }
.sheet-top .t b { display: block; font-size: 15px; font-weight: 600; }
.sheet-top .t small { color: var(--text-2); font-size: 12.5px; }
.sheet-top .x { color: var(--text-3); font-size: 17px; padding: 4px 6px; }
.rec-title { font-size: 13px; font-weight: 600; color: var(--text-2);
  margin-bottom: 9px; }
.rec-row { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: none; }
.rec-row::-webkit-scrollbar { display: none; }
.rec { width: 104px; flex: none; }
.rec .thumb {
  display: grid; place-items: center; aspect-ratio: 3/4; overflow: hidden;
  background: var(--surface-2); border-radius: 10px; margin-bottom: 6px;
}
.rec .thumb img { width: 100%; height: 100%; object-fit: cover; }
.rec .nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; font-size: 12px; line-height: 1.3; color: var(--text-2); }
.rec .pr { display: block; font-size: 13px; font-weight: 700; margin-top: 2px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 16px; }
.sheet-actions .btn { height: 46px; font-size: 14px; }

/* Asosiy tugma: sahifadagi eng to'yingan rang faqat shu yerda.
   Bir marta yorug'lik yuguradi — ko'zni tortadi, lekin miltillamaydi. */
.sticky-bar { box-shadow: 0 -6px 18px rgba(16,18,24,.06); }
body.dark .sticky-bar { box-shadow: 0 -6px 18px rgba(0,0,0,.35); }
.sticky-bar .btn-buy { height: 54px; position: relative; overflow: hidden; }
.btn-buy::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent);
  transform: translateX(-160%);
  animation: shine 1.1s ease-out .45s 1;
}
@keyframes shine { to { transform: translateX(320%); } }
@media (prefers-reduced-motion: reduce) { .btn-buy::after { display: none; } }

/* Savol berish qatori */
.ask-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 4px 0; text-align: left;
}
.ask-row .ico { font-size: 21px; width: 26px; flex: none; }
.ask-row .t { flex: 1; min-width: 0; }
.ask-row .t b { display: block; font-size: 14.5px; font-weight: 600; }
.ask-row .t small { color: var(--text-2); font-size: 12.5px; }
.ask-row .chev { color: var(--text-3); flex: none; }
.ask-row .chev svg { width: 18px; height: 18px; }
.ask-row:active { opacity: .6; }

/* Sotib olish tugmasi — narx tugmaning ichida */
.btn-buy { flex-direction: column; gap: 1px; line-height: 1.15; }
.btn-buy span { font-size: 14px; font-weight: 600; }
.btn-buy b { font-size: 12.5px; font-weight: 500; opacity: .85; }

/* Bepul yetkazishgacha qolgan summa */
.free-ship {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 12px 14px; box-shadow: var(--shadow); font-size: 13.5px;
}
.free-ship.done { color: var(--success); font-weight: 600; }
.free-ship i { display: block; height: 6px; border-radius: 3px;
  background: var(--surface-2); margin-top: 9px; overflow: hidden; }
.free-ship i b { display: block; height: 100%; background: var(--success);
  border-radius: 3px; transition: width .3s; }

/* Sharhlar */
.rating-box { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.big-rate { text-align: center; flex: none; }
.big-rate b { display: block; font-size: 30px; font-weight: 700; line-height: 1.1; }
.big-rate small { display: block; font-size: 11px; margin-top: 3px; }
.bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.bar-row { display: flex; align-items: center; gap: 7px; font-size: 11px;
  color: var(--text-2); }
.bar-row i { flex: 1; height: 5px; border-radius: 3px; background: var(--surface-2);
  overflow: hidden; }
.bar-row i b { display: block; height: 100%; background: #f5a623; border-radius: 3px; }
.reviews { display: flex; flex-direction: column; gap: 14px; }
.review { border-top: 1px solid var(--line); padding-top: 12px; }
.review .head { display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 4px; }
.review .head b { font-size: 13.5px; font-weight: 600; }
.review p { margin: 5px 0; font-size: 14px; color: var(--text-2); }
.muted-note { color: var(--text-3); font-size: 13.5px; margin: 0; }
.muted { color: var(--text-3); }

/* ─────────── Rang tanlash ─────────── */
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch {
  width: 62px; height: 62px; padding: 0; flex: none;
  border-radius: 12px; overflow: hidden; position: relative;
  background: var(--surface-2); display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--line) inset;
}
.swatch img { width: 100%; height: 100%; object-fit: cover; display: block; }
.swatch .ph { font-size: 22px; opacity: .4; }
.swatch.on { box-shadow: 0 0 0 2.5px var(--brand) inset, 0 0 0 2px var(--brand); }
/* O'lcham kabi rasmsiz variantlar — matnli tugma */
.swatch.text {
  width: auto; height: 42px; padding: 0 16px; border-radius: 10px;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  background: var(--surface); box-shadow: 0 0 0 1.5px var(--line) inset;
}
.swatch.text.on { color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 0 0 2px var(--brand) inset; }
.swatch.out { opacity: .45; }
.swatch.out::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top right, transparent 47%,
              var(--text-3) 47%, var(--text-3) 53%, transparent 53%);
}
.muted-label { color: var(--text-2); font-weight: 500; font-size: 14px; }
.variant-tag {
  display: inline-block; align-self: flex-start;
  font-size: 11.5px; color: var(--text-2); background: var(--surface-2);
  padding: 2px 8px; border-radius: 6px; margin-bottom: 4px;
}

/* ─────────── Savat ─────────── */
.cart-item {
  display: flex; gap: 12px; background: var(--surface);
  border-radius: var(--radius-sm); padding: 10px; box-shadow: var(--shadow);
}
.cart-item .thumb {
  width: 76px; height: 76px; border-radius: 10px; overflow: hidden;
  background: var(--surface-2); display: grid; place-items: center; flex: none;
}
.cart-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item .t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cart-item .nm {
  font-size: 13.5px; line-height: 1.3; margin-bottom: 4px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.cart-item .bottom { margin-top: auto; display: flex; align-items: center;
  justify-content: space-between; }
.stepper {
  display: flex; align-items: center; gap: 2px;
  background: var(--surface-2); border-radius: 9px; padding: 2px;
}
.stepper button { width: 30px; height: 28px; display: grid; place-items: center;
  border-radius: 7px; font-size: 17px; font-weight: 600; color: var(--brand); }
.stepper button:active { background: var(--surface); }
.stepper span { min-width: 26px; text-align: center; font-size: 14px; font-weight: 600; }

.summary {
  background: var(--surface); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px;
}
.summary .line { display: flex; justify-content: space-between; font-size: 14px;
  color: var(--text-2); }
.summary .line.total { font-size: 17px; font-weight: 700; color: var(--text);
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: 2px; }

/* ─────────── Forma ─────────── */
.form { padding: 12px; display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--text-2); padding-left: 2px; }
.field input, .field textarea, .field select {
  height: 46px; padding: 0 14px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); outline: 0;
  font-size: 15px;
}
.field textarea { height: 84px; padding: 12px 14px; resize: none; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--brand); }
.field .hint { font-size: 12px; color: var(--text-3); padding-left: 2px;
  line-height: 1.4; margin-top: 2px; }
.form .btn { margin-top: 4px; }

.opt {
  display: flex; align-items: flex-start; gap: 11px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: 12px; padding: 12px 14px;
}
.opt.on { border-color: var(--brand); background: var(--brand-soft); }
.opt .mark {
  width: 19px; height: 19px; border-radius: 50%; flex: none; margin-top: 1px;
  border: 2px solid var(--text-3); display: grid; place-items: center;
}
.opt.on .mark { border-color: var(--brand); }
.opt.on .mark::after { content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); }
.opt .t { flex: 1; min-width: 0; }
.opt .t b { display: block; font-size: 14px; font-weight: 600; }
.opt .t small { color: var(--text-2); font-size: 12.5px; }
.opt .pr { font-size: 13px; font-weight: 600; color: var(--brand); white-space: nowrap; }

/* ─────────── Buyurtmalar ─────────── */
.order {
  background: var(--surface); border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px;
}
.order .head { display: flex; justify-content: space-between; align-items: center; }
.order .no { font-weight: 700; font-size: 14px; }
.status { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 8px;
  background: var(--surface-2); color: var(--text-2); }
.status.new { background: #fff4e5; color: #b45309; }
.status.confirmed { background: var(--brand-soft); color: var(--brand); }
.status.shipped { background: #e0f2fe; color: #0369a1; }
.status.delivered { background: #dcfce7; color: var(--success); }
.status.cancelled { background: #fee2e2; color: var(--danger); }
.order .mini { display: flex; gap: 6px; }
.order .mini img, .order .mini .ph {
  width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
  background: var(--surface-2); display: grid; place-items: center; font-size: 18px;
}

/* ─────────── Holatlar ─────────── */
.empty { padding: 70px 30px; text-align: center; color: var(--text-3); }
.empty .big { font-size: 52px; margin-bottom: 12px; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 6px; }
.empty p { margin: 0 0 18px; font-size: 14px; }
.empty .btn { display: inline-grid; padding: 0 26px; flex: none; }

.skeleton { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.sk-thumb { aspect-ratio: 3 / 4; background: var(--surface-2); }
.sk-line { height: 11px; margin: 9px 10px; border-radius: 6px; background: var(--surface-2); }
.sk-line.short { width: 55%; }
.shimmer { animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .5 } }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + var(--safe-b) + 18px);
  transform: translate(-50%, 20px); z-index: 100;
  background: rgba(20,22,26,.94); color: #fff;
  padding: 11px 18px; border-radius: 12px; font-size: 14px; font-weight: 500;
  opacity: 0; pointer-events: none; transition: .25s; max-width: 86vw; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.sort-bar {
  display: flex; gap: 8px; padding: 10px 12px 6px; overflow-x: auto;
  scrollbar-width: none;
}
.sort-bar::-webkit-scrollbar { display: none; }
/* Ichki bo'limlar — o'ngga surmasdan hammasi ko'rinsin */
.sort-bar.wrap { flex-wrap: wrap; overflow-x: visible; row-gap: 8px; }
.pill {
  flex: none; padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 500;
  background: var(--surface); color: var(--text-2); box-shadow: var(--shadow);
}
.pill.on { background: var(--brand); color: var(--brand-ink); }

.card-color { display: block; font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* Tugagan tovar: «kelganda xabar bering» */
.sticky-bar .btn-notify { height: 54px; flex: 1; background: var(--surface-2, #eef0f4); color: var(--text);
  border: 1.5px solid var(--brand); font-weight: 600; }
.sticky-bar .btn-notify.on { background: var(--brand); color: var(--brand-ink); }

/* Sharh yozish formasi */
.rf-title { font-size: 15px; margin: 16px 0 8px; }
.review-form { display: flex; flex-direction: column; gap: 10px; padding-top: 4px; }
.review-form + .review-form { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 4px; }
.rf-head { display: flex; gap: 10px; align-items: center; }
.rf-head img { width: 44px; height: 58px; object-fit: cover; border-radius: 8px; }
.rf-head span { display: flex; flex-direction: column; font-size: 14px; }
.rf-head small { color: var(--text-2); font-size: 12px; }
.star-pick { display: flex; align-items: center; gap: 2px; }
.star-pick button { background: none; border: 0; font-size: 32px; line-height: 1; color: #d0d5dd;
  padding: 2px 3px; cursor: pointer; }
.star-pick button.on { color: #f5a623; }
.star-label { margin-left: 8px; font-size: 13px; color: var(--text-2); }
.review-form textarea { width: 100%; box-sizing: border-box; border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical;
  background: var(--surface-2); color: var(--text); }
.review-form .btn { height: 44px; }

/* Bonus */
.bonus-hint { margin-top: 10px; padding: 10px 12px; border-radius: 12px; font-size: 13px;
  background: color-mix(in srgb, var(--brand) 10%, var(--surface)); color: var(--text); }
.bonus-toggle { display: flex; gap: 12px; align-items: center; margin: 0 12px 12px; padding: 12px 14px;
  border-radius: 14px; background: var(--surface); box-shadow: var(--shadow); cursor: pointer; }
.bonus-toggle input { display: none; }
.bonus-toggle .mark { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line); flex: none;
  display: grid; place-items: center; }
.bonus-toggle input:checked + .mark { background: var(--brand); border-color: var(--brand); }
.bonus-toggle input:checked + .mark::after { content: '✓'; color: var(--brand-ink); font-size: 14px; font-weight: 700; }
.bonus-toggle .t { display: flex; flex-direction: column; font-size: 14px; }
.bonus-toggle small { color: var(--text-2); font-size: 12px; }
.bonus-card { margin: 0 12px 10px; padding: 16px 14px; border-radius: 16px; background: var(--surface);
  box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.bonus-card .bal { font-size: 15px; color: var(--text-2); }
.bonus-card .bal b { font-size: 28px; color: var(--text); font-weight: 800; margin-right: 4px; }
.bonus-card .exp { font-size: 13px; color: var(--danger); font-weight: 600; }
.bonus-card .rules { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--text-2); }
.bonus-card .rules b { color: var(--text); }
.bonus-card .rules small { margin-top: 4px; font-size: 12px; }
.btn-outline { background: transparent; border: 1.5px solid var(--brand); color: var(--brand); height: 44px; }
.bonus-hist summary { font-size: 13.5px; color: var(--brand); cursor: pointer; }
.bonus-hist .line { display: flex; justify-content: space-between; align-items: center; padding: 8px 0;
  border-top: 1px solid var(--line); font-size: 13.5px; }
.bonus-hist .line span { display: flex; flex-direction: column; }
.bonus-hist small { color: var(--text-2); font-size: 11.5px; }
.bonus-hist .plus { color: var(--success); } .bonus-hist .minus { color: var(--text-2); }
/* Sharh rasmi */
.photo-pick { display: flex; align-items: center; gap: 10px; font-size: 13px; cursor: pointer; flex-wrap: wrap; }
.ph-btn { padding: 8px 12px; border-radius: 10px; border: 1.5px dashed var(--brand); color: var(--brand); font-weight: 600; }
.photo-pick.has .ph-btn { border-style: solid; }
.review-photo img { width: 96px; height: 128px; object-fit: cover; border-radius: 10px; margin: 6px 0; display: block; }

/* Bonus cho'ntagi — kuponlar */
.coupons { display: flex; flex-direction: column; gap: 8px; margin: 0 12px 12px; }
.coupon { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--shadow); cursor: pointer; border: 1.5px solid transparent; }
.coupon.on { border-color: var(--brand); }
.coupon .mark { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); flex: none; display: grid; place-items: center; }
.coupon.on .mark { border-color: var(--brand); }
.coupon.on .mark::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }
.coupon .t { display: flex; flex-direction: column; font-size: 14px; }
.coupon small { color: var(--text-2); font-size: 12px; }
.wallet { display: flex; flex-direction: column; gap: 6px; }
.wallet .wl { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-radius: 10px;
  background: var(--surface-2); font-size: 13.5px; }
.wallet .wl span { display: flex; flex-direction: column; }
.wallet .wl small { color: var(--text-2); font-size: 11.5px; }

/* Saralash */
.sort-btn { display: inline-flex; align-items: center; gap: 6px; }
.sort-list { display: flex; flex-direction: column; margin-top: 6px; }
.sort-opt { display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 14px 6px; background: none; border: 0; border-top: 1px solid var(--line);
  font: inherit; font-size: 15px; color: var(--text); text-align: left; }
.sort-opt.on { color: var(--brand); font-weight: 600; }
.sort-opt i { font-style: normal; }
.sheet-top > b { flex: 1; font-size: 17px; }
