/* ============================================================
   КартонЛаб — стили
   Тёплая «крафтовая» палитра: бумага, гофра, терракота
   ============================================================ */

:root {
  --paper: #FBF7F0;
  --paper-2: #F4ECDF;
  --ink: #221E18;
  --ink-soft: #4A4136;
  --muted: #7C6F5F;
  --line: #E4D8C6;
  --line-strong: #CFBEA6;
  --kraft: #C79A63;
  --kraft-deep: #A87A45;
  --accent: #B4552D;
  --accent-dark: #8F3F1F;
  --green: #3D6B4F;
  --white: #fff;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(52, 38, 22, .06), 0 2px 8px rgba(52, 38, 22, .05);
  --shadow-md: 0 6px 18px rgba(52, 38, 22, .09), 0 2px 4px rgba(52, 38, 22, .05);
  --shadow-lg: 0 22px 50px rgba(52, 38, 22, .16);
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Unbounded', var(--font);
  --header-h: 70px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  padding-bottom: env(safe-area-inset-bottom);
}

/* тонкая «бумажная» фактура фона */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(199, 154, 99, .18), transparent 65%),
    radial-gradient(700px 400px at 0% 30%, rgba(180, 85, 45, .07), transparent 70%);
}

main, .site-header, .site-footer { position: relative; z-index: 1; }

img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.3rem); }
h2 { font-size: clamp(1.45rem, 2.9vw, 2.3rem); }
h3 { font-size: 1.05rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: inherit; }

.container { width: min(1220px, 100% - 2.5rem); margin-inline: auto; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 10px;
  text-decoration: none;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  font: inherit;
  font-weight: 700;
  border: 1.5px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease, color .16s ease;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 0 0 var(--accent-dark);
}
.btn--primary:hover { background: #C05E33; transform: translateY(-1px); }
.btn--primary:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--accent-dark); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover { background: var(--paper-2); border-color: var(--ink-soft); }
.btn--lg { padding: 15px 28px; font-size: 1rem; }
.btn--sm { padding: 9px 18px; font-size: .875rem; }
.btn--block { width: 100%; padding: 14px 20px; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-btn:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 247, 240, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  text-decoration: none;
  flex-shrink: 0;
}
.logo__mark { color: var(--kraft-deep); display: flex; }
.logo__text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -.02em;
}
.logo__text b { color: var(--accent); font-weight: 700; }

.nav {
  display: flex;
  gap: 1.35rem;
  margin-left: auto;
  font-size: .92rem;
  font-weight: 600;
}
.nav a { text-decoration: none; color: var(--ink-soft); padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { color: var(--accent); border-bottom-color: var(--accent); }

.header__actions { display: flex; align-items: center; gap: 1rem; }
.header__phone {
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
}
.header__phone:hover { color: var(--accent); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.2rem, 5vw, 4.5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.hero__grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--kraft-deep);
  margin: 0 0 1rem;
}
.eyebrow .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(61, 107, 79, .18);
}
.hero h1 { margin-bottom: .6em; }
.hl {
  color: var(--accent);
  position: relative;
  white-space: nowrap;
}
.hl::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: .04em;
  height: .28em;
  background: rgba(199, 154, 99, .45);
  z-index: -1;
  border-radius: 2px;
}
.hero__lead {
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  color: var(--ink-soft);
  max-width: 46ch;
}
.hero__bullets {
  list-style: none;
  padding: 0;
  margin: 1.6rem 0;
  display: grid;
  gap: .55rem;
  font-size: .95rem;
}
.hero__bullets li {
  position: relative;
  padding-left: 1.7rem;
  color: var(--ink-soft);
}
.hero__bullets li::before {
  content: '';
  position: absolute;
  left: 0; top: .45em;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: rgba(61, 107, 79, .14) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8.4l2.6 2.6L12 5.6' fill='none' stroke='%233D6B4F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/12px no-repeat;
}
.hero__bullets strong { color: var(--ink); font-weight: 700; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero__note { margin-top: 1.1rem; font-size: .82rem; color: var(--muted); }

.hero__media { position: relative; }
.hero__photo {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 6px solid var(--white);
  aspect-ratio: 4 / 3.2;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__card {
  position: absolute;
  right: -8px;
  bottom: -18px;
  width: min(280px, 82%);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .95rem 1.1rem;
  box-shadow: var(--shadow-md);
}
.hero__card-label {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .5rem;
}
.hero__card-row {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  font-size: .82rem;
  margin: 0 0 .25rem;
  font-weight: 600;
}
.hero__card-row b { color: var(--accent); white-space: nowrap; }
.hero__card-meta { font-size: .72rem; color: var(--muted); margin: 0 0 .6rem; }
.hero__card-total {
  display: flex;
  justify-content: space-between;
  border-top: 1px dashed var(--line-strong);
  padding-top: .5rem;
  margin: 0;
  font-size: .95rem;
}
.hero__card-total b { font-family: var(--font-display); }

/* ---------- Sections ---------- */
.section { padding: clamp(2.6rem, 5vw, 4.5rem) 0; }
.section__head { max-width: 62ch; margin-bottom: 2rem; }
.section__head--tight { margin-bottom: 1.6rem; }
.section__lead { color: var(--ink-soft); font-size: 1.02rem; }
.section--dark {
  background: linear-gradient(175deg, #2C2620, #241F19 55%, #1E1A15);
  color: #F2E9DC;
}
.section--dark .section__lead,
.section--dark .eyebrow { color: #C6B39A; }
.section--dark h2 { color: #FBF7F0; }
.section--faq { background: var(--paper-2); }

/* ---------- Scope (что делаем / не делаем) ---------- */
.section--scope { padding-top: 0; }
.scope {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.scope__col { background: var(--white); padding: clamp(1.3rem, 2.6vw, 2rem); }
.scope__col--no { background: #F7F1E7; }
.scope__col h2 { font-size: 1.1rem; margin-bottom: .9rem; }
.scope__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; font-size: .92rem; }
.scope__list li { position: relative; padding-left: 1.6rem; color: var(--ink-soft); }
.scope__col--yes .scope__list li::before {
  content: '✓';
  position: absolute; left: 0;
  color: var(--green);
  font-weight: 800;
}
.scope__col--no .scope__list li::before {
  content: '—';
  position: absolute; left: .2rem;
  color: #A99A86;
  font-weight: 800;
}
.scope__note {
  margin: 1rem 0 0;
  font-size: .82rem;
  color: var(--muted);
  border-top: 1px dashed var(--line-strong);
  padding-top: .8rem;
}

/* ---------- Type cards ---------- */
.type-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}
.type-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.type-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.type-card__icon {
  color: var(--kraft-deep);
  background: var(--paper-2);
  border-radius: 12px;
  width: 62px; height: 62px;
  display: grid; place-items: center;
  margin-bottom: .6rem;
}
.type-card h3 { margin-bottom: .1rem; }
.type-card__short {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--kraft-deep);
  margin: 0;
}
.type-card p { font-size: .87rem; color: var(--ink-soft); margin: .35rem 0 .6rem; }
.type-card__best {
  font-size: .78rem;
  color: var(--muted);
  border-top: 1px dashed var(--line);
  padding-top: .6rem;
  margin: auto 0 0;
}
.type-card__best b { color: var(--ink); font-weight: 700; }

/* ---------- Ready boxes (со склада) ---------- */
.section--ready {
  background: linear-gradient(180deg, rgba(226, 240, 230, .55), rgba(251, 247, 240, 0) 100%);
}
.ready-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.1rem;
}
.ready-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2.2vw, 1.5rem);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .35rem 1.1rem;
  align-items: start;
  box-shadow: var(--shadow-sm);
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.ready-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.ready-card__icon {
  grid-row: span 2;
  color: var(--kraft-deep);
  background: var(--paper-2);
  border-radius: 14px;
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.ready-card__pill {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
  background: rgba(61, 107, 79, .1);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: .45rem;
}
.ready-card h3 { font-size: 1.02rem; margin-bottom: .2rem; }
.ready-card__purpose { font-size: .84rem; color: var(--muted); margin: 0 0 .7rem; }

.ready-card__dims {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem;
  margin: 0 0 .2rem;
}
.ready-card__size {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--ink);
}
.ready-card__unit { font-size: .78rem; color: var(--muted); font-weight: 600; }

.ready-card__price {
  display: flex;
  align-items: baseline;
  gap: .4rem;
  margin: .55rem 0 .9rem;
  padding-top: .8rem;
  border-top: 1px dashed var(--line);
}
.ready-card__price b {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.6vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--accent);
  line-height: 1;
}
.ready-card__price span { font-size: .8rem; color: var(--muted); font-weight: 600; }

.ready-card__actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.ready-card__actions .btn { flex: 1 1 160px; }
.ready-card__note { font-size: .72rem; color: var(--muted); margin: .7rem 0 0; }

.ready-note {
  font-size: .85rem;
  color: var(--ink-soft);
  margin: 1.3rem 0 0;
  text-align: center;
}
.ready-note a { color: var(--accent); font-weight: 700; }

/* ---------- Прайс склада: группы позиций ---------- */
.ready-groups {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.8rem;
}
.price-group {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.price-group__head {
  padding: 1rem 1.15rem .85rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #FFFDF9, var(--white));
}
.price-group__head h3 { font-size: 1rem; margin-bottom: .15rem; }
.price-group__head p { font-size: .8rem; color: var(--muted); margin: 0; }

.price-list { list-style: none; margin: 0; padding: 0; }
.price-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1.15rem;
  border-bottom: 1px solid rgba(228, 216, 198, .6);
  transition: background-color .14s;
}
.price-item:last-child { border-bottom: 0; }
.price-item:hover { background: #FDFAF4; }
.price-item__main { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.price-item__name { font-size: .89rem; font-weight: 700; }
.price-item__meta {
  font-size: .77rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.price-item__buy {
  display: flex;
  align-items: center;
  gap: .8rem;
  flex: 0 0 auto;
}
.price-item__price {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.price-item__price small {
  font-family: var(--font);
  font-size: .7rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: .1rem;
}

/* блок количества в диалоге готовой коробки */
.qty-row {
  display: grid;
  grid-template-columns: 1fr 130px;
  gap: .8rem;
  align-items: end;
  margin-bottom: .9rem;
}
.qty-row__hint { font-size: .74rem; color: var(--muted); margin: .35rem 0 0; }
.qty-row__total {
  display: block;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.9;
}

/* ---------- Builder ---------- */
.section--builder {
  background:
    linear-gradient(180deg, rgba(244, 236, 223, .75), rgba(251, 247, 240, 0) 220px);
  padding-top: clamp(2rem, 4vw, 3rem);
}
.builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 400px;
  gap: 1.5rem;
  align-items: start;
}
.builder__form { display: grid; gap: 1rem; }

.step {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem 1.25rem;
  margin: 0;
  min-width: 0;
}
.step__head {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: 0;
  margin-bottom: .95rem;
  width: 100%;
}
.step__num {
  flex: 0 0 auto;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  font-size: .78rem;
  font-weight: 800;
  display: grid; place-items: center;
  font-family: var(--font);
}
.step__title {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.step__badge {
  margin-left: auto;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(180, 85, 45, .09);
  border-radius: 999px;
  padding: 4px 9px;
}

/* option grids */
.option-grid { display: grid; gap: .6rem; }
.option-grid--types { grid-template-columns: repeat(2, 1fr); }
.option-grid--stack { grid-template-columns: 1fr; }
.option-grid--checks { grid-template-columns: repeat(2, 1fr); }

.option {
  position: relative;
  display: flex;
  gap: .7rem;
  align-items: flex-start;
  border: 1.5px solid var(--line);
  background: var(--paper);
  border-radius: 11px;
  padding: .75rem .85rem;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.option:hover { border-color: var(--line-strong); background: #FFFDF9; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option__tick {
  flex: 0 0 auto;
  width: 17px; height: 17px;
  margin-top: 2px;
  border: 1.8px solid var(--line-strong);
  border-radius: 50%;
  background: var(--white);
  display: grid; place-items: center;
  transition: border-color .15s, background-color .15s;
}
.option--check .option__tick { border-radius: 5px; }
.option__tick::after {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: transparent;
  transition: background-color .15s;
}
.option--check .option__tick::after {
  width: 9px; height: 5px;
  border-radius: 0;
  border-left: 2px solid var(--white);
  border-bottom: 2px solid var(--white);
  transform: rotate(-45deg) translate(0, -1px);
}
.option__body { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.option__name { font-size: .9rem; font-weight: 700; }
.option__meta { font-size: .78rem; color: var(--muted); line-height: 1.4; }
.option__extra {
  margin-left: auto;
  font-size: .74rem;
  font-weight: 700;
  color: var(--kraft-deep);
  white-space: nowrap;
  align-self: center;
}
.option.is-active {
  border-color: var(--accent);
  background: #FFF6F1;
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.option.is-active .option__tick { border-color: var(--accent); background: var(--accent); }
.option.is-active .option__tick::after { background: var(--white); }
.option--check.is-active .option__tick::after { background: transparent; }
.option--disabled,
.option[disabled] { opacity: .45; cursor: not-allowed; }

.option__icon { color: var(--kraft-deep); flex: 0 0 auto; }
.option--with-icon { align-items: center; }
.option--with-icon .option__tick { margin-top: 0; }

/* dimension inputs */
.dims { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; }
.field { display: block; }
.field__label {
  display: block;
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--muted);
  margin-bottom: .3rem;
}
.field__label i { color: var(--accent); font-style: normal; }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: .6rem .7rem;
  transition: border-color .15s, background-color .15s;
}
.field textarea { font-weight: 500; resize: vertical; min-height: 74px; }
.field input:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(180, 85, 45, .12);
}
.field input.is-invalid { border-color: #C0392B; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }
.field--brand { margin-top: 1rem; }

.presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
  margin-top: .8rem;
}
.presets__label { font-size: .76rem; font-weight: 700; color: var(--muted); margin-right: .2rem; }
.chip {
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  color: var(--ink-soft);
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: .3rem .7rem;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.hint { font-size: .78rem; color: var(--muted); margin: .7rem 0 0; }
.alert {
  font-size: .82rem;
  font-weight: 600;
  color: #8E2C1E;
  background: #FCEDE9;
  border: 1px solid #F0C9BF;
  border-radius: 9px;
  padding: .5rem .7rem;
  margin: .7rem 0 0;
}

/* brand panel */
.brand-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--line);
}
.swatches { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: .8rem; }
.swatches__label { font-size: .76rem; font-weight: 700; color: var(--muted); }
.swatches__row { display: flex; gap: .4rem; }
.swatch {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 1.5px var(--line-strong);
  cursor: pointer;
  padding: 0;
  transition: transform .15s, box-shadow .15s;
}
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { box-shadow: 0 0 0 2.5px var(--accent); transform: scale(1.06); }

/* quantity */
.qty { display: grid; grid-template-columns: 1fr 120px; gap: 1.1rem; align-items: start; }
.qty__slider { padding-top: .4rem; }
.qty__field .field__label { text-align: left; }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) var(--fill, 18%), var(--line) var(--fill, 18%));
  cursor: pointer;
  margin: .4rem 0 .2rem;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--accent);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
  cursor: grab;
}
input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--accent);
  cursor: grab;
}
.qty__scale {
  display: flex;
  justify-content: space-between;
  font-size: .7rem;
  color: var(--muted);
  font-weight: 600;
}

/* ---------- Preview panel ---------- */
.preview { position: relative; min-width: 0; }
.preview__sticky { position: sticky; top: calc(var(--header-h) + 14px); display: grid; gap: .75rem; }
.preview__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 .2rem;
}
.preview__head h3 { margin: 0; font-size: .95rem; }

.stage {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% 12%, #FFFDF9 0%, #F2E8D9 58%, #E7DAC6 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  height: 290px;
  overflow: hidden;
  display: grid;
  place-items: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.stage:active { cursor: grabbing; }
.stage::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 44px;
  width: 190px; height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(70, 48, 24, .22), transparent);
  filter: blur(3px);
  pointer-events: none;
}
.stage__scene {
  position: relative;
  width: 100%; height: 100%;
  perspective: 900px;
  display: grid;
  place-items: center;
  pointer-events: none;
}
.box3d {
  position: relative;
  transform-style: preserve-3d;
  transform: rotateX(-20deg) rotateY(-32deg);
  transition: transform .08s linear;
  will-change: transform;
}
.box3d__face {
  position: absolute;
  left: 50%;
  top: 50%;
  transform-style: preserve-3d;
  background: linear-gradient(160deg, var(--c1), var(--c2));
  border: 1px solid rgba(90, 62, 30, .22);
  overflow: hidden;
  display: grid;
  place-items: center;
  backface-visibility: visible;
}
.box3d__face--front { filter: brightness(1); }
.box3d__face--back { filter: brightness(.82); }
.box3d__face--left { filter: brightness(.9); }
.box3d__face--right { filter: brightness(1.04); }
.box3d__face--top { filter: brightness(1.12); }
.box3d__face--bottom { filter: brightness(.76); }

/* фактура гофры */
.box3d__face::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(120, 84, 40, .1) 0 1px,
    transparent 1px 6px
  );
  opacity: .55;
}
.box3d__face--top::before,
.box3d__face--bottom::before {
  background-image: repeating-linear-gradient(0deg, rgba(120, 84, 40, .1) 0 1px, transparent 1px 6px);
}
/* линия склейки / клапана */
.box3d__face--top::after,
.box3d__face--bottom::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  height: 100%;
  background: rgba(90, 62, 30, .25);
}
.box3d__print {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink-color, #2A2622);
  letter-spacing: .04em;
  text-align: center;
  text-transform: uppercase;
  line-height: 1.05;
  padding: 0 8px;
  word-break: break-word;
  opacity: 0;
  transition: opacity .2s;
  max-width: 92%;
}
.box3d__print.is-visible { opacity: 1; }

.stage__hint {
  position: absolute;
  bottom: 12px;
  left: 0; right: 0;
  text-align: center;
  font-size: .68rem;
  color: rgba(70, 55, 38, .6);
  margin: 0;
  pointer-events: none;
}
.stage__badges {
  position: absolute;
  top: 10px; left: 10px; right: 10px;
  display: flex;
  justify-content: space-between;
  gap: .4rem;
  pointer-events: none;
}
.badge {
  font-size: .7rem;
  font-weight: 800;
  letter-spacing: .02em;
  background: rgba(255, 253, 249, .92);
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  padding: 4px 9px;
  box-shadow: var(--shadow-sm);
}
.badge--muted { color: var(--muted); font-weight: 700; }

/* spec list */
.spec {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .8rem 1rem;
  margin: 0;
  display: grid;
  gap: .42rem;
  font-size: .82rem;
}
.spec__row { display: flex; justify-content: space-between; gap: .8rem; }
.spec dt { color: var(--muted); flex: 0 0 auto; }
.spec dd { margin: 0; text-align: right; font-weight: 700; }

/* price */
.price {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.1rem 1.15rem;
  box-shadow: var(--shadow-sm);
}
.price__main { display: flex; flex-direction: column; }
.price__label {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.price__total {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.15;
  transition: color .2s;
}
.price__total.is-updating { color: var(--accent); }
.price__unit { font-size: .84rem; color: var(--ink-soft); font-weight: 600; }
.breakdown {
  list-style: none;
  padding: .8rem 0 0;
  margin: .8rem 0 0;
  border-top: 1px dashed var(--line-strong);
  display: grid;
  gap: .3rem;
  font-size: .79rem;
}
.breakdown li { display: flex; justify-content: space-between; gap: .6rem; color: var(--ink-soft); }
.breakdown li span:last-child { font-weight: 700; color: var(--ink); white-space: nowrap; }
.breakdown li.is-discount span:last-child { color: var(--green); }
.price__meta {
  display: flex;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
  font-size: .76rem;
  color: var(--muted);
  margin: .85rem 0;
  padding-top: .7rem;
  border-top: 1px dashed var(--line);
}
.price__meta span:first-child { font-weight: 700; color: var(--ink-soft); }
.price__note { font-size: .72rem; color: var(--muted); margin: .7rem 0 0; line-height: 1.5; }

/* ---------- Materials section ---------- */
.materials {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 1.5rem;
  align-items: start;
}
.materials__table-wrap { overflow-x: auto; border-radius: var(--radius); }
.materials__table {
  width: 100%;
  border-collapse: collapse;
  font-size: .86rem;
  min-width: 460px;
}
.materials__table th,
.materials__table td {
  text-align: left;
  padding: .7rem .8rem;
  border-bottom: 1px solid rgba(199, 154, 99, .2);
}
.materials__table thead th {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #C6B39A;
  font-weight: 800;
  border-bottom-color: rgba(199, 154, 99, .45);
}
.materials__table tbody th { color: #FBF7F0; font-weight: 700; }
.materials__table tbody td { color: #D9CBB8; }
.materials__table tbody tr:hover td,
.materials__table tbody tr:hover th { background: rgba(199, 154, 99, .08); }

.materials__media figure { margin: 0; border-radius: var(--radius); overflow: hidden; }
.materials__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/11; }
.materials__media figcaption {
  font-size: .74rem;
  color: #B9A88F;
  padding-top: .5rem;
}

.print-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.8rem;
}
.print-card {
  background: rgba(255, 253, 249, .055);
  border: 1px solid rgba(199, 154, 99, .28);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
}
.print-card h3 { color: #FBF7F0; font-size: .98rem; }
.print-card p { font-size: .84rem; color: #CBBBA6; margin-bottom: .6rem; }
.print-card__meta {
  font-size: .72rem !important;
  font-weight: 700;
  color: var(--kraft) !important;
  margin: 0 !important;
  letter-spacing: .02em;
}

/* ---------- Process ---------- */
.steps {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}
.steps__item {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem;
  position: relative;
}
.steps__num {
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  color: var(--accent);
  display: block;
  margin-bottom: .55rem;
  letter-spacing: .04em;
}
.steps__item h3 { font-size: .94rem; }
.steps__item p { font-size: .84rem; color: var(--ink-soft); margin: 0; }
.process__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.process__media img { width: 100%; max-height: 340px; object-fit: cover; }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: .6rem; max-width: 900px; }
.faq details {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .1rem .2rem;
  transition: border-color .15s;
}
.faq details[open] { border-color: var(--line-strong); }
.faq summary {
  cursor: pointer;
  padding: .9rem 2.4rem .9rem 1rem;
  font-weight: 700;
  font-size: .93rem;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  font-weight: 400;
  color: var(--accent);
  transition: transform .2s;
}
.faq details[open] summary::after { content: '−'; }
.faq details p {
  padding: 0 1rem 1rem;
  margin: 0;
  font-size: .88rem;
  color: var(--ink-soft);
  max-width: 75ch;
}

/* ---------- About / SEO-текст ---------- */
.section--about { background: var(--paper); }
.about {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: start;
}
.about__text h3 { font-size: 1.02rem; margin: 1.6rem 0 .5rem; }
.about__text h3:first-child { margin-top: 0; }
.about__text p {
  font-size: .92rem;
  color: var(--ink-soft);
  max-width: 68ch;
  margin-bottom: .8rem;
}
.about__aside {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.1rem, 2.4vw, 1.7rem);
  box-shadow: var(--shadow-sm);
}
.about__aside h3 { font-size: .98rem; margin-bottom: .9rem; }
.about__list { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .85rem; }
.about__list li { display: grid; gap: .15rem; }
.about__list b { font-size: .88rem; font-weight: 700; color: var(--ink); }
.about__list span { font-size: .82rem; color: var(--muted); line-height: 1.5; }
.about__note {
  font-size: .8rem;
  color: var(--muted);
  border-top: 1px dashed var(--line-strong);
  padding-top: .8rem;
  margin: 0;
}

/* ---------- CTA ---------- */
.cta {
  padding: clamp(2rem, 4vw, 3.2rem) 0;
  background: linear-gradient(120deg, #C79A63, #B4804B 45%, #A26F3D);
  color: #2A2118;
}
.cta__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta h2 { font-size: clamp(1.3rem, 2.4vw, 1.85rem); margin-bottom: .35rem; }
.cta p { margin: 0; max-width: 52ch; font-size: .94rem; color: #3A2C1D; }
.cta__actions { display: flex; gap: .7rem; flex-wrap: wrap; }
.cta .btn--ghost { background: rgba(255, 255, 255, .5); border-color: rgba(42, 33, 24, .35); }
.cta .btn--ghost:hover { background: rgba(255, 255, 255, .8); }
.cta .btn--primary { background: #241F19; box-shadow: 0 4px 0 0 #100D0A; }
.cta .btn--primary:hover { background: #332B22; }

/* ---------- Footer ---------- */
.site-footer { background: #241F19; color: #CBBBA6; padding: 2rem 0 2.4rem; }
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  justify-content: space-between;
  align-items: flex-start;
  font-size: .84rem;
}
.footer__brand p { margin: .4rem 0 0; max-width: 34ch; color: #A6957F; }
.footer__brand .logo__text { color: #FBF7F0; }
.footer__nav { display: flex; flex-wrap: wrap; gap: 1rem 1.4rem; }
.footer__nav a { text-decoration: none; color: #CBBBA6; }
.footer__nav a:hover { color: var(--kraft); }
.footer__legal p { margin: 0; color: #8C7D6A; font-size: .78rem; max-width: 40ch; }

/* ---------- Mobile summary bar ---------- */
.mobile-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 35;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(251, 247, 240, .97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(52, 38, 22, .1);
}
.mobile-bar__price { display: flex; flex-direction: column; line-height: 1.2; }
.mobile-bar__price span { font-family: var(--font-display); font-size: 1.05rem; font-weight: 700; }
.mobile-bar__price small { font-size: .7rem; color: var(--muted); }

/* ---------- Dialog ---------- */
.dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(620px, 100% - 1.5rem);
  width: 100%;
  color: var(--ink);
  max-height: calc(100vh - 2rem);
}
.dialog::backdrop {
  background: rgba(30, 24, 17, .55);
  backdrop-filter: blur(3px);
}
.dialog__inner {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: clamp(1.2rem, 3vw, 1.9rem);
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
.dialog__close {
  position: absolute;
  top: .8rem; right: .8rem;
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 1.3rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  display: grid;
  place-items: center;
}
.dialog__close:hover { background: var(--paper-2); color: var(--accent); }
.dialog h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); margin-bottom: .3rem; padding-right: 2.2rem; }
.dialog__lead { font-size: .88rem; color: var(--ink-soft); margin-bottom: 1rem; }
.dialog__summary {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: .8rem .9rem;
  margin-bottom: 1.1rem;
  font-size: .82rem;
}
.summary-row { display: flex; justify-content: space-between; gap: .8rem; padding: .18rem 0; }
.summary-row span { color: var(--muted); }
.summary-row b { text-align: right; }
.summary-row--total {
  border-top: 1px dashed var(--line-strong);
  margin-top: .4rem;
  padding-top: .5rem;
  font-weight: 700;
}
.summary-row--total b { color: var(--accent); font-size: .95rem; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: .7rem; }
.check { display: flex; gap: .55rem; align-items: flex-start; font-size: .8rem; color: var(--ink-soft); cursor: pointer; }
.check input {
  width: 18px; height: 18px;
  accent-color: var(--accent);
  margin: 2px 0 0;
  flex: 0 0 auto;
}
.check--consent { margin: .9rem 0 .2rem; }
.form-error {
  font-size: .82rem;
  font-weight: 600;
  color: #8E2C1E;
  background: #FCEDE9;
  border: 1px solid #F0C9BF;
  border-radius: 9px;
  padding: .55rem .7rem;
  margin: .8rem 0 0;
}
.dialog__actions { margin-top: 1rem; display: grid; gap: .5rem; }
.dialog__note { font-size: .74rem; color: var(--muted); text-align: center; margin: 0; }

.success { text-align: center; padding-top: .4rem; }
.success__icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  display: grid; place-items: center;
  background: rgba(61, 107, 79, .12);
  color: var(--green);
}
.success h2 { padding: 0; }
.success .dialog__summary { text-align: left; margin-top: 1rem; }
.success .dialog__actions { text-align: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav { display: none; }
  .header__actions { margin-left: auto; }
  .builder { grid-template-columns: 1fr; }
  .preview__sticky { position: static; }
  .preview { order: -1; }
  .stage { height: 320px; }
  .type-cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .materials { grid-template-columns: 1fr; }
  .materials__media { max-width: 520px; }
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__media { max-width: 520px; }
  .hero__card { position: static; width: 100%; margin-top: -1.4rem; margin-inline: auto; max-width: 320px; }
  .print-grid { grid-template-columns: 1fr; }
  .scope { grid-template-columns: 1fr; }
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 1.6rem, 1220px); }
  .header__phone { display: none; }
  .header__actions .btn { padding: 8px 14px; font-size: .82rem; }
  .hero { padding-top: 1.6rem; }
  .hero__card { margin-top: -1.2rem; }
  .type-cards { grid-template-columns: 1fr; }
  .type-card { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: .4rem .9rem; }
  .type-card__icon { margin-bottom: 0; width: 46px; height: 46px; flex: 0 0 auto; }
  .type-card__icon svg { width: 30px; height: 30px; }
  .type-card h3 { font-size: .98rem; flex: 1 1 60%; }
  .type-card__short { order: -1; flex-basis: 100%; }
  .type-card p { flex-basis: 100%; margin: .2rem 0 .3rem; }
  .type-card__best { flex-basis: 100%; }
  .option-grid--types, .option-grid--checks { grid-template-columns: 1fr; }
  .option-grid--types .option { align-items: center; }
  .ready-cards { grid-template-columns: 1fr; }
  .ready-card { grid-template-columns: auto minmax(0, 1fr); }
  .ready-card__icon { width: 58px; height: 58px; }
  .ready-card__icon svg { width: 36px; height: 36px; }
  .price-item { align-items: flex-start; padding: .75rem .9rem; gap: .6rem; }
  .price-item__buy { flex-direction: column; align-items: flex-end; gap: .4rem; }
  .price-item__name { font-size: .85rem; }
  .price-group__head { padding: .9rem .9rem .75rem; }
  .qty-row { grid-template-columns: 1fr; align-items: stretch; }
  .qty-row .field { max-width: 160px; }
  .dims { grid-template-columns: 1fr 1fr; }
  .dims .field:first-child { grid-column: 1 / -1; }
  .qty { grid-template-columns: 1fr; gap: .8rem; }
  .qty__field { max-width: 160px; }
  .steps { grid-template-columns: 1fr; }
  .step { padding: 1rem 1rem 1.1rem; }
  .stage { height: 270px; }
  .mobile-bar.is-visible { display: flex; }
  body { padding-bottom: 68px; }
  .form-grid { grid-template-columns: 1fr; }
  .dialog { max-height: calc(100vh - 1rem); }
  .footer__inner { flex-direction: column; }
  .section__head { margin-bottom: 1.4rem; }
  .preview__head { padding-top: .2rem; }
  .breakdown { font-size: .77rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}

@media print {
  .site-header, .mobile-bar, .cta, .preview { display: none; }
}
