/* ==========================================================================
   Meat Gallery — магазинный слой: прелоадер, корзина, авторизация, профиль,
   оформление заказа, карта, поиск. Палитра та же, что в styles.css.
   ========================================================================== */

/* ------------------------------- preloader ------------------------------- */
.pre {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center;
  background: radial-gradient(60% 55% at 50% 45%, #1a1512 0%, var(--bg) 70%);
  transition: opacity .7s var(--ease), visibility .7s;
}
.pre__in { display: grid; justify-items: center; gap: 26px; text-align: center; }
.pre__logo {
  width: clamp(200px, 34vw, 330px); height: auto;
  animation: preLogo 1.5s var(--ease) both;
}
.pre__line {
  position: relative; width: clamp(180px, 30vw, 280px); height: 2px;
  background: rgba(203, 152, 66, .18); overflow: hidden; border-radius: 2px;
}
.pre__line::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--gold-br), var(--terra));
  transform-origin: left; animation: preBar 3s var(--ease) both;
}
.pre__txt {
  font-size: 11.5px; letter-spacing: .34em; text-transform: uppercase; color: var(--muted);
  animation: preTxt 1.4s var(--ease) .3s both;
}
.pre__skip {
  position: absolute; right: 20px; bottom: 18px;
  font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
  background: none; border: 0; cursor: pointer; font-family: inherit;
  animation: preTxt 1s ease 1.4s both;
}
.pre__skip:hover { color: var(--gold-br); }
.pre.is-done { opacity: 0; visibility: hidden; }
body.is-loading { overflow: hidden; }
@keyframes preLogo {
  from { opacity: 0; transform: scale(.86) translateY(12px); filter: blur(6px); }
  to   { opacity: 1; transform: none; filter: none; }
}
@keyframes preBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes preTxt { from { opacity: 0; letter-spacing: .5em; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .pre__logo, .pre__txt, .pre__skip { animation: none; }
  .pre__line::after { animation-duration: .4s; }
}

/* ------------------------------ header icons ----------------------------- */
.iconbtn {
  position: relative; display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 50%; cursor: pointer;
  color: var(--text); background: rgba(244, 241, 236, .05);
  border: 1px solid rgba(244, 241, 236, .08);
  transition: color .2s, border-color .2s, background-color .2s;
}
.iconbtn:hover { color: var(--gold-br); border-color: var(--line); background: rgba(203, 152, 66, .1); }
.iconbtn__n {
  position: absolute; top: -4px; right: -4px; min-width: 19px; height: 19px; padding: 0 5px;
  display: none; place-items: center; border-radius: 999px;
  font-size: 11px; font-weight: 700; color: #1c1509;
  background: linear-gradient(135deg, var(--gold-br), var(--gold));
}
.iconbtn__n.is-on { display: grid; }
.hdr__tools { display: flex; align-items: center; gap: 8px; }

/* --------------------------------- overlay ------------------------------- */
.ov {
  position: fixed; inset: 0; z-index: 150;
  background: rgba(8, 7, 6, .72); backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .3s var(--ease), visibility .3s;
}
.ov.is-open { opacity: 1; visibility: visible; }

/* drawer справа (корзина, профиль) */
.dr {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 160;
  width: min(460px, 100vw);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #17130f, var(--bg));
  border-left: 1px solid var(--line);
  transform: translateX(102%); transition: transform .42s var(--ease);
}
.dr.is-open { transform: none; }
.dr__head {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px; border-bottom: 1px solid rgba(244, 241, 236, .07);
}
.dr__title { margin: 0; font-size: 19px; font-weight: 700; }
.dr__close, .md__close {
  margin-left: auto; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  color: var(--text2); background: rgba(244, 241, 236, .05); border: 0;
  font-size: 18px; line-height: 1;
}
.dr__close:hover, .md__close:hover { color: var(--text); background: rgba(244, 241, 236, .12); }
.dr__body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.dr__foot { padding: 18px 22px 24px; border-top: 1px solid rgba(244, 241, 236, .07); }

/* модалка по центру (товар, вход, оформление, карта) */
.md {
  position: fixed; z-index: 180; left: 50%; top: 50%;
  transform: translate(-50%, -46%) scale(.98);
  width: min(680px, calc(100vw - 32px)); max-height: min(88vh, 900px);
  display: flex; flex-direction: column; overflow: hidden;
  background: linear-gradient(180deg, #17130f, var(--bg));
  border: 1px solid var(--line); border-radius: 22px;
  opacity: 0; visibility: hidden;
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.md.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.md--wide { width: min(940px, calc(100vw - 32px)); }
.md__head { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-bottom: 1px solid rgba(244, 241, 236, .07); }
.md__title { margin: 0; font-size: 19px; font-weight: 700; }
.md__body { padding: 22px; overflow-y: auto; }
.md__foot { padding: 16px 22px 22px; border-top: 1px solid rgba(244, 241, 236, .07); }

/* ------------------------------- cart lines ------------------------------ */
.cl { display: grid; grid-template-columns: 74px 1fr auto; gap: 14px; padding: 14px 0; border-bottom: 1px solid rgba(244, 241, 236, .07); }
.cl:first-child { padding-top: 0; }
.cl__img { width: 74px; height: 74px; border-radius: 12px; object-fit: cover; background: var(--s2); }
.cl__t { margin: 0 0 4px; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.cl__p { margin: 0; font-size: 13px; color: var(--muted); }
.cl__right { display: grid; justify-items: end; gap: 8px; }
.cl__sum { font-size: 15px; font-weight: 700; color: var(--gold-br); white-space: nowrap; }
.cl__del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; }
.cl__del:hover { color: var(--terra); }

.qty { display: inline-flex; align-items: center; gap: 2px; background: var(--s1); border-radius: 999px; padding: 3px; }
.qty button {
  width: 30px; height: 30px; border-radius: 50%; border: 0; cursor: pointer;
  background: rgba(244, 241, 236, .06); color: var(--text); font-size: 16px; line-height: 1;
  font-family: inherit; transition: background-color .2s, color .2s;
}
.qty button:hover { background: var(--gold); color: #1c1509; }
.qty span { min-width: 30px; text-align: center; font-size: 14px; font-weight: 700; }

.sum { display: grid; gap: 8px; margin-bottom: 16px; }
.sum div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--text2); }
.sum div b { color: var(--text); }
.sum .sum__total { padding-top: 10px; border-top: 1px solid rgba(244, 241, 236, .09); font-size: 17px; color: var(--text); }
.sum .sum__total b { font-size: 20px; color: var(--gold-br); }
.sum__cash { color: var(--gold) !important; }

.empty { display: grid; gap: 12px; justify-items: center; padding: 46px 10px; text-align: center; color: var(--muted); }
.empty svg { opacity: .5; }

/* --------------------------------- forms --------------------------------- */
.fld { display: block; margin-bottom: 14px; font-size: 13px; color: var(--muted); }
.fld input, .fld select, .fld textarea {
  display: block; width: 100%; margin-top: 7px; padding: 13px 15px;
  color: var(--text); background: rgba(14, 12, 10, .62);
  border: 1px solid rgba(244, 241, 236, .1); border-radius: 12px;
  font: inherit; font-size: 15px;
}
.fld input:focus, .fld textarea:focus, .fld select:focus { outline: none; border-color: var(--gold); }
.fld input.is-bad { border-color: var(--terra); }
.fld--row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hint { margin: 0 0 16px; font-size: 13px; color: var(--muted); }
.err { margin: 0 0 14px; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; color: #ffd9d7; background: rgba(207, 74, 67, .16); border: 1px solid rgba(207, 74, 67, .4); }
.ok-box { margin: 0 0 14px; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; color: #d8f3e0; background: rgba(76, 175, 80, .14); border: 1px solid rgba(76, 175, 80, .35); }

.tabs2 { display: flex; gap: 6px; padding: 4px; margin-bottom: 20px; background: var(--s1); border-radius: 999px; }
.tabs2 button {
  flex: 1; height: 40px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 14px; color: var(--text2); background: none;
}
.tabs2 button.is-on { color: #1c1509; font-weight: 600; background: linear-gradient(135deg, var(--gold-br), var(--gold)); }

/* ------------------------------ radio cards ------------------------------ */
.pick { display: grid; gap: 10px; margin-bottom: 18px; }
.pick label {
  display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px; cursor: pointer;
  background: var(--s1); border: 1px solid transparent; border-radius: 14px;
  transition: border-color .2s, background-color .2s;
}
.pick label:hover { border-color: rgba(203, 152, 66, .3); }
.pick input { margin-top: 3px; accent-color: var(--gold); }
.pick b { display: block; font-size: 15px; font-weight: 600; }
.pick span { display: block; font-size: 13px; color: var(--muted); }
.pick label:has(input:checked) { border-color: var(--gold); background: rgba(203, 152, 66, .09); }

/* ------------------------------ bonus card ------------------------------- */
.bcard {
  position: relative; overflow: hidden;
  padding: 22px; margin-bottom: 20px; border-radius: 18px;
  background: linear-gradient(135deg, #2a1f14, #17130f 70%);
  border: 1px solid var(--line);
}
.bcard__l { font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); }
.bcard__v { margin: 8px 0 2px; font-size: 34px; font-weight: 800; color: var(--gold-br); letter-spacing: -.02em; }
.bcard__s { font-size: 13px; color: var(--text2); }
.bcard::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 150px; height: 150px;
  border-radius: 50%; background: radial-gradient(circle, rgba(203, 152, 66, .22), transparent 70%);
}

/* -------------------------------- order row ------------------------------ */
.ord { padding: 16px 0; border-bottom: 1px solid rgba(244, 241, 236, .07); }
.ord__top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.ord__id { font-size: 15px; font-weight: 700; }
.ord__sum { font-size: 15px; font-weight: 700; color: var(--gold-br); white-space: nowrap; }
.ord__meta { margin: 4px 0 8px; font-size: 12.5px; color: var(--muted); }
.ord__st { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 12px; background: rgba(203, 152, 66, .14); color: var(--gold-br); border: 1px solid var(--line); }
.ord__items { margin: 8px 0 0; padding-left: 18px; font-size: 13px; color: var(--text2); }

/* --------------------------------- address ------------------------------- */
.addr { display: flex; align-items: center; gap: 12px; padding: 14px 16px; margin-bottom: 10px; background: var(--s1); border: 1px solid transparent; border-radius: 14px; cursor: pointer; }
.addr:hover { border-color: rgba(203, 152, 66, .3); }
.addr.is-on { border-color: var(--gold); background: rgba(203, 152, 66, .09); }
.addr__t { flex: 1; font-size: 14.5px; }
.addr__del { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 12px; }
.addr__del:hover { color: var(--terra); }

.mapwrap { position: relative; height: min(60vh, 520px); border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.mapwrap iframe { width: 100%; height: 100%; border: 0; display: block; }
.mapaddr { margin: 14px 0 0; font-size: 14.5px; color: var(--text); min-height: 22px; }

/* --------------------------------- product ------------------------------- */
.pv { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.pv__img { border-radius: 16px; overflow: hidden; background: var(--s2); aspect-ratio: 1; }
.pv__img img { width: 100%; height: 100%; object-fit: cover; }
.pv__cat { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.pv__t { margin: 8px 0 10px; font-size: 24px; font-weight: 800; line-height: 1.15; }
.pv__d { margin: 0 0 16px; font-size: 14.5px; color: var(--text2); }
.pv__price { font-size: 30px; font-weight: 800; color: var(--gold-br); margin-bottom: 6px; }
.pv__w { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.pv__row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.fav {
  display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  cursor: pointer; color: var(--text2); background: rgba(244, 241, 236, .05);
  border: 1px solid rgba(244, 241, 236, .1); transition: color .2s, border-color .2s;
}
.fav.is-on, .fav:hover { color: var(--terra); border-color: rgba(207, 74, 67, .5); }
.card__fav {
  position: absolute; right: 12px; top: 12px; width: 38px; height: 38px;
  background: rgba(14, 12, 10, .68); backdrop-filter: blur(6px);
}

/* -------------------------------- search --------------------------------- */
.srch { position: fixed; left: 50%; top: 88px; transform: translateX(-50%) translateY(-12px); z-index: 185; width: min(720px, calc(100vw - 24px)); opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; }
.srch.is-open { opacity: 1; visibility: visible; transform: translateX(-50%); }
.srch__box { display: flex; align-items: center; gap: 12px; padding: 6px 8px 6px 20px; background: #17130f; border: 1px solid var(--line); border-radius: 999px; }
.srch__box input { flex: 1; padding: 15px 0; background: none; border: 0; color: var(--text); font: inherit; font-size: 16px; }
.srch__box input:focus { outline: none; }
.srch__res { margin-top: 10px; max-height: min(60vh, 520px); overflow-y: auto; background: #17130f; border: 1px solid rgba(244, 241, 236, .08); border-radius: 18px; }
.srch__res:empty { display: none; }
.sres { display: flex; align-items: center; gap: 14px; padding: 12px 16px; cursor: pointer; border-bottom: 1px solid rgba(244, 241, 236, .05); }
.sres:hover { background: rgba(203, 152, 66, .08); }
.sres img { width: 52px; height: 52px; border-radius: 10px; object-fit: cover; }
.sres b { display: block; font-size: 14.5px; font-weight: 600; }
.sres span { font-size: 13px; color: var(--gold-br); }

/* -------------------------------- toasts --------------------------------- */
.toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 200; display: grid; gap: 10px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast {
  padding: 14px 18px; border-radius: 14px; font-size: 14px;
  color: var(--text); background: rgba(30, 26, 22, .96); border: 1px solid var(--line);
  box-shadow: 0 20px 40px -22px rgba(0, 0, 0, .9);
  animation: toastIn .3s var(--ease) both;
}
.toast--bad { border-color: rgba(207, 74, 67, .5); }
.toast--ok { border-color: rgba(76, 175, 80, .45); }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* -------------------------------- success -------------------------------- */
.done { display: grid; justify-items: center; gap: 10px; text-align: center; padding: 18px 6px 6px; }
.done__ic { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: rgba(203, 152, 66, .14); border: 1px solid var(--line); color: var(--gold-br); font-size: 30px; }
.done__t { margin: 6px 0 0; font-size: 22px; font-weight: 800; }
.done__s { margin: 0; color: var(--text2); font-size: 14.5px; }

/* ------------------------------- responsive ------------------------------ */
@media (max-width: 900px) {
  .hdr__tools { margin-left: auto; }
  .pv { grid-template-columns: 1fr; }
  .srch { top: 74px; }
}
@media (max-width: 640px) {
  .iconbtn { width: 38px; height: 38px; }
  .hdr__tools { gap: 6px; }
  .dr { width: 100vw; }
  .md { width: calc(100vw - 20px); max-height: 92vh; }
  .fld--row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Десктоп: инлайн-поиск в шапке, личный кабинет с боковым меню, степпер.
   Мобайл: панели на весь экран + таб-бар, как в приложении.
   ========================================================================== */

/* --------------------------- поиск в шапке (desktop) -------------------- */
.hsearch {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
  width: min(300px, 26vw); padding: 0 16px; height: 44px;
  color: var(--muted); background: rgba(244, 241, 236, .05);
  border: 1px solid rgba(244, 241, 236, .08); border-radius: 999px;
  transition: border-color .25s, background-color .25s;
}
.hsearch:focus-within { border-color: var(--gold); background: rgba(203, 152, 66, .08); }
.hsearch input { flex: 1; min-width: 0; padding: 0; background: none; border: 0; color: var(--text); font: inherit; font-size: 14px; }
.hsearch input:focus { outline: none; }
.hsearch input::placeholder { color: var(--muted); }
.iconbtn--m { display: none; }
.hdr__cta { margin-left: 18px; }

/* ------------------------- личный кабинет (desktop) --------------------- */
.dr--wide { width: min(720px, 100vw); }
.dr__split { display: grid; grid-template-columns: 216px 1fr; flex: 1; min-height: 0; }
.lk__nav { display: flex; flex-direction: column; gap: 2px; padding: 18px 12px; border-right: 1px solid rgba(244, 241, 236, .07); }
.lk__i {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 12px;
  border: 0; background: none; cursor: pointer; font: inherit; font-size: 14.5px;
  color: var(--text2); text-align: left; transition: color .2s, background-color .2s;
}
.lk__i:hover { color: var(--text); background: rgba(244, 241, 236, .05); }
.lk__i.is-on { color: var(--text); background: rgba(203, 152, 66, .13); }
.lk__i--out { margin-top: auto; color: var(--muted); }
.lk__i--out:hover { color: var(--terra); }
.lk__user { padding: 6px 14px 16px; border-bottom: 1px solid rgba(244, 241, 236, .07); margin-bottom: 10px; }
.lk__user b { display: block; font-size: 15px; }
.lk__user span { font-size: 13px; color: var(--muted); }

/* ------------------------------- степпер -------------------------------- */
.md__steps { display: flex; gap: 8px; padding: 14px 22px 0; }
.md__steps span {
  flex: 1; padding-bottom: 10px; font-size: 12.5px; color: var(--muted);
  border-bottom: 2px solid rgba(244, 241, 236, .1); transition: color .3s, border-color .3s;
}
.md__steps span.is-on { color: var(--gold-br); border-bottom-color: var(--gold); }

/* ------------------------------ сторис-вьюер ---------------------------- */
.sv {
  position: fixed; inset: 0; z-index: 210; display: none;
  background: #000; place-items: center;
}
.sv.is-open { display: grid; animation: svIn .3s var(--ease); }
@keyframes svIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
.sv__stage { position: relative; width: min(460px, 100vw); height: min(100dvh, 860px); background: #0b0908; overflow: hidden; border-radius: 0; }
@media (min-width: 700px) { .sv__stage { border-radius: 20px; } }
.sv__stage img, .sv__stage video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sv__bars { position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 4px; width: min(440px, calc(100vw - 24px)); padding: 14px 0 0; }
.sv__bar { flex: 1; height: 3px; border-radius: 3px; background: rgba(244, 241, 236, .25); overflow: hidden; }
.sv__bar i { display: block; height: 100%; width: 0; background: var(--gold-br); }
.sv__bar.is-done i { width: 100%; }
.sv__bar.is-live i { animation: svBar 6s linear forwards; }
@keyframes svBar { from { width: 0; } to { width: 100%; } }
.sv__close { position: absolute; top: 40px; right: 18px; z-index: 4; width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; color: var(--text); background: rgba(14, 12, 10, .55); font-size: 17px; }
.sv__cap {
  position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 3;
  width: min(460px, 100vw); padding: 60px 24px 34px; text-align: center;
  background: linear-gradient(to top, rgba(8, 7, 6, .92), transparent);
}
.sv__cap b { display: block; font-size: 20px; font-weight: 700; }
.sv__cap span { display: block; margin-top: 6px; font-size: 14px; color: var(--text2); }
.sv__nav { position: absolute; top: 0; bottom: 0; width: 32%; border: 0; background: none; cursor: pointer; z-index: 2; }
.sv__nav--l { left: 0; }
.sv__nav--r { right: 0; }

/* -------------------------------- таб-бар ------------------------------- */
.tabbar { display: none; }
@media (max-width: 900px) {
  .tabbar {
    /* как в приложении: нижняя навигация всегда видна, поверх экранов-панелей */
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 170;
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 8px 4px calc(8px + env(safe-area-inset-bottom));
    background: rgba(18, 15, 13, .96); backdrop-filter: blur(16px);
    border-top: 1px solid rgba(244, 241, 236, .08);
  }
  .tabbar__i {
    position: relative; display: grid; justify-items: center; gap: 4px; padding: 6px 2px;
    border: 0; background: none; cursor: pointer; font: inherit;
    font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
    color: var(--muted); transition: color .2s, transform .2s var(--ease);
  }
  .tabbar__i.is-on { color: var(--gold-br); }
  .tabbar__i:active { transform: scale(.93); }
  .tabbar__n {
    position: absolute; top: 0; right: calc(50% - 22px); min-width: 17px; height: 17px; padding: 0 4px;
    display: none; place-items: center; border-radius: 999px; font-style: normal;
    font-size: 10.5px; font-weight: 700; color: #1c1509;
    background: linear-gradient(135deg, var(--gold-br), var(--gold));
  }
  .tabbar__n.is-on { display: grid; }

  /* панели на весь экран, выезд снизу — как экраны приложения */
  .dr, .dr--wide {
    width: 100vw; top: 0; bottom: 0;
    transform: translateY(100%); border-left: 0;
    transition: transform .4s var(--ease);
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }
  .dr.is-open { transform: none; }
  .dr__split { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); }
  .lk__nav { flex-direction: row; align-items: center; overflow-x: auto; border-right: 0; border-bottom: 1px solid rgba(244, 241, 236, .07); padding: 10px 14px; gap: 6px; scrollbar-width: none; }
  .lk__nav::-webkit-scrollbar { display: none; }
  .lk__i { flex: 0 0 auto; height: 38px; padding: 0 16px; border-radius: 999px; background: var(--s1); font-size: 13.5px; white-space: nowrap; }
  .lk__i--out { margin-top: 0; }
  .lk__user { display: none; }

  .md {
    left: 0; right: 0; top: auto; bottom: 0; width: 100vw; max-height: 92dvh;
    transform: translateY(100%) scale(1); border-radius: 22px 22px 0 0;
    transition: transform .4s var(--ease), opacity .3s, visibility .3s;
  }
  /* модалка перекрывает таб-бар: кнопки внизу не должны попадать под него */
  .md__foot { padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .md.is-open { transform: none; }
  .srch { top: 68px; }
  .iconbtn--m { display: grid; }
  .hdr__cta { margin-left: 0; }
}

/* --------------------- «летящий» товар в корзину (mobile+desktop) -------- */
.fly {
  position: fixed; z-index: 190; width: 64px; height: 64px; border-radius: 14px;
  object-fit: cover; pointer-events: none;
  animation: fly .75s cubic-bezier(.55, -.2, .6, 1) forwards;
}
@keyframes fly { to { transform: translate(var(--dx), var(--dy)) scale(.18); opacity: .25; } }

/* ------------------------------- app-подсказка --------------------------- */
.applink {
  display: flex; align-items: center; gap: 14px; margin-bottom: 18px;
  padding: 14px 16px; border-radius: 16px;
  background: linear-gradient(135deg, #2a1f14, #17130f 75%); border: 1px solid var(--line);
}
.applink img { width: 46px; height: 46px; border-radius: 12px; }
.applink b { display: block; font-size: 14.5px; }
.applink span { font-size: 12.5px; color: var(--text2); }

/* Поиск в шапке — только на широком десктопе (иначе давит логотип и иконки) */
@media (max-width: 1180px) { .hsearch { display: none; } }
@media (max-width: 900px) {
  /* фиксированный app bar → контент начинается ниже */
  main { padding-top: 62px; }
  .hero { padding-top: 18px; }
  /* в приложении плавающей кнопки нет — на мобиле убираем, есть таб-бар и контакты */
  .wa-fab { display: none; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
}

/* сторис: медиа и оверлеи живут внутри «телефона» */
#svMedia { position: absolute; inset: 0; }
#svMedia img, #svMedia video { width: 100%; height: 100%; object-fit: cover; }
.sv__bars { top: 0; }
.sv__cap { left: 0; transform: none; width: 100%; }
.sv__close { top: 14px; right: 14px; }

/* строка «город + поиск» — только мобайл (копия шапки главного экрана app) */
.mtop { display: none; }
@media (max-width: 900px) {
  .mtop {
    position: relative; z-index: 30; display: grid; gap: 10px;
    padding: 92px 18px 4px; background: var(--bg);
  }
  .mtop__city { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--gold-br); }
  .mtop__search {
    display: flex; align-items: center; gap: 10px; width: 100%; height: 46px; padding: 0 16px;
    border: 1px solid rgba(244, 241, 236, .08); border-radius: 999px; cursor: pointer;
    background: var(--s1); color: var(--muted); font: inherit; font-size: 14px; text-align: left;
  }
  .mtop__search:active { transform: scale(.99); }
  main { padding-top: 0; }
}

/* поле пароля с «глазом» и ссылка-кнопка */
.pwd { position: relative; display: block; }
.pwd input { padding-right: 46px; }
.pwd__eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; border-radius: 50%; cursor: pointer;
  background: none; color: var(--muted); font-size: 15px; opacity: .7;
}
.pwd__eye:hover, .pwd__eye.is-on { color: var(--gold-br); opacity: 1; }
.linkbtn {
  display: block; width: 100%; margin-top: 12px; padding: 6px 0;
  border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--muted); text-align: center;
}
.linkbtn:hover { color: var(--gold-br); }

/* ==========================================================================
   Премиальное окно входа: слева — бренд-панель, справа — форма.
   ========================================================================== */
.md--auth { width: min(880px, calc(100vw - 32px)); }
.md--auth .md__head { position: absolute; right: 4px; top: 4px; z-index: 5; padding: 10px; border: 0; background: none; }
.md--auth .md__title { display: none; }
.md--auth .md__body { padding: 0; }

.auth { display: grid; grid-template-columns: 320px 1fr; min-height: 520px; }

/* бренд-панель */
.auth__aside {
  position: relative; overflow: hidden; padding: 34px 30px;
  display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(160deg, #241a11 0%, #17130f 60%);
  border-right: 1px solid var(--line);
}
.auth__aside::before {
  content: ''; position: absolute; inset: -40% -60% auto -40%; height: 120%;
  background: radial-gradient(45% 45% at 40% 30%, rgba(203, 152, 66, .22), transparent 70%);
  pointer-events: none;
}
.auth__aside img.auth__logo { position: relative; width: 148px; height: auto; }
.auth__slogan {
  position: relative; margin: 26px 0 0; font-size: 22px; font-weight: 800; line-height: 1.18;
}
.auth__slogan i {
  display: block; font-family: 'PlayfairIt', Georgia, serif; font-style: italic;
  font-weight: 500; color: var(--terra); font-size: 26px; margin-top: 2px;
}
.auth__perks { position: relative; list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 14px; }
.auth__perks li { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; color: var(--text2); }
.auth__perks svg { flex: 0 0 auto; margin-top: 1px; color: var(--gold-br); }
.auth__note { position: relative; margin: 24px 0 0; font-size: 12px; color: var(--muted); }

/* форма */
.auth__form { padding: 34px 34px 30px; display: flex; flex-direction: column; }
.auth__h { margin: 0 0 4px; font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.auth__sub { margin: 0 0 22px; font-size: 13.5px; color: var(--muted); }

/* сегмент-переключатель с золотой «пилюлей» */
.seg { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 4px; margin-bottom: 22px; background: var(--s1); border-radius: 999px; }
.seg__pill {
  position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px);
  border-radius: 999px; background: linear-gradient(135deg, var(--gold-br), var(--gold));
  transition: transform .38s var(--e-spring);
}
.seg.is-reg .seg__pill { transform: translateX(100%); }
.seg button {
  position: relative; z-index: 1; height: 42px; border: 0; background: none; cursor: pointer;
  font: inherit; font-size: 14.5px; font-weight: 600; color: var(--text2); transition: color .25s;
}
.seg button.is-on { color: #1c1509; }

/* поле с иконкой и «плавающей» подписью */
.pf { position: relative; margin-bottom: 14px; }
.pf__ic { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; transition: color .2s; }
.pf input {
  width: 100%; height: 58px; padding: 20px 46px 8px 46px;
  color: var(--text); background: rgba(14, 12, 10, .55);
  border: 1px solid rgba(244, 241, 236, .1); border-radius: 14px;
  font: inherit; font-size: 15.5px;
  transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.pf input:focus { outline: none; border-color: var(--gold); background: rgba(203, 152, 66, .06); box-shadow: 0 0 0 3px rgba(203, 152, 66, .12); }
.pf input:focus ~ .pf__ic { color: var(--gold-br); }
.pf label {
  position: absolute; left: 47px; top: 50%; transform: translateY(-50%);
  font-size: 15px; color: var(--muted); pointer-events: none;
  transition: transform .22s var(--e-out), font-size .22s var(--e-out), color .22s;
}
.pf input:focus + label,
.pf input:not(:placeholder-shown) + label { transform: translateY(-22px); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--gold); }
.pf__eye {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border: 0; border-radius: 50%; cursor: pointer;
  background: none; color: var(--muted); font-size: 15px;
}
.pf__eye:hover, .pf__eye.is-on { color: var(--gold-br); }
.pf__eye.is-on::after {
  content: ''; position: absolute; left: 8px; right: 8px; top: 50%; height: 1.5px;
  background: currentColor; transform: rotate(-20deg); border-radius: 2px;
}
.pf__eye { display: grid; place-items: center; }
.pf.is-bad input { border-color: var(--terra); }

.auth__go { margin-top: 6px; }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.auth__link { border: 0; background: none; cursor: pointer; font: inherit; font-size: 13px; color: var(--muted); padding: 4px 0; }
.auth__link:hover { color: var(--gold-br); }
.auth__err {
  margin: 0 0 14px; padding: 11px 14px; border-radius: 12px; font-size: 13.5px;
  color: #ffd9d7; background: rgba(207, 74, 67, .14); border: 1px solid rgba(207, 74, 67, .38);
  animation: errIn .3s var(--e-out) both;
}
@keyframes errIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.auth__hint { margin: 0 0 16px; font-size: 13.5px; color: var(--text2); }
.auth__code { margin: 0 0 16px; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; color: #d8f3e0; background: rgba(76, 175, 80, .12); border: 1px solid rgba(76, 175, 80, .3); }
.auth__timer { font-size: 13px; color: var(--muted); }

@media (max-width: 760px) {
  .md--auth { width: 100vw; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth__aside { flex-direction: row; align-items: center; gap: 14px; padding: 18px 20px; border-right: 0; border-bottom: 1px solid var(--line); }
  .auth__aside img.auth__logo { width: 96px; }
  .auth__slogan { margin: 0; font-size: 15px; }
  .auth__slogan i { display: inline; font-size: 16px; margin-left: 4px; }
  .auth__perks, .auth__note { display: none; }
  .auth__form { padding: 22px 20px 26px; }
  .auth__h { font-size: 21px; }
}

/* ------------------------- умный поиск: подсказки ------------------------ */
.sgroup { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 16px 6px; }
.sgroup > span { width: 100%; font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.chip {
  padding: 8px 14px; border-radius: 999px; cursor: pointer; font: inherit; font-size: 13.5px;
  color: var(--text2); background: var(--s1); border: 1px solid transparent; transition: .2s;
}
.chip:hover { color: var(--text); border-color: var(--line); background: rgba(203, 152, 66, .1); }
.sres { position: relative; }
.sres.is-cur { background: rgba(203, 152, 66, .12); }
.sres b .hl, .hl { color: var(--gold-br); background: rgba(203, 152, 66, .14); border-radius: 3px; }
.sres__add { margin-left: auto; flex: 0 0 auto; }
.sres div { flex: 1; min-width: 0; }
.sres b { display: block; font-size: 14.5px; font-weight: 600; }
.snone { padding: 26px 18px; text-align: center; color: var(--muted); font-size: 14px; }
.snone span { display: block; margin-top: 6px; font-size: 12.5px; }
@media (max-width: 640px) { .sres__add { display: none; } }
