/* =========================================================
   Двери ОПТ — стили. Раскладка: фиксированный каталог слева,
   жёлтый акцент, светло-серые подложки (по мотивам dveri.com).
   ========================================================= */

:root {
  --yellow: #ffcc00;
  --yellow-hover: #f5c000;
  --accent: #f0a01e;         /* оранжевые ссылки */
  --ink: #000;
  --text: #1f1f1f;
  --muted: #8c8c96;
  --line: #e3e4ea;
  --gray: #f2f3f7;
  --gray-2: #e9eaf0;
  --white: #fff;
  --green: #8bc34a;
  --red: #e53935;
  --orange: #f39c33;

  --font: "Jost", "Circe", "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 280px;
  --container: 1200px;
  --gutter: 32px;
  --radius: 6px;
  --shadow: 0 10px 30px -12px rgb(20 20 40 / .22);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--white); color-scheme: light; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.45; color: var(--text); background: var(--white); -webkit-font-smoothing: antialiased; }
body.no-scroll { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
h1, h2, h3 { color: var(--ink); font-weight: 500; line-height: 1.2; }
ul { margin: 0; padding: 0; list-style: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 20px; height: 20px; flex-shrink: 0; }
.muted { color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 26px; border-radius: var(--radius);
  font-size: 16px; font-weight: 500; white-space: nowrap; text-align: center;
  transition: background .2s, border-color .2s, color .2s;
}
.btn--yellow { background: var(--yellow); color: var(--ink); }
.btn--yellow:hover { background: var(--yellow-hover); }
.btn--gray { background: var(--gray); color: var(--ink); }
.btn--gray:hover { background: var(--gray-2); }
.btn--outline { border: 1px solid var(--line); background: var(--white); }
.btn--outline:hover { border-color: var(--ink); }
.btn--sm { height: 34px; padding: 0 16px; font-size: 15px; }
.btn--lg { height: 54px; padding: 0 34px; font-size: 18px; }
.btn--block { width: 100%; }
.btn .icon { width: 18px; height: 18px; }

.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--ink); transition: background .2s; }
.icon-btn:hover { background: var(--gray); }
.icon-btn .icon { width: 22px; height: 22px; }

.round-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--gray); color: var(--ink); transition: background .2s, opacity .2s; }
.round-btn--yellow { background: var(--yellow); }
.round-btn:hover { filter: brightness(.96); }
.round-btn:disabled { opacity: .35; cursor: default; }

.link-accent { color: var(--accent); font-size: 15px; display: inline-flex; align-items: center; gap: 6px; }
.link-accent:hover { color: #d48606; }
.link-accent .icon { width: 16px; height: 16px; }

.badge { display: inline-flex; align-items: center; height: 20px; padding: 0 9px; border-radius: 10px; font-size: 11px; font-weight: 600; line-height: 1; text-transform: uppercase; letter-spacing: .03em; color: #fff; vertical-align: middle; }
.badge--hit { background: var(--orange); }
.badge--new { background: var(--green); }
.badge--sale { background: var(--red); }
.badge--stock { background: var(--green); }
.badge--menu { display: inline-block; max-width: 100%; height: auto; padding: 4px 9px; background: var(--gray-2); color: var(--text); overflow-wrap: anywhere; }

.counter__num { position: absolute; top: 1px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--yellow); color: var(--ink); font-size: 11px; font-weight: 600; line-height: 18px; text-align: center; }
.counter__num:empty, .counter__num[data-zero] { display: none; }

/* ---------- Раскладка ---------- */
.layout { display: flex; min-height: 100vh; }
.layout__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.main { flex: 1; padding-bottom: 72px; }

/* Сайдбар с каталогом */
.sidebar { width: var(--sidebar-w); flex-shrink: 0; }
.sidebar__panel {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column;
  background: var(--white); border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.sidebar__backdrop { display: none; }
.sidebar__head { position: relative; padding: 26px 20px 18px; text-align: center; }
.sidebar__tagline { margin-top: 8px; color: var(--muted); font-size: 14px; }
.sidebar__close { display: none; position: absolute; top: 12px; right: 12px; }
.sidebar__contacts { margin-top: auto; padding: 20px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.sidebar__phone { font-size: 18px; font-weight: 600; }
.sidebar__hours { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

.logo { display: inline-flex; align-items: center; line-height: 1; }
/* Прозрачные поля PNG обрезаем со смещением, сохраняя строку «РОЗНИЦА». */
.logo__image { display: block; width: 200px; height: 100px; object-fit: cover; object-position: 50% 62%; }

.tree { padding: 6px 0 20px; }
.tree__row { display: flex; align-items: center; }
.tree__link { flex: 1; display: block; padding: 9px 4px 9px 20px; font-size: 15px; color: var(--ink); transition: color .15s; }
.tree__link:hover { color: var(--accent); }
.tree__link--sale { color: var(--red); }
.tree__toggle { display: grid; place-items: center; width: 40px; height: 36px; color: var(--muted); }
.tree__toggle .icon { width: 16px; height: 16px; transition: transform .2s; }
.tree__item.is-open > .tree__row .tree__toggle .icon { transform: rotate(180deg); }
.tree__list .tree__list { display: none; }
.tree__item.is-open > .tree__list { display: block; }
.tree__item--l0.is-open > .tree__row { background: var(--gray); }
.tree__item--l1 > .tree__row .tree__link { padding-left: 40px; font-size: 15px; }
.tree__item--l2 > .tree__row .tree__link { padding-left: 60px; font-size: 14.5px; }
.tree__item--l3 > .tree__row .tree__link { padding-left: 78px; font-size: 14px; }
.tree__item.is-current > .tree__row .tree__link { font-weight: 600; }
.tree__item--l0 > .tree__row .tree__link { font-size: 15.5px; }

/* Шапка */
.header { position: sticky; top: 0; z-index: 40; background: var(--white); }
.header.is-scrolled { box-shadow: 0 6px 20px -14px rgb(0 0 0 / .4); }
.topbar { border-bottom: 1px solid var(--line); font-size: 15px; }
.topbar__inner { display: flex; align-items: center; gap: 28px; height: 52px; }
.topbar__city { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.topbar__city .icon { width: 18px; height: 18px; color: var(--yellow); }
.topbar__hours { color: var(--muted); font-size: 14px; }
.topbar__phone { margin-left: auto; font-weight: 600; }
.navbar__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.navbar__burger, .navbar__logo { display: none; }
.navbar__nav { display: flex; gap: 30px; font-size: 16px; }
.navbar__nav a:hover { color: var(--accent); }
.navbar__actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.navbar__actions .icon-btn .icon { color: var(--accent); }

.search { position: relative; display: flex; align-items: center; }
.search__input {
  width: 0; height: 40px; padding: 0; border: 0; border-radius: 20px; background: var(--gray);
  font: inherit; font-size: 15px; opacity: 0; transition: width .25s var(--ease), padding .25s, opacity .2s;
}
.search.is-open .search__input { width: 240px; padding: 0 16px; opacity: 1; margin-right: 4px; }
.search__input:focus { outline: none; }

/* ---------- Подвал ---------- */
.footer { background: var(--gray); padding: 48px 0 28px; font-size: 15px; }
.footer__grid { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 32px; }
.footer__title { margin-bottom: 14px; color: var(--muted); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.footer__col ul { display: flex; flex-direction: column; gap: 9px; }
.footer__col a:hover { color: var(--accent); }
.footer__col--cta { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.footer__note { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line); color: #b4b4bd; font-size: 13px; }
.footer__bottom { display: flex; justify-content: space-between; gap: 16px; margin-top: 16px; color: var(--muted); font-size: 14px; }
.footer__bottom a { text-decoration: underline; }
.social { display: flex; gap: 14px; color: #b8b8c2; }
.social a:hover { color: var(--ink); }
.social .icon { width: 26px; height: 26px; }
.social__max { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border: 1px solid currentColor; border-radius: 8px; font-size: 9px; font-weight: 700; }
.social--dark { color: var(--ink); }

/* Нижняя панель на телефоне */
.tabbar { display: none; }

/* ---------- Секции ---------- */
.section { padding: 56px 0; }
.section--tight { padding: 48px 0 0; }
.section--gray { background: var(--gray); }
.section--line { border-top: 1px solid var(--line); }
.section__title { font-size: 30px; font-weight: 500; margin-bottom: 28px; }
.section__title--center { text-align: center; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section__head--center { display: grid; grid-template-columns: 1fr auto 1fr; }
.section__head--center .section__title { margin: 0; }
.section__head--center > :first-child { order: 3; justify-self: end; }
.section__head--center > :last-child { order: 1; }

.page-head { padding-top: 26px; padding-bottom: 18px; text-align: center; }
.page-head--product { padding-bottom: 6px; }
.page-title { font-size: 34px; font-weight: 500; margin-top: 10px; }
.page-lead { max-width: 760px; margin: 12px auto 0; color: var(--muted); }
.crumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; color: var(--muted); font-size: 14.5px; }
.crumbs a:hover { color: var(--ink); }
.crumbs__current { color: var(--muted); }

/* ---------- Слайдер на главной ---------- */
.hero { position: relative; overflow: hidden; }
.hero__track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.hero__track::-webkit-scrollbar { display: none; }
.slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: start;
  display: grid; grid-template-columns: minmax(300px, 40%) 1fr; align-items: center;
  min-height: 420px; padding: 40px 80px 40px 80px;
  background: linear-gradient(90deg, #f4f5f9 0 38%, var(--slide-bg) 38%);
  overflow: hidden;
}
.slide::before { content: ""; position: absolute; left: 28%; top: -30%; width: 22%; height: 160%; border-radius: 0 50% 50% 0 / 0 50% 50% 0; background: #f4f5f9; }
.slide__text { position: relative; z-index: 1; }
.slide__title { font-size: 52px; font-weight: 400; letter-spacing: -.01em; }
.slide__label { display: inline-block; margin-top: 14px; padding: 4px 14px; background: var(--yellow); font-size: 20px; }
.slide__price { margin-top: 40px; font-size: 44px; font-weight: 500; }
.slide__note { color: var(--text); font-size: 15px; }
.slide__media { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: center; gap: 14px; height: 100%; min-height: 340px; }
.slide__media img { height: 330px; width: auto; max-width: 23%; object-fit: contain; filter: drop-shadow(0 18px 18px rgb(0 0 0 / .12)); }
.hero__prev, .hero__next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; }
.hero__prev { left: 20px; }
.hero__next { right: 20px; }
.hero__dots { position: absolute; left: 0; right: 0; bottom: 14px; display: flex; justify-content: center; gap: 8px; }
.hero__dots button { width: 8px; height: 8px; border-radius: 50%; background: rgb(0 0 0 / .18); }
.hero__dots button.is-active { background: var(--ink); }

/* ---------- Новости ---------- */
.news-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.news-card { display: flex; flex-direction: column; gap: 8px; }
.news-card img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--radius); }
.news-card__label { font-size: 17px; font-weight: 500; color: var(--ink); }
.news-card__title { font-size: 16px; }
.news-card:hover .news-card__title { color: var(--accent); }
.news-card__text { color: var(--muted); font-size: 15px; }
.news-card__date { color: var(--muted); font-size: 14px; }

/* ---------- Вкладки и карусели ---------- */
.tabs-head { display: flex; justify-content: center; gap: 36px; margin-bottom: 26px; }
.tabs-head__btn { padding-bottom: 6px; border-bottom: 2px solid transparent; font-size: 28px; color: var(--muted); }
.tabs-head__btn.is-active { color: var(--ink); border-color: var(--yellow); }
.carousel { position: relative; }
.carousel__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px 2px 8px; }
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__item { scroll-snap-align: start; }
.carousel__prev, .carousel__next { position: absolute; top: 40%; z-index: 2; }
.carousel__prev { left: -22px; }
.carousel__next { right: -22px; }

/* ---------- Карточка товара ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 16px; }
.card { position: relative; display: flex; flex-direction: column; padding: 22px 16px 16px; border: 1px solid transparent; border-radius: var(--radius); background: var(--white); text-align: center; transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: var(--line); box-shadow: var(--shadow); }
.card__link { display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: 18px; font-weight: 400; }
.card__color { margin-top: 4px; min-height: 19px; color: var(--muted); font-size: 13.5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.card__img { position: relative; display: flex; align-items: center; justify-content: center; height: 250px; margin: 16px 0 10px; overflow: hidden; }
.card__img img { height: 100%; width: auto; max-width: 100%; object-fit: contain; transition: transform .3s var(--ease); }
.card:hover .card__img img { transform: scale(1.03); }
.card__noimg { display: grid; place-items: center; width: 100px; height: 100%; color: var(--line); }
.card__noimg .icon { width: 60px; height: 60px; }
.card__discount { position: absolute; top: 0; left: 8%; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--red); color: #fff; font-size: 13px; font-weight: 600; }
.card__badges { display: flex; justify-content: center; gap: 6px; min-height: 20px; margin-top: -20px; position: relative; }
.card__price { margin-top: 14px; font-size: 24px; font-weight: 500; color: var(--ink); }
.card__price s { display: block; color: var(--muted); font-size: 14px; font-weight: 400; }
.card__price small { margin-left: 3px; font-size: .75em; }
.card__compare { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; margin-top: 12px; border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; color: var(--text); opacity: 0; transition: opacity .2s, border-color .2s; }
.card:hover .card__compare, .card__compare.is-active { opacity: 1; }
.card__compare .icon { width: 16px; height: 16px; }
.card__compare.is-active { border-color: var(--yellow); background: #fff9df; }

/* ---------- О компании ---------- */
.about-lead { max-width: 860px; margin: -8px auto 40px; text-align: center; font-size: 17px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 40px; }
.feature { text-align: center; }
.feature__icon { width: 44px; height: 44px; margin: 0 auto 16px; color: var(--ink); }
.feature__title { font-size: 19px; font-weight: 500; margin-bottom: 12px; }
.feature__text { font-size: 15px; color: var(--text); }

/* ---------- Отзывы ---------- */
.reviews__track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 2 * 20px) / 3); gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.review { scroll-snap-align: start; display: flex; flex-direction: column; gap: 14px; padding: 26px; background: var(--white); border-radius: var(--radius); }
.review__stars { color: var(--yellow); font-size: 18px; letter-spacing: 2px; }
.review__stars .off { color: var(--line); }
.review blockquote { margin: 0; font-size: 15px; }
.review figcaption { margin-top: auto; font-weight: 500; }

/* ---------- Замер и салоны ---------- */
.measure-cta { display: flex; align-items: center; justify-content: space-between; gap: 32px; padding: 36px 40px; border-radius: var(--radius); background: var(--yellow); }
.measure-cta__title { font-size: 28px; font-weight: 500; margin-bottom: 8px; }
.measure-cta .btn--yellow { background: var(--ink); color: #fff; }
.measure-cta .btn--yellow:hover { background: #222; }
.stores-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.store { display: flex; gap: 14px; padding: 22px; background: var(--gray); border-radius: var(--radius); }
.store__icon { width: 26px; height: 26px; color: var(--accent); }
.store__title { font-weight: 500; font-size: 17px; }
.store__addr { margin: 4px 0; }
.store__hours { color: var(--muted); font-size: 14px; margin-bottom: 8px; }

/* ---------- Фильтры ---------- */
.filters { margin-bottom: 26px; }
.filters__mobile { display: none; }
.filters__panel-head { display: none; }
.filters__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.filters__side { display: contents; }
.filters__actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 10px; }
.filters__actions:not(:has(a)) { display: none; }
.filters__apply { display: none; }
.dropdown { position: relative; }
.dropdown__btn { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; height: 40px; padding: 0 12px; border-radius: 4px; background: var(--gray); font-size: 15px; text-align: left; }
.dropdown__btn span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.dropdown__btn .icon { width: 16px; height: 16px; color: var(--ink); transition: transform .2s; }
.dropdown.is-open .dropdown__btn .icon { transform: rotate(180deg); }
.dropdown.has-value .dropdown__btn { background: #fff4c2; }
.dropdown__btn--link { justify-content: flex-start; }
.dropdown__panel { position: absolute; left: 0; top: calc(100% + 4px); z-index: 30; display: none; min-width: 100%; max-height: 320px; overflow-y: auto; padding: 10px 12px; background: var(--white); border-radius: 4px; box-shadow: var(--shadow); }
.dropdown__panel--right { left: auto; right: 0; }
.dropdown__panel--price { min-width: 240px; }
.dropdown.is-open .dropdown__panel { display: block; }
.price-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }

.check, .radio { display: flex; align-items: flex-start; gap: 10px; padding: 5px 0; font-size: 15px; cursor: pointer; }
.check input, .radio input { flex-shrink: 0; width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--ink); }
.check a { text-decoration: underline; }

.found { margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.stock-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; margin: 24px 0 0; }
.stock-nav a { text-decoration: underline; text-underline-offset: 3px; }
.stock-nav a:hover { color: var(--accent); }
.stock-section { scroll-margin-top: 132px; }
.stock-section:focus-visible { outline: none; }
.stock-section + .stock-section { border-top: 1px solid var(--line); }
.stock-section__empty { text-align: center; color: var(--muted); }
.stock-section .pager__pages { flex-wrap: wrap; justify-content: center; }

.pager { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 36px; }
.pager__more { min-width: 240px; }
.pager__pages, .pager__numbers { display: flex; align-items: center; gap: 6px; }
.pager__numbers--mobile { display: none; }
.pager__num, .pager__arrow { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 8px; border-radius: 4px; }
.pager__num:hover, .pager__arrow:hover { background: var(--gray); }
.pager__num.is-current { background: var(--yellow); }
.pager__arrow .icon { width: 18px; height: 18px; }

.empty { max-width: 640px; margin: 30px auto; padding: 40px 30px; border-radius: var(--radius); background: var(--gray); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.empty h2 { font-size: 26px; }
.empty--404 { background: none; }
.empty__code { font-size: 96px; font-weight: 700; line-height: 1; color: var(--yellow); }

/* ---------- Страница товара ---------- */
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: start; }
.product__gallery { position: sticky; top: 140px; display: grid; grid-template-columns: 1fr; gap: 14px; }
.product__main-img { display: flex; align-items: center; justify-content: center; height: 560px; }
.product__main-img img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.product__thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.product__thumb { width: 52px; height: 72px; padding: 4px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); }
.product__thumb img { width: 100%; height: 100%; object-fit: contain; }
.product__thumb.is-active { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); }
.product__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.product__title { font-size: 32px; font-weight: 500; margin-right: 6px; }
.product__sub { display: flex; justify-content: space-between; gap: 16px; margin-top: 10px; font-size: 16px; }
.product__sku { color: var(--muted); font-size: 14px; white-space: nowrap; }

.options { display: flex; flex-direction: column; gap: 18px; margin-top: 24px; }
.option__title { margin-bottom: 8px; color: var(--muted); font-size: 14px; }
.option__title b { color: var(--ink); font-weight: 400; }
.option__values { display: flex; flex-wrap: wrap; gap: 8px; }
.swatch { position: relative; width: 30px; height: 30px; border-radius: 3px; border: 1px solid var(--line); background-size: cover; transition: transform .15s; }
.swatch:hover { transform: scale(1.08); }
.swatch.is-active { box-shadow: 0 0 0 2px var(--white), 0 0 0 4px var(--yellow); }
.swatch.is-disabled { opacity: .35; }
.swatch[data-tip]:hover::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 5; padding: 5px 9px; border-radius: 4px; background: var(--ink); color: #fff; font-size: 12.5px; white-space: nowrap; pointer-events: none; }
.chip { min-width: 54px; height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 3px; font-size: 14.5px; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--ink); }
.chip.is-active { background: var(--yellow); border-color: var(--yellow); }
.chip.is-disabled { color: #c3c3cc; border-style: dashed; }

.prices { margin-top: 26px; }
.prices__label { color: var(--muted); font-size: 14px; margin-bottom: 8px; }
.prices__row { display: flex; flex-wrap: wrap; gap: 12px; }
.prices__hint { margin-top: 8px; color: var(--muted); font-size: 13.5px; }
.price-box { cursor: pointer; }
.price-box input { position: absolute; opacity: 0; pointer-events: none; }
.price-box__inner { display: flex; flex-direction: column; min-width: 150px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 4px; transition: border-color .15s; }
.price-box input:checked + .price-box__inner { border-color: var(--yellow); box-shadow: 0 0 0 1px var(--yellow); }
.price-box__title { color: var(--muted); font-size: 14px; }
.price-box__value { font-size: 28px; font-weight: 500; color: var(--ink); white-space: nowrap; }
.price-box__value b { font-weight: 500; }
.price-box__value s { margin-right: 8px; font-size: 16px; color: var(--muted); font-weight: 400; }

.buy { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 24px; }
.buy__btn { min-width: 240px; }
.buy__btn:disabled { opacity: .5; cursor: not-allowed; }
.buy__links { display: flex; flex-direction: column; gap: 6px; }
.buy__links .is-active { color: var(--ink); }
.buy__unavailable { margin-top: 10px; color: var(--red); font-size: 14px; }
.qty { display: inline-flex; align-items: center; height: 54px; border: 1px solid var(--line); border-radius: var(--radius); }
.qty__btn { display: grid; place-items: center; width: 40px; height: 100%; color: var(--muted); }
.qty__btn:hover { color: var(--ink); }
.qty__btn .icon { width: 16px; height: 16px; }
.qty__input { width: 44px; height: 100%; border: 0; font: inherit; font-size: 17px; text-align: center; -moz-appearance: textfield; }
.qty__input::-webkit-inner-spin-button, .qty__input::-webkit-outer-spin-button { -webkit-appearance: none; }
.perks { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 14.5px; }
.perks li { display: inline-flex; align-items: center; gap: 8px; }
.perks .icon { color: var(--accent); }

.ptabs { margin-top: 56px; }
.ptabs__head { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 36px; margin-bottom: 26px; }
.ptabs__btn { padding-bottom: 6px; border-bottom: 2px solid transparent; font-size: 17px; color: var(--muted); }
.ptabs__btn.is-active { color: var(--ink); font-weight: 500; border-color: var(--yellow); }
.ptabs__panel { max-width: 980px; margin: 0 auto; }
.prose { font-size: 15.5px; }
.prose h2 { font-size: 22px; margin: 26px 0 10px; }
.prose h3 { font-size: 16px; font-weight: 600; margin: 18px 0 4px; }
.prose h3:first-child, .prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 8px; }
.prose a { color: var(--accent); }
.prose__img { width: 100%; border-radius: var(--radius); margin-bottom: 20px; }
.specs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.specs div { display: flex; justify-content: space-between; gap: 20px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.specs dt { color: var(--muted); }
.specs dd { text-align: right; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.table th { color: var(--muted); font-weight: 400; }
.table__group td { padding-top: 18px; font-weight: 600; }

/* ---------- Формы ---------- */
.form { display: flex; flex-direction: column; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field__label { font-size: 14px; color: var(--muted); }
.field__label i { color: var(--red); font-style: normal; }
.field__error { color: var(--red); font-size: 13px; }
.field__error:empty { display: none; }
.input { width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 4px; background: var(--white); font: inherit; font-size: 16px; color: var(--ink); transition: border-color .15s; }
textarea.input { height: auto; padding: 12px 14px; resize: vertical; }
select.input { appearance: none; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23000' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 36px; }
.input:focus { outline: none; border-color: var(--ink); }
.input.is-invalid { border-color: var(--red); }

.segmented { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: var(--radius); background: var(--gray); }
.segmented__item { position: relative; cursor: pointer; }
.segmented__item input { position: absolute; opacity: 0; }
.segmented__item span { display: block; padding: 9px 8px; border-radius: 4px; text-align: center; font-size: 15px; }
.segmented__item input:checked + span { background: var(--white); box-shadow: 0 1px 4px rgb(0 0 0 / .1); }

/* ---------- Модальное окно ---------- */
.modal { width: min(460px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); padding: 36px 32px 30px; border: 0; border-radius: 8px; box-shadow: var(--shadow); color: var(--text); }
.modal::backdrop { background: rgb(0 0 0 / .5); }
.modal[open] { animation: pop .2s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px); } }
.modal__close { position: absolute; top: 10px; right: 10px; }
.modal__title { font-size: 26px; font-weight: 500; margin-bottom: 8px; }
.modal__text { color: var(--muted); margin-bottom: 20px; font-size: 15px; }
.modal__success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.success-mark { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; background: var(--yellow); }
.success-mark .icon { width: 34px; height: 34px; }

.toast { position: fixed; left: 50%; bottom: 28px; z-index: 200; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 14px 22px; border-radius: var(--radius); background: var(--ink); color: #fff; font-size: 15px; box-shadow: var(--shadow); animation: pop .2s var(--ease); }
.toast a { color: var(--yellow); margin-left: 10px; }

.flash { margin-top: 16px; }
.flash__item { padding: 12px 16px; border-radius: var(--radius); background: #fff4c2; }
.flash__item--error { background: #fde3e3; }

/* ---------- Корзина ---------- */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 40px; align-items: start; }
.cart-line { display: grid; grid-template-columns: 90px minmax(0, 1fr) auto 130px 40px; align-items: center; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.cart-line__img { display: flex; align-items: center; justify-content: center; height: 120px; }
.cart-line__img img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.cart-line__name { font-size: 18px; font-weight: 500; }
.cart-line__name:hover { color: var(--accent); }
.cart-line__opts { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.cart-line__sku { color: var(--muted); font-size: 13px; }
.cart-line__set { margin-top: 6px; }
.cart-line__set .check { font-size: 14px; }
.cart-line__set-price { white-space: nowrap; }
.cart-line__qty .qty { height: 42px; }
.cart-line__price { text-align: right; }
.cart-line__price b { display: block; font-size: 19px; font-weight: 500; }
.cart-line__price span { color: var(--muted); font-size: 13px; }
.cart-line__remove { color: var(--muted); }
.promo { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.promo .input { width: 220px; }
.promo__ok { color: var(--green); font-size: 14px; }
.cart__summary { position: sticky; top: 140px; display: flex; flex-direction: column; gap: 16px; }
.summary { padding: 22px; border-radius: var(--radius); background: var(--gray); }
.summary__row { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; }
.summary__row b { font-weight: 500; white-space: nowrap; }
.summary__row--discount b { color: var(--red); }
.summary__row--total { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 20px; }
.summary__note { margin-top: 8px; color: var(--muted); font-size: 13.5px; }
.checkout { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); }
.checkout__title { font-size: 22px; }
.checkout__hint { color: var(--muted); font-size: 13.5px; text-align: center; }

.success { max-width: 640px; margin: 40px auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.success__summary { width: 100%; text-align: left; }

/* ---------- Сравнение ---------- */
.compare { overflow-x: auto; }
.compare__table { border-collapse: collapse; min-width: 100%; font-size: 15px; }
.compare__table th, .compare__table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; min-width: 200px; }
.compare__table tbody th { color: var(--muted); font-weight: 400; min-width: 180px; position: sticky; left: 0; background: var(--white); }
.compare__product { display: flex; flex-direction: column; align-items: center; gap: 8px; font-weight: 500; text-align: center; }
.compare__product img { height: 180px; width: auto; }
.compare__table thead th { text-align: center; }

/* ---------- Контакты, поиск ---------- */
.contacts { display: grid; grid-template-columns: 320px 1fr; gap: 24px 40px; align-items: start; }
.contacts__main { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.contacts__phone { font-size: 28px; font-weight: 600; }
.contacts__locations { min-width: 0; }
.store-map { display: block; width: 100%; height: 400px; border: 0; border-radius: var(--radius); }
.contacts > .store-map { grid-column: 1 / -1; }
.stores-grid + .store-map { margin-top: 24px; }
.home-page .main { padding-bottom: 40px; }
#stores { padding-bottom: 0; }
.stores-grid--2 { margin-top: 0; }
.search-page { display: flex; gap: 10px; max-width: 560px; margin: 18px auto 0; }

/* =========================================================
   Адаптив
   ========================================================= */
@media (max-width: 1280px) {
  :root { --sidebar-w: 250px; --gutter: 24px; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .carousel__track { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
  .slide { padding: 40px 64px; }
  .slide__title { font-size: 44px; }
  .slide__price { font-size: 38px; }
  .navbar__nav { gap: 22px; font-size: 15px; }
  .topbar__hours { display: none; }
}

@media (max-width: 1080px) {
  /* Каталог уезжает в выдвижное меню */
  .sidebar { position: fixed; inset: 0; z-index: 100; width: auto; pointer-events: none; }
  .sidebar__backdrop { display: block; position: absolute; inset: 0; background: rgb(0 0 0 / .45); opacity: 0; transition: opacity .25s; }
  .sidebar__panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(340px, 88vw); height: auto; transform: translateX(-100%); transition: transform .25s var(--ease); }
  .sidebar.is-open { pointer-events: auto; }
  .sidebar.is-open .sidebar__backdrop { opacity: 1; }
  .sidebar.is-open .sidebar__panel { transform: none; }
  .sidebar__close { display: grid; }
  .navbar__burger { display: inline-grid; margin-left: -8px; }
  .navbar__logo { display: block; }
  .navbar__logo .logo__image { width: 130px; height: 60px; }
  .navbar__nav { display: none; }
  .navbar__inner { height: 64px; gap: 12px; }
  .product { grid-template-columns: 1fr; gap: 28px; }
  .product__gallery { position: static; }
  .product__main-img { height: 440px; }
  .cart { grid-template-columns: 1fr; }
  .cart__summary { position: static; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .reviews__track { grid-auto-columns: calc((100% - 20px) / 2); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .contacts { grid-template-columns: 1fr; }
  .filters__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .store-map { height: 320px; }
  :root { --gutter: 16px; }
  body { font-size: 15px; }
  .main { padding-bottom: 96px; }
  .footer { padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px)); }
  .topbar { display: none; }
  .navbar__actions .counter { display: none; }
  .search.is-open .search__input { width: calc(100vw - 150px); }
  .tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: repeat(4, 1fr);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: var(--yellow);
  }
  .tabbar__item { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 44px; gap: 2px; font-size: 13px; color: var(--ink); }
  .tabbar__item .icon { width: 24px; height: 24px; }
  .tabbar__icon { position: relative; display: flex; align-items: center; justify-content: center; width: 24px; height: 24px; }
  .tabbar__icon .icon { display: block; }
  .tabbar__icon .counter__num { top: -4px; right: -10px; background: var(--ink); color: var(--yellow); }
  .toast { bottom: 90px; }

  .section { padding: 40px 0; }
  .section__title { font-size: 24px; margin-bottom: 20px; }
  .page-title { font-size: 26px; }
  .slide { grid-template-columns: 1fr; min-height: 0; padding: 28px 20px 0; background: var(--slide-bg); }
  .slide::before { display: none; }
  .slide__title { font-size: 32px; }
  .slide__label { font-size: 16px; }
  .slide__price { margin-top: 18px; font-size: 30px; }
  .slide__media { min-height: 0; margin-top: 10px; }
  .slide__media img { height: 200px; }
  .hero__prev, .hero__next { display: none; }

  .news-row, .news-grid { grid-template-columns: 1fr; gap: 18px; }
  .section__head--center { grid-template-columns: 1fr auto; }
  .section__head--center > :last-child { display: none; }
  .tabs-head { gap: 14px; justify-content: center; flex-wrap: wrap; }
  .tabs-head__btn { font-size: 20px; white-space: nowrap; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pager__pages, .pager__numbers { gap: 3px; }
  .pager__num, .pager__arrow { min-width: 32px; padding-inline: 4px; }
  .pager__numbers { display: none; }
  .pager__numbers--mobile { display: flex; }
  .carousel__track { grid-auto-columns: calc((100% - 8px) / 2); gap: 8px; }
  .carousel__prev, .carousel__next { display: none; }
  .card { padding: 14px 8px 12px; }
  .card__title { font-size: 15.5px; overflow-wrap: anywhere; }
  .card__img { height: 190px; }
  .card__price { font-size: 19px; }
  .card__compare { display: none; }
  .features { grid-template-columns: 1fr; gap: 32px; }
  .reviews__track { grid-auto-columns: 86%; }
  .measure-cta { flex-direction: column; align-items: stretch; padding: 26px 20px; }
  .measure-cta__title { font-size: 22px; }

  .filters__mobile { display: flex; gap: 8px; }
  .filters__mobile .btn { flex: 1; }
  .filters__panel { position: fixed; inset: 0; z-index: 120; display: none; flex-direction: column; padding: 0 16px 16px; background: var(--white); overflow-y: auto; }
  .filters.is-open .filters__panel { display: flex; }
  .filters__panel-head { display: flex; justify-content: space-between; align-items: center; height: 60px; font-size: 20px; font-weight: 500; }
  .filters__grid { grid-template-columns: 1fr; }
  .filters__group { display: none; }
  .dropdown__panel { position: static; display: none; box-shadow: none; max-height: none; padding: 6px 4px; }
  .filters__actions { display: flex !important; margin-top: auto; padding-top: 16px; position: sticky; bottom: 0; background: var(--white); }
  .filters__apply { display: inline-flex; flex: 1; }

  .product__main-img { height: 360px; }
  .product__title { font-size: 26px; }
  .product__sub { flex-direction: column; gap: 4px; }
  .price-box__inner { min-width: 0; }
  .prices__row { display: grid; grid-template-columns: 1fr 1fr; }
  .price-box__value { font-size: 22px; }
  .buy { gap: 10px; }
  .buy__btn { flex: 1; min-width: 0; }
  .ptabs__head { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; gap: 22px; }
  .ptabs__btn { white-space: nowrap; }
  .specs { grid-template-columns: 1fr; }

  .cart-line { grid-template-columns: 60px minmax(0, 1fr) auto 32px; grid-template-areas: "img info info rm" "img qty price price"; gap: 12px 10px; }
  .cart-line__img { grid-area: img; height: 100px; }
  .cart-line__info { grid-area: info; min-width: 0; overflow-wrap: anywhere; }
  .cart-line__set-price { display: block; margin-top: 2px; color: var(--muted); }
  .cart-line__qty { grid-area: qty; }
  .cart-line__price { grid-area: price; align-self: center; white-space: nowrap; }
  .cart-line > form:last-child { grid-area: rm; align-self: start; justify-self: end; }
  .footer__grid { grid-template-columns: 1fr; gap: 24px; }
  .footer__bottom { flex-direction: column; }
  .search-page { flex-direction: column; }
}

@media (max-width: 360px) {
  .cart-line { grid-template-areas: "img info info rm" "img qty qty qty" "img price price price"; }
  .cart-line__price { justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
