/* ================================================================
   ОНЕГИН МОДУЛЬ — style.css
   Структура:
   1. Custom Properties
   2. Reset
   3. Утилиты
   4. Компоненты (header, hero, catalog, card, filters, steps,
      includes-table, delivery, faq, footer, product-page,
      form, modal, breadcrumb)
   5. Медиазапросы
================================================================ */

/* === 1. CUSTOM PROPERTIES === */

:root {
  /* Цвета */
  --c-primary:       #C4501A;
  --c-primary-dark:  #A3411A;
  --c-primary-light: #F5E6DF;
  --c-coal:          #1E1E1E;
  --c-text:          #3D3D3D;
  --c-muted:         #7A7A7A;
  --c-border:        #E8E0D8;
  --c-surface:       #FAFAF8;
  --c-white:         #FFFFFF;

  /* Типографика */
  --font-heading: 'Manrope', sans-serif;
  --font-body:    'Inter', sans-serif;

  --text-xs:   0.75rem;   /* 12px */
  --text-sm:   0.875rem;  /* 14px */
  --text-base: 1rem;      /* 16px */
  --text-lg:   1.125rem;  /* 18px */
  --text-xl:   1.375rem;  /* 22px */
  --text-2xl:  1.75rem;   /* 28px */
  --text-3xl:  2.375rem;  /* 38px */
  --text-4xl:  3.25rem;   /* 52px */

  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold: 600;
  --fw-bold:    700;
  --fw-extrabold: 800;

  --lh-tight:  1.15;
  --lh-snug:   1.3;
  --lh-base:   1.6;

  /* Отступы (8px grid) */
  --sp-1:  0.5rem;    /* 8px */
  --sp-2:  1rem;      /* 16px */
  --sp-3:  1.5rem;    /* 24px */
  --sp-4:  2rem;      /* 32px */
  --sp-5:  2.5rem;    /* 40px */
  --sp-6:  3rem;      /* 48px */
  --sp-8:  4rem;      /* 64px */
  --sp-10: 5rem;      /* 80px */
  --sp-12: 6rem;      /* 96px */

  /* Скругления */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  12px;
  --r-xl:  20px;
  --r-2xl: 32px;

  /* Тени */
  --shadow-card:       0 2px 12px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-card-hover: 0 8px 32px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.06);
  --shadow-header:     0 1px 0 var(--c-border);

  /* Переходы */
  --tr-base:  0.2s ease;
  --tr-slow:  0.35s ease;
}

/* === 2. RESET === */

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

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

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--c-text);
  background: var(--c-surface);
  -webkit-font-smoothing: antialiased;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font: inherit;
}

ul, ol {
  list-style: none;
}

input, textarea, select {
  font: inherit;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--c-coal);
}

/* === 3. УТИЛИТЫ === */

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

@media (min-width: 600px) {
  .container { padding: 0 var(--sp-3); }
}

@media (min-width: 960px) {
  .container { padding: 0 var(--sp-4); }
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--r-sm);
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1.4;
}

.badge--hit    { background: var(--c-primary); color: var(--c-white); }
.badge--sale   { background: #E8321A; color: var(--c-white); }
.badge--new    { background: var(--c-coal); color: var(--c-white); }
.badge--stock  { background: #1A8C4E; color: var(--c-white); }

.section-label {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-primary);
  margin-bottom: var(--sp-2);
}

.section-title {
  font-size: var(--text-2xl);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-snug);
  color: var(--c-coal);
  margin-bottom: var(--sp-2);
}

/* === 4. КОМПОНЕНТЫ === */

/* --- HEADER --- */

.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--c-white);
  box-shadow: var(--shadow-header);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  height: 64px;
}

.header__logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.header__logo-brand {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-extrabold);
  color: var(--c-coal);
  letter-spacing: -0.01em;
}

.header__logo-sub {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--c-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.header__contacts {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.header__phone {
  display: none;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--c-coal);
  transition: color var(--tr-base);
}

.header__phone:hover { color: var(--c-primary); }

.header__tg {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--c-primary-light);
  color: var(--c-primary);
  border-radius: var(--r-md);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  transition: background var(--tr-base), color var(--tr-base);
}

.header__tg:hover {
  background: var(--c-primary);
  color: var(--c-white);
}

.header__tg svg { flex-shrink: 0; }

.header__cta {
  display: none;
  padding: 10px 20px;
  background: var(--c-primary);
  color: var(--c-white);
  border-radius: var(--r-md);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  transition: background var(--tr-base);
}

.header__cta:hover { background: var(--c-primary-dark); }

/* --- HERO --- */

.hero {
  background: var(--c-white);
  padding: var(--sp-6) 0 var(--sp-8);
  border-bottom: 1px solid var(--c-border);
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  align-items: center;
}

.hero__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-bottom: var(--sp-3);
}

.hero__title {
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  line-height: var(--lh-tight);
  color: var(--c-coal);
  margin-bottom: var(--sp-3);
}

.hero__title span {
  color: var(--c-primary);
  display: block;
}

.hero__sub {
  font-size: var(--text-lg);
  color: var(--c-muted);
  margin-bottom: var(--sp-4);
  line-height: var(--lh-base);
}

.hero__stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stat-value {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  color: var(--c-coal);
  line-height: 1;
}

.hero__stat-label {
  font-size: var(--text-sm);
  color: var(--c-muted);
}

.hero__form {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-3);
}

.hero__form-title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--c-coal);
  margin-bottom: var(--sp-2);
}

.hero__image {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--c-primary-light);
  aspect-ratio: 4/3;
}

.hero__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: var(--sp-2);
  background: linear-gradient(135deg, #F5E6DF 0%, #EDD5C8 100%);
}

.hero__image-placeholder span {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  color: var(--c-primary);
  font-weight: var(--fw-semibold);
}

.hero__price-tag {
  position: absolute;
  bottom: var(--sp-2);
  left: var(--sp-2);
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: 10px 16px;
  box-shadow: var(--shadow-card-hover);
}

.hero__price-tag-from {
  font-size: var(--text-xs);
  color: var(--c-muted);
}

.hero__price-tag-value {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  color: var(--c-coal);
}

/* --- CATALOG SECTION --- */

.catalog {
  padding: var(--sp-8) 0 var(--sp-10);
}

.catalog__header {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  margin-bottom: var(--sp-4);
}

/* --- FILTERS --- */

.filters {
  margin-bottom: var(--sp-4);
}

.filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  align-items: center;
}

.filter-tab {
  padding: 8px 18px;
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--c-text);
  background: var(--c-white);
  cursor: pointer;
  transition: border-color var(--tr-base), background var(--tr-base), color var(--tr-base);
  white-space: nowrap;
}

.filter-tab:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.filter-tab.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-white);
}

/* --- CATALOG GRID --- */

.catalog__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
}

.catalog__empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--sp-8) var(--sp-4);
  color: var(--c-muted);
}

.catalog__empty-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-semibold);
  color: var(--c-coal);
  margin-bottom: var(--sp-1);
}

/* --- PRODUCT CARD --- */

.product-card {
  background: var(--c-white);
  border: 1px solid var(--c-border);
  border-radius: var(--r-xl);
  overflow: hidden;
  transition: box-shadow var(--tr-slow), transform var(--tr-slow);
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.product-card__image {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--c-primary-light);
  overflow: hidden;
}

.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--tr-slow);
}

.product-card:hover .product-card__image img {
  transform: scale(1.03);
}

.product-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.product-card__badges {
  position: absolute;
  top: var(--sp-1);
  left: var(--sp-1);
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.product-card__body {
  padding: var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  flex: 1;
}

.product-card__name {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--c-coal);
  line-height: var(--lh-snug);
}

.product-card__pitch {
  font-size: var(--text-sm);
  color: var(--c-muted);
  line-height: var(--lh-base);
}

.product-card__meta {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: var(--sp-2);
}

.product-card__delivery {
  font-size: var(--text-xs);
  color: #1A8C4E;
  font-weight: var(--fw-semibold);
  font-family: var(--font-heading);
}

.product-card__size {
  font-size: var(--text-xs);
  color: var(--c-muted);
}

.product-card__pricing {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: var(--sp-1);
}

.product-card__price {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  color: var(--c-coal);
}

.product-card__old-price {
  font-size: var(--text-sm);
  color: var(--c-muted);
  text-decoration: line-through;
}

.product-card__installment {
  font-size: var(--text-xs);
  color: var(--c-muted);
}

.product-card__actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-1);
  padding: 0 var(--sp-3) var(--sp-3);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--r-md);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  transition: background var(--tr-base), color var(--tr-base), box-shadow var(--tr-base);
  cursor: pointer;
  white-space: nowrap;
  border: none;
}

.btn--primary {
  background: var(--c-primary);
  color: var(--c-white);
}

.btn--primary:hover {
  background: var(--c-primary-dark);
}

.btn--outline {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
}

.btn--outline:hover {
  background: var(--c-primary-light);
}

.btn--ghost {
  background: var(--c-surface);
  color: var(--c-coal);
  border: 1.5px solid var(--c-border);
}

.btn--ghost:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
}

.btn--lg {
  padding: 15px 28px;
  font-size: var(--text-base);
}

.btn--full { width: 100%; }

/* --- STEPS (как мы работаем) --- */

.steps {
  background: var(--c-white);
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.steps__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

.step {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
}

.step__num {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step__body {}

.step__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--c-coal);
  margin-bottom: 4px;
}

.step__text {
  font-size: var(--text-sm);
  color: var(--c-muted);
  line-height: var(--lh-base);
}

/* --- INCLUDES TABLE --- */

.includes {
  padding: var(--sp-8) 0;
  background: var(--c-surface);
}

.includes__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}

.includes__col {}

.includes__col-title {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--c-coal);
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 2px solid;
}

.includes__col--yes .includes__col-title { border-color: #1A8C4E; }
.includes__col--no  .includes__col-title { border-color: var(--c-border); }

.includes__list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.includes__item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-1);
  font-size: var(--text-sm);
  color: var(--c-text);
  line-height: var(--lh-base);
}

.includes__item::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  margin-top: 2px;
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

.includes__col--yes .includes__item::before {
  background-color: #E6F5EE;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%231A8C4E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.includes__col--no .includes__item::before {
  background-color: #F5F5F5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 2l6 6M8 2l-6 6' stroke='%237A7A7A' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* --- DELIVERY --- */

.delivery {
  background: var(--c-white);
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}

.delivery__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.delivery__item {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: var(--sp-3);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
}

.delivery__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--r-md);
  background: var(--c-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.375rem;
}

.delivery__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--c-coal);
  margin-bottom: 4px;
}

.delivery__text {
  font-size: var(--text-sm);
  color: var(--c-muted);
  line-height: var(--lh-base);
}

/* --- FAQ --- */

.faq {
  padding: var(--sp-8) 0;
  background: var(--c-surface);
}

.faq__list {
  margin-top: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.faq__item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  background: var(--c-white);
  overflow: hidden;
}

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  padding: var(--sp-3);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--c-coal);
  transition: color var(--tr-base);
}

.faq__item summary::-webkit-details-marker { display: none; }

.faq__item summary::after {
  content: '';
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%237A7A7A' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform var(--tr-base);
}

.faq__item[open] summary { color: var(--c-primary); }

.faq__item[open] summary::after {
  transform: rotate(180deg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23C4501A' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.faq__answer {
  padding: 0 var(--sp-3) var(--sp-3);
  font-size: var(--text-sm);
  color: var(--c-text);
  line-height: var(--lh-base);
}

.faq__answer p + p { margin-top: var(--sp-1); }

/* --- FOOTER --- */

.footer {
  background: var(--c-coal);
  color: var(--c-white);
  padding: var(--sp-8) 0 var(--sp-4);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-5);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: var(--sp-4);
}

.footer__logo-brand {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-extrabold);
  letter-spacing: -0.01em;
}

.footer__logo-sub {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: var(--fw-medium);
  color: var(--c-primary);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.footer__desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.55);
  line-height: var(--lh-base);
  margin-bottom: var(--sp-3);
}

.footer__col-title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--sp-2);
}

.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer__link {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
  transition: color var(--tr-base);
}

.footer__link:hover { color: var(--c-white); }

.footer__contacts {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.footer__contact {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.75);
}

.footer__contact-icon {
  flex-shrink: 0;
  margin-top: 2px;
  opacity: 0.5;
}

.footer__contact a { transition: color var(--tr-base); }
.footer__contact a:hover { color: var(--c-white); }

.footer__social {
  display: flex;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
}

.footer__social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--tr-base);
}

.footer__social-link:hover { background: var(--c-primary); }

.footer__bottom {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.footer__legal {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.35);
  line-height: var(--lh-base);
}

/* --- FORM --- */

.form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form__label {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--c-coal);
}

.form__input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--text-base);
  color: var(--c-coal);
  background: var(--c-white);
  transition: border-color var(--tr-base);
  outline: none;
}

.form__input::placeholder { color: var(--c-muted); }
.form__input:focus { border-color: var(--c-primary); }

.form__input--error {
  border-color: #E8321A;
}

.form__error {
  font-size: var(--text-xs);
  color: #E8321A;
}

.form__consent {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-1);
  cursor: pointer;
}

.form__consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-sm);
  cursor: pointer;
  margin-top: 2px;
  accent-color: var(--c-primary);
}

.form__consent-text {
  font-size: var(--text-xs);
  color: var(--c-muted);
  line-height: var(--lh-base);
}

.form__consent-text a {
  color: var(--c-primary);
  text-decoration: underline;
}

/* --- MODAL --- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-2);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--tr-slow);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: var(--c-white);
  border-radius: var(--r-xl);
  padding: var(--sp-5);
  max-width: 400px;
  width: 100%;
  text-align: center;
  transform: translateY(16px);
  transition: transform var(--tr-slow);
}

.modal-overlay.active .modal {
  transform: translateY(0);
}

.modal__icon {
  font-size: 3rem;
  margin-bottom: var(--sp-2);
}

.modal__title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold);
  color: var(--c-coal);
  margin-bottom: var(--sp-1);
}

.modal__text {
  font-size: var(--text-sm);
  color: var(--c-muted);
  line-height: var(--lh-base);
  margin-bottom: var(--sp-4);
}

/* --- BREADCRUMB --- */

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: var(--text-sm);
  color: var(--c-muted);
  padding: var(--sp-3) 0;
}

.breadcrumb__item a {
  color: var(--c-muted);
  transition: color var(--tr-base);
}

.breadcrumb__item a:hover { color: var(--c-primary); }

.breadcrumb__sep {
  color: var(--c-border);
}

.breadcrumb__item--current {
  color: var(--c-coal);
}

/* --- PRODUCT PAGE --- */

.product-page {
  padding: var(--sp-6) 0 var(--sp-10);
}

.product-page__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
}

/* Gallery */
.product-gallery {}

.product-gallery__main {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--c-primary-light);
  aspect-ratio: 4/3;
  margin-bottom: var(--sp-2);
}

.product-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}

.product-gallery__main-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #F5E6DF 0%, #EDD5C8 100%);
  font-size: 4rem;
}

.product-gallery__thumbs {
  display: flex;
  gap: var(--sp-1);
  overflow-x: auto;
  scrollbar-width: none;
}

.product-gallery__thumbs::-webkit-scrollbar { display: none; }

.product-gallery__thumb {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color var(--tr-base);
  background: var(--c-primary-light);
}

.product-gallery__thumb.active {
  border-color: var(--c-primary);
}

.product-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Product info */
.product-info {}

.product-info__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--sp-2);
}

.product-info__name {
  font-size: var(--text-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--c-coal);
  margin-bottom: var(--sp-1);
}

.product-info__pitch {
  font-size: var(--text-base);
  color: var(--c-muted);
  margin-bottom: var(--sp-3);
}

.product-info__pricing {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.product-info__price {
  font-family: var(--font-heading);
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold);
  color: var(--c-coal);
}

.product-info__old-price {
  font-size: var(--text-lg);
  color: var(--c-muted);
  text-decoration: line-through;
}

.product-info__installment {
  font-size: var(--text-sm);
  color: var(--c-muted);
  margin-bottom: var(--sp-3);
}

.product-info__delivery {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #E6F5EE;
  color: #1A8C4E;
  border-radius: var(--r-md);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-3);
}

/* Colors */
.product-colors {
  margin-bottom: var(--sp-3);
}

.product-colors__label {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--c-coal);
  margin-bottom: var(--sp-1);
}

.product-colors__swatches {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}

.color-swatch {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px 7px 10px;
  border: 1.5px solid var(--c-border);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color var(--tr-base);
  font-size: var(--text-sm);
  color: var(--c-coal);
}

.color-swatch.active {
  border-color: var(--c-primary);
  color: var(--c-primary);
  font-weight: var(--fw-semibold);
}

.color-swatch__dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
  flex-shrink: 0;
}

/* Состав */
.product-includes {
  margin-bottom: var(--sp-3);
}

.product-includes__title {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--c-coal);
  margin-bottom: var(--sp-2);
  padding-bottom: var(--sp-1);
  border-bottom: 1px solid var(--c-border);
}

.product-includes__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.product-includes__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: var(--text-sm);
  color: var(--c-text);
}

.product-includes__item::before {
  content: '';
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border-radius: 50%;
  background-color: #E6F5EE;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l3 3 5-6' stroke='%231A8C4E' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 10px;
  background-repeat: no-repeat;
  background-position: center;
}

.product-includes__item--no::before {
  background-color: #F5F5F5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M2 2l6 6M8 2l-6 6' stroke='%237A7A7A' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* Размеры */
.product-dims {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: var(--text-sm);
  color: var(--c-muted);
  margin-bottom: var(--sp-3);
}

.product-dims strong { color: var(--c-coal); }

/* Order form box */
.order-box {
  background: var(--c-white);
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-xl);
  padding: var(--sp-4);
}

.order-box__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-extrabold);
  color: var(--c-coal);
  margin-bottom: var(--sp-1);
}

.order-box__sub {
  font-size: var(--text-sm);
  color: var(--c-muted);
  margin-bottom: var(--sp-3);
}

/* Related */
.related {
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--c-border);
}

.related__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
}

/* === 5. МЕДИАЗАПРОСЫ === */

/* Tablet: 600px */
@media (min-width: 600px) {
  .hero__title { font-size: var(--text-4xl); }
  .section-title { font-size: var(--text-3xl); }

  .catalog__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .includes__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .delivery__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop: 960px */
@media (min-width: 960px) {
  .header__phone { display: block; }
  .header__cta   { display: flex; }

  .hero__inner {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-8);
  }

  .catalog__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps__grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .delivery__grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1.5fr;
  }

  .product-page__grid {
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }

  .related__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Wide: 1200px */
@media (min-width: 1200px) {
  .hero__title { font-size: calc(var(--text-4xl) * 1.1); }

  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
  }
}
