/* ── Палитра и базовые переменные ─────────────────────────────────────────── */
:root {
  --brand:        #0f7d8c;
  --brand-dark:   #0a5c68;
  --header-bg:    #0d4f5c;
  --topbar-bg:    #093c47;
  --accent:       #ff6b35;
  --accent-dark:  #e85520;
  --text:         #1c2b33;
  --muted:        #6b7c85;
  --border:       #dfe6ea;
  --bg:           #f2f5f7;
  --card:         #ffffff;
  --green:        #17914a;
  --radius:       6px;
  --container:    1280px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

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

/* ── Верхняя тонкая полоса ────────────────────────────────────────────────── */
.topbar {
  background: var(--topbar-bg);
  color: #cfe3e8;
  font-size: 13px;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 34px;
  gap: 16px;
}
.topbar__nav { display: flex; gap: 20px; }
.topbar a:hover { color: #fff; }
/* Пункты меню не разрываются посередине: с пятым пунктом «О бренде» ломалось пополам */
.topbar__nav a { white-space: nowrap; }

/* ── Шапка ────────────────────────────────────────────────────────────────── */
.header { background: var(--header-bg); color: #fff; }
.header__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 68px;
}

/* Фирменный логотип: в шапке рыба и надпись стоят в строку — вертикальный
   замок в 68px высоты нечитаем. Обе части — белые версии на прозрачном фоне. */
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo__fish { height: 48px; width: auto; }
.logo__word { height: 27px; width: auto; }

/* Кнопка и выпадающее меню каталога */
.catalog-menu { position: relative; flex-shrink: 0; }
.catalog-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 18px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.catalog-btn:hover { background: var(--accent-dark); }
.catalog-btn__icon {
  width: 16px; height: 2px;
  background: currentColor;
  box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor;
}

.catalog-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  z-index: 50;
  min-width: 300px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 10px 0;
  background: #fff;
  color: var(--text);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18);
}
.catalog-dropdown[hidden] { display: none; }
.catalog-dropdown__list { list-style: none; margin: 0; padding: 0; }
.catalog-dropdown__parent {
  display: block;
  padding: 9px 20px;
  font-weight: 600;
}
.catalog-dropdown__parent:hover { background: var(--bg); color: var(--brand); }
.catalog-dropdown__children { list-style: none; margin: 0 0 6px; padding: 0; }
.catalog-dropdown__children a {
  display: block;
  padding: 6px 20px 6px 34px;
  color: var(--muted);
  font-size: 14px;
}
.catalog-dropdown__children a:hover { color: var(--brand); background: var(--bg); }
.catalog-dropdown__empty { margin: 0; padding: 14px 20px; color: var(--muted); }

/* Поиск */
.search { flex: 1; display: flex; min-width: 0; }
.search__input {
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--radius) 0 0 var(--radius);
  font: inherit;
  outline: none;
}
.search__btn {
  height: 40px;
  padding: 0 20px;
  background: var(--brand);
  color: #fff;
  border: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.search__btn:hover { background: var(--brand-dark); }

.header__support {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
  font-size: 12px;
}
.header__support-icon { font-size: 20px; }
.header__support:hover { color: #ffd9c9; }

/* ── Главный блок ─────────────────────────────────────────────────────────── */
.main { min-height: 60vh; padding-bottom: 48px; }

.hero {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  color: #fff;
}
.hero__inner { padding: 52px 16px; }
.hero__text { max-width: 620px; }
.hero__title { margin: 0 0 14px; font-size: clamp(26px, 4vw, 38px); line-height: 1.2; }
.hero__subtitle { margin: 0 0 24px; font-size: 17px; color: #d8eef2; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── Кнопки ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { background: rgba(255, 255, 255, .14); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.4); }
.btn--ghost:hover { background: rgba(255, 255, 255, .24); }
.btn--buy { width: 100%; height: 38px; background: var(--accent); color: #fff; margin-top: 12px; }
.btn--buy:hover { background: var(--accent-dark); }

/* ── Секции ───────────────────────────────────────────────────────────────── */
.section { padding: 36px 16px 0; }
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.section__title { margin: 0 0 18px; font-size: 23px; }
.section__link { color: var(--brand); font-weight: 600; font-size: 14px; }
.section__link:hover { color: var(--accent); }

/* Плитки категорий */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.tile:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.tile__name { font-weight: 600; }
.tile__count { font-size: 13px; color: var(--muted); }

/* ── Сетка и карточка товара ──────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 12px;
}

.card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(0,0,0,.08); }

.card__image {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  padding: 12px;
  background: #fff;
}
.card__image img { max-height: 100%; width: auto; object-fit: contain; }
.card__noimage { font-size: 44px; opacity: .25; }
.card__badge {
  position: absolute;
  top: 10px; left: 10px;
  padding: 3px 8px;
  background: var(--accent);
  color: #fff;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 700;
}

.card__body { display: flex; flex-direction: column; flex: 1; padding: 12px 14px 14px; }
.card__name {
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__name:hover { color: var(--brand); }
.card__specs {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.card__specs li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card__footer { margin-top: auto; }
.card__prices { display: flex; align-items: baseline; gap: 8px; }
.card__price { font-size: 19px; font-weight: 700; }
.card__oldprice { font-size: 13px; color: var(--muted); text-decoration: line-through; }
.card__stock { margin-top: 4px; font-size: 12.5px; color: var(--green); }
.card__stock--out { color: var(--muted); }

/* ── Пустое состояние ─────────────────────────────────────────────────────── */
.empty {
  padding: 48px 24px;
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.empty__title { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.empty__text { margin: 0 0 18px; color: var(--muted); }

/* ── Преимущества ─────────────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}
.feature {
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.feature__icon { font-size: 26px; margin-bottom: 10px; }
.feature__title { margin: 0 0 6px; font-size: 16px; }
.feature__text { margin: 0; color: var(--muted); font-size: 14px; }

/* ── Хлебные крошки и текстовые страницы ──────────────────────────────────── */
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 0;
  font-size: 13px;
  color: var(--muted);
}
.breadcrumbs a:hover { color: var(--brand); }
.breadcrumbs > * + *::before { content: "/"; margin-right: 8px; color: var(--border); }

.article {
  max-width: 760px;
  padding: 28px 32px 34px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.article h1 { margin: 0 0 18px; font-size: 27px; }
.article p { margin: 0 0 14px; }
.article a { color: var(--brand); text-decoration: underline; }

.contacts-list { list-style: none; margin: 0 0 20px; padding: 0; }
.contacts-list li {
  display: flex;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.contacts-list span { width: 110px; color: var(--muted); flex-shrink: 0; }

/* ── Подвал ───────────────────────────────────────────────────────────────── */
.footer { background: var(--header-bg); color: #cfe3e8; margin-top: 48px; }
.footer__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px;
  padding-top: 36px;
  padding-bottom: 30px;
}
.footer__title { margin-bottom: 12px; color: #fff; font-weight: 600; }
.footer__logo { height: 74px; width: auto; margin-bottom: 12px; opacity: .92; }
.footer__text { margin: 0; font-size: 14px; }
.footer__list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.footer__list li { margin-bottom: 8px; }
.footer a:hover { color: #fff; }
.footer__bottom {
  padding: 14px 0;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 13px;
}

/* ── Каталог: заголовок, фильтры, тулбар, пагинация ───────────────────────── */
.catalog-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.catalog-title { margin: 0; font-size: 26px; }
.catalog-count { color: var(--muted); font-size: 14px; }

.catalog-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }

.filters {
  padding: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: sticky;
  top: 12px;
}
.filter-group { margin-bottom: 18px; }
.filter-group__title { margin-bottom: 9px; font-weight: 600; font-size: 14px; }
.filter-price { display: flex; gap: 8px; }
.filter-price input {
  width: 100%; min-width: 0; padding: 7px 9px;
  border: 1px solid var(--border); border-radius: 4px; font: inherit;
}
.filter-option { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 14px; cursor: pointer; }
.filter-option span:first-of-type { flex: 1; }
.filter-option__count { color: var(--muted); font-size: 12px; }
.filters__submit { width: 100%; margin-bottom: 10px; }
.filters__reset { display: block; text-align: center; font-size: 13px; color: var(--muted); }
.filters__reset:hover { color: var(--accent); }

.toolbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 14px;
}
.toolbar__label { color: var(--muted); }
.toolbar__sort { color: var(--text); }
.toolbar__sort:hover { color: var(--brand); }
.toolbar__sort.is-active { color: var(--accent); font-weight: 600; }

.pagination { display: flex; gap: 6px; margin-top: 22px; flex-wrap: wrap; }
.pagination a, .pagination span {
  padding: 7px 12px; background: var(--card);
  border: 1px solid var(--border); border-radius: 4px;
}
.pagination a:hover { border-color: var(--brand); color: var(--brand); }
.pagination .is-current { background: var(--brand); border-color: var(--brand); color: #fff; }

/* ── Карточка товара ──────────────────────────────────────────────────────── */
.product-title { margin: 0 0 18px; font-size: 25px; }
.product { display: grid; grid-template-columns: 1fr 320px; gap: 24px; align-items: start; }

.product__gallery {
  padding: 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.product__main-image {
  display: flex; align-items: center; justify-content: center;
  height: 380px; margin-bottom: 12px;
}
.product__main-image img { max-height: 100%; width: auto; object-fit: contain; }
.product__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.product__thumb {
  width: 62px; height: 62px; padding: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 4px; cursor: pointer;
}
.product__thumb:hover, .product__thumb.is-active { border-color: var(--brand); }
.product__thumb img { width: 100%; height: 100%; object-fit: contain; }

.product__video { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.product__video-title { margin-bottom: 9px; font-weight: 600; font-size: 14px; }
.product__video video {
  width: 100%;
  max-height: 420px;
  border-radius: var(--radius);
  background: #000;
}

.product__buy {
  padding: 20px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  position: sticky; top: 12px;
}
.product__prices { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.product__price { font-size: 28px; font-weight: 700; }
.product__oldprice { color: var(--muted); text-decoration: line-through; }
.card__badge--inline { position: static; }
.product__stock { margin: 8px 0 16px; color: var(--green); font-size: 14px; }
.product__stock--out { color: var(--muted); }
.product__cta { width: 100%; }
.product__note { margin: 10px 0 0; color: var(--muted); font-size: 12.5px; }
.product__support { display: block; margin-top: 16px; color: var(--brand); font-size: 14px; }
.product__support:hover { color: var(--accent); }

.section-block {
  margin-top: 26px; padding: 20px 24px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.section-block__title { margin: 0 0 14px; font-size: 19px; }

.specs { width: 100%; border-collapse: collapse; }
.specs th, .specs td { padding: 9px 0; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.specs th { width: 45%; font-weight: 400; color: var(--muted); }
.specs tr:last-child th, .specs tr:last-child td { border-bottom: 0; }

/* Описание приходит из Ozon и выводится с экранированием — переносы строк
   сохраняем через CSS, а не вставкой сырого HTML в шаблон. */
.product__description { white-space: pre-line; }

/* ── Отзывы покупателей ───────────────────────────────────────────────────── */
/* Звёзды: серый ряд и поверх обрезанный по ширине оранжевый — дробная оценка без картинок */
.stars { position: relative; display: inline-block; white-space: nowrap; color: #d5dde0; line-height: 1; }
.stars__fill { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--accent); }
.stars--sm { font-size: 13px; letter-spacing: 1px; }
.stars--lg { font-size: 19px; letter-spacing: 2px; }

.card__rating { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; font-size: 12.5px; }
.card__rating span { font-weight: 600; }
.card__rating em { color: var(--muted); font-style: normal; }

.product__rating { display: inline-flex; align-items: center; gap: 8px; margin: -10px 0 16px; font-size: 14px; }
.product__rating b { font-size: 15px; }
.product__rating span { color: var(--muted); }
.product__rating:hover b, .product__rating:hover span { color: var(--brand); }

.reviews-summary { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; margin-bottom: 22px; }
.reviews-summary__score { text-align: center; }
.reviews-summary__value { display: block; font-size: 40px; font-weight: 700; line-height: 1.1; }
.reviews-summary__count { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.reviews-hist { flex: 1; min-width: 240px; max-width: 420px; }
.reviews-hist__row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; font-size: 12.5px; }
.reviews-hist__star { width: 34px; color: var(--muted); }
.reviews-hist__bar { flex: 1; height: 8px; background: #e9eef0; border-radius: 4px; overflow: hidden; }
.reviews-hist__bar span { display: block; height: 100%; background: var(--accent); }
.reviews-hist__count { width: 44px; text-align: right; color: var(--muted); }

.review { padding: 16px 0; border-top: 1px solid var(--border); }
.review__head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.review__author { font-weight: 600; }
.review__date { color: var(--muted); font-size: 13px; }
.review__block { margin-bottom: 8px; }
.review__label { display: block; margin-bottom: 2px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.review__text { margin: 0; white-space: pre-line; }
.review__photos { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 4px; }
.review__photo {
  position: relative;
  width: 92px; height: 92px;
  padding: 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  background: var(--bg); cursor: zoom-in; overflow: hidden;
}
.review__photo img { width: 100%; height: 100%; object-fit: cover; }
.review__frame-note {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2px 4px; background: rgba(13, 79, 92, .78); color: #fff; font-size: 10.5px;
}
.review__answer { margin-top: 10px; padding: 10px 14px; background: var(--bg); border-left: 3px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; }
.reviews-more { display: inline-block; margin-top: 14px; color: var(--brand); font-weight: 600; }
.reviews-note { margin: 18px 0 0; color: var(--muted); font-size: 12.5px; }
.reviews-note a { color: var(--brand); }

/* Просмотр фото из отзыва */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; background: rgba(10, 30, 36, .88); cursor: zoom-out;
}
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }

/* ── Служба заботы ────────────────────────────────────────────────────────── */
.support-head { max-width: 680px; }
.support-title { margin: 0 0 10px; font-size: 27px; }
.support-lead { margin: 0 0 22px; color: var(--muted); font-size: 15.5px; }
.support-subtitle { margin: 0 0 16px; font-size: 18px; }
.support-muted { margin: 0; color: var(--muted); font-size: 14px; }

.support-layout { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.support-form-card, .support-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.support-card { margin-bottom: 16px; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; }
.alert--ok { background: #e4f6eb; border: 1px solid #b6e3c8; color: #14653a; }

/* Поля формы */
.field { display: block; margin-bottom: 16px; }
.field__label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.field__label em { color: var(--accent); font-style: normal; }
.field__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font: inherit;
  background: #fff;
}
.field__input:focus { outline: none; border-color: var(--brand); }
.field__input.is-error { border-color: #d33a2c; background: #fffafa; }
textarea.field__input { resize: vertical; }
.field__error { display: block; margin-top: 5px; color: #d33a2c; font-size: 13px; }
.field__hint { margin: -8px 0 16px; color: var(--muted); font-size: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Ловушка для ботов — вне экрана, но не display:none (его боты распознают) */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Каналы связи: QR + ссылки. В сайдбаре колонкой, на странице контактов — в строку. */
.channels { display: flex; flex-direction: column; gap: 18px; }
.channels__qr { text-align: center; }
.channels__qr img {
  width: 180px; height: 180px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  padding: 8px;
}
.channels__qr-hint { margin-top: 7px; color: var(--muted); font-size: 12.5px; }
.channels__text { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

.channel {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 9px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.channel:hover { border-color: var(--brand); background: #fff; }
.channel__icon {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 50%;
  color: #fff; font-weight: 700; font-size: 15px;
}
.channel--tg .channel__icon { background: #29a0da; }
.channel--vk .channel__icon { background: #0077ff; font-size: 12px; }
.channel b { display: block; font-size: 14.5px; }
.channel em { display: block; margin-top: 2px; color: var(--muted); font-style: normal; font-size: 12.5px; }

/* На отдельной странице контактов QR и ссылки стоят рядом */
.contacts-card .channels { flex-direction: row; align-items: flex-start; gap: 30px; }
.contacts-card .channels__links { flex: 1; }

.support-contacts { list-style: none; margin: 0; padding: 0; }
.support-contacts li {
  display: flex;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.support-contacts li:last-child { border-bottom: 0; }
.support-contacts span { width: 84px; color: var(--muted); flex-shrink: 0; }
.support-contacts a { color: var(--brand); }

.support-faq-list { list-style: none; margin: 0 0 14px; padding: 0; font-size: 14px; }
.support-faq-list li { margin-bottom: 9px; }
.support-faq-list a { color: var(--text); }
.support-faq-list a:hover { color: var(--brand); }
.support-more { color: var(--brand); font-weight: 600; font-size: 14px; }
.support-more:hover { color: var(--accent); }

/* FAQ */
.faq-group { margin-bottom: 26px; }
.faq-group__title { margin: 0 0 12px; font-size: 19px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
}
.faq-item__q {
  padding: 14px 18px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.faq-item__q::-webkit-details-marker { display: none; }
.faq-item__q::before { content: "+ "; color: var(--accent); font-weight: 700; }
.faq-item[open] .faq-item__q::before { content: "− "; }
.faq-item__a {
  padding: 0 18px 16px;
  color: var(--text);
  white-space: pre-line;
}
.faq-cta {
  margin-top: 28px;
  padding: 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
}
.faq-cta p { margin: 0 0 12px; color: var(--muted); }

/* ── Статьи ───────────────────────────────────────────────────────────────── */
.articles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.article-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 20px 22px;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
}
.article-card:hover { border-color: var(--brand); box-shadow: 0 6px 18px rgba(0,0,0,.07); }
.article-card { overflow: hidden; }
/* Обложка во всю ширину карточки: выходит за внутренние отступы карточки */
.article-card__cover {
  display: block;
  width: calc(100% + 44px);
  max-width: none;
  height: auto;
  aspect-ratio: 1200 / 630;
  margin: -20px -22px 6px;
  object-fit: cover;
  background: var(--bg);
}
.article-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 1200 / 630;
  margin: 0 0 24px;
  border-radius: var(--radius);
  background: var(--bg);
}
.article-card__category { color: var(--brand); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.article-card__title { font-size: 17px; font-weight: 700; line-height: 1.35; }
.article-card__excerpt { color: var(--muted); font-size: 14px; }
.article-card__more { margin-top: auto; color: var(--accent); font-weight: 600; font-size: 14px; }

.article--long { max-width: 820px; }
.article-meta { margin: -8px 0 22px; color: var(--muted); font-size: 13.5px; }
.article-body { font-size: 16px; line-height: 1.7; }
.article-body h2 { margin: 30px 0 12px; font-size: 22px; line-height: 1.3; }
.article-body h3 { margin: 24px 0 10px; font-size: 18px; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 24px; }
.article-body li { margin-bottom: 6px; }
.article-body img { margin: 12px 0 18px; border: 1px solid var(--border); border-radius: var(--radius); }
.article-body blockquote { margin: 0 0 16px; padding: 10px 16px; border-left: 3px solid var(--brand); background: var(--bg); }
.article-body table { display: block; overflow-x: auto; width: 100%; margin: 0 0 16px; border-collapse: collapse; font-size: 14.5px; }
.article-body th, .article-body td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; }
.article-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--border); }
.article-cta p { width: 100%; margin: 0; font-weight: 600; }
/* .article a подчёркивает и красит ссылки в цвет бренда — для кнопок внутри статьи это отменяем */
.article a.btn { text-decoration: none; }
.article a.btn--primary, .article a.btn--primary:hover { color: #fff; }
.btn--outline { background: transparent; color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.btn--outline:hover, .article a.btn--outline:hover { background: var(--brand); color: #fff; }
.more-articles { max-width: 820px; margin-top: 28px; }
.feature__link { color: var(--brand); font-weight: 600; }
.feature__link:hover { color: var(--accent); }

/* ── Калькуляторы ─────────────────────────────────────────────────────────── */
.tools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; }
.tool-card {
  display: flex;
  gap: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.tool-card:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(13, 79, 92, .08); }
.tool-card__icon { font-size: 26px; line-height: 1.1; }
.tool-card__title { display: block; margin-bottom: 6px; font-size: 17px; font-weight: 600; }
.tool-card__text { display: block; color: var(--muted); font-size: 14px; }
.tool-card__more { display: block; margin-top: 10px; color: var(--brand); font-weight: 600; font-size: 14px; }

.calc-layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
/* Поля скрытых форм аквариума: .field переопределяет display, поэтому hidden усиливаем */
.calc [hidden] { display: none !important; }
.calc-card {
  padding: 24px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.calc-shapes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.calc-shape { cursor: pointer; }
.calc-shape input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.calc-shape span {
  display: block;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
}
.calc-shape input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }
.calc-shape input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.calc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 14px; }
.calc-grid + .calc-grid { margin-top: 14px; }
.calc-grid .field { margin-bottom: 0; }
.calc-note { margin: 18px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.calc-result { position: sticky; top: 16px; }
.calc-total {
  padding: 20px;
  background: var(--header-bg);
  color: #fff;
  border-radius: var(--radius) var(--radius) 0 0;
}
.calc-total__label { display: block; font-size: 13.5px; color: #bcdbe2; }
.calc-total__value { display: block; margin: 4px 0 3px; font-size: 32px; font-weight: 700; line-height: 1.1; }
.calc-total__hint { display: block; font-size: 12.5px; color: #9fc9d3; }
.calc-panel {
  padding: 16px 20px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
}
.calc-list { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.calc-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.calc-list li:last-child { border-bottom: 0; }
.calc-list span { color: var(--muted); }
.calc-list b { white-space: nowrap; }
.calc-block { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.calc-block__title { margin-bottom: 6px; font-size: 14px; font-weight: 600; }
.calc-block .support-muted { margin-bottom: 4px; font-size: 13px; }
.calc-block .btn { width: 100%; margin-top: 12px; }
.calc-text { margin-top: 20px; }
.calc-text h2 { margin: 26px 0 12px; font-size: 21px; }
.calc-text h2:first-child { margin-top: 0; }
.calc-text ul { margin: 0 0 14px; padding-left: 22px; }
.calc-text li { margin-bottom: 7px; }

.alert--warn { background: #fff5e6; border: 1px solid #ffd9a8; color: #8a4b00; }
.calc-hint { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; line-height: 1.45; }

/* Подбор по объёму: плашка над списком каталога и отметка на плитке товара */
.catalog-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
  padding: 12px 16px;
  background: #e7f3f5;
  border: 1px solid #bcdde3;
  border-radius: var(--radius);
  font-size: 14px;
}
.catalog-note a { color: var(--brand); font-weight: 600; white-space: nowrap; }
.card__volume { margin-bottom: 6px; color: var(--brand); font-size: 12.5px; font-weight: 600; }
.product__volume {
  margin: 12px 0 0;
  padding: 10px 12px;
  background: #e7f3f5;
  border-radius: var(--radius);
  font-size: 13.5px;
}
.product__volume a { display: block; margin-top: 4px; color: var(--brand); font-size: 12.5px; }

/* ── Адаптив ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .header__inner { height: auto; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
  .search { order: 3; flex-basis: 100%; }
  .topbar__nav { gap: 14px; }
  .catalog-layout { grid-template-columns: 1fr; }
  .filters { position: static; }
  .product { grid-template-columns: 1fr; }
  .product__buy { position: static; }
  .product__main-image { height: 280px; }
  .support-layout { grid-template-columns: 1fr; }
  .calc-layout { grid-template-columns: 1fr; }
  .calc-result { position: static; }
}

@media (max-width: 560px) {
  .logo { gap: 8px; }
  .logo__fish { height: 34px; }
  .logo__word { height: 17px; }
  .catalog-btn { padding: 0 13px; }
  /* Оставляем только иконку — иначе «Забота» переносится на отдельную строку */
  .header__support span:not(.header__support-icon) { display: none; }
  .card__image { height: 165px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .article { padding: 20px; }
  .topbar__contacts { display: none; }
  /* Пять пунктов в одну строку не помещаются — переносим их и отпускаем высоту полосы */
  .topbar__inner { height: auto; min-height: 34px; padding-top: 5px; padding-bottom: 5px; }
  .topbar__nav { flex-wrap: wrap; gap: 4px 14px; }
  .field-row { grid-template-columns: 1fr; }
  .support-form-card, .support-card { padding: 18px; }
  .calc-card { padding: 18px; }
  .calc-grid { grid-template-columns: 1fr 1fr; }
  .contacts-card .channels { flex-direction: column; gap: 18px; }
}
