/* Сайт магазина FloraDesk: основа, раскладки каталога, вид главного экрана и 10 тем ([data-theme]). */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f2ef;
  --text: #1d1b1a;
  --muted: #5f5a56;
  --line: #e7e2dc;
  --accent: #1d1b1a;
  --on-accent: #ffffff;
  --sale: #b8322a;
  --new: #2f6b4f;
  --seasonal: var(--accent);
  --hero-bg: var(--surface-2);
  --hero-text: var(--text);
  --infobar-bg: var(--accent);
  --infobar-text: var(--on-accent);
  --radius: 16px;
  --radius-img: var(--radius);
  --radius-btn: 999px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 10px 30px rgba(0, 0, 0, .06);
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: var(--font-body);
  --head-weight: 700;
  --head-style: normal;
  --head-transform: none;
  --head-spacing: -.01em;
  --hero-size: clamp(2.4rem, 6vw, 4.4rem);
  --photo-ratio: 4 / 5;
  --max: 1200px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button, select, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.sprite { position: absolute; }
.ico { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.ico-lg { width: 28px; height: 28px; color: var(--accent); margin-bottom: 10px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 50; background: var(--surface); padding: 8px 12px; }
.wrap { width: 100%; max-width: var(--max); margin-left: auto; margin-right: auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 768px) { .wrap { padding-left: 28px; padding-right: 28px; } }

h1, h2, h3, .brand {
  font-family: var(--font-head);
  font-weight: var(--head-weight);
  font-style: var(--head-style);
  text-transform: var(--head-transform);
  letter-spacing: var(--head-spacing);
  line-height: 1.12;
  overflow-wrap: anywhere;
  text-wrap: balance;
}

/* --- пример на floradesk.ru ------------------------------------------------------- */
.demo-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px;
  padding: 8px 16px; background: #1b1a19; color: #f4efe9; font: 500 .85rem/1.4 system-ui, sans-serif; text-align: center;
}
.demo-bar a { color: #ffd9a8; font-weight: 700; }

/* --- верхняя полоса ---------------------------------------------------------------- */
.infobar { background: var(--infobar-bg); color: var(--infobar-text); font-size: .82rem; }
.infobar-inner { display: flex; gap: 8px 22px; align-items: center; min-height: 36px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.ib-item { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; opacity: .92; }
.ib-phone { margin-left: auto; font-weight: 600; opacity: 1; }
@media (max-width: 640px) {
  #ib-place { display: none !important; }
  .infobar-inner { flex-wrap: nowrap; white-space: nowrap; gap: 12px; }
  .ib-item { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .ib-phone { flex: none; }
}

/* --- шапка ------------------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { font-size: 1.45rem; text-decoration: none; margin: 0 auto 0 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; gap: 24px; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; padding: 10px 0; }
.nav a:hover { color: var(--text); }
.top-phone { text-decoration: none; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-btn {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  border: 0; background: var(--accent); color: var(--on-accent);
  border-radius: var(--radius-btn); padding: 0 18px; min-height: 44px; font-weight: 600;
  transition: transform .15s var(--ease), opacity .15s;
}
.cart-btn:active { transform: scale(.97); }
.badge {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
  background: var(--on-accent); color: var(--accent);
  font-size: .78rem; font-weight: 700; display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}
.cart-btn.bump { animation: bump .35s var(--ease); }
@keyframes bump { 40% { transform: scale(1.08); } }

/* --- главный экран: split (по умолчанию), cover (фото на весь экран), center ---------- */
.hero { background: var(--hero-bg); color: var(--hero-text); position: relative; overflow: hidden; }
.hero-grid { display: grid; gap: 32px; align-items: center; padding-top: clamp(40px, 7vw, 88px); padding-bottom: clamp(40px, 7vw, 88px); }
.hero-text { min-width: 0; }
.hero h1 { font-size: var(--hero-size); margin: 0 0 18px; max-width: 14ch; }
.hero-desc { font-size: 1.12rem; max-width: 46ch; margin: 0 0 22px; opacity: .88; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-media { margin: 0; position: relative; }
.hero-media img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius-img); box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .hero-grid.has-media { grid-template-columns: 1.1fr .9fr; gap: 56px; }
  .hero-media img { max-height: 600px; }
}
@media (max-width: 899px) {
  .hero-media img { aspect-ratio: 16 / 11; }
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .8; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

[data-hero="cover"] .hero { color: #fff; background: #1a1714; }
[data-hero="cover"] .hero-grid { grid-template-columns: 1fr !important; min-height: min(78vh, 720px); align-content: end; position: static; }
[data-hero="cover"] .hero-media { position: absolute; inset: 0; }
[data-hero="cover"] .hero-media img { height: 100%; max-height: none; aspect-ratio: auto; border-radius: 0; box-shadow: none; }
[data-hero="cover"] .hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .15) 0%, rgba(0, 0, 0, .25) 40%, rgba(0, 0, 0, .72) 100%); }
[data-hero="cover"] .hero-text { position: relative; z-index: 1; }
[data-hero="cover"] .hero .btn-ghost { color: #fff; }
[data-hero="cover"] .hero .chip { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .3); }

[data-hero="center"] .hero-grid { grid-template-columns: 1fr !important; justify-items: center; text-align: center; }
[data-hero="center"] .hero h1, [data-hero="center"] .hero-desc { margin-left: auto; margin-right: auto; }
[data-hero="center"] .hero-actions, [data-hero="center"] .hero-meta { justify-content: center; }
[data-hero="center"] .hero-media { width: 100%; max-width: 1040px; }
[data-hero="center"] .hero-media img { aspect-ratio: 21 / 9; max-height: 460px; }
@media (max-width: 899px) { [data-hero="center"] .hero-media img { aspect-ratio: 4 / 3; } }

/* --- кнопки ------------------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px; border-radius: var(--radius-btn);
  border: 1px solid transparent; font-weight: 600; text-decoration: none; text-align: center;
  transition: transform .15s var(--ease), opacity .15s, background-color .15s, color .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { opacity: .88; }
.btn-ghost { border-color: currentColor; background: transparent; color: inherit; }
.btn-ghost:hover:not(:disabled) { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn-small { min-height: 42px; padding: 0 18px; font-size: .92rem; }
.btn-block { width: 100%; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 0; flex: none;
  background: var(--surface-2); font-size: 1.5rem; line-height: 1; color: var(--text);
}
.link-btn { border: 0; background: none; color: var(--accent); text-decoration: underline; padding: 0; font-weight: 600; }
.text-link { color: var(--accent); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* --- преимущества ---------------------------------------------------------------------- */
.highlights { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); margin-top: 32px; }
.hl { display: flex; gap: 14px; align-items: flex-start; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.hl .ico { width: 26px; height: 26px; color: var(--accent); margin-top: 2px; }
.hl h3 { margin: 0 0 2px; font-size: 1rem; font-family: var(--font-body); font-style: normal; font-weight: 700; text-transform: none; letter-spacing: 0; }
.hl p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; }

/* --- разделы ------------------------------------------------------------------------- */
.section { padding-top: clamp(48px, 7vw, 80px); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.kicker { margin: 0 0 6px; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.section-title { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0; }
.count { font-family: var(--font-body); font-size: .4em; font-weight: 500; color: var(--muted); letter-spacing: 0; vertical-align: .5em; font-style: normal; }
.seasonal-title { color: var(--seasonal); }
.sort { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: .9rem; }
.sort select { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px 10px; min-height: 42px; color: var(--text); }
.notice { margin-top: 24px; margin-bottom: 0; }
.notice { padding: 14px 18px; border-radius: var(--radius); background: var(--surface-2); border-left: 4px solid var(--accent); max-width: calc(var(--max) - 56px); }
.empty { color: var(--muted); padding: 24px 0; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -4px 0 24px; }
.filter {
  min-height: 40px; padding: 0 16px; border-radius: var(--radius-btn); border: 1px solid var(--line);
  background: var(--surface); font-size: .92rem; font-weight: 500; color: var(--text);
}
.filter[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* --- карточки букетов ------------------------------------------------------------------ */
.products { display: grid; gap: 28px 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.product { display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.product-open { display: block; padding: 0; border: 0; background: none; text-align: left; width: 100%; }
.product-media { position: relative; aspect-ratio: var(--photo-ratio); background: var(--surface-2); overflow: hidden; }
.photo { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.product-open:hover .photo { transform: scale(1.04); }
.photo-empty { display: grid; place-items: center; color: var(--muted); font-size: .9rem; }
.badges { position: absolute; top: 12px; left: 12px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.sheet-body .badges { position: static; flex-direction: row; }
.tag { padding: 4px 10px; border-radius: 999px; background: var(--sale); color: #fff; font-size: .75rem; font-weight: 700; letter-spacing: .02em; }
.tag-new { background: var(--new); }
.tag-season { background: var(--surface); color: var(--text); }
.product-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.product-name { font-size: 1.2rem; margin: 0; }
.product-desc { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-foot { margin-top: auto; padding-top: 10px; display: grid; gap: 12px; }
.price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price { font-weight: 700; font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.old-price { color: var(--muted); font-size: .92rem; }
.discount { color: var(--sale); font-weight: 700; font-size: .9rem; }
.product-action .btn { width: 100%; min-height: 46px; }
.stepper { display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--line); border-radius: var(--radius-btn); overflow: hidden; min-height: 46px; background: var(--surface); }
.step { width: 46px; height: 46px; border: 0; background: var(--surface-2); font-size: 1.25rem; color: var(--text); }
.step:disabled { opacity: .4; }
.step-count { flex: 1; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-row .stepper { min-width: 132px; }
.skeleton { min-height: 380px; background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; box-shadow: none; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* раскладка «крупные фото»: две-три колонки */
[data-layout="wide"] .products { grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 36px 28px; }

/* раскладка «список»: фото слева, текст справа */
[data-layout="list"] .products { grid-template-columns: 1fr; gap: 24px; }
@media (min-width: 700px) {
  [data-layout="list"] #catalog-grid { grid-template-columns: 1fr 1fr; }
  [data-layout="list"] .product { flex-direction: row; }
  [data-layout="list"] .product-open { flex: 0 0 46%; }
  [data-layout="list"] .product-media { height: 100%; min-height: 300px; aspect-ratio: auto; }
  [data-layout="list"] .product-body { padding: 26px; justify-content: center; }
  [data-layout="list"] .product-name { font-size: 1.55rem; }
  [data-layout="list"] .product-desc { -webkit-line-clamp: 4; }
}

/* раскладка «журнал»: первый букет на обложке */
@media (min-width: 900px) {
  [data-layout="magazine"] .products { grid-template-columns: repeat(3, 1fr); }
  [data-layout="magazine"] #catalog-grid .product:first-child { grid-column: span 2; grid-row: span 2; }
  [data-layout="magazine"] #catalog-grid .product:first-child .product-open { flex: 1; display: flex; }
  [data-layout="magazine"] #catalog-grid .product:first-child .product-media { aspect-ratio: auto; flex: 1; min-height: 520px; }
  [data-layout="magazine"] #catalog-grid .product:first-child .product-name { font-size: 2.2rem; }
}

/* --- как заказать -------------------------------------------------------------------------- */
.how { margin-top: clamp(56px, 8vw, 96px); padding: clamp(48px, 7vw, 80px) 0; background: var(--surface-2); }
.how .section-head { margin-bottom: 28px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); counter-reset: none; }
.steps li { background: var(--surface); border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.step-n { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-weight: 700; margin-bottom: 14px; }
.steps h3 { margin: 0 0 6px; font-size: 1.2rem; }
.steps p { margin: 0; color: var(--muted); font-size: .95rem; }

/* --- контакты и подвал ---------------------------------------------------------------------- */
.contacts { padding-bottom: clamp(56px, 8vw, 96px); }
.contact-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.contacts-body { display: grid; gap: 16px; }
.contacts-body.with-map { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: stretch; }
.contacts-body.with-map { gap: clamp(24px, 4vw, 56px); }
.contacts-body.with-map .contact-grid { grid-template-columns: 1fr; gap: 22px; align-content: start; }
.contacts-body.with-map .contact-card { background: none; border: 0; border-radius: 0; padding: 0; box-shadow: none; }
.contacts-body.with-map .contact-card .ico-lg { display: none; }
.contacts-body.with-map .contact-card h3 { font-family: inherit; font-size: .74rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.contacts-body.with-map .contact-card p { margin-bottom: 4px; }
.contact-map { position: relative; min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.contact-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
@media (max-width: 860px) { .contacts-body.with-map { grid-template-columns: 1fr; } .contact-map { min-height: 300px; } }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.contact-card h3 { margin: 0 0 6px; font-size: 1.15rem; }
.contact-card p { margin: 0 0 8px; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; margin: 8px 0 0; font-variant-numeric: tabular-nums; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; }
.footer { border-top: 1px solid var(--line); background: var(--surface); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; padding-top: 40px; padding-bottom: 24px; }
.footer-brand { max-width: 44ch; }
.footer-brand .brand { margin: 0 0 8px; white-space: normal; }
.footer-brand p { margin: 0; font-size: .92rem; }
.footer-links { display: grid; gap: 10px; align-content: start; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.footer-links a:hover { color: var(--text); }
.footer-note { margin: 0 auto; padding-top: 16px; padding-bottom: calc(24px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .85rem; border-top: 1px solid var(--line); }

/* --- корзина внизу экрана на телефоне --------------------------------------------------------- */
.cart-bar {
  position: fixed; z-index: 25; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 54px; padding: 0 20px; border: 0; border-radius: var(--radius-btn);
  background: var(--accent); color: var(--on-accent); font-weight: 600; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
@media (min-width: 900px) { .cart-bar { display: none !important; } }
body.has-cart-bar { padding-bottom: 80px; }
@media (min-width: 900px) { body.has-cart-bar { padding-bottom: 0; } }

/* --- окна: карточка букета и корзина ------------------------------------------------------------ */
dialog { border: 0; padding: 0; color: var(--text); background: var(--surface); }
dialog::backdrop { background: rgba(15, 12, 10, .55); backdrop-filter: blur(2px); }
.sheet { width: min(980px, calc(100% - 24px)); max-height: calc(100dvh - 24px); border-radius: var(--radius); overflow: auto; }
.sheet[open] { display: grid; grid-template-columns: 1fr; animation: rise .25s var(--ease); }
@media (min-width: 760px) { .sheet[open] { grid-template-columns: 1.05fr 1fr; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.sheet-media { background: var(--surface-2); }
.sheet-media img { width: 100%; height: 100%; max-height: 72dvh; object-fit: cover; aspect-ratio: 4 / 5; }
.sheet-body { padding: 32px 28px; display: flex; flex-direction: column; gap: 14px; }
.sheet-body h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); padding-right: 40px; }
.sheet-body .price { font-size: 1.5rem; }
.sheet-desc { margin: 0; color: var(--muted); white-space: pre-line; }
.sheet-actions { margin-top: 6px; }
.sheet-actions .btn, .sheet-actions .stepper { width: 100%; }
.sheet-notes { list-style: none; margin: 8px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 8px; color: var(--muted); font-size: .9rem; }
.sheet-notes li { display: flex; gap: 8px; }
.sheet-notes .ico { color: var(--accent); margin-top: .15em; }
.sheet-close { position: absolute; top: 12px; right: 12px; background: var(--surface); box-shadow: var(--shadow); }
.drawer { margin: 0 0 0 auto; height: 100dvh; max-height: 100dvh; width: min(440px, 100%); max-width: 100%; border-radius: 0; }
.drawer[open] { display: flex; flex-direction: column; animation: slide .25s var(--ease); }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer-head h2 { margin: 0; font-size: 1.5rem; }
.cart-list { flex: 1; overflow: auto; padding: 8px 20px; }
.drawer > .empty { padding: 24px 20px; flex: 1; }
.cart-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-thumb { width: 64px; height: 80px; border-radius: min(var(--radius), 10px); object-fit: cover; background: var(--surface-2); flex: none; }
.cart-info { min-width: 0; flex: 1; }
.cart-name { font-weight: 600; overflow-wrap: anywhere; }
.drawer-foot { padding: 16px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); display: grid; gap: 12px; }
.drawer-foot .muted { margin: 0; }
.cart-total { display: flex; justify-content: space-between; font-size: 1.15rem; }

/* --- район и число букетов на главном экране -------------------------------------------------------- */
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 26px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: var(--radius-btn); background: var(--surface); border: 1px solid var(--line); font-size: .88rem; color: var(--text); }
.chip-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #c98a1b; }
.chip-dot.is-open::before { background: #2e9e5b; }

/* --- заказ без Telegram ------------------------------------------------------------------------------ */
.order-form, .order-done { flex: 1; overflow: auto; display: grid; align-content: start; gap: 14px; padding: 16px 20px calc(20px + env(safe-area-inset-bottom)); }
.order-form .muted { margin: 0; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
.field input, .field textarea { font-weight: 400; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: min(var(--radius), 12px); padding: 12px 14px; min-height: 48px; width: 100%; }
.field textarea { resize: vertical; min-height: 72px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.seg { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg legend { font-weight: 600; font-size: .95rem; margin-bottom: 6px; padding: 0; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius-btn); background: var(--surface); }
.seg input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; padding: 10px 14px; border-radius: 10px; background: #fdecea; color: #8a1c13; font-size: .92rem; }
.order-form .link-btn { justify-self: center; min-height: 40px; }
.order-done { text-align: center; justify-items: center; padding-top: 48px; }
.order-done h3 { margin: 0; font-size: 1.5rem; }
.order-done p { margin: 0; color: var(--muted); max-width: 34ch; }
.done-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); }
.done-icon .ico { width: 30px; height: 30px; stroke-width: 2.4; }

.toast { position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 12px; background: #1d1b1a; color: #fff; box-shadow: var(--shadow); font-size: .95rem; }
@media (min-width: 900px) { .toast { bottom: 24px; } }

@media (max-width: 899px) {
  .nav, .top-phone { display: none !important; }
}
@media (max-width: 640px) {
  .cart-label { display: none; }
  .topbar-inner { min-height: 60px; gap: 12px; }
  .brand { font-size: 1.25rem; }
  .products { gap: 20px 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  [data-layout="wide"] .products, [data-layout="list"] .products { grid-template-columns: 1fr; }
  .product-body { padding: 12px 12px 14px; }
  .product-name { font-size: 1.02rem; }
  .product-desc { display: none; }
  .price { font-size: 1.05rem; }
  .product-action .btn { min-height: 42px; padding: 0 10px; font-size: .9rem; }
  .stepper { min-height: 42px; }
  .step { width: 40px; height: 42px; }
  .badges { top: 8px; left: 8px; }
  .tag { font-size: .7rem; padding: 3px 8px; }
  .drawer { width: 100%; }
  .sort span { display: none; }
  .highlights { gap: 8px; margin-top: 20px; }
  .hl { padding: 12px 14px; align-items: center; }
  .hl .ico { width: 22px; height: 22px; margin: 0; }
  .hl p { display: none; }
  .demo-bar { font-size: .78rem; padding: 6px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ======================================================================================
   ТЕМЫ. Ключи совпадают с utils/site_themes.py (тест проверяет каждый).
   ====================================================================================== */

/* 1. Пастель: розово-сиреневые тона, мягкие формы */
[data-theme="pastel"] {
  --bg: #fff9fb; --surface: #ffffff; --surface-2: #fcedf3; --text: #3a2633; --muted: #7a5c6e;
  --line: #f3dde7; --accent: #c4567a; --on-accent: #fff; --sale: #c4405f; --new: #7d5bb5;
  --hero-bg: linear-gradient(135deg, #fde3ec 0%, #efe4fb 100%); --infobar-bg: #3a2633; --infobar-text: #fde3ec;
  --radius: 26px; --font-body: "Nunito", system-ui, sans-serif; --head-weight: 800;
  --shadow: 0 12px 34px rgba(196, 86, 122, .12);
}
[data-theme="pastel"] .product { box-shadow: var(--shadow); }
[data-theme="pastel"] .hero-media img { border-radius: 200px 200px 28px 28px; }

/* 2. Минимализм: белый фон, чёткий шрифт, много воздуха */
[data-theme="minimal"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #f3f3f3; --text: #111111; --muted: #5e5e5e;
  --line: #e6e6e6; --accent: #111111; --on-accent: #fff; --sale: #c0392b; --new: #111;
  --hero-bg: #ffffff; --infobar-bg: #111; --radius: 0; --radius-btn: 0; --shadow: none;
  --font-body: "Inter", system-ui, sans-serif; --head-weight: 500; --head-spacing: -.035em;
  --hero-size: clamp(2.8rem, 7vw, 5.4rem);
}
[data-theme="minimal"] .product { background: transparent; }
[data-theme="minimal"] .product-body { padding: 14px 0 0; }
[data-theme="minimal"] .hero { border-bottom: 1px solid var(--line); }
[data-theme="minimal"] .steps li, [data-theme="minimal"] .contact-card, [data-theme="minimal"] .contact-map, [data-theme="minimal"] .hl { border-radius: 0; }
[data-theme="minimal"] .tag { border-radius: 0; }

/* 3. Тёмная премиум: чёрный, золото, засечки */
[data-theme="noir"] {
  --bg: #0f0e0d; --surface: #181715; --surface-2: #211f1c; --text: #f2ece1; --muted: #b3aa9b;
  --line: #2f2c27; --accent: #cfa962; --on-accent: #15130f; --sale: #c96b4b; --new: #cfa962;
  --hero-bg: #0f0e0d; --hero-text: #f2ece1; --infobar-bg: #050505; --infobar-text: #cfa962;
  --radius: 4px; --radius-btn: 2px; --shadow: none;
  --font-body: "Inter", system-ui, sans-serif; --font-head: "Playfair Display", Georgia, serif; --head-weight: 500;
  --hero-size: clamp(2.8rem, 7vw, 5.6rem);
}
[data-theme="noir"] .product { border: 1px solid var(--line); }
[data-theme="noir"] .btn, [data-theme="noir"] .cart-btn { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }
[data-theme="noir"] .tag-new { color: #15130f; }
[data-theme="noir"] .section-title { font-style: italic; }
[data-theme="noir"] .toast { background: var(--accent); color: var(--on-accent); }

/* 4. Крафт и эко: бумага, зелень, рукописные заголовки */
[data-theme="eco"] {
  --bg: #f1e9da; --surface: #f9f4ea; --surface-2: #e6dac4; --text: #2c3624; --muted: #5d5b46;
  --line: #d8c9ad; --accent: #4b6637; --on-accent: #f9f4ea; --sale: #a14f2a; --new: #4b6637;
  --hero-bg: #e6dac4; --infobar-bg: #2c3624; --infobar-text: #e6dac4;
  --radius: 12px; --radius-btn: 12px; --shadow: 0 2px 0 #d8c9ad;
  --font-body: "Lora", Georgia, serif; --font-head: "Caveat", cursive; --head-weight: 700; --head-spacing: 0;
  --hero-size: clamp(3.2rem, 9vw, 6rem);
}
[data-theme="eco"] .product { border: 1px dashed #b39f78; box-shadow: none; }
[data-theme="eco"] .section-title { font-size: clamp(2.5rem, 6vw, 3.6rem); }
[data-theme="eco"] .product-name { font-size: 1.75rem; }
[data-theme="eco"] .hero-media img { transform: rotate(1.5deg); border: 10px solid #f9f4ea; }

/* 5. Яркая весенняя: сочные цвета, жирный контур */
[data-theme="spring"] {
  --bg: #fffcef; --surface: #ffffff; --surface-2: #fff1bf; --text: #1f2a1a; --muted: #4f5a46;
  --line: #1f2a1a; --accent: #f0533f; --on-accent: #fff; --sale: #f0533f; --new: #2a7d3b;
  --hero-bg: linear-gradient(120deg, #ffe066 0%, #ffb3a7 55%, #c4f29a 100%); --infobar-bg: #1f2a1a; --infobar-text: #ffe066;
  --radius: 22px; --font-body: "Rubik", system-ui, sans-serif; --head-weight: 800;
  --shadow: 5px 5px 0 #1f2a1a;
}
[data-theme="spring"] .product, [data-theme="spring"] .steps li, [data-theme="spring"] .contact-card, [data-theme="spring"] .hl { border: 2px solid #1f2a1a; }
[data-theme="spring"] .btn-primary, [data-theme="spring"] .cart-btn { box-shadow: 3px 3px 0 #1f2a1a; border: 2px solid #1f2a1a; }
[data-theme="spring"] .tag { border: 2px solid #1f2a1a; }
[data-theme="spring"] .hero-media img { border: 3px solid #1f2a1a; box-shadow: 8px 8px 0 #1f2a1a; }

/* 6. Классика: зелень и сливки, строгие засечки */
[data-theme="classic"] {
  --bg: #f8f4ec; --surface: #ffffff; --surface-2: #efe7d8; --text: #1f2a22; --muted: #5d6157;
  --line: #e4dac8; --accent: #1f3d2b; --on-accent: #f8f4ec; --sale: #a8402f; --new: #9a7b3c;
  --hero-bg: #f8f4ec; --infobar-bg: #1f3d2b; --infobar-text: #efe7d8;
  --radius: 14px; --radius-btn: 10px;
  --font-body: "PT Sans", system-ui, sans-serif; --font-head: "PT Serif", Georgia, serif;
}
[data-theme="classic"] .product { border: 1px solid var(--line); box-shadow: none; }
[data-theme="classic"] .section-title::after { content: ""; display: block; width: 56px; height: 2px; background: var(--sale); margin-top: 14px; }

/* 7. Журнальная: крупная типографика, первый букет на обложке */
[data-theme="magazine"] {
  --bg: #f5f2ec; --surface: #f5f2ec; --surface-2: #e8e1d5; --text: #121212; --muted: #57524b;
  --line: #121212; --accent: #121212; --on-accent: #f5f2ec; --sale: #c8322a; --new: #121212;
  --hero-bg: #f5f2ec; --infobar-bg: #121212; --radius: 0; --radius-btn: 0; --shadow: none;
  --font-body: "Manrope", system-ui, sans-serif; --font-head: "Prata", Georgia, serif; --head-weight: 400;
  --hero-size: clamp(3.2rem, 9vw, 7rem); --photo-ratio: 3 / 4;
}
[data-theme="magazine"] .hero { border-bottom: 3px double var(--line); }
[data-theme="magazine"] .hero h1 { max-width: 10ch; line-height: .98; }
[data-theme="magazine"] .section-head { border-bottom: 1px solid var(--line); padding-bottom: 14px; }
[data-theme="magazine"] .product-body { padding: 14px 0 0; }
[data-theme="magazine"] .product { background: transparent; }
[data-theme="magazine"] .steps li, [data-theme="magazine"] .contact-card, [data-theme="magazine"] .hl { background: transparent; border-color: var(--line); }
[data-theme="magazine"] .btn { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; }

/* 8. Романтика: пудра и каллиграфия */
[data-theme="romance"] {
  --bg: #fbf2f0; --surface: #fffaf9; --surface-2: #f5e1dc; --text: #4a2b31; --muted: #84606a;
  --line: #eed5d0; --accent: #a8506a; --on-accent: #fff; --sale: #a8506a; --new: #7b6aa8;
  --hero-bg: #f5e1dc; --infobar-bg: #4a2b31; --infobar-text: #f5e1dc;
  --radius: 22px; --font-body: "Cormorant Garamond", Georgia, serif;
  --font-head: "Marck Script", cursive; --head-weight: 400; --head-spacing: 0; --hero-size: clamp(3.2rem, 9vw, 6.2rem);
  --shadow: 0 14px 36px rgba(168, 80, 106, .12);
}
[data-theme="romance"] body { font-size: 18px; }
[data-theme="romance"] .product-media { border-radius: 999px 999px 0 0; }
[data-theme="romance"] .kicker, [data-theme="romance"] .eyebrow { font-family: "Cormorant Garamond", Georgia, serif; font-size: .9rem; }

/* 9. Сканди: светлый серый, шалфей, строгие формы */
[data-theme="scandi"] {
  --bg: #f3f3f0; --surface: #fbfbf9; --surface-2: #e7e8e2; --text: #262926; --muted: #5f645d;
  --line: #dadbd4; --accent: #55705c; --on-accent: #fff; --sale: #a85a40; --new: #55705c;
  --hero-bg: #e7e8e2; --infobar-bg: #262926; --infobar-text: #e7e8e2;
  --radius: 2px; --radius-btn: 2px; --shadow: none;
  --font-body: "Manrope", system-ui, sans-serif; --head-weight: 300; --head-spacing: -.02em;
}
[data-theme="scandi"] .product { border: 1px solid var(--line); }
[data-theme="scandi"] .product-name { font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .1em; }

/* 10. Бутик: изумруд и пудра, крупные фото списком */
[data-theme="boutique"] {
  --bg: #fbf6f2; --surface: #ffffff; --surface-2: #f1e4dd; --text: #13312b; --muted: #4f665f;
  --line: #e4d4cc; --accent: #134a3f; --on-accent: #f7e9e2; --sale: #a8445a; --new: #b08a4a;
  --hero-bg: #134a3f; --hero-text: #f7e9e2; --infobar-bg: #0c312a; --infobar-text: #e9cfc3;
  --radius: 4px; --radius-btn: 0;
  --font-body: "Montserrat", system-ui, sans-serif; --font-head: "Cormorant Garamond", Georgia, serif;
  --head-weight: 600; --hero-size: clamp(2.8rem, 7vw, 5.4rem);
  --shadow: 0 18px 40px rgba(19, 74, 63, .08);
}
[data-theme="boutique"] .btn, [data-theme="boutique"] .cart-btn { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; }
[data-theme="boutique"] .section-title { font-style: italic; }
