/* Эколайн Коми — стили витрины */
:root {
  --c-bg: #f4f7fa;
  --c-surface: #ffffff;
  --c-ink: #16212e;
  --c-muted: #64748b;
  --c-line: #e2e8f0;
  --c-accent: #0b78b8;
  --c-accent-dark: #095f92;
  --c-accent-soft: #e6f2fa;
  --c-good: #15803d;
  --c-warn: #b45309;
  --c-bad: #b91c1c;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(22, 33, 46, .06), 0 8px 24px rgba(22, 33, 46, .07);
  --shadow-hover: 0 4px 8px rgba(22, 33, 46, .08), 0 16px 36px rgba(22, 33, 46, .12);
  --container: 1220px;
}

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

html { -webkit-text-size-adjust: 100%; }

body.site {
  margin: 0;
  font-family: "Segoe UI", Roboto, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-bg);
}

img { max-width: 100%; display: block; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { color: var(--c-accent-dark); text-decoration: underline; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--c-ink); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 10px 18px; font: inherit; font-weight: 600; font-size: 15px;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--c-accent); color: #fff; }
.btn--primary:hover { background: var(--c-accent-dark); color: #fff; }
.btn--primary:disabled { background: #b6c4d1; cursor: not-allowed; }
.btn--ghost { background: #fff; color: var(--c-ink); border-color: var(--c-line); }
.btn--ghost:hover { border-color: var(--c-accent); color: var(--c-accent-dark); }
.btn--danger { background: #fff; color: var(--c-bad); border-color: #f3c2c2; }
.btn--danger:hover { background: #fdecec; color: var(--c-bad); }
.btn--sm { padding: 7px 12px; font-size: 14px; }
.btn--lg { padding: 14px 26px; font-size: 17px; }
.btn--block { display: flex; width: 100%; }

.link-muted { background: none; border: 0; padding: 0; font: inherit; color: var(--c-muted); cursor: pointer; text-decoration: underline; }
.link-muted:hover { color: var(--c-accent-dark); }
.link-muted--center { display: block; width: 100%; text-align: center; margin-top: 10px; }
.link-danger { background: none; border: 0; padding: 0; font: inherit; color: var(--c-bad); cursor: pointer; text-decoration: underline; }
.link-danger:hover { color: #8f1616; }
.muted { color: var(--c-muted); }

/* ---------- Промо-полоса ---------- */
.promo-strip { background: linear-gradient(90deg, #0b78b8, #14a0c9); color: #fff; font-size: 14px; }
.promo-strip__inner { display: flex; align-items: center; gap: 12px; padding-top: 8px; padding-bottom: 8px; }
.promo-strip__text { flex: 1; }
.promo-strip__close { background: none; border: 0; color: #fff; font-size: 20px; line-height: 1; cursor: pointer; opacity: .8; }
.promo-strip__close:hover { opacity: 1; }

/* ---------- Шапка ---------- */
.header { background: #fff; border-bottom: 1px solid var(--c-line); position: relative; z-index: 20; }
.header__top { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }

.logo { display: flex; align-items: center; gap: 10px; color: inherit; }
.logo:hover { text-decoration: none; color: inherit; }
.logo__name { display: block; font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.logo__tag { display: block; font-size: 12px; color: var(--c-muted); }

.search { flex: 1; display: flex; gap: 8px; max-width: 460px; }
.search input {
  flex: 1; min-width: 0; border: 1px solid var(--c-line); border-radius: var(--radius-sm);
  padding: 10px 12px; font: inherit; background: var(--c-bg);
}
.search input:focus { outline: 2px solid var(--c-accent-soft); border-color: var(--c-accent); background: #fff; }
.search button {
  border: 0; border-radius: var(--radius-sm); background: var(--c-ink); color: #fff;
  padding: 0 16px; font: inherit; font-weight: 600; cursor: pointer;
}
.search button:hover { background: #24384d; }
.search--page { max-width: 640px; margin-bottom: 20px; }

.header__contacts { margin-left: auto; text-align: right; }
.header__phone { font-weight: 700; font-size: 17px; color: var(--c-ink); }
.header__phone:hover { color: var(--c-accent-dark); }
.header__hours { font-size: 13px; color: var(--c-muted); }

.header__actions { display: flex; align-items: center; gap: 10px; }
.header__call {
  border: 1px dashed var(--c-accent); background: var(--c-accent-soft); color: var(--c-accent-dark);
  border-radius: var(--radius-sm); padding: 9px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
}
.header__call:hover { background: #d5e9f7; }
.header__account { color: var(--c-ink); font-weight: 600; font-size: 14px; white-space: nowrap; }
.header__exit { color: var(--c-muted); font-size: 18px; }
.header__cart {
  display: flex; align-items: center; gap: 8px; background: var(--c-accent); color: #fff;
  border-radius: var(--radius-sm); padding: 9px 14px; font-weight: 600;
}
.header__cart:hover { background: var(--c-accent-dark); color: #fff; text-decoration: none; }
.cart-count {
  min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: #fff; color: var(--c-accent-dark);
  font-size: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700;
}

/* ---------- Навигация ---------- */
.nav { background: var(--c-ink); }
.nav__inner { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.nav a { color: #e8eef5; padding: 12px 14px; font-size: 15px; border-radius: 6px; }
.nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); text-decoration: none; }
.nav__office { margin-left: auto; color: #8fd6ff !important; font-weight: 600; }
.nav__item { position: relative; }
.nav__item_catalog > a { font-weight: 700; }
.submenu {
  display: none; position: absolute; left: 0; top: 100%; min-width: 280px;
  background: #fff; border: 1px solid var(--c-line); border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-hover); padding: 8px; z-index: 30;
}
.submenu a { display: block; color: var(--c-ink); padding: 8px 10px; font-size: 14px; }
.nav__item:hover .submenu, .nav__item:focus-within .submenu { display: block; }

/* ---------- Секции ---------- */
.section { padding: 46px 0; }
.section--tight { padding: 26px 0 54px; }
.section--muted { background: #fff; border-top: 1px solid var(--c-line); border-bottom: 1px solid var(--c-line); }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section__title { font-size: 26px; margin: 0 0 18px; }
.section__head .section__title { margin-bottom: 0; }
.section__more { font-weight: 600; white-space: nowrap; }
.page__title { font-size: 30px; margin-bottom: 12px; }
.page__lead { color: var(--c-muted); max-width: 720px; margin-bottom: 22px; }

/* ---------- Герой ---------- */
.hero { background: linear-gradient(120deg, #e9f4fb 0%, #f6fbf9 60%, #eef4fa 100%); border-bottom: 1px solid var(--c-line); }
.hero__inner { display: grid; grid-template-columns: 1.15fr .85fr; gap: 36px; align-items: center; padding-top: 46px; padding-bottom: 46px; }
.hero__title { font-size: 40px; margin-bottom: 14px; }
.hero__text { font-size: 18px; color: #33475b; max-width: 540px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0 26px; }
.hero__facts { list-style: none; display: flex; flex-wrap: wrap; gap: 26px; padding: 0; margin: 0; font-size: 14px; color: var(--c-muted); }
.hero__facts b { display: block; font-size: 22px; color: var(--c-ink); }
.hero__media img { border-radius: var(--radius); }

/* ---------- Плитки разделов ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile {
  display: flex; align-items: center; min-height: 68px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  font-weight: 600; color: var(--c-ink); box-shadow: var(--shadow);
}
.tile:hover { border-color: var(--c-accent); color: var(--c-accent-dark); text-decoration: none; transform: translateY(-1px); }

/* ---------- Баннеры ---------- */
.banners { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.banner {
  position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 14px; align-items: center;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
  padding: 16px; overflow: hidden; color: inherit; box-shadow: var(--shadow);
}
.banner:hover { text-decoration: none; box-shadow: var(--shadow-hover); color: inherit; }
.banner__img { width: 120px; height: 92px; object-fit: cover; border-radius: var(--radius-sm); background: var(--c-accent-soft); }
.banner__body { display: flex; flex-direction: column; gap: 4px; }
.banner__badge { align-self: flex-start; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; background: var(--c-accent-soft); color: var(--c-accent-dark); border-radius: 999px; padding: 2px 9px; font-weight: 700; }
.banner__title { font-weight: 700; font-size: 17px; }
.banner__text { font-size: 14px; color: var(--c-muted); }
.banner__cta { font-size: 14px; font-weight: 700; color: var(--c-accent); }

/* ---------- Категории ---------- */
.cats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.cats--big { grid-template-columns: repeat(4, 1fr); margin-bottom: 36px; }
.cat {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; text-align: center;
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); color: inherit;
}
.cat:hover { border-color: var(--c-accent); text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.cat img { width: 100%; height: 92px; object-fit: contain; }
.cat__name { font-weight: 600; font-size: 14px; }
.cat__count { font-size: 12px; color: var(--c-muted); }

/* ---------- Карточка товара ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  display: flex; flex-direction: column; background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card__media { position: relative; display: block; background: #f7fafc; padding: 14px; }
.card__media img { height: 150px; width: 100%; object-fit: contain; }
.card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px; flex: 1; }
.card__cat { font-size: 12px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .3px; }
.card__title { color: var(--c-ink); font-weight: 600; font-size: 15px; min-height: 2.6em; }
.card__title:hover { color: var(--c-accent-dark); text-decoration: none; }
.card__meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--c-muted); }
.card__meta span { background: var(--c-bg); border-radius: 6px; padding: 2px 8px; }
.card__prices { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.card__foot { margin-top: 8px; }

.badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  font-size: 12px; font-weight: 700; color: #fff; border-radius: 6px; padding: 3px 8px;
}
.badge--sale { background: #e0532f; }
.badge--new { background: #15803d; left: auto; right: 10px; }
.badge--hit { background: #7c3aed; }
.badge--off { background: #94a3b8; }

.price { font-weight: 800; font-size: 19px; }
.price--old { color: var(--c-muted); font-weight: 500; font-size: 15px; text-decoration: line-through; }
.price--lg { font-size: 30px; }
.stock--none { font-size: 14px; color: var(--c-muted); }
.stars { color: #f59e0b; letter-spacing: 1px; }

/* ---------- Хлебные крошки ---------- */
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--c-muted); padding-top: 18px; padding-bottom: 4px; }
.breadcrumbs__sep { color: #cbd5e1; }

/* ---------- Каталог ---------- */
.catalog { display: grid; grid-template-columns: 250px 1fr; gap: 26px; align-items: start; }
.catalog__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.catalog__head .page__title { margin-bottom: 6px; }
.catalog__count { color: var(--c-muted); font-size: 14px; margin-bottom: 16px; }

.filters, .aside-cats { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.filters__title, .aside-cats__title { font-size: 16px; margin-bottom: 12px; }
.filters__group { border: 0; padding: 0; margin: 0 0 16px; }
.filters__group legend { font-weight: 600; font-size: 14px; margin-bottom: 8px; padding: 0; }
.filters__row { display: flex; gap: 8px; }
.filters__row .input { width: 50%; }
.filters__actions { display: flex; align-items: center; gap: 12px; }
.check, .radio { display: flex; align-items: center; gap: 8px; font-size: 14px; margin-bottom: 6px; cursor: pointer; }
.check input, .radio input { width: 16px; height: 16px; accent-color: var(--c-accent); }

.aside-cats__link { display: block; padding: 7px 9px; border-radius: 6px; color: var(--c-ink); font-size: 14px; }
.aside-cats__link:hover { background: var(--c-bg); text-decoration: none; }
.aside-cats__link.is-active { background: var(--c-accent-soft); color: var(--c-accent-dark); font-weight: 600; }

.sort { display: flex; align-items: center; gap: 8px; }
.sort__label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--c-muted); }

.pagination { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.pagination a, .pagination__current {
  min-width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; color: var(--c-ink); font-weight: 600;
}
.pagination a:hover { border-color: var(--c-accent); color: var(--c-accent-dark); text-decoration: none; }
.pagination__current { background: var(--c-accent); border-color: var(--c-accent); color: #fff; }

/* ---------- Карточка товара (страница) ---------- */
.product { display: grid; grid-template-columns: 460px 1fr; gap: 34px; align-items: start; }
.product__gallery { position: relative; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; }
.product__image { width: 100%; height: 380px; object-fit: contain; }
.product__badges { position: absolute; top: 14px; left: 14px; display: flex; flex-direction: column; gap: 6px; }
.product__badges .badge { position: static; }
.product__title { font-size: 28px; }
.product__specs-top { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 20px; margin: 0 0 18px; }
.product__specs-top dt { font-size: 13px; color: var(--c-muted); }
.product__specs-top dd { margin: 0; font-weight: 600; font-size: 14px; }
.product__prices { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.product__per { color: var(--c-muted); font-size: 14px; }
.product__buy { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 18px; }
.product__delivery { list-style: none; padding: 0; margin: 0 0 18px; font-size: 14px; color: #33475b; }
.product__delivery li { padding: 8px 0 8px 24px; border-bottom: 1px dashed var(--c-line); position: relative; }
.product__delivery li::before { content: "✓"; position: absolute; left: 0; color: var(--c-good); font-weight: 700; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff; overflow: hidden; }
.qty__btn { width: 38px; height: 44px; border: 0; background: #fff; font-size: 18px; color: var(--c-muted); cursor: pointer; }
.qty__btn:hover { background: var(--c-bg); color: var(--c-ink); }
.qty__input { width: 56px; height: 44px; border: 0; border-left: 1px solid var(--c-line); border-right: 1px solid var(--c-line);
  text-align: center; font: inherit; font-weight: 700; -moz-appearance: textfield; }
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.product-tabs { margin-top: 30px; }
.tabs__item { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); margin-bottom: 12px; }
.tabs__item summary { cursor: pointer; padding: 14px 18px; font-weight: 700; }
.tabs__item summary:hover { color: var(--c-accent-dark); }
.tabs__body { padding: 0 18px 18px; color: #33475b; }

.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid var(--c-line); text-align: left; font-size: 14px; vertical-align: middle; }
.table th { font-weight: 600; color: var(--c-muted); background: #f8fafc; }
.table--specs { max-width: 620px; }
.table--specs th { width: 45%; }
.cell-nowrap { white-space: nowrap; }

/* ---------- Корзина ---------- */
.cart { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.cart__list { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.cart__row { display: grid; grid-template-columns: 84px 1fr auto auto 36px; gap: 14px; align-items: center; padding: 14px; border-bottom: 1px solid var(--c-line); }
.cart__row:last-child { border-bottom: 0; }
.cart__media img { width: 84px; height: 84px; object-fit: contain; background: #f7fafc; border-radius: var(--radius-sm); }
.cart__name { font-weight: 600; color: var(--c-ink); }
.cart__meta { font-size: 13px; color: var(--c-muted); }
.cart__qty { display: flex; gap: 8px; align-items: center; }
.cart__qty .qty__input { width: 64px; height: 38px; }
.cart__sum { font-weight: 700; min-width: 90px; text-align: right; }
.cart__remove { width: 32px; height: 32px; border: 1px solid var(--c-line); background: #fff; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--c-muted); cursor: pointer; }
.cart__remove:hover { border-color: var(--c-bad); color: var(--c-bad); }
.cart__aside { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; position: sticky; top: 16px; }
.cart__hint { font-size: 13px; color: var(--c-warn); }

.promo { display: flex; gap: 8px; align-items: flex-end; margin-bottom: 14px; }
.promo .field { flex: 1; margin: 0; }

.totals { margin: 0 0 16px; }
.totals > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 15px; }
.totals dt { color: var(--c-muted); }
.totals dd { margin: 0; font-weight: 600; }
.totals__discount dd, .totals__discount dt { color: var(--c-good); }
.totals__grand { border-top: 1px solid var(--c-line); padding-top: 12px !important; font-size: 18px !important; }
.totals__grand dt { color: var(--c-ink); font-weight: 700; }
.totals__grand dd { font-weight: 800; font-size: 20px; }

.empty, .table-empty { color: var(--c-muted); background: #fff; border: 1px dashed var(--c-line); border-radius: var(--radius); padding: 22px; margin: 12px 0; }
.empty-block { text-align: center; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 54px 24px; }
.empty-block__title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }
.empty-block .btn { margin-top: 18px; }

/* ---------- Оформление ---------- */
.checkout { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; }
.checkout__form { display: block; }
.checkout__aside { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; position: sticky; top: 16px; }
.checkout__aside-title { font-size: 18px; }
.checkout__note { font-size: 12px; color: var(--c-muted); margin: 12px 0 0; }
.fieldset { border: 1px solid var(--c-line); border-radius: var(--radius); background: #fff; padding: 16px; margin: 0 0 16px; }
.fieldset__legend { font-weight: 700; padding: 0 6px; }
.fieldset__note { font-size: 13px; color: var(--c-muted); margin: 8px 0 0; }
.field { display: block; margin-bottom: 12px; }
.field__label { display: block; font-size: 13px; color: var(--c-muted); margin-bottom: 5px; }
.field__hint { display: block; font-size: 12px; color: var(--c-muted); margin-top: 4px; }
.input {
  width: 100%; border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: #fff;
  padding: 10px 12px; font: inherit; color: var(--c-ink);
}
.input:focus { outline: 2px solid var(--c-accent-soft); border-color: var(--c-accent); }
.input--area { resize: vertical; min-height: 76px; }
.input--sm { padding: 6px 8px; font-size: 14px; }
.checkout__form .fieldset { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.field--wide { grid-column: 1 / -1; }

.mini-cart { list-style: none; padding: 0; margin: 0 0 14px; font-size: 14px; }
.mini-cart li { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--c-line); }

/* ---------- Готово ---------- */
.done { display: flex; justify-content: center; }
.done__card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 34px; max-width: 640px; box-shadow: var(--shadow); }
.done__icon { width: 56px; height: 56px; border-radius: 50%; background: #dcfce7; color: var(--c-good); font-size: 28px; display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.done__summary { margin: 18px 0; }
.done__summary > div { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--c-line); }
.done__summary dt { color: var(--c-muted); }
.done__summary dd { margin: 0; text-align: right; font-weight: 600; }
.done__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

/* ---------- Отзывы ---------- */
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.reviews--page { grid-template-columns: repeat(2, 1fr); }
.review { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 16px; }
.review__head { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-bottom: 8px; }
.review__author { font-weight: 700; }
.review__text { margin: 0 0 10px; color: #33475b; font-size: 15px; }
.review__date { font-size: 12px; color: var(--c-muted); }
.review__product { font-size: 13px; }

/* ---------- Шаги доставки ---------- */
.steps__list { list-style: none; counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; padding: 0; margin: 0; }
.steps__list li { counter-increment: step; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px 16px 16px; font-size: 14px; position: relative; }
.steps__list li::before {
  content: counter(step); position: absolute; top: -14px; left: 16px;
  width: 28px; height: 28px; border-radius: 50%; background: var(--c-accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.steps__list b { display: block; margin-bottom: 4px; }

/* ---------- CTA ---------- */
.cta-panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  background: linear-gradient(115deg, #0b78b8, #128fa8); color: #fff; border-radius: var(--radius); padding: 28px 30px; }
.cta-panel__title { color: #fff; margin-bottom: 6px; }
.cta-panel__text p { margin: 0; opacity: .92; }

/* ---------- Статья ---------- */
.article { display: grid; grid-template-columns: 240px 1fr; gap: 26px; align-items: start; }
.article__nav { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 12px; }
.article__link { display: block; padding: 9px 10px; border-radius: 6px; color: var(--c-ink); font-size: 14px; }
.article__link:hover { background: var(--c-bg); text-decoration: none; }
.article__link.is-active { background: var(--c-accent-soft); color: var(--c-accent-dark); font-weight: 600; }
.article__body { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 24px 28px; }

/* ---------- Контакты ---------- */
.contacts__grid { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; }
.contacts__list { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px 22px; margin: 0; }
.contacts__list > div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--c-line); }
.contacts__list > div:last-child { border-bottom: 0; }
.contacts__list dt { color: var(--c-muted); }
.contacts__list dd { margin: 0; font-weight: 600; }
.contacts__side { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 20px 22px; }
.contacts__actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.contacts__social { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; font-size: 14px; }

/* ---------- Профиль ---------- */
.profile__grid { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }
.profile__main .table { border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.profile__aside { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 18px; }
.profile__links { margin-top: 14px; }

/* ---------- Чат-виджет (popup справа) ---------- */
.chat-widget { position: fixed; right: 20px; bottom: 20px; z-index: 100; }
.chat-widget__fab {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--c-accent); color: #fff; border: 0; cursor: pointer;
  font-size: 26px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(11,120,184,.35);
  transition: transform .2s, background .2s;
}
.chat-widget__fab:hover { background: var(--c-accent-dark); transform: scale(1.06); }
.chat-widget__fab.is-open { background: var(--c-bad); }

.chat-widget__panel {
  position: fixed; right: 20px; bottom: 90px; z-index: 100;
  width: 380px; max-width: calc(100vw - 40px); height: 520px; max-height: calc(100vh - 120px);
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  display: flex; flex-direction: column;
  transform: translateY(20px) scale(.95); opacity: 0;
  pointer-events: none;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
}
.chat-widget__panel.is-open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: auto;
}

.chat-widget__header {
  display: flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--c-accent), #128fa8);
  color: #fff; padding: 16px 18px; flex-shrink: 0;
}
.chat-widget__header-icon {
  width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.2);
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.chat-widget__header-text { flex: 1; }
.chat-widget__header-title { font-weight: 700; font-size: 15px; }
.chat-widget__header-sub { font-size: 12px; opacity: .85; }
.chat-widget__close {
  border: 0; background: rgba(255,255,255,.2); color: #fff;
  width: 32px; height: 32px; border-radius: 50%; font-size: 18px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.chat-widget__close:hover { background: rgba(255,255,255,.35); }

.chat-widget__body {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 10px;
  background: #f8fafc;
}
.chat-widget__body .chat__msg { margin: 0; }
.chat-widget__body .chat__bubble { max-width: 85%; word-break: break-word; }

.chat-widget__footer {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--c-line); background: #fff; flex-shrink: 0;
}
.chat-widget__footer .input { flex: 1; }
.chat-widget__footer button { flex-shrink: 0; }

@media (max-width: 480px) {
  .chat-widget__panel { right: 10px; bottom: 84px; width: calc(100vw - 20px); height: calc(100vh - 110px); }
  .chat-widget__fab { width: 54px; height: 54px; font-size: 22px; }
}

/* ---------- Чат (страница) ---------- */
.chat__window { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; max-width: 760px; }
.chat__messages { list-style: none; padding: 18px; margin: 0; max-height: 460px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; background: #f8fafc; }
.chat__msg { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; max-width: 82%; }
.chat__author { grid-column: 1; font-size: 12px; color: var(--c-muted); }
.chat__bubble { grid-column: 1 / -1; background: #fff; border: 1px solid var(--c-line); border-radius: 12px 12px 12px 4px; padding: 10px 13px; white-space: pre-wrap; }
.chat__time { grid-column: 1 / -1; font-size: 11px; color: var(--c-muted); }
.chat__msg--staff { align-self: flex-end; }
.chat__msg--staff .chat__author { text-align: right; }
.chat__msg--staff .chat__bubble { background: var(--c-accent-soft); border-color: #c9e3f5; border-radius: 12px 12px 4px 12px; }
.chat__form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--c-line); }
.chat__form .input { flex: 1; }

/* ---------- Модальное окно ---------- */
.modal { position: fixed; inset: 0; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 60; }
.modal[hidden] { display: none; }
.modal__dialog { position: relative; background: #fff; border-radius: var(--radius); padding: 26px; width: 100%; max-width: 420px; box-shadow: var(--shadow-hover); }
.modal__close { position: absolute; right: 10px; top: 8px; border: 0; background: none; font-size: 24px; line-height: 1; color: var(--c-muted); cursor: pointer; }
.modal__close:hover { color: var(--c-ink); }
.modal__title { font-size: 22px; margin-bottom: 4px; }
.modal__note { font-size: 14px; color: var(--c-muted); margin-bottom: 16px; }

/* ---------- Флеш-сообщения ---------- */
.flashes { margin-top: 14px; }
.flash { display: flex; align-items: center; gap: 10px; border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; font-size: 15px; border: 1px solid; }
.flash--success { background: #ecfdf5; border-color: #a7f3d0; color: #065f46; }
.flash--error, .flash--danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.flash--warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.flash--info, .flash--message { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }
.flash__close { margin-left: auto; border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.flash__close:hover { opacity: 1; }

.alert { border-radius: var(--radius-sm); padding: 14px 16px; margin-bottom: 18px; border: 1px solid; }
.alert--error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.alert ul { margin: 0; padding-left: 1.1em; }

/* ---------- Подвал ---------- */
.footer { margin-top: 40px; background: #16212e; color: #cbd5e1; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 26px; padding-top: 40px; padding-bottom: 28px; }
.footer a { display: block; color: #cbd5e1; padding: 3px 0; font-size: 14px; }
.footer a:hover { color: #fff; }
.footer__title { color: #fff; font-weight: 700; margin-bottom: 10px; font-size: 16px; }
.footer__text { font-size: 14px; color: #94a3b8; margin: 0 0 12px; }
.footer__social { display: flex; flex-wrap: wrap; gap: 12px; }
.footer__social a { display: inline; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding-top: 16px; padding-bottom: 22px; border-top: 1px solid #25344a; font-size: 13px; color: #94a3b8; }
.footer__bottom a { display: inline; }

/* ---------- Авторизация ---------- */
body.site.auth { display: block; }
.auth { display: flex; align-items: center; justify-content: center; padding: 46px 20px; }
.auth__card { background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 30px; width: 100%; max-width: 440px; box-shadow: var(--shadow); }
.auth__card .page__title { font-size: 24px; }
.auth__aside { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--c-line); font-size: 14px; color: var(--c-muted); }
.form { display: block; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 6px; }

/* ---------- Ошибки ---------- */
.error-page { text-align: center; padding: 70px 20px; }
.error-page__code { font-size: 76px; font-weight: 800; color: var(--c-accent); line-height: 1; }
.error-page__actions { display: flex; gap: 12px; justify-content: center; margin-top: 22px; }

/* ---------- Формы в один/два столбца ---------- */
.form--narrow { max-width: 520px; }
.form--wide { max-width: 860px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.ticks { display: flex; flex-wrap: wrap; gap: 10px 18px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cats { grid-template-columns: repeat(4, 1fr); }
  .product { grid-template-columns: 380px 1fr; }
}
@media (max-width: 980px) {
  .header__top { flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { display: none; }
  .hero__title { font-size: 32px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .banners { grid-template-columns: 1fr; }
  .banner { grid-template-columns: 100px 1fr; }
  .catalog, .cart, .checkout, .article, .contacts__grid, .profile__grid { grid-template-columns: 1fr; }
  .cart__aside, .checkout__aside { position: static; }
  .grid { grid-template-columns: repeat(3, 1fr); }
  .cats, .cats--big { grid-template-columns: repeat(3, 1fr); }
  .steps__list { grid-template-columns: repeat(2, 1fr); }
  .steps__list li { margin-top: 14px; }
  .reviews, .reviews--page { grid-template-columns: 1fr; }
  .product { grid-template-columns: 1fr; }
  .product__image { height: 300px; }
  .footer__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .cats, .cats--big { grid-template-columns: repeat(2, 1fr); }
  .tiles, .steps__list { grid-template-columns: 1fr; }
  .steps__list li { margin-top: 16px; }
  .header__contacts { display: none; }
  .header__cart-label { display: none; }
  .checkout__form .fieldset, .grid-2 { grid-template-columns: 1fr; }
  .cart__row { grid-template-columns: 64px 1fr; grid-auto-rows: auto; }
  .cart__media img { width: 64px; height: 64px; }
  .cart__sum { text-align: left; }
  .section { padding: 32px 0; }
  .page__title { font-size: 25px; }
  .contacts__list > div { grid-template-columns: 1fr; gap: 2px; }
  .nav__office { margin-left: 0; }
}
