/* ==========================================================
   Банный Двор — тема поверх Bootstrap 5.3
   ========================================================== */

/* ---------- Токены: светлая тема ---------- */
:root,
[data-bs-theme="light"] {
  --c-bg: oklch(97% .015 80);
  --c-fg: oklch(22% .03 50);
  --c-card: oklch(99% .01 80);
  --c-primary: oklch(42% .09 145);
  --c-primary-fg: oklch(98% .01 80);
  --c-secondary: oklch(92% .03 75);
  --c-muted: oklch(93% .02 75);
  --c-muted-fg: oklch(48% .03 55);
  --c-accent: oklch(70% .14 60);
  --c-accent-fg: oklch(20% .03 50);
  --c-danger: oklch(57.7% .245 27.325);
  --c-border: oklch(87% .03 70);

  --font-sans: "Inter", system-ui, sans-serif;
  --font-serif: "Lora", Georgia, serif;

  /* Прокидываем в переменные Bootstrap */
  --bs-body-bg: var(--c-bg);
  --bs-body-color: var(--c-fg);
  --bs-body-font-family: var(--font-sans);
  --bs-border-color: var(--c-border);
  --bs-secondary-color: var(--c-muted-fg);
  --bs-link-color-rgb: inherit;
}

/* ---------- Токены: тёмная тема ---------- */
[data-bs-theme="dark"] {
  color-scheme: dark;
  --c-bg: oklch(17% .015 50);
  --c-fg: oklch(94% .02 80);
  --c-card: oklch(22% .02 50);
  --c-primary: oklch(72% .13 140);
  --c-primary-fg: oklch(17% .02 50);
  --c-secondary: oklch(27% .02 50);
  --c-muted: oklch(25% .02 50);
  --c-muted-fg: oklch(70% .03 70);
  --c-accent: oklch(75% .15 65);
  --c-accent-fg: oklch(17% .02 50);
  --c-danger: oklch(70.4% .191 22.216);
  --c-border: oklch(100% 0 0 / .12);

  --bs-body-bg: var(--c-bg);
  --bs-body-color: var(--c-fg);
  --bs-border-color: var(--c-border);
  --bs-secondary-color: var(--c-muted-fg);
}

/* ---------- База ---------- */
html { scroll-behavior: smooth; }
body {
  background: var(--c-bg);
  color: var(--c-fg);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  margin: 0;
}

/* ---------- Раскладка ---------- */
.container-6xl {
  width: 100%;
  max-width: 72rem;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.py-section    { padding-block: 5rem; }
.py-section-sm { padding-block: 4rem; }
.bg-soft { background: color-mix(in oklab, var(--c-secondary) 60%, transparent); }

/* ---------- Утилиты ---------- */
.text-brand    { color: var(--c-primary) !important; }
.text-accent-c { color: var(--c-accent) !important; }
.text-muted-c  { color: var(--c-muted-fg) !important; }
.text-danger-c { color: var(--c-danger) !important; }
.fs-lg { font-size: 1.125rem; line-height: 1.75rem; }
.fw-medium { font-weight: 500 !important; }
.opacity-90 { opacity: .9; }
.rounded-xl  { border-radius: .75rem; }
.rounded-2xl { border-radius: 1rem; }
.shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); }

.icon-20 { width: 1.25rem; height: 1.25rem; flex-shrink: 0; }
.icon-28 { width: 1.75rem; height: 1.75rem; }
.icon-48 { width: 3rem;    height: 3rem; }

.card-c {
  background: var(--c-card);
  border: 1px solid var(--c-border);
}

/* ---------- Кнопки ---------- */
.btn-accent-c,
.btn-ghost {
  --bs-btn-border-width: 0;
  font-weight: 500;
  transition: opacity .15s ease, background-color .15s ease;
}

.btn-ghost {
  --bs-btn-border-width: 1px;
  border-color: var(--c-border);
  background: color-mix(in oklab, var(--c-card) 70%, transparent);
  color: var(--c-fg);
}
.btn-ghost:hover { background: var(--c-card); color: var(--c-fg); border-color: var(--c-border); }

.btn-lg-c { padding: .75rem 1.75rem; font-size: 1rem; }

.btn-accent-c {
  background: var(--c-accent);
  color: var(--c-accent-fg);
  padding-block: 1rem;
  font-size: 1.125rem;
  font-weight: 600;
}
.btn-accent-c:hover,
.btn-accent-c:active { background: var(--c-accent) !important; color: var(--c-accent-fg) !important; opacity: .9; }

.order-again {
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-primary);
  text-decoration: underline;
  text-underline-offset: .2em;
}
.order-again:hover { text-decoration: none; }

.btn-theme {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  color: var(--c-fg);
  transition: background-color .15s ease;
}
.btn-theme:hover { background: var(--c-secondary); }
.theme-icon-dark { display: none; }
[data-bs-theme="dark"] .theme-icon-dark  { display: block; }
[data-bs-theme="dark"] .theme-icon-light { display: none; }

/* ---------- Шапка ---------- */
.site-header {
  position: relative;
  z-index: 2;
  background: var(--c-bg);
  border-color: color-mix(in oklab, var(--c-border) 60%, transparent) !important;
}
.site-header .container-6xl { padding-block: .75rem !important; }
.brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
}

/* ---------- Первый экран ---------- */
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    var(--c-bg),
    color-mix(in oklab, var(--c-bg) 85%, transparent),
    color-mix(in oklab, var(--c-bg) 20%, transparent)
  );
}
.hero-content { padding-block: 6rem; }
.pill-note {
  display: inline-block;
  margin-bottom: 1rem;
  padding: .25rem .75rem;
  border: 1px solid var(--c-border);
  border-radius: 50rem;
  background: color-mix(in oklab, var(--c-card) 70%, transparent);
  color: var(--c-muted-fg);
  font-size: .875rem;
}
.hero-title {
  max-width: 42rem;
  font-size: 2.25rem;
  line-height: 1.25;
}
.hero-lead {
  max-width: 36rem;
  margin-top: 1.25rem;
  font-size: 1.125rem;
  line-height: 1.75rem;
}

/* ---------- Заголовки секций и карточек ---------- */
.section-title { font-size: 1.875rem; line-height: 2.25rem; }
.card-title-c  { font-size: 1.25rem;  line-height: 1.75rem; }
.feature-title { font-size: 1.125rem; line-height: 1.75rem; }
.step-num {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  line-height: 2.5rem;
  font-weight: 600;
  color: var(--c-accent);
}

/* ---------- Продукт ---------- */
.img-square {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.check-list {
  list-style: none;
  padding: 0;
  margin-bottom: 0;
}
.check-list li {
  display: flex;
  gap: .75rem;
}
.check-list li + li { margin-top: .75rem; }
.check-list-tight li + li { margin-top: .5rem; }

/* ---------- Подбор веника ---------- */
.breed-tab {
  padding: .625rem 1.5rem;
  border-radius: 50rem;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  color: var(--c-fg);
  font-weight: 500;
  transition: background-color .15s ease, color .15s ease;
}
.breed-tab:hover { background: var(--c-muted); }
.breed-tab.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-primary-fg);
}
.breed-card {
  display: grid;
  gap: 1.5rem;
  padding: 2rem;
}
.breed-img {
  display: block;
  width: 100%;
  max-width: 22rem;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 1rem;
}
.breed-subtitle {
  margin: 0 0 .25rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
}
.breed-title { font-size: 1.5rem; line-height: 2rem; }
.tag {
  padding: .25rem .75rem;
  border-radius: 50rem;
  background: var(--c-secondary);
  font-size: .875rem;
}

/* ---------- Оффер ---------- */
.offer {
  background: var(--c-primary);
  color: var(--c-primary-fg);
}
.offer-title { font-size: 1.875rem; line-height: 2.25rem; }
.price-card {
  padding: 2rem;
  border-radius: 1.5rem;
  background: var(--c-card);
  color: var(--c-fg);
  box-shadow: 0 25px 50px -12px rgb(0 0 0 / .25);
}
.price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: .5rem;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.1;
}
.price-qty { font-size: 2.5rem; white-space: nowrap; }
.price-sum { font-size: 1.5rem; white-space: nowrap; color: var(--c-muted-fg); }
@media (max-width: 575.98px) {
  .price-card { padding: 1.5rem; }
  /* На телефоне — в две строки: количество, под ним цена */
  .price-line { flex-direction: column; align-items: flex-start; row-gap: .25rem; }
  .price-dash { display: none; }
}

/* Полупрозрачная карточка формы на первом экране */
.price-card-glass {
  background: color-mix(in oklab, var(--c-card) 62%, transparent);
  border: 1px solid color-mix(in oklab, var(--c-card) 45%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  backdrop-filter: blur(14px) saturate(1.2);
}
.price-card-glass .form-control-c,
.price-card-glass .form-control-c:focus {
  background: color-mix(in oklab, var(--c-bg) 75%, transparent);
}

/* ---------- Адаптив ---------- */
@media (min-width: 768px) {
  .hero-content  { padding-block: 8rem; }
  .hero-title    { font-size: 3.75rem; line-height: 1.25; }
  .section-title { font-size: 2.25rem; line-height: 2.5rem; }
  .offer-title   { font-size: 3rem;    line-height: 1; }
  .breed-card    { grid-template-columns: minmax(14rem, 22rem) 1fr; gap: 2rem; align-items: start; }
  .breed-img     { position: sticky; top: 1.5rem; }
}

/* ---------- Мелочи ---------- */
.p-card { padding: 1.25rem; }
.site-footer { padding: 2rem 1.25rem; }

/* ---------- Форма заказа ---------- */
.form-control-c {
  padding: .875rem 1.25rem;
  border-radius: 50rem;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-fg);
  font-size: 1.125rem;
}
.form-control-c::placeholder { color: var(--c-muted-fg); opacity: .7; }
.form-control-c:focus {
  background: var(--c-bg);
  color: var(--c-fg);
  border-color: var(--c-primary);
  box-shadow: 0 0 0 .25rem color-mix(in oklab, var(--c-primary) 25%, transparent);
}
.form-control-c.is-invalid { border-color: var(--c-danger); }
.order-form .invalid-feedback { color: var(--c-danger); padding-left: 1.25rem; }
.order-error { color: var(--c-danger); }

/* Поле-ловушка для ботов: скрыто от людей, но не через display:none */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ==========================================================
   Страница опта (/opt)
   ========================================================== */
.nav-link-c {
  color: var(--c-muted-fg);
  text-decoration: none;
  font-size: .9375rem;
}
.nav-link-c:hover { color: var(--c-fg); }

/* Плашки с условиями на первом экране */
.fact-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  max-width: 36rem;
  margin-top: 2rem;
}
.fact {
  padding: 1rem 1.25rem;
  border: 1px solid var(--c-border);
  border-radius: 1rem;
  background: color-mix(in oklab, var(--c-card) 70%, transparent);
}
.fact-num {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.2;
}
.fact-label { font-size: .875rem; color: var(--c-muted-fg); }

/* Форма оптовой заявки */
.wh-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
}
.wh-box .form-select-c,
.wh-box .form-select-c:focus {
  padding-right: 3rem;
  background-image: var(--bs-form-select-bg-img);
  background-repeat: no-repeat;
  background-position: right 1.25rem center;
  background-size: 16px 12px;
}
.form-select-c:invalid { color: var(--c-muted-fg); }

/* Таблица цен */
.price-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.price-table th,
.price-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--c-border);
  text-align: right;
  white-space: nowrap;
}
.price-table thead th { font-size: .875rem; font-weight: 500; color: var(--c-muted-fg); }
.price-table thead th:first-child,
.price-table tbody th {
  text-align: left;
}
.price-table tbody th {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-weight: 600;
}
.price-table td { font-size: 1.125rem; }
.price-table tbody tr:last-child > * { border-bottom: 0; }
.price-table .col-best { background: color-mix(in oklab, var(--c-primary) 8%, transparent); }
.price-table thead .col-best { color: var(--c-primary); }

/* На телефоне — каждая порода отдельным блоком: объём слева, цена справа */
@media (max-width: 575.98px) {
  .price-table thead { display: none; }
  .price-table,
  .price-table tbody,
  .price-table tr,
  .price-table th,
  .price-table td { display: block; }
  .price-table tbody tr { border-bottom: 1px solid var(--c-border); }
  .price-table tbody tr:last-child { border-bottom: 0; }
  .price-table th,
  .price-table td { border-bottom: 0; }
  .price-table tbody th { padding-bottom: .25rem; }
  .price-table td {
    display: flex;
    justify-content: space-between;
    padding-block: .5rem;
  }
  .price-table td::before {
    content: attr(data-label);
    color: var(--c-muted-fg);
    font-size: .9375rem;
  }
  .price-table tbody tr > :last-child { padding-bottom: 1rem; }
}

/* Частые вопросы */
.accordion-c .accordion-item { background: var(--c-card); border-color: var(--c-border); }
.accordion-c .accordion-button {
  padding: 1.25rem 1.5rem;
  background: var(--c-card);
  color: var(--c-fg);
  font-size: 1.0625rem;
  font-weight: 500;
}
.accordion-c .accordion-button:not(.collapsed) { box-shadow: none; color: var(--c-primary); }
.accordion-c .accordion-button:focus { box-shadow: 0 0 0 .25rem color-mix(in oklab, var(--c-primary) 25%, transparent); }
.accordion-c .accordion-body { padding: 0 1.5rem 1.25rem; color: var(--c-muted-fg); }
[data-bs-theme="dark"] .accordion-c .accordion-button::after { filter: invert(1); }

@media (min-width: 768px) {
  .fact-row { grid-template-columns: repeat(4, 1fr); max-width: none; }
}
