/* ==========================================================================
   Владимирская Фабрика Дверей (ВФД) — mobile-first
   ========================================================================== */

:root {
  --red: #E31E24;
  --red-dark: #C4181E;
  --black: #111111;
  --gray-900: #1A1A1A;
  --gray-700: #444444;
  --gray-500: #777777;
  --gray-300: #D9D9D9;
  --gray-100: #F5F5F5;
  --white: #FFFFFF;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
  --radius: 8px;
  --maxw: 1200px;
  --header-h: 64px;
  --font: "Manrope", "Segoe UI", system-ui, sans-serif;
  --font-display: "Unbounded", "Arial Narrow", sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.menu-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }

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

ul, ol { list-style: none; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
}

/* ---------- типографика ---------- */
.page-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  line-height: 1.15;
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 4vw, 1.75rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.lead { color: var(--gray-700); font-size: 1rem; }

.prose p { margin-bottom: 14px; color: var(--gray-700); }
.prose h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin: 24px 0 10px;
  color: var(--black);
}
.prose ul { margin: 0 0 16px 0; }
.prose li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: var(--gray-700);
}
.prose li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
}

/* ---------- кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font-family: var(--font);
  font-weight: 700;
  font-size: 14px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-red { background: var(--red); color: var(--white); }
.btn-red:hover { background: var(--red-dark); }

.btn-outline {
  background: transparent;
  color: var(--black);
  border-color: var(--black);
}
.btn-outline:hover { background: var(--black); color: var(--white); }

.btn-white {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}
.btn-white:hover { background: var(--gray-100); }

/* ---------- шапка ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-300);
  height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 12px;
}

.logo img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-text {
  display: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 11px;
  line-height: 1.2;
  text-transform: uppercase;
}

.header-phone {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  color: var(--black);
  white-space: nowrap;
}
.header-phone:hover { color: var(--red); }

.burger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}

.burger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--black);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.burger.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 90;
}
.nav-overlay.is-visible { display: block; }

.nav-menu {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  padding: 20px 16px 40px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 95;
  overflow-y: auto;
}

.nav-menu.is-open { transform: translateX(0); }

.nav-menu a {
  display: block;
  padding: 14px 0;
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid var(--gray-100);
}
.nav-menu a.active { color: var(--red); }
.nav-menu a:hover { color: var(--red); }

.nav-menu .sub {
  padding-left: 16px;
}
.nav-menu .sub a {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
  border-bottom: none;
  padding: 10px 0;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .btn { display: none; }

/* ---------- hero / баннеры ---------- */
.hero-banners {
  display: grid;
  gap: 12px;
  padding: 16px 0;
}

.banner {
  position: relative;
  min-height: 160px;
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  color: var(--white);
  background: linear-gradient(135deg, var(--gray-900) 0%, #333 100%);
}

.banner--red { background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); }
.banner--dark { background: linear-gradient(135deg, #2a2a2a 0%, #111 100%); }

.banner h2 {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 4vw, 1.5rem);
  font-weight: 700;
  line-height: 1.2;
}

.banner p {
  margin-top: 6px;
  font-size: 14px;
  opacity: 0.9;
}

.hero-main {
  padding: 32px 0 24px;
  text-align: center;
}

.hero-main h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.5rem, 6vw, 2.5rem);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero-main .subtitle {
  color: var(--gray-700);
  max-width: 560px;
  margin: 0 auto 24px;
}

/* ---------- категории ---------- */
.categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 24px 0;
}

.category-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 200px;
  background: var(--gray-100);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  transition: transform 0.2s;
}

.category-card:hover { transform: translateY(-2px); }

.category-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--white);
  text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.category-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 60%);
}

.category-card h3 { position: relative; z-index: 1; }

.category-card--emal { background: linear-gradient(135deg, #8B7355, #C4A882); }
.category-card--eco { background: linear-gradient(135deg, #5C6B5E, #8FA892); }

/* ---------- секции ---------- */
.section { padding: 32px 0; }
.section--gray { background: var(--gray-100); }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.section-head .btn { align-self: flex-start; }

/* ---------- карточки товаров ---------- */
.products-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.product-card {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.product-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--gray-500);
}

.product-card__img {
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, #EDE8E0, #D8D0C4);
  display: grid;
  place-items: center;
  padding: 20px;
}

.product-card__img svg { width: 80px; height: auto; opacity: 0.85; }

.product-card__body { padding: 16px; flex: 1; display: flex; flex-direction: column; }

.product-card__title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.35;
  margin-bottom: 12px;
  flex: 1;
}

.product-card__prices {
  display: grid;
  gap: 6px;
  font-size: 13px;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.price-row span:first-child { color: var(--gray-500); }
.price-row strong { font-size: 15px; color: var(--black); }
.price-row strong.highlight { color: var(--red); }

.product-card__foot { padding: 0 16px 16px; }
.product-card__foot .btn { width: 100%; }

/* ---------- преимущества ---------- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.feature {
  background: var(--white);
  border-radius: var(--radius);
  padding: 20px 16px;
  text-align: center;
  border: 1px solid var(--gray-300);
}

.feature__icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 12px;
  color: var(--red);
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.feature p { font-size: 12px; color: var(--gray-500); }

/* ---------- отзывы ---------- */
.reviews-grid {
  display: grid;
  gap: 16px;
}

.review {
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 20px;
}

.review__author {
  font-weight: 700;
  margin-bottom: 8px;
  font-size: 14px;
}

.review__text {
  font-size: 14px;
  color: var(--gray-700);
  font-style: italic;
}

.rating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--black);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  margin-top: 20px;
}

/* ---------- CTA ---------- */
.cta-block {
  background: var(--black);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}

.cta-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 4vw, 1.5rem);
  margin-bottom: 10px;
}

.cta-block p { color: #bbb; margin-bottom: 20px; font-size: 14px; }

.cta-block .btn { margin: 4px; }

/* ---------- таблицы (установка) ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 20px 0;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
}

.data-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--gray-300);
}

.data-table th {
  background: var(--gray-100);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table td:last-child { font-weight: 700; white-space: nowrap; }

.info-box {
  background: #FFF8F0;
  border-left: 4px solid var(--red);
  padding: 16px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 20px 0;
  font-size: 14px;
  color: var(--gray-700);
}

.info-box strong { color: var(--black); }

/* ---------- контакты ---------- */
.contacts-grid {
  display: grid;
  gap: 20px;
}

.contact-block {
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 24px 20px;
}

.contact-block h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 12px;
}

.contact-block .big-phone {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  margin-bottom: 8px;
}
.contact-block .big-phone:hover { color: var(--red); }

.contact-block .email {
  color: var(--red);
  font-weight: 600;
  font-size: 15px;
}

.contact-block .email:hover { text-decoration: underline; }

.address-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.address-item svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--red);
  margin-top: 2px;
}

.address-item .place { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.address-item .metro {
  font-size: 13px;
  color: var(--gray-500);
}
.address-item .metro::before {
  content: "м.";
  margin-right: 4px;
}

/* ---------- фильтры каталога ---------- */
.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-chip {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  background: var(--white);
  cursor: pointer;
  transition: 0.2s;
}

.filter-chip:hover { border-color: var(--black); }
.filter-chip.active {
  background: var(--black);
  color: var(--white);
  border-color: var(--black);
}

.catalog-cats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 28px;
}

.catalog-cat {
  padding: 14px 12px;
  background: var(--gray-100);
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  transition: 0.2s;
}
.catalog-cat:hover { background: var(--red); color: var(--white); }

/* ---------- подвал ---------- */
.site-footer {
  background: var(--black);
  color: #ccc;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  gap: 28px;
  padding: 40px 0 28px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 14px;
}

.footer-col a {
  display: block;
  font-size: 14px;
  color: #aaa;
  margin-bottom: 8px;
}
.footer-col a:hover { color: var(--red); }

.footer-phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--white) !important;
}

.footer-brand p {
  font-size: 13px;
  color: #888;
  margin-top: 12px;
  line-height: 1.5;
}

.footer-bottom {
  border-top: 1px solid #333;
  padding: 20px 0 28px;
  font-size: 12px;
  color: #777;
}

.footer-bottom .legal {
  margin-top: 10px;
  line-height: 1.6;
  max-width: 72ch;
}

.breadcrumb {
  font-size: 13px;
  color: var(--gray-500);
  padding: 16px 0 0;
}
.breadcrumb a:hover { color: var(--red); }

.page-hero {
  padding: 24px 0 8px;
}

.page-hero .page-title { margin-bottom: 8px; }

/* ---------- tablet (min 576px) ---------- */
@media (min-width: 576px) {
  .wrap { padding: 0 24px; }

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

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

  .hero-banners .banner:last-child:nth-child(odd) {
    grid-column: span 2;
  }

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

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

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

  .logo-text { display: block; }
}

/* ---------- desktop nav (min 992px) ---------- */
@media (min-width: 992px) {
  :root { --header-h: 72px; }

  .burger { display: none; }
  .nav-overlay { display: none !important; }

  .nav-menu {
    position: static;
    transform: none;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    overflow: visible;
    background: transparent;
    flex: 1;
    justify-content: center;
  }

  .nav-menu a {
    padding: 8px 14px;
    font-size: 14px;
    border-bottom: none;
    border-radius: 4px;
  }

  .nav-menu a:hover { background: var(--gray-100); }
  .nav-menu .sub { display: none; }

  .header-actions .btn { display: inline-flex; }
  .header-phone { font-size: 16px; }

  .header-inner { gap: 24px; }

  .logo img { width: 52px; height: 52px; }

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

  .hero-banners .banner:last-child:nth-child(odd) {
    grid-column: auto;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

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

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  }

  .section-head {
    flex-direction: row;
    align-items: flex-end;
    justify-content: space-between;
  }

  .cta-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    padding: 36px 40px;
  }

  .cta-block p { margin-bottom: 0; }

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

/* ---------- large desktop (min 1200px) ---------- */
@media (min-width: 1200px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }

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