/* ===== Магазин дверей — стили витрины ===== */
:root {
  --bg: #f7f4ef;
  --surface: #ffffff;
  --ink: #1f2326;
  --ink-2: #4a5157;
  --muted: #858b90;
  --line: #e6e0d7;
  --accent: #9a6a3c;
  --accent-2: #7d522b;
  --accent-soft: #f1e7da;
  --dark: #23282c;
  --ok: #2f7d4f;
  --err: #b5402f;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 35, 38, .05), 0 8px 24px rgba(31, 35, 38, .06);
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { color: var(--accent); }
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: clamp(22px, 3vw, 28px); }
h3 { font-size: 19px; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px; }
.container--narrow { max-width: 860px; }
.container--auth { max-width: 460px; padding-top: 24px; padding-bottom: 40px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---- top / header ---- */
.promo-bar { background: var(--accent); color: #fff; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 600; }
.topbar { background: var(--dark); color: #cfd3d6; font-size: 13px; }
.topbar__in { display: flex; gap: 24px; align-items: center; min-height: 36px; flex-wrap: wrap; }
.topbar__phone { margin-left: auto; color: #fff; font-weight: 600; }
.header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header__in { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); flex: none; }
.logo:hover { color: var(--ink); }
.logo__mark { width: 30px; height: 38px; color: var(--accent); flex: none; }
.logo__text { font-family: var(--font-head); font-size: 20px; font-weight: 700; line-height: 1.1; white-space: nowrap; min-width: 0; }
.logo__text small { display: block; font-family: var(--font); font-size: 11.5px; font-weight: 400; color: var(--muted); letter-spacing: .02em; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav__item, .nav__item > a { white-space: nowrap; color: var(--ink); padding: 10px 12px; border-radius: 8px; font-weight: 500; font-size: 15px; display: block; }
.nav__item--drop { position: relative; padding: 0; }
.nav__item:hover, .nav__item > a:hover { background: var(--accent-soft); color: var(--accent-2); }
.dropdown { position: absolute; left: 0; top: 100%; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: none; gap: 28px; min-width: 460px; }
.nav__item--drop:hover .dropdown, .nav__item--drop:focus-within .dropdown { display: flex; }
.dropdown__col { display: flex; flex-direction: column; gap: 6px; min-width: 180px; }
.dropdown__col a { color: var(--ink-2); font-size: 14.5px; }
.dropdown__col a:hover { color: var(--accent); }
.dropdown__title { font-weight: 700; color: var(--ink) !important; margin-bottom: 4px; }
.header__tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }
.search { display: flex; align-items: center; box-sizing: border-box; max-width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; padding: 0 4px 0 14px; }
.search input { flex: 1 1 auto; min-width: 0; border: 0; background: transparent; outline: none; font: inherit; font-size: 14px; width: 170px; padding: 9px 0; color: var(--ink); -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { margin: 0 4px; }
.search input:focus { border: 0; box-shadow: none; }
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(154,106,60,.15); }
.search button:not(.btn) { flex: 0 0 34px; border: 0; background: none; width: 34px; height: 34px; padding: 0; margin: 0; cursor: pointer; color: var(--ink-2); display: grid; place-items: center; }
.search .btn { flex: 0 0 auto; margin-left: 8px; padding: 9px 22px; border-radius: 999px; }
.search svg { width: 18px; height: 18px; }
.search--big { max-width: 560px; padding: 4px 4px 4px 18px; margin-bottom: 24px; }
.search--big input { width: 100%; font-size: 16px; }
.search.search--big { display: flex; } /* на телефоне шапочный поиск скрыт, а на странице поиска поле нужно */
.tool { position: relative; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 8px; color: var(--ink); font-size: 14px; }
.tool:hover { background: var(--accent-soft); color: var(--accent-2); }
.tool svg { width: 22px; height: 22px; }
.badge { position: absolute; top: 1px; left: 24px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; border-radius: 9px; display: grid; place-items: center; padding: 0 5px; }
.burger { display: none; border: 0; background: none; width: 40px; height: 40px; cursor: pointer; padding: 8px; }
.burger span { display: block; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---- buttons / forms ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--accent); background: var(--accent); color: #fff; font: inherit; font-weight: 600; font-size: 15px; padding: 11px 22px; border-radius: 10px; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .05s; text-align: center; }
.btn:hover { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn--ghost { background: transparent; color: var(--accent-2); }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent-2); }
.btn--light { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.5); color: #fff; }
.btn--light:hover { background: #fff; color: var(--ink); border-color: #fff; }
.btn--lg { padding: 14px 28px; font-size: 16px; }
.btn--sm { padding: 7px 14px; font-size: 14px; }
.btn--block { width: 100%; }
.form h1 { margin-bottom: .4em; }
.form h3 { margin-top: 18px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=search]:not(.search input), input:not([type]), select, textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff; border: 1px solid #d9d2c7; border-radius: 9px; padding: 10px 12px; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(154,106,60,.15); }
.field__err { color: var(--err); font-size: 13px; margin-top: 5px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form__links { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 10px 0; font-size: 14.5px; cursor: pointer; }
.check input { margin-top: 4px; accent-color: var(--accent); }
.radios { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.radio { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.radio input { accent-color: var(--accent); }
.card-box { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin-bottom: 20px; }

/* ---- alerts ---- */
.flashes { padding-top: 16px; }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 10px; font-size: 14.5px; border: 1px solid; }
.alert--success { background: #eaf5ee; border-color: #c4e2cf; color: #1e5a37; }
.alert--error { background: #fbecea; border-color: #f0c9c3; color: #8a2c1f; }
.alert--info { background: #eef3f8; border-color: #cddcea; color: #2b4a66; }
.alert a { font-weight: 600; }

/* ---- hero ---- */
.hero { background: radial-gradient(1200px 500px at 85% 20%, #3a3129 0%, transparent 60%), linear-gradient(120deg, #1c2023 0%, #2a2e31 55%, #3b3027 100%); color: #fff; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; min-height: 440px; padding-top: 48px; padding-bottom: 48px; }
.hero h1 { font-size: clamp(32px, 5vw, 52px); margin-bottom: .35em; }
.hero p { color: #d3d6d8; font-size: 18px; max-width: 520px; }
.hero__tag { display: inline-block; background: var(--accent); color: #fff; padding: 6px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; margin-bottom: 18px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero__art { position: relative; height: 340px; }
.hero__door { position: absolute; bottom: 0; width: 140px; height: 300px; border-radius: 4px 4px 0 0; box-shadow: 0 30px 60px rgba(0,0,0,.4); }
.hero__door::before { content: ""; position: absolute; inset: 18px 16px; border: 2px solid rgba(255,255,255,.18); border-radius: 2px; }
.hero__door::after { content: ""; position: absolute; right: 14px; top: 52%; width: 18px; height: 5px; border-radius: 3px; background: #d8b98f; }
.hero__door--a { left: 4%; background: linear-gradient(160deg, #efe9e1, #cfc6ba); height: 270px; }
.hero__door--b { left: 34%; background: linear-gradient(160deg, #8a5a32, #5b3a20); z-index: 2; height: 320px; width: 156px; }
.hero__door--c { left: 66%; background: linear-gradient(160deg, #50565b, #2c3033); height: 285px; }

/* ---- sections ---- */
.section { padding: 48px 0; }
.section--alt { background: #efe9e0; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 20px; }
.section__head .section__title { margin: 0; }
.section__title { margin-bottom: 22px; }
.link-more { font-weight: 600; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.cat { position: relative; display: flex; flex-direction: column; justify-content: flex-start; min-height: 230px; padding: 22px; border-radius: var(--radius); overflow: hidden; color: #fff; background: linear-gradient(135deg, #3b3027, #1f2326); box-shadow: var(--shadow); }
.cat:nth-child(2n) { background: linear-gradient(135deg, #8a5a32, #4d3119); }
.cat img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .45; transition: transform .4s; }
.cat:hover img { transform: scale(1.05); }
.cat:hover { color: #fff; }
.cat__name { position: relative; font-family: var(--font-head); font-size: 24px; font-weight: 700; }
.cat__subs { position: relative; font-size: 14px; color: #e7dccd; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cat__icon { position: relative; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 14px; background: rgba(255, 255, 255, .12); color: #f1e7da; transition: background .2s; }
.cat__icon svg { width: 32px; height: 32px; }
.cat:hover .cat__icon { background: rgba(255, 255, 255, .2); }
.cat__more { position: relative; margin-top: auto; padding-top: 18px; font-size: 14px; font-weight: 600; color: #f1e7da; }
.cat__more span { display: inline-block; transition: transform .2s; }
.cat:hover .cat__more span { transform: translateX(4px); }

/* ---- catalog ---- */
.page-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 0 10px; }
.page-head h1 { margin: 0; }
.crumbs { font-size: 13.5px; color: var(--muted); padding-top: 16px; display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--ink-2); }
.crumbs__sep { color: #c4bdb2; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 18px; }
.chip { background: var(--surface); border: 1px solid var(--line); color: var(--ink); padding: 8px 16px; border-radius: 999px; font-size: 14.5px; }
.chip:hover { border-color: var(--accent); color: var(--accent-2); }
.filters { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; background: var(--surface); border-radius: var(--radius); padding: 12px 18px; margin-bottom: 22px; box-shadow: var(--shadow); }
.filters__label { color: var(--muted); font-size: 14px; margin-right: 6px; }
.filters__colors { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filters__sort { display: flex; align-items: center; }
.filters__sort select { width: auto; padding: 7px 10px; }
.color-pick input { position: absolute; opacity: 0; pointer-events: none; }
.color-pick { cursor: pointer; display: inline-flex; }
.color-pick .swatch { width: 26px; height: 26px; }
.color-pick__all { font-size: 13px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 999px; }
.color-pick input:checked + .swatch { box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent); }
.color-pick input:checked + .color-pick__all { background: var(--accent); color: #fff; border-color: var(--accent); }
.color-pick input:focus-visible + * { outline: 2px solid var(--accent); outline-offset: 2px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; }
.card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(31,35,38,.06), 0 16px 36px rgba(31,35,38,.1); }
.card__img { position: relative; display: block; aspect-ratio: 3 / 4; background: linear-gradient(180deg, #f4f0ea, #ebe5dc); }
.card__img img { width: 100%; height: 100%; object-fit: contain; padding: 18px 18px 0; }
.card__badge { position: absolute; top: 12px; left: 12px; background: var(--err); color: #fff; font-weight: 700; font-size: 13px; padding: 3px 9px; border-radius: 6px; }
.card__badge--hit { left: auto; right: 12px; background: var(--dark); }
.card__badge--lg { font-size: 16px; padding: 5px 12px; }
.card__body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card__name { color: var(--ink); font-weight: 600; font-size: 16px; line-height: 1.3; }
.card__body .btn { margin-top: auto; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.swatches--sm { gap: 5px; }
.swatch { display: inline-block; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); flex: none; vertical-align: middle; }
.swatch--lg { width: 38px; height: 38px; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); transition: box-shadow .15s; }
.swatch--lg:hover { box-shadow: 0 0 0 2px var(--accent-soft), 0 0 0 1px var(--accent); }
.swatch--lg.is-active { box-shadow: 0 0 0 2px var(--accent); }
.swatches__more { font-size: 12px; color: var(--muted); }
.price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.price__now { font-size: 20px; font-weight: 700; color: var(--ink); }
.price__now small { font-size: 13px; font-weight: 500; color: var(--muted); }
.price__old { color: var(--muted); text-decoration: line-through; font-size: 15px; }
.price--lg .price__now { font-size: 32px; font-family: var(--font-head); }
.price--lg .price__old { font-size: 18px; }
.pager { display: flex; justify-content: center; gap: 6px; margin: 30px 0 10px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 10px; background: var(--surface); color: var(--ink); border: 1px solid var(--line); padding: 0 10px; }
.pager .is-active { background: var(--accent); color: #fff; border-color: var(--accent); }
.empty { background: var(--surface); border-radius: var(--radius); padding: 40px; text-align: center; color: var(--ink-2); box-shadow: var(--shadow); margin-bottom: 30px; }

/* ---- product ---- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; padding: 18px 0 30px; align-items: start; }
.product__gallery { position: sticky; top: 92px; }
.gallery__main { position: relative; background: linear-gradient(180deg, #fff, #f1ece4); border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4 / 5; display: grid; place-items: center; overflow: hidden; }
.gallery__main img { width: 100%; height: 100%; object-fit: contain; padding: 28px; transition: opacity .2s; }
.gallery__thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery__thumb { width: 72px; height: 88px; border: 2px solid transparent; border-radius: 8px; background: #fff; padding: 4px; cursor: pointer; }
.gallery__thumb.is-active, .gallery__thumb:hover { border-color: var(--accent); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }
.product__title { margin-bottom: 6px; }
.product__sku { font-size: 13.5px; margin-bottom: 12px; }
.product__lead { color: var(--ink-2); margin: 0 0 18px; }
.buy__block { padding: 16px 0; border-top: 1px solid var(--line); }
.buy__label { font-weight: 600; margin-bottom: 10px; }
.buy__label b { font-weight: 500; color: var(--ink-2); }
.req { color: var(--err); }
.kits { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.kit { border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; color: var(--ink); display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.kit:hover { border-color: var(--accent); color: var(--ink); }
.kit.is-active { border-color: var(--accent); background: var(--accent-soft); }
.kit.is-disabled { opacity: .45; }
.kit__name { font-weight: 600; font-size: 14.5px; }
.kit__desc { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.opt { cursor: pointer; display: flex; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt__box { flex: 1; border: 1.5px solid var(--line); background: var(--surface); border-radius: 10px; padding: 9px 12px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; transition: border-color .15s, background .15s; }
.opt__img { grid-row: 1 / 3; width: 40px; height: 40px; object-fit: contain; }
.opt__name { font-size: 14px; font-weight: 500; line-height: 1.3; grid-column: 2; }
.opt__price { font-size: 13px; color: var(--accent-2); font-weight: 600; grid-column: 2; }
.opt__box:not(:has(.opt__img)) { grid-template-columns: 1fr; }
.opt__box:not(:has(.opt__img)) .opt__name, .opt__box:not(:has(.opt__img)) .opt__price { grid-column: 1; }
.opt:hover .opt__box { border-color: #cdb79e; }
.opt input:checked + .opt__box { border-color: var(--accent); background: var(--accent-soft); }
.opt input:focus-visible + .opt__box { outline: 2px solid var(--accent); outline-offset: 2px; }
.buy__total { position: sticky; bottom: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-top: 12px; }
.buy__row { display: flex; gap: 12px; margin-top: 14px; }
.buy__row .btn { flex: 1; }
.buy__msg { font-size: 14px; margin-top: 8px; min-height: 1em; }
.buy__msg.is-error { color: var(--err); }
.stock { font-size: 14px; margin-top: 6px; }
.stock--yes { color: var(--ok); }
.stock--no { color: var(--err); }
.qty { display: inline-flex; align-items: center; border: 1px solid #d9d2c7; border-radius: 10px; background: #fff; overflow: hidden; }
.qty button { border: 0; background: none; width: 40px; height: 48px; font-size: 20px; cursor: pointer; color: var(--ink-2); }
.qty button:hover { background: var(--accent-soft); }
.qty input { width: 48px !important; border: 0 !important; text-align: center; padding: 0 !important; box-shadow: none !important; -moz-appearance: textfield; appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty--sm button { width: 32px; height: 38px; }
.qty--sm input { width: 38px !important; }
.tabs { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 20px; }
.tabs__nav { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 16px; overflow-x: auto; }
.tabs__nav button { border: 0; background: none; font: inherit; font-weight: 600; padding: 16px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs__nav button.is-active { color: var(--ink); border-color: var(--accent); }
.tabs__pane { padding: 24px; display: none; }
.tabs__pane.is-active { display: block; }
.specs { width: 100%; border-collapse: collapse; max-width: 720px; }
.specs th, .specs td { text-align: left; padding: 10px 0; border-bottom: 1px dashed var(--line); vertical-align: top; }
.specs th { font-weight: 400; color: var(--muted); width: 45%; padding-right: 16px; }

/* ---- content (редактор) ---- */
.content { font-size: 16.5px; }
.content > *:first-child { margin-top: 0; }
.content h2 { margin-top: 1.4em; }
.content h3 { margin-top: 1.2em; }
.content img { border-radius: 10px; margin: 12px 0; }
.content blockquote { margin: 18px 0; padding: 12px 20px; border-left: 4px solid var(--accent); background: var(--accent-soft); border-radius: 0 10px 10px 0; }
.content table { border-collapse: collapse; width: 100%; margin: 16px 0; }
.content th, .content td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.content iframe { width: 100%; max-width: 100%; border: 0; border-radius: 10px; min-height: 360px; }
.content ul, .content ol { padding-left: 1.3em; }
.content--intro { background: var(--surface); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 16px; box-shadow: var(--shadow); }
.container--narrow > h1 { padding-top: 22px; }
.container--narrow .content { background: var(--surface); padding: 28px; border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 40px; }

/* ---- cart / checkout ---- */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 24px; align-items: start; margin-bottom: 40px; }
.cart__lines { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 20px; }
.line { display: grid; grid-template-columns: 84px minmax(0, 1fr) auto 110px 32px; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.line:last-of-type { border-bottom: 0; }
.line__img { background: var(--bg); border-radius: 8px; height: 100px; display: grid; place-items: center; }
.line__img img { max-height: 92px; object-fit: contain; }
.line__name { font-weight: 600; color: var(--ink); }
.line__meta { font-size: 13px; color: var(--ink-2); margin-top: 3px; }
.line__total { font-weight: 700; text-align: right; white-space: nowrap; }
.line__remove { border: 0; background: none; font-size: 24px; color: var(--muted); cursor: pointer; width: 32px; height: 32px; border-radius: 50%; }
.line__remove:hover { background: #fbecea; color: var(--err); }
.summary { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; position: sticky; top: 92px; }
.summary__row { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; }
.summary__row span:last-child { text-align: right; }
.summary__row--disc { color: var(--err); }
.summary__row--total { font-size: 20px; font-weight: 700; border-top: 1px solid var(--line); margin: 8px 0 16px; padding-top: 14px; }
.summary__item { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }

/* ---- account ---- */
.account { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 40px; }
.account__name { font-weight: 700; font-size: 18px; }
.account__nav { display: flex; flex-direction: column; margin-top: 18px; gap: 2px; }
.account__nav a { padding: 9px 12px; border-radius: 8px; color: var(--ink); }
.account__nav a.is-active, .account__nav a:hover { background: var(--accent-soft); color: var(--accent-2); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: 14.5px; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.table .right { text-align: right; }
.table tfoot td { border: 0; padding: 6px 10px; }
.table__total td { font-weight: 700; font-size: 17px; }
.account__main .table { border-radius: var(--radius); box-shadow: var(--shadow); }
.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: #eef0f2; color: var(--ink-2); white-space: nowrap; }
.status--new { background: #fdf0dc; color: #8a5a10; }
.status--processing, .status--confirmed, .status--production { background: #e5eef8; color: #2b4a66; }
.status--shipped { background: #ece6f7; color: #4b3a7a; }
.status--completed { background: #e3f3e8; color: #1e5a37; }
.status--cancelled { background: #f6e3e0; color: #8a2c1f; }

/* ---- errors / footer / toast ---- */
.error-page { text-align: center; padding: 60px 16px; }
.error-page__code { font-family: var(--font-head); font-size: 96px; color: var(--accent); line-height: 1; }
.footer { background: var(--dark); color: #b7bcc0; margin-top: 30px; font-size: 14.5px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 30px; padding-top: 44px; padding-bottom: 30px; }
.footer a { display: block; color: #dfe2e4; padding: 3px 0; }
.footer a:hover { color: #fff; }
.footer__logo { font-family: var(--font-head); font-size: 22px; color: #fff; font-weight: 700; margin-bottom: 8px; }
.footer__title { color: #fff; font-weight: 600; margin-bottom: 10px; }
.footer .muted { color: #8d9399; }
.footer__bottom { border-top: 1px solid #353b40; padding-top: 16px; padding-bottom: 20px; font-size: 13px; color: #868c91; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--dark); color: #fff; padding: 14px 20px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.25); z-index: 100; display: flex; gap: 14px; align-items: center; font-size: 15px; max-width: calc(100% - 32px); }
.toast a { color: #f0c896; font-weight: 600; white-space: nowrap; }

/* ---- адаптив ---- */
@media (max-width: 1280px) and (min-width: 1081px) {
  .search input { width: 120px; }
  .tool__label { display: none; }
}
@media (min-width: 1081px) {
  .nav__item--cat { display: none; }
}
@media (max-width: 1080px) {
  .burger { display: block; order: 3; }
  .buy__total { position: static; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); flex-direction: column; align-items: stretch; padding: 10px 16px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.is-open { display: flex; }
  .dropdown { position: static; display: flex; flex-direction: column; box-shadow: none; border: 0; min-width: 0; padding: 4px 12px 10px; gap: 10px; }
  .header__tools { margin-left: auto; }
  .search input { width: 120px; }
}
@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; min-height: 0; }
  .hero__art { display: none; }
  .product { grid-template-columns: 1fr; gap: 20px; }
  .product__gallery { position: static; }
  .cart, .account { grid-template-columns: 1fr; }
  .summary { position: static; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .topbar__in span:not(:first-child) { display: none; }
  .search { display: none; }
}
@media (max-width: 600px) {
  .header__in { gap: 10px; min-height: 62px; }
  .logo__text { font-size: 15px; white-space: normal; line-height: 1.15; max-width: calc(100vw - 230px); }
  .logo__text small { display: none; }
  .search { display: none; }
  .tool__label { display: none; }
  .form__grid { grid-template-columns: 1fr; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .card__body { padding: 10px 12px 12px; }
  .card__name { font-size: 14.5px; }
  .price__now { font-size: 17px; }
  .line { grid-template-columns: 64px minmax(0, 1fr) 32px; gap: 10px; }
  .line__img { grid-row: span 3; height: 84px; }
  .line .qty { grid-column: 2; justify-self: start; }
  .line__total { grid-column: 2; text-align: left; }
  .line__remove { grid-row: 1; grid-column: 3; }
  .card-box { padding: 20px; }
  .footer__grid { grid-template-columns: 1fr; }
  .filters { flex-direction: column; align-items: flex-start; }
  .topbar { display: none; }
}

/* ---- юридическое: cookie, согласия ---- */
.footer__legal { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 8px; }
.footer__legal a { display: inline; color: #a9afb4; font-size: 13px; padding: 0; }
.cookie-bar { position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 90; max-width: 860px; margin: 0 auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 40px rgba(0,0,0,.18); padding: 16px 20px; display: flex; gap: 18px; align-items: center; }
.cookie-bar p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.cookie-bar .btn { flex: none; }
.consent { font-size: 13.5px; color: var(--ink-2); }
.consent a { text-decoration: underline; }
@media (max-width: 600px) { .cookie-bar { flex-direction: column; align-items: stretch; left: 8px; right: 8px; bottom: 8px; } }
.danger-zone { border: 1px solid #f0c9c3; }
.search--nav { display: none; }
@media (max-width: 1080px) {
  .nav .search--nav { display: flex; margin: 4px 0 10px; }
  .nav .search--nav input { width: 100%; }
}

/* ---- комплектующие, наличие ---- */
.stock--order { color: #a8742c; }
.comps { display: flex; flex-direction: column; gap: 6px; }
.comp { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 6px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }
.comp__name { font-size: 14px; }
.comp__price { font-size: 14px; font-weight: 600; white-space: nowrap; }
.comps + .btn { margin-top: 8px; }
@media (max-width: 600px) { .comp { grid-template-columns: minmax(0, 1fr) auto; } .comp .qty { grid-column: 1 / -1; justify-self: start; } }

/* ---- карта на странице контактов ---- */
.map-block { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; margin: -20px 0 40px; }
.map-block h2 { margin-bottom: 6px; }
.map-block__addr { color: var(--ink-2); margin: 0 0 16px; }
.map-block__frame { position: relative; border-radius: 10px; overflow: hidden; background: #eee; aspect-ratio: 16 / 9; min-height: 320px; }
.map-block__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-block__links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
@media (max-width: 600px) { .map-block { padding: 18px; } .map-block__frame { aspect-ratio: 3 / 4; } .map-block__links .btn { flex: 1 1 100%; } }

/* ---- логотип: знак — встроенный SVG, надпись — текст (brand/2026-11-12-logo) ---- */
@font-face { font-family: "LogoInter"; src: url("../fonts/logo-inter-800.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
@font-face { font-family: "LogoInter"; src: url("../fonts/logo-inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
.brand { --door: var(--accent); --door-ink: #1f2326; display: flex; align-items: center; gap: 10px; flex: none; color: var(--ink); line-height: 1; }
.brand:hover { color: var(--ink); }
.brand__mark { display: block; width: 78px; height: 70px; flex: none; }
.brand__ink { fill: currentColor; }
.brand__door { fill: var(--door); }
.brand__panel { fill: none; stroke: var(--door-ink); stroke-opacity: .2; stroke-width: 2; }
.brand__handle { fill: var(--door-ink); }
.brand__body { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.brand__text { display: flex; flex-direction: column; font-family: "LogoInter", Inter, var(--font); }
.brand__name { font-weight: 800; font-size: 15px; line-height: 1; letter-spacing: -.01em; }
.brand__name > span { display: block; }
.brand__slogan { font-weight: 600; font-size: 10.5px; line-height: 1.2; color: var(--accent-2); margin-top: 4px; white-space: nowrap; }
.brand--dark { --door: #c08a45; color: #fff; }
.brand--dark:hover { color: #fff; }
.brand--dark .brand__slogan { color: #c08a45; white-space: normal; }
.footer__logo { margin-bottom: 12px; }
.footer__logo .brand__mark { width: 96px; height: 86px; }
.footer__logo .brand__name { font-size: 19px; }
.footer__logo .brand__slogan { font-size: 12.5px; }
@media (max-width: 600px) {
  .header .brand__mark { width: 58px; height: 52px; }
  .header .brand__name { font-size: 14px; line-height: 1.1; }
  .header .brand__name > span { display: inline; }
  .header .brand__name > span:last-child { display: block; }
  .header .brand__slogan { display: none; }
}
.burger { flex: none; }
@media (max-width: 400px) {
  .header .brand__name { font-size: 13px; }
  .header__tools { gap: 2px; }
  .header .tool { padding: 8px 6px; }
}
@media (max-width: 340px) { .header .brand__text { display: none; } }

/* ---- всплывающее окно (заказ замера) ---- */
.modal { position: fixed; inset: 0; z-index: 200; background: rgba(20, 22, 24, .55); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.modal[hidden] { display: none !important; }
.modal__box { position: relative; background: var(--surface); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.3); width: 100%; max-width: 560px; padding: 28px; }
.modal__box h2 { margin: 0 32px 16px 0; }
.modal__close { position: absolute; top: 10px; right: 10px; width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; color: var(--muted); cursor: pointer; border-radius: 50%; }
.modal__close:hover { background: var(--accent-soft); color: var(--ink); }
.modal__done { background: #eaf5ee; border: 1px solid #c4e2cf; color: #1e5a37; border-radius: 10px; padding: 18px; font-size: 16px; }
body.modal-open { overflow: hidden; }
.measure-form .form__grid { gap: 0 14px; }
@media (max-width: 600px) { .modal { padding: 0; align-items: stretch; } .modal__box { border-radius: 0; min-height: 100%; padding: 22px 16px; } }

/* ---- фильтр по цветовым группам ---- */
.color-pick__chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; padding: 3px 10px 3px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.color-pick__chip .swatch { width: 20px; height: 20px; }
.color-pick input:checked + .color-pick__chip { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-2); }
.color-pick input:focus-visible + .color-pick__chip { outline: 2px solid var(--accent); outline-offset: 2px; }
.swatch--ral { background: conic-gradient(#e74c3c, #f1c40f, #2ecc71, #3498db, #9b59b6, #e74c3c) !important; }

/* ---- обратный звонок ---- */
.topbar__callback { color: #f1e7da; font-weight: 600; border-bottom: 1px dashed rgba(241, 231, 218, .5); white-space: nowrap; }
.topbar__callback:hover { color: #fff; border-bottom-color: #fff; }
.nav__contact { display: none; }
@media (max-width: 1080px) {
  .nav__contact { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
  .nav__phone { font-size: 18px; font-weight: 700; color: var(--ink); text-align: center; }
}
.footer a.footer__callback { color: #e7c9a4; border-bottom: 1px dashed rgba(231, 201, 164, .5); display: inline-block; padding: 0; margin: 3px 0 6px; }
.footer a.footer__callback:hover { color: #fff; }
.callback-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 24px 0; }
.callback-cta > div { flex: 1 1 260px; min-width: 0; }
.callback-cta .btn { flex: 0 0 auto; }
@media (max-width: 600px) { .callback-cta .btn { flex: 1 1 100%; } }
.topbar__in { flex-wrap: nowrap; }
.topbar__in > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar__phone { white-space: nowrap; }
@media (max-width: 1180px) { .topbar__in span:not(:first-child) { display: none; } }
.footer a.footer__callback { display: table; }
.callback-cta + .map-block { margin-top: 0; }
@media (max-width: 1080px) { .dropdown__col { min-width: 0; } .dropdown__col a { white-space: normal; overflow-wrap: anywhere; } }
