/* Flower Time — одна вёрстка, три темы: grace / blush / room */

:root {
  --bg: #ffffff; --paper: #f5f1f0; --ink: #2a1e22; --muted: #76696d; --line: #e6dcdc;
  --accent: #7d1631; --accent-ink: #fff; --soft: #f3dfe3; --card: #f4efee; --sage: #aeb8a8;
  --tg: #2a9ee0;
  --font-d: "Cormorant Garamond", Georgia, serif;
  --font-h: "Cormorant SC", "Cormorant Garamond", Georgia, serif;
  --font-b: "Manrope", system-ui, sans-serif;
  --r-img: 2px; --r-btn: 999px; --r-panel: 4px;
  --wrap: 1200px; --gut: clamp(16px, 4vw, 40px);
  --h1: clamp(36px, 5vw, 60px); --h2: clamp(30px, 3.6vw, 44px);
}

/* Blush — пудровый фон, огромная антиква, арка */
[data-theme="blush"] {
  --bg: #f6e5e6; --paper: #f0d8da; --ink: #5c5254; --muted: #8a7d7f; --line: #e5cdd0;
  --accent: #e9799f; --accent-ink: #fff; --soft: #fbeff0; --card: #efe3dc; --sage: #b8c2b0;
  --font-h: "Cormorant Garamond", Georgia, serif;
  --r-img: 0; --r-btn: 0; --r-panel: 0;
  --h2: clamp(34px, 5vw, 64px);
}

/* Room — яркий розовый, белые скруглённые панели, гротеск */
[data-theme="room"] {
  --bg: #ffffff; --paper: #fff0f5; --ink: #1f1a1c; --muted: #6f6669; --line: #f4d9e3;
  --accent: #ff6fa6; --accent-ink: #fff; --soft: #ffe3ee; --card: #ffeef4; --sage: #9ec5ee;
  --font-d: "Unbounded", system-ui, sans-serif;
  --font-h: "Unbounded", system-ui, sans-serif;
  --r-img: 20px; --r-btn: 14px; --r-panel: 28px;
  --h1: clamp(30px, 4.4vw, 52px); --h2: clamp(26px, 3.2vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 var(--font-b); -webkit-font-smoothing: antialiased;
}
[data-theme="room"] body { background: #ffd3e3; padding: 12px; }
[data-theme="room"] main { background: #fff; border-radius: 36px; overflow: hidden; padding-bottom: 24px; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut); }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.lead { font-size: 18px; max-width: 60ch; }
[hidden] { display: none !important; }

/* типографика */
.h1, .h2, .h3 { font-family: var(--font-d); font-weight: 500; line-height: 1.05; margin: 0 0 .5em; letter-spacing: -.01em; }
.h1 { font-size: var(--h1); }
.h2 { font-family: var(--font-h); font-size: var(--h2); }
.h3 { font-size: 26px; }
[data-theme="grace"] .h2 { font-weight: 400; letter-spacing: .01em; }
[data-theme="room"] .h1, [data-theme="room"] .h2, [data-theme="room"] .h3 { font-weight: 500; letter-spacing: -.03em; line-height: 1.1; }
[data-theme="room"] .h3 { font-size: 20px; }
.link { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.link:hover { text-decoration-thickness: 2px; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 26px; border-radius: var(--r-btn); border: 1px solid transparent;
  font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.btn--main { background: var(--accent); color: var(--accent-ink); }
.btn--main:hover { background: color-mix(in srgb, var(--accent) 85%, #000); }
.btn--ghost { border-color: currentColor; background: transparent; }
.btn--ghost:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.btn--tg { background: var(--tg); color: #fff; }
.btn--tg::before { content: ""; width: 18px; height: 18px; background: currentColor;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.5 3.6 2.9 10.8c-1.3.5-1.3 1.2-.2 1.5l4.8 1.5 1.8 5.6c.2.6.4.8.8.8.4 0 .6-.2.9-.5l2.3-2.2 4.8 3.5c.9.5 1.5.2 1.7-.8l3.1-14.7c.3-1.3-.5-1.9-1.4-1.5Z"/></svg>') center/contain no-repeat;
          mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21.5 3.6 2.9 10.8c-1.3.5-1.3 1.2-.2 1.5l4.8 1.5 1.8 5.6c.2.6.4.8.8.8.4 0 .6-.2.9-.5l2.3-2.2 4.8 3.5c.9.5 1.5.2 1.7-.8l3.1-14.7c.3-1.3-.5-1.9-1.4-1.5Z"/></svg>') center/contain no-repeat; }
.btn--wide { width: 100%; }
[data-theme="blush"] .btn { text-transform: none; letter-spacing: .02em; font-weight: 500; }
.icon-btn {
  width: 44px; height: 44px; display: inline-grid; place-items: center; border-radius: 50%;
  border: 0; background: transparent; cursor: pointer; position: relative; text-decoration: none;
}
.icon-btn svg { width: 22px; height: 22px; }
.icon-btn:hover { background: color-mix(in srgb, currentColor 8%, transparent); }

/* шапка */
.hdr { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.hdr__in { max-width: 1320px; margin: 0 auto; padding: 10px var(--gut); display: flex; align-items: center; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo__mark { width: 38px; height: 38px; color: var(--accent); flex: none; }
.logo__word { font-family: "Cormorant Garamond", serif; font-size: 22px; line-height: .92; font-weight: 500; }
.nav { display: flex; gap: 22px; margin: 0 auto; font-size: 14px; font-weight: 500; }
.nav a { text-decoration: none; padding: 6px 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.nav a:hover { border-color: currentColor; }
.hdr__act { display: flex; align-items: center; gap: 4px; }
.hdr__phone { font-weight: 600; font-size: 14px; text-decoration: none; margin-right: 8px; white-space: nowrap; }
.cart-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.burger { display: none; }

[data-theme="room"] .hdr { position: sticky; top: 12px; background: transparent; border: 0; backdrop-filter: none; margin-bottom: -84px; }
[data-theme="room"] .hdr__in { background: #fff; border-radius: 999px; margin: 12px auto 0; max-width: calc(var(--wrap) - 2*var(--gut)); padding: 8px 10px 8px 22px; box-shadow: 0 6px 24px rgba(255, 111, 166, .18); }
[data-theme="room"] .logo__mark { color: var(--accent); }
[data-theme="blush"] .hdr { background: color-mix(in srgb, var(--bg) 90%, transparent); }

/* ---------- HERO ---------- */
.hero { position: relative; }
.hero__kicker { margin: 0 0 12px; font-size: 15px; }
.hero__title { margin: 0; font-family: var(--font-d); font-weight: 400; line-height: .9; }
.hero__script { display: none; }
.hero__lead { max-width: 46ch; margin: 18px auto 28px; font-size: 18px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; }

/* grace: фотография во всю ширину, текст по центру */
[data-theme="grace"] .hero { min-height: min(88vh, 860px); display: grid; place-items: center; color: #fff; text-align: center; overflow: hidden; }
[data-theme="grace"] .hero__media { position: absolute; inset: 0; }
[data-theme="grace"] .hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
[data-theme="grace"] .hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42, 20, 26, .15), rgba(42, 20, 26, .55)); }
[data-theme="grace"] .hero__text { position: relative; padding: 80px var(--gut); }
[data-theme="grace"] .hero__title { font-size: clamp(72px, 13vw, 190px); letter-spacing: .01em; }
[data-theme="grace"] .hero__title span:last-child { font-style: italic; }
[data-theme="grace"] .hero__cta { justify-content: center; }
[data-theme="grace"] .hero .btn--main { background: #fff; color: var(--accent); }
[data-theme="grace"] .hero .btn--ghost { color: #fff; }

/* blush: слово огромное на фоне, букет в арке поверх */
[data-theme="blush"] .hero { display: grid; grid-template-columns: 1fr; justify-items: center; padding: 24px var(--gut) 72px; overflow: hidden; text-align: center; }
[data-theme="blush"] .hero__text { display: contents; }
[data-theme="blush"] .hero__media, [data-theme="blush"] .hero__text > * { grid-column: 1; }
[data-theme="blush"] .hero__kicker { grid-row: 1; z-index: 3; margin-top: 8px; color: var(--muted); }
[data-theme="blush"] .hero__title { grid-row: 2; z-index: 1; font-size: clamp(60px, 13.5vw, 210px); font-weight: 500; color: var(--ink); letter-spacing: -.02em; white-space: nowrap; }
[data-theme="blush"] .hero__media { grid-row: 2 / span 2; z-index: 2; margin-top: clamp(40px, 9vw, 140px); width: min(440px, 64vw); aspect-ratio: 4 / 5; border-radius: 999px 999px 0 0; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(92, 82, 84, .5); }
[data-theme="blush"] .hero__media img { width: 100%; height: 100%; object-fit: cover; }
[data-theme="blush"] .hero__script { display: block; grid-row: 3; z-index: 3; justify-self: center; align-self: start; margin: -1.5em 0 0; font: 400 clamp(36px, 5vw, 64px)/1 "Marck Script", cursive; color: var(--accent); transform: translateX(clamp(110px, 24vw, 330px)) rotate(-8deg); }
[data-theme="blush"] .hero__lead { grid-row: 4; z-index: 3; margin: 28px auto 22px; }
[data-theme="blush"] .hero__cta { grid-row: 5; z-index: 3; justify-content: center; }

/* room: панель-небо, белый гротеск, скруглённое фото */
[data-theme="room"] .hero { display: grid; grid-template-columns: 1fr 1fr; align-items: end; gap: 0 24px; margin: 0 0 8px; padding: 130px clamp(20px, 4vw, 48px) 36px; min-height: 640px; color: #fff; overflow: hidden;
  background: radial-gradient(ellipse 60% 50% at 20% 20%, #fff8 0, transparent 60%), radial-gradient(ellipse 50% 40% at 85% 30%, #fff6 0, transparent 60%), linear-gradient(180deg, #8ec0ef, #cfe4fa 70%, #fde4ee); }
[data-theme="room"] .hero__text { display: contents; }
[data-theme="room"] .hero__kicker { display: none; }
[data-theme="room"] .hero__title { grid-column: 1 / -1; grid-row: 1; text-align: center; font-size: clamp(54px, 11vw, 150px); font-weight: 600; letter-spacing: -.04em; text-shadow: 0 4px 30px rgba(60, 120, 190, .25); z-index: 1; }
[data-theme="room"] .hero__media { grid-column: 1 / -1; grid-row: 1 / span 2; justify-self: center; z-index: 2; width: min(360px, 62vw); aspect-ratio: 3 / 4; margin-top: clamp(60px, 9vw, 120px); border-radius: 28px; overflow: hidden; border: 6px solid #fff; transform: rotate(-3deg); box-shadow: 0 30px 60px -20px rgba(40, 90, 150, .45); }
[data-theme="room"] .hero__media img { width: 100%; height: 100%; object-fit: cover; }
[data-theme="room"] .hero__lead { grid-column: 1; grid-row: 3; margin: 24px 0 0; font-size: 15px; font-weight: 600; max-width: 34ch; text-align: left; z-index: 3; color: #2b4a6b; }
[data-theme="room"] .hero__cta { grid-column: 2; grid-row: 3; justify-content: flex-end; z-index: 3; }
[data-theme="room"] .hero .btn--ghost { background: #fff; color: var(--ink); border-color: #fff; }

/* ---------- секции ---------- */
.sec { padding-top: clamp(48px, 7vw, 96px); }
.page { padding-top: clamp(32px, 5vw, 56px); padding-bottom: 24px; }
.sec__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.sec__head .h2 { margin: 0; }

/* категории */
.cats { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 14px; }
.cat { text-decoration: none; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; min-width: 0; }
.cat__img { display: block; width: 100%; }
.cat__name { overflow-wrap: anywhere; hyphens: auto; }
.cat__img { aspect-ratio: 1; overflow: hidden; border-radius: var(--r-img); background: var(--card); }
.cat__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.cat:hover .cat__img img { transform: scale(1.04); }
.cat__name { font-weight: 600; font-size: 15px; }
[data-theme="grace"] .cat__img { border-radius: 50%; }
[data-theme="grace"] .cat { text-align: center; }
[data-theme="blush"] .cat__img { aspect-ratio: 3 / 4; }
[data-theme="blush"] .cat__name { font: 500 20px/1.1 var(--font-d); }

/* сетка товаров */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px 20px; }
.card { display: flex; flex-direction: column; }
.card__img { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--r-img); background: var(--card); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card__img:hover img { transform: scale(1.04); }
.card__body { padding-top: 12px; display: grid; gap: 6px; }
.card__name { text-decoration: none; font-weight: 500; line-height: 1.35; }
.card__name:hover { text-decoration: underline; text-underline-offset: 3px; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card__price { font-weight: 700; }
.card__add { width: 38px; height: 38px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); cursor: pointer; display: grid; place-items: center; color: var(--accent); transition: background .2s, color .2s; }
.card__add svg { width: 18px; height: 18px; }
.card__add:hover, .card__add.is-added { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.card__ask { font-size: 14px; color: var(--accent); }
[data-theme="blush"] .card__img { aspect-ratio: 4 / 5; padding: 0; }
[data-theme="blush"] .card__name { font: 500 21px/1.15 var(--font-d); }
[data-theme="room"] .card { background: var(--card); border-radius: 24px; padding: 10px 10px 14px; }
[data-theme="room"] .card__img { border-radius: 18px; }
[data-theme="room"] .card__body { padding: 12px 6px 0; }
[data-theme="room"] .card__name { font-weight: 700; }
[data-theme="room"] .card__add { background: var(--accent); color: #fff; border: 0; }

/* блок «под повод» */
.custom { margin-top: clamp(48px, 7vw, 96px); padding-bottom: clamp(48px, 6vw, 80px); background: var(--paper); }
.custom.sec { padding-top: clamp(48px, 6vw, 80px); }
.custom__in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center; }
.custom__text p { max-width: 52ch; margin: 0 0 24px; }
.custom__text .btn { margin: 0 8px 8px 0; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips a { display: block; padding: 12px 20px; border-radius: var(--r-btn); border: 1px solid var(--line); background: var(--bg); text-decoration: none; font-weight: 500; }
.chips a:hover { border-color: var(--accent); color: var(--accent); }
[data-theme="grace"] .custom { background: var(--accent); color: #fff; }
[data-theme="grace"] .custom .btn--main { background: #fff; color: var(--accent); }
[data-theme="grace"] .chips a { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
[data-theme="grace"] .chips a:hover { border-color: #fff; }
[data-theme="room"] .custom { margin-left: 16px; margin-right: 16px; border-radius: var(--r-panel); background: var(--soft); }

/* шаги заказа */
.steps { list-style: none; counter-reset: s; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.steps li { counter-increment: s; display: grid; gap: 6px; padding-top: 20px; border-top: 1px solid var(--ink); }
.steps li::before { content: counter(s); font: 400 44px/1 var(--font-d); color: var(--accent); }
.steps b { font-size: 18px; }
.steps span { color: var(--muted); }
[data-theme="room"] .steps li { border: 0; background: var(--card); border-radius: 24px; padding: 24px; }

/* свадьба */
.wedding { padding-bottom: 0; }
.wedding .lead { margin: -8px 0 28px; }

/* о салоне */
.about { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.about__text p { max-width: 62ch; }
.about__tg { padding: 32px; background: var(--soft); border-radius: var(--r-panel); }
.about__tg h3 { font: 500 26px/1.15 var(--font-d); margin: 0 0 8px; }
[data-theme="room"] .about__tg h3 { font-size: 19px; }

/* визит */
.visit { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; align-items: start; padding-bottom: 24px; }
.map { aspect-ratio: 16 / 10; border-radius: var(--r-img); overflow: hidden; background: var(--paper); }
.map iframe { width: 100%; height: 100%; border: 0; }
.map--tall { aspect-ratio: 4 / 3; }

/* каталог */
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin: 8px 0 20px; scrollbar-width: none; }
.tabs a { flex: none; padding: 10px 18px; border-radius: var(--r-btn); border: 1px solid var(--line); text-decoration: none; font-weight: 500; font-size: 15px; }
.tabs a[aria-current] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
[data-theme="room"] .tabs a[aria-current] { background: var(--accent); border-color: var(--accent); color: #fff; }
.filters { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; margin-bottom: 28px; font-size: 14px; }
.filters label { display: flex; gap: 8px; align-items: center; }
.filters select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.empty { padding: 48px 0; max-width: 520px; }

/* товар */
.prod { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: start; }
.prod__img { border-radius: var(--r-img); overflow: hidden; background: var(--card); aspect-ratio: 1; }
.prod__img img { width: 100%; height: 100%; object-fit: cover; }
[data-theme="blush"] .prod__img { border-radius: 999px 999px 0 0; aspect-ratio: 4 / 5; }
.prod__info .h1 { margin-top: 8px; }
.prod__price { font-size: 26px; font-weight: 700; margin: 0 0 20px; }
.prod__desc { white-space: pre-line; margin-bottom: 24px; max-width: 60ch; }
.prod__buy { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.prod__notes { margin: 28px 0 0; padding: 20px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; display: grid; gap: 8px; padding-left: 18px; }

/* конструктор */
.builder { display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(24px, 5vw, 72px); align-items: start; }
.builder__intro { position: sticky; top: 100px; }
.q { border: 0; margin: 0 0 28px; padding: 0 0 28px; border-bottom: 1px solid var(--line); }
.q legend { font: 500 24px/1.2 var(--font-d); padding: 0; margin-bottom: 14px; }
[data-theme="room"] .q legend { font-size: 18px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.pick label, .seg label { cursor: pointer; }
.pick input, .seg input, .sw input { position: absolute; opacity: 0; pointer-events: none; }
.pick span { display: block; padding: 10px 18px; border: 1px solid var(--line); border-radius: var(--r-btn); font-weight: 500; transition: .15s; }
.pick input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.pick input:focus-visible + span, .seg input:focus-visible + span, .sw input:focus-visible ~ span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fld-inline { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); }
input[type="range"] { width: 100%; accent-color: var(--accent); }
.range-scale { display: flex; justify-content: space-between; }
.q output { color: var(--accent); font-weight: 600; }
.swatches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sw { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; font-size: 14px; font-weight: 500; }
.sw__dot { width: 28px; height: 28px; border-radius: 50%; flex: none; background: linear-gradient(135deg, var(--c1) 50%, var(--c2) 50%); box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.sw:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }

/* формы */
.form { display: grid; gap: 14px; }
.form h2 { font: 500 32px/1.1 var(--font-d); margin: 0; }
[data-theme="room"] .form h2 { font-size: 24px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.fld { display: grid; gap: 6px; font-size: 14px; font-weight: 600; }
.fld input, .fld select, .fld textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); font-weight: 400; font-size: 16px; }
.fld input:focus, .fld select:focus, .fld textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.fld .bad { border-color: #c0392b; }
.seg { border: 0; margin: 0; padding: 4px; display: inline-flex; background: var(--paper); border-radius: 12px; gap: 4px; justify-self: start; }
.seg span { display: block; padding: 8px 18px; border-radius: 9px; font-weight: 600; font-size: 14px; }
.seg input:checked + span { background: var(--bg); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.more summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--accent); padding: 4px 0; }
.more[open] summary { margin-bottom: 12px; }
.more .fld { margin-top: 12px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; }
.err { color: #b3261e; font-weight: 600; margin: 0; }

/* корзина */
.drawer, .modal { position: fixed; inset: 0; z-index: 50; visibility: hidden; }
.drawer.is-open, .modal.is-open { visibility: visible; }
.drawer__bg, .modal__bg { position: absolute; inset: 0; background: rgba(30, 20, 24, .4); opacity: 0; transition: opacity .25s; }
.is-open .drawer__bg, .is-open .modal__bg { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 100%); background: var(--bg); display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font: 500 28px/1 var(--font-d); }
[data-theme="room"] .drawer__head h2 { font-size: 22px; }
.drawer__body { flex: 1; overflow: auto; padding: 8px 20px; }
.drawer__foot { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.sum { display: flex; justify-content: space-between; font-size: 18px; }
.ci { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ci img { width: 64px; height: 64px; object-fit: cover; border-radius: var(--r-img); }
.ci__name { font-weight: 500; line-height: 1.3; }
.ci__price { font-size: 14px; color: var(--muted); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; }
.qty button { width: 32px; height: 32px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.qty span { min-width: 20px; text-align: center; font-weight: 600; }
.cart-empty { padding: 40px 0; text-align: center; color: var(--muted); }

.modal { display: grid; place-items: center; padding: 16px; }
.modal__panel { position: relative; width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--bg); border-radius: max(var(--r-panel), 6px); padding: clamp(20px, 4vw, 36px); transform: translateY(16px); opacity: 0; transition: .25s; }
.is-open .modal__panel { transform: none; opacity: 1; }
.modal__x { position: absolute; top: 10px; right: 10px; }
.done { text-align: center; display: grid; gap: 12px; padding: 12px 0; }
.done h2 { font: 500 32px/1.1 var(--font-d); margin: 0; }
.done p { margin: 0; }
.done__icon { font-size: 44px; color: var(--accent); line-height: 1; }

.toast { position: fixed; left: 50%; top: 84px; transform: translate(-50%, -16px); opacity: 0; background: var(--ink); color: var(--bg); padding: 12px 20px; border-radius: 999px; font-weight: 600; font-size: 14px; z-index: 60; transition: .25s; pointer-events: none; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* контакты */
.contacts { display: grid; grid-template-columns: 1fr 1.3fr; gap: 40px; }
.contacts__list { display: grid; gap: 22px; }
.contacts__list p { margin: 0; }
.contacts__list .h3 { margin-bottom: 4px; }

/* подвал */
.ftr { margin-top: clamp(56px, 8vw, 110px); background: var(--paper); padding: 48px 0 24px; font-size: 15px; }
[data-theme="grace"] .ftr { background: #2a1e22; color: #eadfe1; }
[data-theme="room"] .ftr { background: transparent; }
.ftr__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
.ftr__h { font-weight: 700; margin: 0 0 8px; }
.ftr p { margin: 0; }
.ftr__note { margin-top: 10px !important; opacity: .8; max-width: 30ch; }
.logo--ftr { color: inherit; }
.logo--ftr .logo__word { font-size: 30px; }
.ftr__base { margin-top: 40px; font-size: 13px; opacity: .7; }

/* переключатель тем (только для выбора дизайна) */
.themes { position: fixed; left: 16px; bottom: 16px; z-index: 40; display: flex; gap: 4px; align-items: center; padding: 6px 6px 6px 14px; background: #1f1a1c; color: #fff; border-radius: 999px; font: 600 13px/1 Manrope, sans-serif; box-shadow: 0 8px 30px rgba(0,0,0,.25); }
.themes a { padding: 8px 12px; border-radius: 999px; text-decoration: none; }
.themes a[aria-current] { background: #fff; color: #1f1a1c; }

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .nav { gap: 16px; }
  .hdr__phone { display: none; }
  .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .burger { display: inline-grid; }
  .nav { position: fixed; inset: 64px 0 auto 0; flex-direction: column; gap: 0; background: var(--bg); padding: 8px var(--gut) 20px; border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .3s; font-size: 18px; z-index: -1; }
  .nav a { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav.is-open { transform: none; }
  [data-theme="room"] .nav { inset: 80px 12px auto 12px; border-radius: 24px; }
  .hdr__act { margin-left: auto; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .custom__in, .about, .visit, .prod, .builder, .contacts { grid-template-columns: 1fr; }
  .builder__intro { position: static; }
  .steps { grid-template-columns: 1fr; gap: 20px; }
  .ftr__grid { grid-template-columns: 1fr 1fr; }
  [data-theme="room"] .hero { grid-template-columns: 1fr; min-height: 0; padding-top: 110px; }
  [data-theme="room"] .hero__lead, [data-theme="room"] .hero__cta { grid-column: 1; }
  [data-theme="room"] .hero__lead { grid-row: 3; text-align: center; margin: 24px auto 0; }
  [data-theme="room"] .hero__cta { grid-row: 4; justify-content: center; margin-top: 16px; }
}
@media (max-width: 560px) {
  body { font-size: 15px; }
  [data-theme="room"] body { padding: 0; }
  [data-theme="room"] main { border-radius: 0; }
  [data-theme="room"] .hdr { top: 8px; }
  [data-theme="room"] .hdr__in { margin: 8px 8px 0; }
  .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .cat__name { font-size: 13px; }
  [data-theme="blush"] .cat__name { font-size: 16px; }
  .grid { gap: 20px 12px; }
  .card__name { font-size: 14px; }
  [data-theme="blush"] .card__name { font-size: 17px; }
  [data-theme="room"] .card { padding: 6px 6px 10px; border-radius: 18px; }
  .row2 { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: 1fr 1fr; }
  .hero__cta .btn { flex: 1 1 100%; }
  [data-theme="room"] .hero__title { font-size: 14vw; white-space: nowrap; }
  .ftr__grid { grid-template-columns: 1fr; }
  .themes { left: 50%; transform: translateX(-50%); bottom: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* внутри Telegram Mini App — без лишней шапки */
.in-tg .hdr__phone, .in-tg .themes { display: none; }
[data-theme="room"] .page { padding-top: 130px; }
@media (max-width: 560px) { [data-theme="room"] .page { padding-top: 104px; } }

/* ---------- элементы, которые показывает только Studio ---------- */
.hero__tag, .hero__since, .hero__meta, .deco { display: none; }

/* блок-утверждение (все темы) */
.statement { position: relative; overflow: hidden; }
.statement__text { max-width: 900px; margin: 0 auto; text-align: center; font: 400 clamp(26px, 3.4vw, 42px)/1.25 var(--font-d); text-wrap: balance; }
[data-theme="room"] .statement__text { font-weight: 500; letter-spacing: -.02em; font-size: clamp(22px, 2.8vw, 34px); }

/* ================= STUDIO — по мотивам Shape Studio ================= */
[data-theme="studio"] {
  --bg: #f9f8f7; --paper: #efece8; --ink: #000; --muted: #55524f; --line: #000;
  --accent: #e8436c; --accent-ink: #fff; --soft: #f3e9e6; --card: #ece8e3; --sage: #b9c2b3;
  --font-d: "Onest", system-ui, sans-serif; --font-h: "Onest", system-ui, sans-serif; --font-b: "Onest", system-ui, sans-serif;
  --r-img: 0; --r-btn: 0; --r-panel: 0;
  --h1: clamp(40px, 6.4vw, 92px); --h2: clamp(30px, 3.6vw, 48px);
}
[data-theme="studio"] .h1, [data-theme="studio"] .h2, [data-theme="studio"] .h3,
[data-theme="studio"] .form h2, [data-theme="studio"] .done h2, [data-theme="studio"] .drawer__head h2 { font-weight: 500; letter-spacing: -.035em; line-height: 1.02; }
[data-theme="studio"] .h3 { font-size: 22px; letter-spacing: -.02em; }
[data-theme="studio"] .q legend { font-size: 20px; font-weight: 500; letter-spacing: -.02em; }
[data-theme="studio"] .link { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
[data-theme="studio"] .btn { font-weight: 500; min-height: 46px; }
[data-theme="studio"] .btn--main { background: #000; color: #fff; }
[data-theme="studio"] .btn--main:hover { background: var(--accent); }
[data-theme="studio"] .btn--ghost { border: 1.5px solid var(--accent); color: var(--ink); }
[data-theme="studio"] .btn--ghost:hover { background: var(--accent); color: #fff; }

/* шапка: светлая, при прокрутке — чёрная */
[data-theme="studio"] .hdr { background: var(--bg); border-bottom: 0; backdrop-filter: none; transition: background .25s, color .25s; }
[data-theme="studio"] .hdr.is-scrolled { background: #000; color: #fff; }
[data-theme="studio"] .hdr.is-scrolled .logo { color: #fff; }
[data-theme="studio"] .hdr.is-scrolled .logo__mark { color: #fff; }
[data-theme="studio"] .logo__word { font-family: "Onest", sans-serif; font-weight: 600; font-size: 17px; letter-spacing: -.02em; line-height: 1; }
[data-theme="studio"] .logo__mark { color: #000; }
[data-theme="studio"] .nav { font-weight: 500; font-size: 15px; }
[data-theme="studio"] .cart-count { background: var(--accent); }

/* hero: крупный заголовок, линия, строка деталей, широкое фото */
[data-theme="studio"] .hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 7vw, 96px) var(--gut) 0; display: grid; grid-template-columns: 1fr auto; column-gap: 32px; position: relative; }
[data-theme="studio"] .hero__text { display: contents; }
[data-theme="studio"] .hero__text > *, [data-theme="studio"] .hero__media { grid-column: 1 / -1; }
[data-theme="studio"] .hero__kicker, [data-theme="studio"] .hero__script { display: none; }
[data-theme="studio"] .hero__title { grid-column: 1; grid-row: 1; font-size: var(--h1); font-weight: 500; letter-spacing: -.045em; line-height: 1; max-width: 12ch; }
[data-theme="studio"] .hero__tag { display: inline; }
[data-theme="studio"] .hero__since { display: block; grid-column: 2; grid-row: 1; align-self: end; margin: 0 0 6px; font-weight: 600; font-size: 15px; }
[data-theme="studio"] .hero__meta { display: flex; grid-row: 2; margin: 32px 0 0; padding-top: 28px; border-top: 1px solid #000; gap: 0; flex-wrap: wrap; }
[data-theme="studio"] .hero__meta div { padding: 0 28px; border-left: 1px solid #000; font-size: 14px; line-height: 1.45; }
[data-theme="studio"] .hero__meta div:first-child { padding-left: 0; border-left: 0; }
[data-theme="studio"] .hero__meta dt { font-weight: 600; }
[data-theme="studio"] .hero__meta dd { margin: 0; }
[data-theme="studio"] .hero__lead { grid-row: 3; grid-column: 1; margin: 36px 0 0; max-width: 44ch; font-size: 17px; }
[data-theme="studio"] .hero__cta { grid-row: 3; grid-column: 2; align-self: end; justify-content: flex-end; }
[data-theme="studio"] .hero__media { grid-row: 4; margin-top: 40px; aspect-ratio: 16 / 8; overflow: hidden; }
[data-theme="studio"] .hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: center 45%; }
[data-theme="studio"] .deco { display: block; position: absolute; color: var(--accent); pointer-events: none; }
[data-theme="studio"] .deco--hero { width: 240px; right: -40px; top: 10px; opacity: .55; }

/* категории и товары: без скруглений, «лесенка» как в галерее */
[data-theme="studio"] .cats { gap: 18px; }
[data-theme="studio"] .cat__name { font-weight: 500; font-size: 15px; letter-spacing: -.01em; }
[data-theme="studio"] .grid { gap: 40px 24px; align-items: start; }
[data-theme="studio"] .grid > .card:nth-child(4n+2), [data-theme="studio"] .grid > .card:nth-child(4n+4) { margin-top: 72px; }
[data-theme="studio"] .card__img { aspect-ratio: 4 / 5; }
[data-theme="studio"] .grid > .card:nth-child(4n+3) .card__img { aspect-ratio: 1; }
[data-theme="studio"] .card__name { font-weight: 500; font-size: 17px; letter-spacing: -.015em; }
[data-theme="studio"] .card__price { font-weight: 500; color: var(--muted); }
[data-theme="studio"] .card__add { border: 1.5px solid var(--accent); background: transparent; color: var(--ink); }
[data-theme="studio"] .tabs a { border-color: #000; }
[data-theme="studio"] .tabs a[aria-current] { background: #000; color: #fff; }

/* секции */
[data-theme="studio"] .sec__head { padding-bottom: 18px; border-bottom: 1px solid #000; margin-bottom: 32px; }
[data-theme="studio"] .custom { background: var(--bg); border-top: 1px solid #000; border-bottom: 1px solid #000; }
[data-theme="studio"] .chips a { border-radius: 0; border-color: #000; background: transparent; }
[data-theme="studio"] .chips a:hover { background: #000; color: #fff; }
[data-theme="studio"] .steps li { border-top: 1px solid #000; }
[data-theme="studio"] .steps li::before { font: 500 44px/1 "Onest", sans-serif; letter-spacing: -.04em; color: var(--accent); }
[data-theme="studio"] .statement { padding-bottom: clamp(24px, 4vw, 48px); }
[data-theme="studio"] .statement__text { font-weight: 400; letter-spacing: -.025em; font-size: clamp(26px, 3.6vw, 46px); line-height: 1.2; }
[data-theme="studio"] .deco--left { width: 170px; left: -30px; top: 10px; opacity: .6; }
[data-theme="studio"] .about__tg { background: transparent; border: 1.5px solid var(--accent); }
[data-theme="studio"] .about__tg h3 { font: 500 24px/1.1 "Onest", sans-serif; letter-spacing: -.02em; }
[data-theme="studio"] .seg { border-radius: 0; }
[data-theme="studio"] .seg span { border-radius: 0; }
[data-theme="studio"] .fld input, [data-theme="studio"] .fld select, [data-theme="studio"] .fld textarea, [data-theme="studio"] .fld-inline { border-radius: 0; border-color: #cfcac4; }
[data-theme="studio"] .pick span { border-color: #000; }
[data-theme="studio"] .sw { border-radius: 0; }

/* подвал — яркий цветной блок, как жёлтый у референса */
[data-theme="studio"] .ftr { background: var(--accent); color: #000; padding-top: 72px; }
[data-theme="studio"] .ftr .logo__word { font-family: "Onest", sans-serif; font-size: 40px; font-weight: 500; letter-spacing: -.04em; }
[data-theme="studio"] .ftr a { text-decoration-color: #000; }

@media (max-width: 900px) {
  [data-theme="studio"] .hero { grid-template-columns: 1fr; }
  [data-theme="studio"] .hero__title { order: 1; } [data-theme="studio"] .hero__since { order: 2; }
  [data-theme="studio"] .hero__meta { order: 3; } [data-theme="studio"] .hero__lead { order: 4; }
  [data-theme="studio"] .hero__cta { order: 5; } [data-theme="studio"] .hero__media { order: 6; }
  [data-theme="studio"] .hero__title { grid-row: auto; }
  [data-theme="studio"] .hero__since { grid-column: 1; grid-row: auto; margin-top: 12px; }
  [data-theme="studio"] .hero__meta { grid-row: auto; }
  [data-theme="studio"] .hero__lead, [data-theme="studio"] .hero__cta { grid-column: 1; grid-row: auto; }
  [data-theme="studio"] .hero__cta { justify-content: flex-start; margin-top: 20px; }
  [data-theme="studio"] .hero__media { grid-row: auto; aspect-ratio: 4 / 3; }
  [data-theme="studio"] .grid > .card:nth-child(4n+4) { margin-top: 0; }
  [data-theme="studio"] .grid > .card:nth-child(even) { margin-top: 48px; }
  [data-theme="studio"] .grid > .card:nth-child(odd) { margin-top: 0; }
  [data-theme="studio"] .deco--hero { width: 140px; right: -30px; top: 0; }
}
@media (max-width: 560px) {
  [data-theme="studio"] .hero__meta { flex-direction: column; gap: 12px; }
  [data-theme="studio"] .hero__meta div { padding: 0; border: 0; }
}
[data-theme="studio"] .prod .h1 { font-size: clamp(32px, 4vw, 56px); }
@media (max-width: 560px) { [data-theme="studio"] .cats { gap: 10px; } }
@media (max-width: 560px) {
  .cats { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gut); margin: 0 calc(-1 * var(--gut)); padding: 0 var(--gut) 6px; scrollbar-width: none; }
  .cats::-webkit-scrollbar { display: none; }
  .cat { flex: 0 0 28%; scroll-snap-align: start; }
  .cat__name { hyphens: manual; overflow-wrap: normal; font-size: 13px; }
}
