:root {
  --accent: #7B3FF2;
  --accent-dark: #6427DA;
  --accent-soft: #F1EBFF;
  --ink: #17142A;
  --ink-2: #4E4A60;
  --muted: #8E8A9C;
  --line: #E6E4EC;
  --bg: #FFFFFF;
  --bg-2: #F6F5F9;
  --green: #22B14C;
  --red: #E5383B;
  --orange: #E8590C;
  --gold: #C9A050;
  --radius: 18px;
  --tabbar-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; max-width: 100%; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'tnum' 1;
  overscroll-behavior-y: none;
  overflow-x: clip;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input, textarea, select { font: inherit; color: inherit; }
.hidden { display: none !important; }

/* ---------- App shell ---------- */
#app {
  width: 100%; max-width: 100%; overflow-x: clip;
  min-height: 100vh;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
}
#app.has-buybar { padding-bottom: calc(92px + var(--safe-b)); }
.view { animation: viewIn .22s ease-out; }
@keyframes viewIn { from { opacity: 0; } to { opacity: 1; } }
body.product-page .tabbar { display: none; }
.container { max-width: 1240px; margin: 0 auto; }

/* ---------- Desktop header (hidden on mobile) ---------- */
.site-header { display: none; }

/* ---------- Tab bar ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; width: 100%; max-width: 100%;
  height: calc(var(--tabbar-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--line);
}
.tab {
  min-width: 0; overflow: hidden; white-space: nowrap;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 500; color: var(--muted); position: relative;
}
.tab svg { width: 26px; height: 26px; }
.tab.active { color: var(--accent); font-weight: 600; }
.tab .badge {
  position: absolute; top: 7px; left: calc(50% + 6px);
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; border: 2px solid #fff;
}

/* ---------- Top bars ---------- */
.searchbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; gap: 10px; align-items: center;
  padding: calc(10px + var(--safe-t)) 16px 10px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.search-field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  height: 48px; padding: 0 14px; border-radius: 14px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--muted);
}
.search-field svg { width: 22px; height: 22px; flex: none; }
.search-field input { flex: 1; min-width: 0; width: 100%; -webkit-appearance: none; appearance: none; border: 0; outline: 0; background: transparent; font-size: 16px; color: var(--ink); }
.search-field input::placeholder { color: var(--muted); }
.scan-btn {
  width: 48px; height: 48px; border-radius: 14px; flex: none;
  background: var(--accent-soft); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
.scan-btn svg { width: 26px; height: 26px; }

.navbar {
  position: sticky; top: 0; z-index: 40;
  display: grid; grid-template-columns: 56px 1fr 96px; align-items: center;
  height: calc(60px + var(--safe-t)); padding: var(--safe-t) 8px 0;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.navbar h1 { margin: 0; text-align: center; font-size: 21px; font-weight: 800; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.navbar .nav-actions { display: flex; justify-content: flex-end; gap: 2px; }
.icon-btn { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 12px; position: relative; }
.icon-btn svg { width: 26px; height: 26px; }
.icon-btn:active { background: var(--bg-2); }
.icon-btn.fav-on svg { color: var(--red); fill: var(--red); }
.icon-btn .dot { position: absolute; top: 6px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

/* ---------- Home ---------- */
.hero {
  margin: 4px 16px 6px; border-radius: 22px; overflow: hidden; position: relative;
  background: radial-gradient(120% 140% at 85% 10%, #3A2A12 0%, #0B0A08 55%, #000 100%);
  color: #F6E3B4; min-height: 176px; display: flex; align-items: center;
}
.hero-text { position: relative; z-index: 2; padding: 22px 0 22px 22px; max-width: 62%; }
.hero-kicker { font-size: 11px; letter-spacing: .28em; text-transform: uppercase; color: #C9A050; font-weight: 600; }
.hero h2 { margin: 8px 0 6px; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 30px; line-height: 1.02; color: #F8E7BC; }
.hero p { margin: 0 0 14px; font-size: 13px; color: #CDBB92; }
.hero .btn-gold { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 16px; border-radius: 18px; font-weight: 700; font-size: 13px; color: #1A1206; background: linear-gradient(135deg, #F7DD95, #C9993E 60%, #F3D27F); }
.hero img { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); height: 78%; width: auto; opacity: .95; mix-blend-mode: lighten; }

.quick-cats { display: flex; gap: 14px; overflow-x: auto; padding: 14px 16px 4px; scrollbar-width: none; }
.quick-cats::-webkit-scrollbar { display: none; }
.qc { flex: none; width: 68px; text-align: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.qc-img { width: 68px; height: 68px; border-radius: 50%; overflow: hidden; margin-bottom: 6px; border: 2px solid var(--accent-soft); }
.qc-img img { width: 100%; height: 100%; object-fit: cover; }

.section { margin-top: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; padding: 0 16px; margin-bottom: 12px; }
.section-head h2 { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.section-head .sub { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 2px; letter-spacing: 0; }
.see-all { color: var(--accent); font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.see-all svg { width: 16px; height: 16px; }

.hscroll { display: flex; gap: 10px; overflow-x: auto; padding: 0 16px 6px; scroll-snap-type: x mandatory; scrollbar-width: none; scroll-padding: 0 16px; }
.hscroll::-webkit-scrollbar { display: none; }
.hscroll > * { scroll-snap-align: start; flex: none; }
.hscroll .card { width: calc((100vw - 42px) / 2); max-width: 240px; }


/* ---------- Product card ---------- */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 0 12px; }
.card {
  position: relative; border: 1.5px solid var(--line); border-radius: var(--radius);
  background: #fff; overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease;
}
.card:active { transform: scale(.98); }
.card.sale { border-color: #F5C6D3; }
.card-img { position: relative; aspect-ratio: 1 / .82; background: var(--bg-2); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.tag-brand {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  padding: 3px 7px; border-radius: 6px; background: rgba(60,60,60,.72); color: #fff;
  font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; max-width: 70%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tag-new { position: absolute; top: 8px; right: 8px; z-index: 2; padding: 3px 8px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .02em; }
.tag-kids { position: absolute; left: 8px; bottom: 8px; z-index: 2; padding: 3px 8px; border-radius: 6px; background: #F7B9A6; color: #7A2A14; font-size: 11px; font-weight: 700; }
.ribbon {
  position: absolute; top: 12px; right: -30px; z-index: 2; width: 110px; transform: rotate(45deg);
  background: var(--red); color: #fff; text-align: center; font-size: 12px; font-weight: 800; padding: 3px 0;
}
.card-body { padding: 10px 12px 12px; display: flex; flex-direction: column; flex: 1; }
.card-title { font-size: 16px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barcode { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-size: 12.5px; color: var(--muted); letter-spacing: .02em; }
.barcode svg { width: 13px; height: 13px; flex: none; }
.stock { margin-top: 5px; font-size: 13px; font-weight: 600; color: var(--green); }
.stock.low { color: var(--orange); }
.kaspi { margin-top: 3px; font-size: 13px; font-weight: 600; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.kaspi i { width: 14px; height: 14px; border-radius: 50%; background: var(--red); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 9px; }
.card-foot { margin-top: auto; padding-top: 14px; display: flex; align-items: center; gap: 6px; }
.price { font-size: 19px; font-weight: 800; color: var(--accent); white-space: nowrap; letter-spacing: -.01em; }
.price small { font-size: .72em; font-weight: 800; }
.price-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.old-price { font-size: 12px; color: var(--muted); text-decoration: line-through; font-weight: 600; }
.round-btn {
  width: 44px; height: 44px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  transition: transform .12s ease, background .15s ease;
}
.round-btn:active { transform: scale(.9); }
.round-btn svg { width: 22px; height: 22px; }
.round-btn.fav { border: 1.5px solid var(--line); color: var(--muted); background: #fff; }
.round-btn.fav.on { color: var(--red); border-color: #FBD0D3; background: #FFF0F1; }
.round-btn.fav.on svg { fill: var(--red); }
.round-btn.cart { background: var(--accent); color: #fff; }
.round-btn.cart.in { background: var(--green); }
@media (max-width: 420px) {
  .card-body { padding: 10px 10px 12px; }
  .card-foot { gap: 5px; }
  .price { font-size: 17px; }
  .round-btn { width: 38px; height: 38px; }
  .round-btn svg { width: 20px; height: 20px; }
  .card-title { font-size: 15px; }
  .barcode { font-size: 11.5px; }
}
@media (max-width: 480px) {
  .hero img { height: 70%; right: 4px; opacity: .45; }
  .hero-text { max-width: 72%; }
}
@media (max-width: 360px) {
  .searchbar, .navbar { padding-left: 12px; padding-right: 12px; }
  .search-field { height: 44px; }
  .scan-btn { width: 44px; height: 44px; }
  .grid { gap: 8px; padding: 0 8px; }
  .price { font-size: 15px; }
  .round-btn { width: 34px; height: 34px; }
  .round-btn svg { width: 18px; height: 18px; }
  .cat-card { height: 128px; border-radius: 22px; }
  .cat-text { padding-left: 16px; }
  .cat-text h3 { font-size: clamp(17px, 5.6vw, 20px); }
  .cat-text .count { font-size: 13px; }
  .hero h2 { font-size: 25px; }
  .tab { font-size: 10px; }
  .chip { height: 38px; padding: 0 14px; font-size: 13px; }
  .sort-btn { font-size: 13px; }
}


/* ---------- Catalog ---------- */
.cat-list { display: flex; flex-direction: column; gap: 14px; padding: 0 16px 16px; }
.cat-card {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 148px; border-radius: 26px; overflow: hidden;
  transition: transform .15s ease;
}
.cat-card:active { transform: scale(.985); }
.cat-text { padding: 18px 8px 18px 20px; display: flex; flex-direction: column; justify-content: center; }
.cat-text .new-badge { align-self: flex-start; background: var(--orange); color: #fff; font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 4px 9px; border-radius: 8px; margin-bottom: 8px; }
.cat-text { min-width: 0; }
.cat-text h3 { overflow-wrap: break-word; hyphens: auto; }
.cat-text h3 { margin: 0; font-size: clamp(18px, 6vw, 24px); line-height: 1.08; font-weight: 800; letter-spacing: -.02em; }
.cat-text .count { margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--ink-2); opacity: .8; }
.cat-text .look { margin-top: 6px; font-size: 13px; line-height: 1.25; font-weight: 700; color: #9A3412; }
.cat-card.kids h3 { color: #4A1D0A; }
.cat-img { position: relative; background: #fff; }
.cat-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Listing ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 16px 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; height: 42px; padding: 0 18px; border-radius: 21px; border: 1.5px solid var(--line);
  font-size: 15px; font-weight: 700; text-transform: uppercase; color: var(--ink-2); background: #fff; letter-spacing: .01em;
  transition: background .15s, color .15s, border-color .15s;
}
.chip.first { text-transform: none; }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.toolbar { display: flex; gap: 8px; padding: 12px 16px 14px; align-items: center; }
.sort-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: 12px;
  border: 1.5px solid var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 15px;
}
.sort-btn svg { width: 20px; height: 20px; }
.toolbar .found { margin-left: auto; color: var(--muted); font-size: 13px; font-weight: 500; }

.empty { text-align: center; padding: 60px 30px; color: var(--muted); }
.empty svg { width: 64px; height: 64px; color: #CFCBDA; margin-bottom: 12px; }
.empty h3 { color: var(--ink); margin: 0 0 6px; font-size: 20px; }
.empty p { margin: 0 0 18px; font-size: 15px; line-height: 1.4; }

/* ---------- Product page ---------- */
.gallery { position: relative; }
.gallery-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-track img { flex: none; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; scroll-snap-align: center; background: var(--bg-2); }
.gallery .tag-brand { top: 14px; left: 16px; font-size: 13px; padding: 4px 9px; text-transform: none; }
.dots { display: flex; justify-content: center; gap: 6px; padding: 12px 0 2px; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: #D8D4E3; transition: background .2s, width .2s; }
.dots i.on { background: var(--accent); width: 18px; border-radius: 4px; }

.pd { padding: 8px 16px 0; }
.pd h1 { margin: 6px 0 6px; font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.pd .price-big { font-size: 30px; font-weight: 800; color: var(--accent); letter-spacing: -.01em; display: flex; align-items: baseline; gap: 10px; }
.pd .price-big .old-price { font-size: 16px; }
.pd .price-big .disc { font-size: 13px; color: #fff; background: var(--red); padding: 3px 7px; border-radius: 7px; align-self: center; }
.pd .stock { font-size: 15px; margin-top: 8px; }
.pd .meta-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.pd .meta { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border-radius: 10px; background: var(--bg-2); font-size: 13px; font-weight: 600; color: var(--ink-2); }
.pd .meta svg { width: 15px; height: 15px; }
.pd h3 { font-size: 20px; font-weight: 800; margin: 24px 0 10px; letter-spacing: -.01em; }
.descr { font-size: 15px; line-height: 1.55; color: var(--ink-2); }
.descr p { margin: 0 0 12px; }
.descr ul { list-style: none; padding: 0; margin: 0 0 12px; }
.descr li { padding-left: 24px; position: relative; margin: 3px 0; }
.descr li::before { content: '✨'; position: absolute; left: 0; font-size: 13px; top: 1px; }

.accordion { margin-top: 20px; border: 1.5px solid var(--line); border-radius: 16px; overflow: hidden; }
.accordion summary { list-style: none; display: flex; justify-content: space-between; align-items: center; padding: 16px; font-size: 17px; font-weight: 700; cursor: pointer; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary svg { width: 20px; height: 20px; color: var(--muted); transition: transform .2s; }
.accordion[open] summary svg { transform: rotate(180deg); }
.specs { padding: 0 16px 10px; }
.specs div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 15px; }
.specs span:first-child { color: var(--muted); }
.specs span:last-child { font-weight: 600; text-align: right; }

.rail { margin-top: 26px; }
.rail .section-head { padding: 0 16px; margin-bottom: 10px; }
.rail .section-head h2 { font-size: 21px; }
.mini { width: 140px; cursor: pointer; }
.mini-img { position: relative; width: 140px; height: 150px; border-radius: 14px; overflow: hidden; background: var(--bg-2); }
.mini-img img { width: 100%; height: 100%; object-fit: cover; }
.mini-img .lbl { position: absolute; top: 7px; left: 7px; background: #fff; color: var(--ink); font-size: 11px; font-weight: 700; padding: 3px 7px; border-radius: 6px; }
.mini .brand-sm { margin-top: 8px; font-size: 10.5px; color: var(--muted); text-transform: uppercase; font-weight: 600; letter-spacing: .05em; }
.mini .name { font-size: 14px; font-weight: 600; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini .row { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }
.mini .price { font-size: 15px; }
.plus-btn { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.plus-btn svg { width: 18px; height: 18px; }
.plus-btn.in { background: var(--green); }
.mini.small { width: 108px; }
.mini.small .mini-img { width: 108px; height: 116px; }

.buybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px calc(12px + var(--safe-b));
  background: rgba(255,255,255,.97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.buybar .bb-price { min-width: 104px; }
.buybar .bb-price > small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.buybar .bb-price b { font-size: 22px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.btn-primary {
  flex: 1; height: 54px; border-radius: 16px; background: var(--accent); color: #fff;
  font-size: 17px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform .12s ease, background .15s;
}
.btn-primary:active { transform: scale(.98); background: var(--accent-dark); }
.btn-primary[disabled] { opacity: .5; }
.btn-primary.green { background: var(--green); }
.btn-secondary { height: 48px; padding: 0 20px; border-radius: 14px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.stepper { display: flex; align-items: center; border-radius: 16px; background: var(--accent-soft); height: 54px; flex: 1; justify-content: space-between; padding: 0 6px; }
.stepper button { width: 44px; height: 44px; border-radius: 12px; color: var(--accent); display: flex; align-items: center; justify-content: center; }
.stepper button svg { width: 22px; height: 22px; }
.stepper span { font-size: 17px; font-weight: 700; color: var(--accent); }

/* ---------- Cart ---------- */
.page-pad { padding: 0 16px; }
.cart-item { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-item img { width: 92px; height: 92px; border-radius: 14px; object-fit: cover; cursor: pointer; }
.ci-top { display: flex; justify-content: space-between; gap: 8px; }
.ci-name { font-weight: 700; font-size: 16px; }
.ci-brand { font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 600; margin-top: 2px; letter-spacing: .04em; }
.ci-del { color: var(--muted); width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; margin: -6px -6px 0 0; }
.ci-del svg { width: 20px; height: 20px; }
.ci-bottom { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.qty { display: flex; align-items: center; gap: 4px; background: var(--bg-2); border-radius: 12px; height: 36px; padding: 0 4px; }
.qty button { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--accent); }
.qty button svg { width: 18px; height: 18px; }
.qty span { min-width: 22px; text-align: center; font-weight: 700; }
.summary { margin: 18px 0; padding: 16px; border-radius: 18px; background: var(--bg-2); }
.summary .row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 15px; color: var(--ink-2); }
.summary .row.total { font-size: 19px; color: var(--ink); font-weight: 800; padding-top: 10px; margin-top: 6px; border-top: 1px dashed #D5D1DF; }
.summary .row.total b { color: var(--accent); }
.summary .row.saving b { color: var(--green); }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 12px; }
.form .btn-primary { flex: none; }
.field label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; height: 50px; padding: 0 14px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; font-size: 16px; outline: 0;
  transition: border-color .15s;
}
.field textarea { height: 90px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button { height: 46px; border-radius: 12px; border: 1.5px solid var(--line); font-weight: 600; font-size: 15px; }
.seg button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* ---------- Orders ---------- */
.order-card { border: 1.5px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 12px; cursor: pointer; }
.order-card .oc-top { display: flex; justify-content: space-between; align-items: center; }
.order-card .oc-num { font-weight: 800; font-size: 17px; }
.order-card .oc-date { color: var(--muted); font-size: 13px; margin-top: 2px; }
.status { padding: 5px 10px; border-radius: 10px; font-size: 12px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.status.done { background: #E6F7EC; color: var(--green); }
.oc-thumbs { display: flex; gap: 6px; margin: 12px 0; }
.oc-thumbs img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.oc-thumbs .more { width: 52px; height: 52px; border-radius: 10px; background: var(--bg-2); display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--muted); font-size: 14px; }
.oc-bottom { display: flex; justify-content: space-between; font-size: 15px; color: var(--ink-2); }
.oc-bottom b { color: var(--ink); }

/* ---------- Profile ---------- */
.profile-hero {
  margin: 4px 16px 0; border-radius: 22px; padding: 22px; display: flex; gap: 16px; align-items: center;
  background: radial-gradient(130% 160% at 100% 0%, #3A2A12 0%, #0B0A08 60%); color: #F6E3B4;
}
.profile-hero img { width: 64px; height: 64px; border-radius: 18px; }
.profile-hero .pn { font-size: 20px; font-weight: 800; color: #F8E7BC; }
.profile-hero .pp { font-size: 14px; color: #BFAE87; margin-top: 3px; }
.menu { margin: 18px 16px; border: 1.5px solid var(--line); border-radius: 18px; overflow: hidden; }
.menu-item { display: flex; align-items: center; gap: 14px; padding: 15px 16px; border-top: 1px solid var(--line); width: 100%; text-align: left; font-size: 16px; font-weight: 600; }
.menu-item:first-child { border-top: 0; }
.menu-item .mi-ic { width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; flex: none; }
.menu-item .mi-ic svg { width: 21px; height: 21px; }
.menu-item .mi-sub { display: block; font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.menu-item .mi-right { margin-left: auto; color: var(--muted); display: flex; align-items: center; gap: 6px; font-size: 14px; }
.menu-item .mi-right svg { width: 18px; height: 18px; }
.app-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 4px 0 24px; }

/* ---------- Sheet / modal / toast ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(15,10,30,.45); animation: fadeIn .2s ease; display: flex; align-items: flex-end; justify-content: center; }
@keyframes fadeIn { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; background: #fff; border-radius: 24px 24px 0 0; padding: 10px 18px calc(20px + var(--safe-b)); animation: sheetUp .26s cubic-bezier(.2,.9,.3,1); max-height: 90vh; overflow: auto; }
@keyframes sheetUp { from { transform: translateY(100%); } }
.sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #DDD9E6; margin: 0 auto 14px; }
.sheet h3 { margin: 0 0 6px; font-size: 21px; font-weight: 800; }
.sheet p.hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; line-height: 1.4; }
.sheet-opt { width: 100%; text-align: left; padding: 15px 4px; border-top: 1px solid var(--line); font-size: 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.sheet-opt svg { width: 20px; height: 20px; color: var(--accent); }
.scan-video { width: 100%; aspect-ratio: 4/3; border-radius: 16px; background: #000; object-fit: cover; margin-bottom: 12px; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 16px + var(--safe-b)); z-index: 100;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: #1E1A2E; color: #fff; padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; gap: 8px; white-space: nowrap; transition: transform .25s ease, opacity .25s ease;
  box-shadow: 0 10px 30px rgba(20,10,40,.25);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 18px; height: 18px; color: #7CE39B; }
.toast.up { bottom: calc(96px + var(--safe-b)); }

/* ---------- Desktop / tablet ---------- */
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; padding: 0 16px; }
  .hscroll .card { width: 230px; }
  .cat-list { display: grid; grid-template-columns: repeat(2, 1fr); }
  .cat-card { height: 180px; }
}

@media (min-width: 1000px) {
  :root { --tabbar-h: 0px; }
  .tabbar { display: none; }
  #app { padding-bottom: 40px; }
  #app.has-buybar { padding-bottom: 40px; }
  .toast, .toast.up { bottom: 30px; }

  .site-header {
    display: block; position: sticky; top: 0; z-index: 60; background: #0B0A08; color: #F1DDA8;
  }
  .sh-main { display: flex; align-items: center; gap: 28px; padding: 14px 24px; max-width: 1240px; margin: 0 auto; }
  .sh-logo { display: flex; align-items: center; gap: 12px; }
  .sh-logo img { width: 46px; height: 46px; border-radius: 10px; }
  .sh-logo b { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 30px; font-weight: 600; color: #F2D88F; line-height: 1; display: block; letter-spacing: .01em; }
  .sh-logo small { display: block; font-size: 11px; letter-spacing: .5em; color: #C9A050; margin-top: 2px; }
  .sh-nav { display: flex; gap: 22px; font-size: 15px; font-weight: 600; }
  .sh-nav a { color: #D9C79E; padding: 6px 0; border-bottom: 2px solid transparent; }
  .sh-nav a.active, .sh-nav a:hover { color: #F7E2A8; border-color: #C9A050; }
  .sh-search { flex: 1; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 14px; border-radius: 12px; background: #1E1A12; border: 1px solid #3A2F1A; color: #9C8C68; }
  .sh-search svg { width: 20px; height: 20px; }
  .sh-search input { flex: 1; border: 0; background: transparent; outline: 0; color: #F4E6C2; font-size: 15px; }
  .sh-search input::placeholder { color: #8F8162; }
  .sh-icons { display: flex; gap: 6px; }
  .sh-icons a { position: relative; width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #E9D4A0; }
  .sh-icons a:hover { background: #1E1A12; }
  .sh-icons svg { width: 24px; height: 24px; }
  .sh-icons .dot { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; }

  .searchbar { display: none; }
  .view { max-width: 1240px; margin: 0 auto; padding: 0 8px; }
  .navbar { position: static; background: transparent; backdrop-filter: none; height: 76px; grid-template-columns: 56px 1fr 96px; }
  .navbar h1 { text-align: left; font-size: 30px; }

  .hero { margin: 20px 16px 6px; min-height: 340px; border-radius: 28px; }
  .hero-text { padding: 40px 0 40px 56px; max-width: 50%; }
  .hero h2 { font-size: 58px; }
  .hero p { font-size: 17px; margin-bottom: 24px; }
  .hero .btn-gold { height: 48px; padding: 0 26px; border-radius: 24px; font-size: 15px; }
  .hero-kicker { font-size: 13px; }
  .hero img { right: 60px; height: 80%; }
  .quick-cats { justify-content: center; gap: 28px; padding-top: 24px; }
  .qc { width: 96px; font-size: 14px; }
  .qc-img { width: 96px; height: 96px; }
  .section { margin-top: 36px; }
  .section-head h2 { font-size: 30px; }

  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
  .hscroll .card { width: 260px; }
  .card:hover { box-shadow: 0 14px 36px rgba(40,20,90,.10); transform: translateY(-2px); }
  .cat-list { grid-template-columns: repeat(3, 1fr); gap: 18px; }
  .cat-card { height: 200px; }
  .cat-card:hover { transform: translateY(-2px); }

  /* product page — две колонки */
  .product-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 40px; padding: 0 16px; align-items: start; }
  .product-layout .gallery { border-radius: 24px; overflow: hidden; position: sticky; top: 140px; }
  .product-layout .pd { padding: 0; }
  .product-layout .pd h1 { font-size: 36px; margin-top: 0; }
  .buybar { position: static; padding: 18px 0 0; border: 0; background: none; backdrop-filter: none; }
  .buybar .bb-price { display: none; }
  .btn-primary, .stepper { max-width: 360px; }
  .cart-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
  .cart-layout .summary { position: sticky; top: 140px; margin-top: 14px; }
  .profile-wrap { max-width: 720px; margin: 0 auto; }
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Senbi widget on home ---------- */
.senbi-slot { margin: 18px 12px 0; max-width: calc(100% - 24px); min-height: 40px; }
@media (min-width: 1000px) { .senbi-slot { margin: 28px 16px 0; max-width: none; } }
