/* ============================================================
   ХИМИЯ-ОПТОМ.РФ — REDESIGN v6  (green quick-commerce, Lavka-style)
   Чистый rewrite. Классы = существующий инвентарь app.js/index.html.
   Токены утверждены заказчиком. Шрифт Manrope (self-hosted).
   ============================================================ */

/* ---------- Fonts (variable, self-hosted) ---------- */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116, U+20BD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design tokens ---------- */
:root {
  /* greens */
  --green-cta:   #5FB335;
  --green-cta-d: #4E9A2A;
  --green-plus:  #6FB92E;
  --green-plus-d:#5AA321;
  --green-soft:  #EAF7E1;
  --green-ink:   #4E9A2A;
  --green-glow:  rgba(95,179,53,.34);

  /* neutrals */
  --bg:        #F4F4F3;
  --card:      #FFFFFF;
  --ink:       #1A1A1A;
  --ink-2:     #6E6E73;
  --muted:     #9A9AA0;
  --line:      #ECECEC;
  --line-2:    #F1F1F0;

  /* accents */
  --red:       #EF3B39;
  --red-d:     #D62F2D;
  --blue-bg:   #E7F0FF;
  --blue-ink:  #2F6BD8;
  --amber:     #F4A63C;

  /* category pastels */
  --c-all:    #6FBE3E; --c-promo: #FF7A5C; --c-new: #4BB4F0; --c-coffee: #C68A4A;
  --c-wash:   #4E97EA; --c-soft: #9B7BEA; --c-dish: #FF9A38; --c-clean: #2FC2B4;
  --c-stain:  #FF7FA6; --c-bleach: #45C874; --c-scale: #3FB4EC; --c-soap: #FFC42A;

  /* geometry */
  --r-card: 20px;
  --r-btn:  14px;
  --r-pill: 999px;
  --r-in:   14px;

  /* shadows */
  --sh-1: 0 4px 16px rgba(20,20,20,.05);
  --sh-2: 0 8px 24px rgba(20,20,20,.09);
  --sh-bar: 0 -2px 24px rgba(20,20,20,.10);
  --sh-cta: 0 6px 18px var(--green-glow);

  --maxw: 1240px;
  --header-h: 64px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.4;
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  padding-bottom: 0;
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
:focus-visible { outline: 2px solid var(--green-cta); outline-offset: 2px; border-radius: 4px; }
:focus:not(:focus-visible) { outline: none; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
.hidden { display: none !important; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ============================================================
   HEADER / HERO
   ============================================================ */
.hero { background: var(--bg); padding-top: 14px; }
.hero-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 6px 0 16px;
}
.hero-logo { display: flex; align-items: center; gap: 12px; }
.hero-logo__mark {
  width: 70px; height: 70px; border-radius: 14px; overflow: hidden;
  background: #fff;
  display: grid; place-items: center; flex: 0 0 auto;
  box-shadow: var(--sh-1);
}
.hero-logo__mark img { width: 100%; height: 100%; object-fit: cover; }
.hero-logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.hero-logo__name { font-weight: 800; font-size: 19px; letter-spacing: -.02em; }
.hero-logo__tag { font-size: 12px; color: var(--ink-2); font-weight: 600; }

.hero-contacts { display: flex; align-items: center; gap: 10px; }
.hero-promo-link {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 16px; border-radius: var(--r-pill);
  background: var(--red); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 14px rgba(239,59,57,.28);
  transition: transform .15s, box-shadow .15s;
}
.hero-promo-link:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(239,59,57,.34); }
.hero-contacts__socials { display: flex; gap: 8px; }
.hero-contacts__social {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  transition: transform .15s;
}
.hero-contacts__social:hover { transform: translateY(-2px); }
.hero-contacts__social--tg  { background: #2AABEE; }
.hero-contacts__social--max { background: #7B61FF; }
.hero-phone {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px 8px 10px; border-radius: var(--r-pill);
  background: var(--card); box-shadow: var(--sh-1);
}
.hero-phone__icon {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green-ink); flex: 0 0 auto;
}
.hero-phone__text { display: flex; flex-direction: column; line-height: 1.1; }
.hero-phone__num { font-weight: 800; font-size: 15px; }
.hero-phone__sub { font-size: 11.5px; color: var(--ink-2); font-weight: 600; }

/* ---------- Promo row (hero banners) ---------- */
.promo-row {
  display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-bottom: 18px;
}
.promo-card { position: relative; border-radius: var(--r-card); overflow: hidden; min-height: 210px; }
.promo-card--banner { padding: 0; box-shadow: var(--sh-1); }
.promo-card--banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.promo-banner__hit { position: absolute; inset: 0; background: none; cursor: pointer; }
.promo-card--primary {
  background: linear-gradient(135deg, #6FC13E 0%, #4E9A2A 100%);
  color: #fff; display: flex; align-items: center;
}
.promo-card__body { position: relative; z-index: 2; padding: 32px 34px; }
.promo-card__tag {
  display: inline-block; padding: 5px 12px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.22); color: #fff; font-weight: 800; font-size: 11.5px;
  letter-spacing: .04em; text-transform: uppercase; margin-bottom: 14px;
}
.promo-card__title { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.promo-card__sub { margin-top: 10px; font-size: 14px; opacity: .92; font-weight: 600; }
.promo-card__cta {
  margin-top: 20px; display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: var(--r-pill);
  background: #fff; color: var(--green-ink); font-weight: 800; font-size: 14px;
  box-shadow: 0 6px 18px rgba(0,0,0,.14); transition: transform .15s;
}
.promo-card__cta:hover { transform: translateY(-2px); }
.promo-card__deco { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.promo-card__blob { position: absolute; border-radius: 50%; background: rgba(255,255,255,.14); }
.promo-card__blob--1 { width: 220px; height: 220px; top: -70px; right: -50px; }
.promo-card__blob--2 { width: 140px; height: 140px; bottom: -50px; right: 60px; background: rgba(255,255,255,.10); }
.promo-card__blob--3 { width: 90px; height: 90px; top: 40px; right: 130px; background: rgba(255,255,255,.08); }

/* discount banner */
.promo-card--discounts {
  background: #12351C; color: #fff; display: flex; align-items: center;
}
.promo-card__disc-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .18; z-index: 0; }
.promo-card__disc-deco { position: absolute; inset: 0; z-index: 1; overflow: hidden; }
.disc-blob { position: absolute; border-radius: 50%; }
.disc-blob--1 { width: 180px; height: 180px; top: -60px; right: -40px; background: rgba(111,185,46,.24); }
.disc-blob--2 { width: 120px; height: 120px; bottom: -50px; left: -30px; background: rgba(111,185,46,.16); }
.promo-card__disc-inner { position: relative; z-index: 2; padding: 26px 28px; width: 100%; }
.promo-card__disc-head {
  display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 13px;
  text-transform: uppercase; letter-spacing: .04em; color: #A7E08A; margin-bottom: 18px;
}
.promo-disc-list { display: flex; flex-direction: column; gap: 14px; }
.promo-disc-item { display: flex; align-items: center; gap: 14px; }
.promo-disc-pct { font-size: 30px; font-weight: 800; color: #fff; min-width: 78px; letter-spacing: -.02em; }
.promo-disc-pct--big { color: #8FE06A; }
.promo-disc-label { font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.promo-disc-label small { display: block; font-size: 11.5px; font-weight: 500; opacity: .62; margin-top: 2px; }
.promo-card__disc-cta {
  margin-top: 20px; padding: 11px 20px; border-radius: var(--r-pill);
  background: var(--green-cta); color: #fff; font-weight: 800; font-size: 13.5px;
  transition: background .15s;
}
.promo-card__disc-cta:hover { background: var(--green-cta-d); }

/* ---------- Main promos (dynamic banners) ---------- */
.main-promos { display: grid; gap: 14px; margin-bottom: 18px; }
.main-promo-card {
  position: relative; display: flex; align-items: center; gap: 20px;
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--sh-1);
  overflow: hidden; padding: 8px 8px 8px 26px; min-height: 150px;
}
.main-promo-card__img { width: 320px; max-width: 44%; height: 100%; min-height: 150px; object-fit: contain; align-self: stretch; }
.main-promo-card__body { flex: 1; padding: 18px 0; }
.main-promo-card__tag {
  display: inline-block; padding: 4px 11px; border-radius: var(--r-pill);
  background: var(--red); color: #fff; font-weight: 800; font-size: 11px;
  text-transform: uppercase; letter-spacing: .03em; margin-bottom: 10px;
}
.main-promo-card__title { font-size: 21px; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.main-promo-card__desc { margin-top: 8px; font-size: 13.5px; color: var(--ink-2); font-weight: 600; line-height: 1.35; }
.main-promo-card__btn {
  margin-top: 16px; display: inline-flex; align-items: center; gap: 6px;
  padding: 11px 20px; border-radius: var(--r-pill);
  background: var(--green-cta); color: #fff; font-weight: 800; font-size: 13.5px;
  transition: background .15s, transform .15s;
}
.main-promo-card__btn:hover { background: var(--green-cta-d); transform: translateY(-1px); }

/* ============================================================
   CATEGORY TILES
   ============================================================ */
.cat-tiles-wrap { margin-bottom: 8px; }
.cat-tiles {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px;
}
.cat-tile {
  position: relative; border-radius: var(--r-card); overflow: hidden;
  min-height: 118px; padding: 15px 14px; text-align: left;
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  color: #fff; transition: transform .15s, box-shadow .15s; box-shadow: var(--sh-1);
}
.cat-tile:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.cat-tile.active { outline: 3px solid var(--ink); outline-offset: 2px; }
.cat-tile__icon { width: 30px; height: 30px; color: #fff; opacity: .96; margin-bottom: 2px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.12)); }
.cat-tile__icon svg { width: 100%; height: 100%; }
.cat-tile__label { font-weight: 800; font-size: 13.5px; letter-spacing: -.01em; line-height: 1.14; text-shadow: 0 1px 2px rgba(0,0,0,.14); hyphens: auto; -webkit-hyphens: auto; overflow-wrap: break-word; }
.cat-tile__count {
  margin-top: auto; font-size: 11.5px; font-weight: 800; background: rgba(0,0,0,.2);
  padding: 2px 9px; border-radius: var(--r-pill);
}
/* pastel palette per modifier */
.cat-tile--all    { background: var(--c-all); }
.cat-tile--promo  { background: var(--c-promo); }
.cat-tile--new    { background: var(--c-new); }
.cat-tile--coffee { background: var(--c-coffee); }
.cat-tile--wash   { background: var(--c-wash); }
.cat-tile--soft   { background: var(--c-soft); }
.cat-tile--dish   { background: var(--c-dish); }
.cat-tile--clean  { background: var(--c-clean); }
.cat-tile--stain  { background: var(--c-stain); }
.cat-tile--bleach { background: var(--c-bleach); }
.cat-tile--scale  { background: var(--c-scale); }
.cat-tile--soap   { background: var(--c-soap); }

/* ============================================================
   STICKY TOOLBAR (search + brands + cart)
   ============================================================ */
.toolbar {
  position: sticky; top: 0; z-index: 300;
  background: rgba(244,244,243,.86); backdrop-filter: saturate(180%) blur(12px);
  padding: 12px 0; transition: box-shadow .2s;
}
.toolbar.stuck { box-shadow: 0 4px 16px rgba(20,20,20,.06); }
.toolbar__inner { display: flex; gap: 10px; align-items: center; }
.search-box {
  position: relative; flex: 1; display: flex; align-items: center;
  background: var(--card); border-radius: var(--r-pill); box-shadow: var(--sh-1);
  padding: 0 16px; height: 50px;
}
.search-box__icon { color: var(--muted); display: grid; place-items: center; flex: 0 0 auto; }
.search-box input {
  flex: 1; border: none; outline: none; background: none; font-size: 15px; font-weight: 600;
  padding: 0 10px; height: 100%;
}
.search-box input::placeholder { color: var(--muted); font-weight: 500; }
.search-box__clear {
  display: none; width: 22px; height: 22px; border-radius: 50%; background: var(--line);
  color: var(--ink-2); font-size: 15px; line-height: 22px; text-align: center; flex: 0 0 auto;
}
.search-box.filled .search-box__clear,
.search-box__clear.visible { display: block; }
.search-suggestions {
  display: none; position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 20;
  background: var(--card); border-radius: 16px; box-shadow: var(--sh-2); overflow: hidden; padding: 6px;
}
.search-suggestions.visible { display: block; }
.search-suggestion-item { padding: 11px 14px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; }
.search-suggestion-item:hover, .search-suggestion-item.active { background: var(--green-soft); color: var(--green-ink); }

.toolbar-brand-btn {
  display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 20px;
  border-radius: var(--r-pill); background: var(--green-cta); color: #fff; font-weight: 800; font-size: 14px;
  box-shadow: var(--sh-cta); transition: background .15s, transform .15s; flex: 0 0 auto;
}
.toolbar-brand-btn:hover { background: var(--green-cta-d); transform: translateY(-1px); }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 50px; padding: 0 20px;
  border-radius: var(--r-pill); background: var(--card); box-shadow: var(--sh-1);
  font-weight: 800; font-size: 14px; flex: 0 0 auto; transition: transform .15s;
}
.cart-btn:hover { transform: translateY(-1px); }
.cart-btn__count {
  position: absolute; top: -4px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-pill); background: var(--red); color: #fff; font-size: 11.5px; font-weight: 800;
  display: grid; place-items: center;
}

/* ---------- Chips bar ---------- */
.chips-bar { position: sticky; top: var(--header-h); z-index: 260; background: var(--bg); padding: 4px 0 10px; }
.chips-bar__inner { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 16px; }
.chips-bar__inner::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; padding: 9px 16px; border-radius: var(--r-pill);
  background: var(--card); box-shadow: var(--sh-1); font-weight: 700; font-size: 13.5px; color: var(--ink-2);
  white-space: nowrap; transition: background .15s, color .15s;
}
.chip.active { background: var(--ink); color: #fff; }

/* ============================================================
   CATALOG
   ============================================================ */
main { padding: 8px 0 40px; }
.catalog-header { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 16px; }
.catalog-header__count { font-weight: 800; font-size: 15px; color: var(--ink-2); }
.sort-select { display: flex; align-items: center; gap: 8px; }
.sort-select label { font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.sort-select select {
  appearance: none; -webkit-appearance: none; border: none;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236E6E73' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  box-shadow: var(--sh-1); border-radius: var(--r-pill);
  padding: 10px 38px 10px 18px; font-weight: 700; font-size: 13.5px; cursor: pointer;
}

.catalog-section { margin-bottom: 28px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin: 6px 0 16px; }
.section-heading__icon {
  width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); box-shadow: var(--sh-1);
  display: grid; place-items: center; color: var(--green-ink); flex: 0 0 auto;
}
.section-heading__icon svg { width: 24px; height: 24px; stroke: var(--green-ink); }
.section-heading__text { flex: 1; }
.section-heading__text h2 { font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.section-heading__text p { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-top: 1px; }
.section-heading__count { font-size: 13px; color: var(--muted); font-weight: 700; white-space: nowrap; }

.product-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }

/* ---------- Product card ---------- */
.product-card {
  position: relative; background: var(--card); border-radius: var(--r-card);
  box-shadow: var(--sh-1); overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s; cursor: pointer;
  content-visibility: auto; contain-intrinsic-size: auto 340px;   /* не рендерить карточки за экраном */
}
.product-card:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.product-card--out { opacity: .72; }
.product-card__img-wrap {
  position: relative; background: #fff;
  display: grid; place-items: center; padding: 14px;
}
.product-card__img { width: 100%; object-fit: contain; height: auto; max-height: 200px; min-height: 200px; border-radius: 10px; }
.product-card__img-placeholder { width: 60%; height: 60%; color: var(--line); display: grid; place-items: center; }
.product-card__img-placeholder svg { width: 100%; height: 100%; }

.product-card__badges { position: absolute; top: 10px; left: 10px; display: flex; flex-direction: column; gap: 6px; z-index: 2; }
.product-card__badge {
  padding: 4px 9px; border-radius: var(--r-pill); font-size: 10.5px; font-weight: 800;
  text-transform: uppercase; letter-spacing: .02em; background: var(--ink); color: #fff; width: fit-content;
}
.product-card__badge--out   { background: #8A8A8E; }
.product-card__badge--promo { background: var(--red); }
.product-card__badge--sale  { background: var(--red); }
.product-card__badge--new   { background: var(--blue-bg); color: var(--blue-ink); }
.product-card__wholesale-badge {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  padding: 4px 9px; border-radius: var(--r-pill); font-size: 10px; font-weight: 800;
  background: var(--green-soft); color: var(--green-ink);
}
.product-card__flag { display: none; }
.product-card__views { display: none; }

.product-card__body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.product-card__brand { display: none; }   /* в референсе бренда отдельной строкой нет */
.product-card__name {
  font-size: 14px; font-weight: 700; line-height: 1.25; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.5em;
}
.product-card__desc { display: none; }   /* в карточке не дублируем описание — как в референсе */
.product-card__footer {
  display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: auto; padding-top: 12px;
}
.product-card__price-wrap { display: flex; flex-direction: column; line-height: 1.05; }
.product-card__price { font-size: 18px; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.product-card__price-old { font-size: 12.5px; font-weight: 600; color: var(--muted); text-decoration: line-through; }
.product-card__price-hint { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.product-card__price--out { font-size: 14px; font-weight: 700; color: var(--muted); }

.product-card__action { width: 100%; }
.product-card__add {
  width: 100%; height: 44px; border-radius: 12px; background: var(--green-plus); color: #fff;
  display: grid; place-items: center; font-size: 24px; font-weight: 600; line-height: 1;
  box-shadow: var(--sh-cta); transition: background .15s, transform .15s;
}
.product-card__add:hover { background: var(--green-plus-d); }
.product-card__add--combo {
  width: 100%; height: 44px; padding: 0 18px; font-size: 14px; font-weight: 800; border-radius: 12px;
}

/* in-card stepper — во всю ширину под ценой */
.card-stepper {
  display: flex; width: 100%; align-items: center; justify-content: space-between; background: var(--green-soft);
  border-radius: 12px; padding: 4px; height: 44px;
}
.card-stepper__btn {
  width: 36px; height: 36px; border-radius: 50%; background: var(--green-plus); color: #fff;
  display: grid; place-items: center; font-size: 20px; font-weight: 600; line-height: 1;
  transition: background .15s;
}
.card-stepper__btn:hover { background: var(--green-plus-d); }
.card-stepper__val { min-width: 26px; text-align: center; font-weight: 800; font-size: 15px; color: var(--green-ink); }

/* empty / skeleton */
.empty-state { display: none; text-align: center; padding: 60px 20px; }
.empty-state.visible { display: block; }
.empty-state__icon { width: 64px; height: 64px; margin: 0 auto 16px; color: var(--line); }
.empty-state h3 { font-size: 19px; font-weight: 800; }
.empty-state p { color: var(--ink-2); margin-top: 6px; font-weight: 600; }
.empty-state__reset { margin-top: 18px; padding: 11px 22px; border-radius: 12px; background: var(--green-cta); color: #fff; font-size: 14px; font-weight: 800; transition: filter .15s; }
.empty-state__reset:hover { filter: brightness(.95); }
.skeleton-wrap { margin-top: 16px; }
.skeleton-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.skeleton-card { background: var(--card); border-radius: var(--r-card); padding: 12px; box-shadow: var(--sh-1); }
.sk { background: linear-gradient(90deg, #eee 25%, #f5f5f5 37%, #eee 63%); background-size: 400% 100%;
      animation: sk 1.4s ease infinite; border-radius: 8px; }
.sk--img { aspect-ratio: 1/1; border-radius: 14px; margin-bottom: 12px; }
.sk--line { height: 12px; margin-top: 8px; }
.sk--line-short { width: 40%; } .sk--line-med { width: 70%; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ============================================================
   STICKY CART BAR (mobile pill)
   ============================================================ */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 550;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
  transform: translateY(calc(100% + 90px)); transition: transform .28s cubic-bezier(.4,0,.2,1);
  pointer-events: none;
}
.cart-bar--visible { transform: translateY(0); pointer-events: auto; }
.cart-bar__inner {
  max-width: var(--maxw); margin: 0 auto; display: flex; align-items: center; gap: 12px;
  background: var(--green-cta); color: #fff; border-radius: var(--r-pill);
  padding: 10px 12px 10px 22px; box-shadow: 0 8px 26px var(--green-glow);
}
.cart-bar__info { display: flex; flex-direction: column; line-height: 1.15; flex: 1; }
.cart-bar__count { font-size: 12.5px; font-weight: 700; opacity: .92; }
.cart-bar__total { font-size: 18px; font-weight: 800; }
.cart-bar__btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: var(--r-pill);
  background: #fff; color: var(--green-ink); font-weight: 800; font-size: 15px; flex: 0 0 auto;
  transition: transform .15s;
}
.cart-bar__btn:hover { transform: scale(1.03); }

/* ============================================================
   CART DRAWER
   ============================================================ */
.cart-overlay {
  position: fixed; inset: 0; z-index: 700; background: rgba(20,20,20,.42);
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.cart-overlay.active { opacity: 1; visibility: visible; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 710; width: 420px; max-width: 92vw;
  background: var(--bg); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.cart-drawer.active { transform: translateX(0); }
.cart-drawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px; background: var(--card); box-shadow: var(--sh-1);
}
.cart-drawer__title { display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.cart-drawer__title svg { display: none; }
.cart-drawer__title span { background: var(--green-soft); color: var(--green-ink); font-size: 13px; font-weight: 800; padding: 3px 11px; border-radius: var(--r-pill); }
.cart-drawer__clear-btn { width: 40px; height: 40px; border-radius: 50%; background: var(--line-2); color: var(--ink-2); display: grid; place-items: center; transition: background .15s, color .15s; }
.cart-drawer__clear-btn:hover { background: #FDE7E7; color: var(--red); }
.cart-drawer__close { width: 36px; height: 36px; border-radius: 50%; background: var(--line-2); display: grid; place-items: center; color: var(--ink-2); }
.cart-drawer__body { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }

.cart-item { position: relative; display: flex; gap: 14px; align-items: center; background: var(--card); border-radius: 18px; box-shadow: var(--sh-1); padding: 12px 14px; }
.cart-item__img { width: 108px; height: 108px; border-radius: 14px; background: #fff; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; padding: 6px; }
.cart-item__img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.cart-item__main { flex: 1; min-width: 0; padding-right: 18px; }
.cart-item__name { font-size: 14px; font-weight: 800; line-height: 1.28; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item__vol { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-top: 3px; }
.cart-item__vol:empty { display: none; }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; }
.cart-item__qty { display: inline-flex; align-items: center; gap: 3px; background: var(--bg); border-radius: var(--r-pill); padding: 4px; }
.cart-item__qty-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 19px; line-height: 1; transition: background .15s; }
.cart-item__qty-btn:first-child { background: #fff; box-shadow: var(--sh-1); color: var(--ink-2); }
.cart-item__qty-btn:last-child { background: var(--green-plus); color: #fff; }
.cart-item__qty-btn:last-child:hover { background: var(--green-plus-d); }
.cart-item__qty-val { min-width: 26px; text-align: center; font-weight: 800; font-size: 15px; color: var(--ink); }
.cart-item__price { font-size: 18px; font-weight: 800; color: var(--ink); white-space: nowrap; }
.cart-item__del { position: absolute; top: 8px; right: 10px; width: 26px; height: 26px; border-radius: 50%; color: var(--muted); font-size: 17px; line-height: 1; display: grid; place-items: center; transition: background .15s, color .15s; }
.cart-item__del:hover { background: #FDE7E7; color: var(--red); }

.cart-empty { text-align: center; padding: 60px 20px; color: var(--ink-2); }
.cart-empty__icon { width: 64px; height: 64px; margin: 0 auto 14px; color: var(--line); display: grid; place-items: center; }
.cart-empty__icon svg { width: 100%; height: 100%; }
.cart-empty p { font-size: 17px; color: var(--ink); font-weight: 800; }
.cart-empty__sub { font-size: 13.5px !important; color: var(--ink-2) !important; font-weight: 600 !important; margin-top: 4px; }
.cart-empty__cta { margin-top: 18px; padding: 12px 22px; border-radius: var(--r-pill); background: var(--green-soft); color: var(--green-ink); font-weight: 800; font-size: 14px; }

.cart-drawer__foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom,0px)); background: var(--card); box-shadow: 0 -4px 20px rgba(20,20,20,.06); }
.cart-foot-chips { display: flex; gap: 8px; margin-bottom: 12px; }
.cart-foot-chip { flex: 1; display: inline-flex; align-items: center; gap: 7px; background: var(--green-soft); color: var(--green-ink); border-radius: 12px; padding: 10px 12px; font-size: 12.5px; font-weight: 700; line-height: 1.15; }
.cart-address-card { display: flex; align-items: center; gap: 12px; width: 100%; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 14px; margin-bottom: 14px; text-align: left; transition: border-color .15s; }
.cart-address-card:hover { border-color: var(--green-cta); }
.cart-address-card__pin { width: 36px; height: 36px; border-radius: 50%; background: var(--green-soft); color: var(--green-ink); display: grid; place-items: center; flex: 0 0 auto; }
.cart-address-card__text { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.cart-address-card__text b { font-size: 14px; font-weight: 800; }
.cart-address-card__text small { font-size: 12px; color: var(--ink-2); font-weight: 600; margin-top: 1px; }
.cart-address-card__chev { color: var(--muted); flex: 0 0 auto; }
.cart-discount-info { margin-bottom: 12px; display: flex; flex-direction: column; gap: 6px; }
.cart-discount-applied, .cart-cash-hint {
  display: flex; align-items: center; gap: 8px; background: var(--green-soft); color: var(--green-ink);
  border-radius: 12px; padding: 10px 14px; font-size: 13px; font-weight: 700;
}
.cart-promo-warning { background: #FDECEC; color: var(--red-d); border-radius: 12px; padding: 10px 14px; font-size: 12.5px; font-weight: 700; }
.cart-promo-note { font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 0 4px; }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.cart-total__label { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.cart-total__val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.cart-checkout-btn {
  width: 100%; padding: 16px; border-radius: var(--r-pill); background: var(--green-cta); color: #fff;
  font-weight: 800; font-size: 16px; box-shadow: var(--sh-cta); transition: background .15s;
}
.cart-checkout-btn:hover { background: var(--green-cta-d); }

/* ============================================================
   GENERIC MODAL OVERLAYS (popup / combo / brand / promo / form / how)
   ============================================================ */
.popup-overlay, .combo-overlay, .brand-overlay, .promo-overlay-modal, .form-overlay, .how-overlay {
  position: fixed; inset: 0; z-index: 800; background: rgba(20,20,20,.5);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; padding: 0;
}
.popup-overlay.active, .combo-overlay.active, .brand-overlay.active,
.promo-overlay-modal.active, .form-overlay.active, .how-overlay.active { opacity: 1; visibility: visible; }
@media (min-width: 640px) {
  .popup-overlay, .combo-overlay, .brand-overlay, .promo-overlay-modal, .form-overlay, .how-overlay { align-items: center; padding: 20px; }
}
.popup, .combo-modal, .brand-modal, .promo-detail-modal, .form-modal, .how-modal {
  position: relative; background: var(--card); width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto;
  border-radius: 24px 24px 0 0; transform: translateY(30px); transition: transform .28s;
}
@media (min-width: 640px) { .popup, .combo-modal, .brand-modal, .promo-detail-modal, .form-modal, .how-modal { border-radius: 24px; } }
.active .popup, .active .combo-modal, .active .brand-modal, .active .promo-detail-modal, .active .form-modal, .active .how-modal { transform: translateY(0); }
.popup__close, .combo-modal__close, .brand-modal__close, .promo-detail-modal__close, .form-modal__close, .how-modal__close {
  position: absolute; top: 14px; right: 14px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.9); box-shadow: var(--sh-1); color: var(--ink); display: grid; place-items: center; font-size: 18px;
}

/* product popup */
.popup { display: flex; flex-direction: column; }
.popup__img-wrap { background: #fff; height: 260px; display: flex; align-items: center; justify-content: center; padding: 20px; overflow: hidden; flex: 0 0 auto; }
@media (max-width: 640px) { .popup__img-wrap { height: 200px; padding: 16px; } }
.popup__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.popup__body { padding: 22px 24px 26px; }
.popup__brand { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.popup__name { font-size: 22px; font-weight: 800; line-height: 1.2; margin-top: 4px; letter-spacing: -.02em; }
.popup__badges-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.popup__views { font-size: 13px; color: var(--ink-2); font-weight: 600; margin-top: 8px; }
.popup__desc { font-size: 14px; color: var(--ink-2); line-height: 1.5; margin-top: 12px; font-weight: 500; }
.popup__purposes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.popup__purpose-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: var(--r-pill); background: var(--green-soft); color: var(--green-ink); font-size: 12.5px; font-weight: 700; }
.popup__tag-icon { display: inline-flex; align-items: center; width: 15px; height: 15px; }
.popup__tag-icon svg { width: 100%; height: 100%; stroke: var(--green-ink); }
.popup__tag-icon:empty { display: none; }
.popup__price-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 20px; }
.popup__price-group { display: flex; flex-direction: column; }
.popup__price { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.popup__old-price { font-size: 15px; color: var(--muted); text-decoration: line-through; font-weight: 600; }
.popup__qty { display: inline-flex; align-items: center; gap: 8px; background: var(--green-soft); border-radius: var(--r-pill); padding: 6px; }
.popup__qty-btn { width: 40px; height: 40px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); color: var(--green-ink); font-size: 22px; display: grid; place-items: center; }
.popup__qty-val { min-width: 28px; text-align: center; font-weight: 800; font-size: 17px; color: var(--green-ink); }
.popup__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }
.popup__btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 15px; border-radius: var(--r-pill); font-weight: 800; font-size: 15px; transition: background .15s, transform .15s; }
.popup__btn--cart { background: var(--green-cta); color: #fff; box-shadow: var(--sh-cta); }
.popup__btn--cart:hover { background: var(--green-cta-d); }
.popup__btn--order { background: var(--ink); color: #fff; }
.popup__similar { margin-top: 26px; }
.popup__similar-title { font-size: 16px; font-weight: 800; margin-bottom: 12px; }
.popup__similar-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sim-card { background: var(--bg); border-radius: 12px; padding: 8px; text-align: left; display: flex; flex-direction: column; gap: 6px; transition: background .15s; }
.sim-card:hover { background: var(--green-soft); }
.sim-card__img { background: #fff; border-radius: 10px; display: grid; place-items: center; overflow: hidden; padding: 8px; }
.sim-card__img img { max-width: 100%; max-height: 100%; object-fit: contain; height: 120px; }
.sim-card__img--placeholder { color: var(--line); display: grid; place-items: center; }
.sim-card__name { font-size: 11.5px; font-weight: 600; line-height: 1.2; color: var(--ink); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sim-card__price { font-size: 13px; font-weight: 800; color: var(--ink); }

/* combo */
.combo-modal { max-width: 460px; padding: 26px 24px; }
.combo-modal__title { font-size: 20px; font-weight: 800; }
.combo-modal__sub { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; font-weight: 600; }
.combo-variants { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 18px 0; }
.combo-variant-btn { display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--bg); border: 2px solid transparent; text-align: left; transition: border-color .15s, background .15s; }
.combo-variant-btn--selected { border-color: var(--green-cta); background: var(--green-soft); }
.combo-variant-color { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.combo-variant-name { flex: 1; font-size: 13px; font-weight: 700; }
.combo-variant-cnt { font-size: 13px; font-weight: 800; color: var(--green-ink); }
.combo-modal__footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.combo-selected-info { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.combo-modal__add { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: var(--r-pill); background: var(--green-cta); color: #fff; font-weight: 800; }
.combo-modal__add:disabled { background: var(--line); color: var(--muted); box-shadow: none; }

/* brand */
.brand-modal { max-width: 560px; }
.brand-modal__head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 12px; }
.brand-modal__title { font-size: 20px; font-weight: 800; }
.brand-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 8px 24px 26px; }
.brand-card { padding: 14px 12px; border-radius: 14px; background: var(--bg); text-align: center; transition: background .15s; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.brand-card:hover { background: var(--green-soft); }
.brand-card__icon { width: 30px; height: 30px; display: grid; place-items: center; margin-bottom: 2px; }
.brand-card__icon svg { width: 100%; height: 100%; stroke: var(--green-ink); }
.brand-card__name { font-weight: 800; font-size: 13.5px; color: var(--ink); }
.brand-card__sub { font-size: 11px; color: var(--muted); font-weight: 600; }
.brand-card__count { font-size: 11px; color: var(--green-ink); font-weight: 700; }

/* promo detail */
.promo-detail-modal { max-width: 640px; }
.promo-detail-modal__img-wrap { background: var(--green-soft); }
.promo-detail-modal__img-wrap img { width: 100%; object-fit: contain; max-height: 280px; }
.promo-detail-modal__body { padding: 22px 24px 26px; }
.promo-detail-modal__title { font-size: 22px; font-weight: 800; }
.promo-detail-modal__desc { font-size: 14px; color: var(--ink-2); margin-top: 8px; line-height: 1.5; font-weight: 500; }
.promo-detail-modal__products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }

/* how-to modal */
.how-modal { max-width: 480px; padding: 28px 24px; }
.how-modal__title { font-size: 22px; font-weight: 800; margin-bottom: 18px; }
.how-steps { display: flex; flex-direction: column; gap: 16px; }
.how-step { display: flex; gap: 14px; }
.how-step__num { width: 38px; height: 38px; border-radius: 50%; background: var(--green-soft); color: var(--green-ink); font-weight: 800; display: grid; place-items: center; flex: 0 0 auto; }
.how-step__title { font-weight: 800; font-size: 15px; }
.how-step__text { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; line-height: 1.4; font-weight: 500; }
.how-modal__cta { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 22px; padding: 15px; border-radius: var(--r-pill); background: #2AABEE; color: #fff; font-weight: 800; }

/* ============================================================
   ORDER FORM
   ============================================================ */
.form-modal { max-width: 480px; padding: 26px 24px 30px; }
.form-modal__title { font-size: 22px; font-weight: 800; }
.form-modal__sub { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; font-weight: 600; }
.form-field { margin-top: 16px; }
.form-field label { display: block; font-size: 13px; font-weight: 700; color: var(--ink-2); margin-bottom: 7px; }
.form-field__required { color: var(--red); font-size: 11px; margin-left: 4px; }
.form-field input[type=text]:not(.address-input), .form-field input[type=tel] {
  width: 100%; height: 52px; border: 2px solid var(--line); border-radius: var(--r-in); padding: 0 16px;
  font-size: 15px; font-weight: 600; background: var(--card); transition: border-color .15s;
}
.form-field input:focus { outline: none; border-color: var(--green-cta); }
.form-textarea { width: 100%; border: 2px solid var(--line); border-radius: var(--r-in); padding: 12px 16px; font-size: 15px; font-weight: 600; font-family: inherit; background: var(--card); color: var(--ink); transition: border-color .15s; resize: vertical; min-height: 50px; }
.form-textarea:focus { outline: none; border-color: var(--green-cta); }
.form-textarea::placeholder { color: var(--muted); }
.form-field__optional { color: var(--muted); font-size: 11px; margin-left: 4px; font-weight: 600; }
.address-input-wrap { position: relative; display: flex; align-items: center; }
.address-input-wrap__icon { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--green-ink); pointer-events: none; display: flex; }
.address-input { width: 100%; height: 52px; border: 2px solid var(--line); border-radius: var(--r-in); padding: 0 44px; font-size: 15px; font-weight: 600; background: var(--card); transition: border-color .15s; }
.address-input:focus { outline: none; border-color: var(--green-cta); }
.address-clear-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; background: var(--line); color: var(--ink-2); display: grid; place-items: center; }
.address-suggestions { display: none; margin-top: 6px; background: var(--card); border-radius: 14px; box-shadow: var(--sh-2); overflow: hidden; max-height: 300px; overflow-y: auto; }
.address-suggestions.visible { display: block; }
.addr-sugg-item { padding: 11px 16px; cursor: pointer; border-bottom: 1px solid var(--line-2); transition: background .12s; }
.addr-sugg-item:last-child { border-bottom: none; }
.addr-sugg-item--active, .addr-sugg-item:hover { background: var(--green-soft); }
.addr-sugg-item__main { font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.addr-sugg-item--active .addr-sugg-item__main, .addr-sugg-item:hover .addr-sugg-item__main { color: var(--green-ink); }
.addr-sugg-item__sub { font-size: 12px; color: var(--ink-2); font-weight: 500; margin-top: 1px; }
.address-chosen { margin-top: 8px; }
.address-chosen__inner { display: flex; align-items: center; gap: 10px; background: var(--green-soft); color: var(--green-ink); border-radius: 12px; padding: 12px 14px; font-weight: 700; font-size: 14px; }
.address-chosen__text { flex: 1; }
.address-chosen__edit { color: var(--green-ink); }
.address-tel-option { margin-top: 10px; }
.address-tel-btn { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--ink-2); }
.form-section-label { font-size: 13px; font-weight: 700; color: var(--ink-2); margin: 18px 0 8px; }
.pay-options { display: flex; flex-direction: column; gap: 10px; }
.pay-radio { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--r-in); border: 2px solid var(--line); cursor: pointer; transition: border-color .15s; }
.pay-radio input { display: none; }
.pay-radio__box { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; flex: 0 0 auto; }
.pay-radio__dot { width: 12px; height: 12px; border-radius: 50%; background: var(--green-cta); transform: scale(0); transition: transform .15s; }
.pay-radio input:checked ~ .pay-radio__box { border-color: var(--green-cta); }
.pay-radio input:checked ~ .pay-radio__box .pay-radio__dot { transform: scale(1); }
.pay-radio:has(input:checked) { border-color: var(--green-cta); }
.pay-radio__info { display: flex; flex-direction: column; }
.pay-radio__title { font-weight: 700; font-size: 14.5px; }
.pay-radio__hint { font-size: 12px; color: var(--ink-2); font-weight: 600; }
.pay-radio__badge { font-size: 11.5px; font-weight: 800; color: var(--green-ink); background: var(--green-soft); padding: 2px 8px; border-radius: var(--r-pill); width: fit-content; margin-top: 2px; }
.order-summary { margin-top: 18px; padding: 14px 16px; border-radius: var(--r-in); background: var(--bg); }
.order-summary__row { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.order-summary__label { color: var(--ink-2); font-size: 14px; font-weight: 700; flex: 0 0 auto; }
#orderTotalDisplay { display: inline-flex; align-items: baseline; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.order-total__val { font-size: 16px; font-weight: 800; color: var(--ink); }
.order-total__old { font-size: 13.5px; font-weight: 600; color: var(--muted); text-decoration: line-through; opacity: .55; }
.order-total__new { font-size: 17px; font-weight: 800; color: var(--green-ink); }
.order-total__save { font-size: 11.5px; font-weight: 800; color: #fff; background: var(--green-cta); padding: 2px 8px; border-radius: var(--r-pill); align-self: center; }
.order-discount-note { font-size: 12.5px; color: var(--ink-2); font-weight: 600; margin-top: 8px; line-height: 1.4; }
.order-savings { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--green-ink); font-weight: 800; margin-top: 6px; }
.order-nudge { font-size: 12.5px; font-weight: 700; color: #92400e; background: #FEF3C7; border: 1px dashed #FCD34D; border-radius: 10px; padding: 8px 12px; margin-top: 8px; }
.order-nudge b { font-weight: 800; }
.form-checkbox { display: flex; gap: 10px; margin-top: 18px; cursor: pointer; }
.form-checkbox input { display: none; }
.form-checkbox__box { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line); display: grid; place-items: center; flex: 0 0 auto; margin-top: 1px; }
.form-checkbox__check { width: 12px; height: 12px; border-radius: 3px; background: var(--green-cta); transform: scale(0); transition: transform .15s; }
.form-checkbox input:checked ~ .form-checkbox__box { border-color: var(--green-cta); }
.form-checkbox input:checked ~ .form-checkbox__box .form-checkbox__check { transform: scale(1); }
.form-checkbox__text { font-size: 12.5px; color: var(--ink-2); line-height: 1.4; font-weight: 500; }
.form-checkbox__text a { color: var(--green-ink); font-weight: 700; }
.form-submit { width: 100%; margin-top: 20px; padding: 16px; border-radius: var(--r-pill); background: var(--green-cta); color: #fff; font-weight: 800; font-size: 16px; box-shadow: var(--sh-cta); }
.form-submit:hover { background: var(--green-cta-d); }
.form-success { display: none; text-align: center; padding: 30px 10px; }
.form-success.visible { display: block; }
.form-success__icon { margin: 0 auto 16px; width: fit-content; }
.form-success__title { font-size: 20px; font-weight: 800; }
.form-success__text { font-size: 14px; color: var(--ink-2); margin-top: 8px; font-weight: 500; }
.form-success__tg { display: inline-block; margin-top: 18px; padding: 13px 24px; border-radius: var(--r-pill); background: #2AABEE; color: #fff; font-weight: 800; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: #12351C; color: #fff; margin-top: 40px; padding: 40px 0 100px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
.footer__logo { font-size: 22px; font-weight: 800; }
.footer__logo em { color: #8FE06A; font-style: normal; }
.footer__tagline { font-size: 14px; opacity: .72; margin-top: 10px; line-height: 1.5; max-width: 420px; font-weight: 500; }
.footer__cta { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; padding: 13px 22px; border-radius: var(--r-pill); background: var(--green-cta); color: #fff; font-weight: 800; }
.footer__contacts { text-align: right; }
.footer__phone { font-size: 22px; font-weight: 800; }
.footer__contact-name { font-size: 13px; opacity: .7; margin-top: 4px; }
.footer__socials { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; }
.footer__social { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.footer__social--tg { background: #2AABEE; } .footer__social--max { background: #7B61FF; }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 30px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; opacity: .72; }
.footer__bottom-links { display: flex; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   FLOAT WIDGETS (desktop only — mobile uses bottom-nav)
   ============================================================ */
.float-widgets { position: fixed; right: 18px; bottom: 20px; z-index: 500; display: flex; flex-direction: column; gap: 12px; }
.float-btn { position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--sh-2); color: #fff; transition: transform .15s; }
.float-btn:hover { transform: translateY(-3px); }
.float-btn--brand { background: var(--green-cta); }
.float-btn--tg { background: #2AABEE; }
.float-btn--max { background: #7B61FF; }
.float-btn--cart { background: var(--ink); }
.float-btn--phone { background: var(--green-plus); }
.float-btn--top { background: var(--card); color: var(--ink); }
.float-btn span.js-cart-count { position: absolute; top: -2px; right: -2px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: var(--r-pill); background: var(--red); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }

/* ============================================================
   BOTTOM NAV (mobile) — NEW
   ============================================================ */
.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 540;
  background: rgba(255,255,255,.94); backdrop-filter: blur(12px); box-shadow: 0 -2px 20px rgba(20,20,20,.08);
  padding: 8px 6px calc(6px + env(safe-area-inset-bottom, 0px));
  justify-content: space-around;
}
.bottom-nav__item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; position: relative; }
.bottom-nav__item svg { width: 24px; height: 24px; }
.bottom-nav__item--active { color: var(--green-ink); }
.bottom-nav__badge { position: absolute; top: -3px; right: 50%; margin-right: -20px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: var(--r-pill); background: var(--red); color: #fff; font-size: 10px; font-weight: 800; display: grid; place-items: center; }

/* ============================================================
   COOKIE BANNER (floating card)
   ============================================================ */
.cookie-banner {
  position: fixed; left: 50%; bottom: 20px; transform: translate(-50%, 140%); z-index: 560;
  width: min(720px, calc(100% - 32px)); display: flex; align-items: center; gap: 16px;
  background: var(--ink); color: #fff; border-radius: 18px; padding: 16px 20px; box-shadow: var(--sh-2);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.cookie-banner.visible { transform: translate(-50%, 0); }
.cookie-banner__text { flex: 1; font-size: 13.5px; line-height: 1.4; font-weight: 500; }
.cookie-banner__text a { color: #8FE06A; font-weight: 700; }
.cookie-banner__actions { display: flex; gap: 8px; flex: 0 0 auto; }
.cookie-banner__btn { padding: 10px 18px; border-radius: var(--r-pill); font-weight: 800; font-size: 13.5px; }
.cookie-banner__btn--ok { background: var(--green-cta); color: #fff; }
.cookie-banner__btn--more { background: rgba(255,255,255,.12); color: #fff; }

/* ---------- Toast ---------- */
#singleToast {
  position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); z-index: 900;
  background: var(--ink); color: #fff; padding: 13px 22px; border-radius: var(--r-pill); font-weight: 700; font-size: 14px;
  opacity: 0; visibility: hidden; transition: opacity .25s, transform .25s, visibility .25s; box-shadow: var(--sh-2);
}
#singleToast.show { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1100px) {
  .product-grid, .skeleton-grid { grid-template-columns: repeat(4, 1fr); }
  .cat-tiles { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .promo-row { grid-template-columns: 1fr; }
  .product-grid, .skeleton-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .container { padding: 0 12px; }
  .hero-promo-link { display: none; }              /* «Акции» есть в нижнем таб-баре */
  .hero-socials--desktop { display: flex; }        /* TG/MAX возвращаем на мобилку */
  .hero-contacts { gap: 7px; }
  .hero-contacts__social { width: 40px; height: 40px; }
  .hero-phone__text { display: none; }
  .hero-phone { padding: 8px; }
  .hero-logo__name { font-size: 17px; }
  .hero-logo__tag { display: none; }
  .promo-card__title { font-size: 24px; }
  .promo-card__body { padding: 26px 24px; }
  .promo-card--banner { min-height: 0; }
  .promo-card--banner img { height: auto; }
  .cat-tiles { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .cat-tile { padding: 13px 11px; }
  .cat-tile__label { font-size: 12.5px; }
  .product-grid, .skeleton-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .product-card__img { max-height: 150px; min-height: 150px; }
  .product-card__name { font-size: 12px; -webkit-line-clamp: 3; min-height: 3.3em; line-height: 1.3; }
  .product-card__body { padding: 10px 12px 12px; }
  .toolbar__inner .cart-btn { display: none; }               /* корзина уходит в bottom-nav */
  .section-heading__text h2 { font-size: 18px; }
  .main-promo-card { flex-direction: column; padding: 0; gap: 0; }
  .main-promo-card__img { width: 100%; max-width: 100%; height: 265px; min-height: 0; }
  .main-promo-card__body { padding: 15px; }
  .footer { padding-bottom: 120px; }
  .footer__grid { grid-template-columns: 1fr; gap: 22px; }
  .footer__contacts { text-align: left; }
  .footer__socials { justify-content: flex-start; }
  /* на мобиле: только связь (TG/MAX/телефон), справа снизу, над «Оформить» */
  .float-widgets { display: flex; right: 12px; bottom: 145px; gap: 10px; z-index: 545; }
  .float-btn--brand, .float-btn--cart, .float-btn--top { display: none; }
  .float-btn { width: 46px; height: 46px; }
  .bottom-nav { display: flex; }
  body { padding-bottom: 68px; }
  .cart-bar { bottom: 55px; }                                /* над bottom-nav */
  .cookie-banner { bottom: 76px; flex-direction: column; align-items: stretch; gap: 12px; }
  .cookie-banner__actions { justify-content: stretch; }
  .cookie-banner__btn { flex: 1; text-align: center; }
  .cart-drawer { max-width: 100vw; }
  .cart-drawer__body { overflow-x: hidden; padding: 12px; }
  .cart-item { padding: 10px 12px; gap: 12px; }
  .cart-item__img { width: 100px; height: 100px; }
  .cart-item__name { font-size: 12px; }
  .cart-item__price { font-size: 16px; }
}

/* подъём плавающих виджетов над cart-bar задаётся в мобильном медиа-блоке */

/* На десктопе нижняя корзина-бар не нужна (перекрывала тулбар) — корзина открывается кнопкой в тулбаре */
@media (min-width: 641px) {
  .cart-bar { display: none !important; }
}
/* высота фото на мобилке — через .product-card__img max/min-height (см. блок max-width:640) */

/* Логотип-герб (круглый, на белом) */
.hero-logo__mark { position: relative; background: #fff; }
.hero-logo__fallback { display: none; }
.hero-logo__mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ── Микро-анимации ── */
.product-card__add, .card-stepper__btn, .cart-item__qty-btn, .cart-bar__btn, .cart-checkout-btn,
.popup__btn, .popup__qty-btn, .toolbar-brand-btn, .combo-modal__add, .form-submit,
.cat-tile, .promo-card__cta, .main-promo-card__btn { transition: transform .12s, background .15s, box-shadow .15s; }
.product-card__add:active, .card-stepper__btn:active, .cart-item__qty-btn:active, .cart-bar__btn:active,
.cart-checkout-btn:active, .popup__btn:active, .popup__qty-btn:active, .toolbar-brand-btn:active,
.combo-modal__add:active:not(:disabled), .form-submit:active, .cat-tile:active,
.promo-card__cta:active, .main-promo-card__btn:active { transform: scale(.92); }

/* «летящий» шарик в корзину при добавлении (JS: flyToCart → .cart-fly + --tx/--ty) */
.cart-fly {
  position: fixed; z-index: 9999; width: 22px; height: 22px; border-radius: 50%;
  background: var(--green-plus); box-shadow: 0 4px 14px var(--green-glow); pointer-events: none;
  transform: translate(-50%, -50%); animation: cartFly .7s cubic-bezier(.5,-0.2,.7,1) forwards;
}
@keyframes cartFly {
  0%   { transform: translate(-50%,-50%) scale(1); opacity: 1; }
  65%  { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx,0px)), calc(-50% + var(--ty,0px))) scale(.25); opacity: 0; }
}
/* пульс бейджа корзины (JS добавляет .pop) */
.js-cart-count.pop { animation: badgePop .35s ease; }
@keyframes badgePop { 0% { transform: scale(1); } 40% { transform: scale(1.5); } 100% { transform: scale(1); } }
/* вспышка нижней панели корзины (JS добавляет .cart-bar--flash) */
.cart-bar--flash .cart-bar__inner { animation: cartBarFlash .4s ease; }
@keyframes cartBarFlash { 0% { transform: scale(1); } 45% { transform: scale(1.025); } 100% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .cart-fly { display: none; } *, *::before, *::after { animation-duration: .001ms !important; } }
