/* css/style.css */
:root {
  --color-bg: #FAF8F4;
  --color-white: #FFFFFF;
  --color-text: #1A1A18;
  --color-text-secondary: #6B6459;
  --color-accent: #C85A1E;
  --color-accent-hover: #A84A18;
  --color-border: #EDE9E2;
  --font-heading: 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --radius: 8px;
  --shadow: 0 2px 16px rgba(0,0,0,0.07);
  --max-width: 1140px;
  --section-padding: 80px 24px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 16px;
  line-height: 1.6;
}

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

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

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

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  line-height: 1.2;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; margin-bottom: 16px; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: clamp(0.95rem, 1.5vw, 1.1rem); font-weight: 600; }

p { color: var(--color-text-secondary); margin-bottom: 12px; }

.btn {
  display: inline-block;
  background: var(--color-accent);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 32px;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.2s;
  text-align: center;
  min-height: 48px;
}

.btn:hover, .btn:focus { background: var(--color-accent-hover); }
.btn:focus { outline: 3px solid var(--color-accent); outline-offset: 2px; }

.btn--ghost {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}

.btn--ghost:hover, .btn--ghost:focus {
  background: var(--color-accent);
  color: #fff;
}

section:not(.hero) { padding: var(--section-padding); }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 8px;
  display: block;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 244, 0.95);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 2px solid var(--color-accent);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 72px;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  flex-shrink: 0;
}

.site-header__nav {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
  align-self: center;
}

.site-header__nav a {
  display: inline-flex;
  align-items: center;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1;
  transition: color 0.2s;
}

.site-header__nav a:hover { color: var(--color-accent); }

.site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  font-size: 0.9rem;
  flex-shrink: 0;
  line-height: 1;
}

@media (max-width: 768px) {
  .site-header__nav { display: none; }
  .site-header__logo { font-size: 1rem; }
}

/* ── HERO ────────────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}

.hero__media {
  width: 100%;
  flex: 1;
  min-height: 60vh;
  overflow: hidden;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero__content {
  position: relative;
  background: var(--color-bg);
  padding: 40px 24px 48px;
  text-align: center;
}

.hero__title {
  margin-bottom: 16px;
  font-size: clamp(1.5rem, 4.6vw, 3.4rem);
  line-height: 1.08;
  max-width: 18ch;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.hero__subtitle {
  font-size: 0.98rem;
  max-width: 560px;
  margin: 0 auto 18px;
}

.hero__badges {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 0 0 26px;
}

.hero__badges li {
  background: var(--color-white);
  border: 1px solid var(--color-accent);
  color: var(--color-text);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  min-height: unset;
}

.hero__cta { min-width: 220px; }

@media (min-width: 900px) {
  .hero {
    flex-direction: row;
    min-height: 90vh;
  }

  .hero__media {
    width: 55%;
    min-height: 90vh;
    flex: none;
  }

  .hero__content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    padding: 60px 60px 60px 56px;
    background: var(--color-bg);
  }

  .hero__subtitle { margin-left: 0; margin-right: 0; }
  .hero__badges { justify-content: flex-start; }
}

/* ── ABOUT ───────────────────────────────────────────────────── */
.about { background: var(--color-white); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }

.about__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}

.about__photo {
  width: 100%;
  max-width: 320px;
  border-radius: 12px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}

.about__facts {
  list-style: none;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.about__fact {
  display: block;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
}

@media (min-width: 768px) {
  .about__inner { grid-template-columns: 340px 1fr; }
  .about__photo { max-width: 100%; margin: 0; }
}

/* ── CATALOG ─────────────────────────────────────────────────── */
.catalog { background: #FFFDF9; border-bottom: 1px solid var(--color-border); }
.catalog__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 40px;
}

@media (min-width: 600px) {
  .catalog__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .catalog__grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── PRODUCT CARD ────────────────────────────────────────────── */
.product-card {
  background: var(--color-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

/* slider */
.product-card__slider {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #F5F5F5;
}

.product-card__slides {
  display: flex;
  height: 100%;
  transition: transform 0.35s ease;
}

.product-card__slides img {
  min-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
}

.product-card__slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  transition: background 0.2s;
  z-index: 2;
}

.product-card__slider-btn:hover { background: #fff; }

.product-card__slider-btn--prev { left: 8px; }
.product-card__slider-btn--next { right: 8px; }

.product-card__dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}

.product-card__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,0.6);
  cursor: pointer;
  transition: background 0.2s;
}

.product-card__dot--active { background: #fff; }

/* body */
.product-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.product-card__name { font-size: 1.1rem; }

.product-card__scenario {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: #FFF4EB;
  border: 1px solid #F2C7AE;
  border-radius: 999px;
  padding: 4px 10px;
  min-height: unset;
}

.product-card__price {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text);
}

.product-card__sizes {
  font-size: 0.85rem;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.product-card__buy { width: 100%; margin-top: 8px; }

.product-card__material {
  font-size: 0.76rem;
  color: var(--color-text-secondary);
  margin: 0;
  padding-top: 4px;
  opacity: 0.95;
}

/* ── ADVANTAGES ──────────────────────────────────────────────── */
.advantages { background: var(--color-bg); border-bottom: 1px solid var(--color-border); }

.advantages__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 40px;
}

@media (min-width: 768px) {
  .advantages__grid { grid-template-columns: repeat(3, 1fr); }
}

.advantages__item {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 24px 20px;
  border: 1px solid var(--color-border);
}

.advantages__item h3 { font-size: 1rem; margin-bottom: 8px; }
.advantages__item p { font-size: 0.875rem; margin: 0; }

/* ── MATERIALS ───────────────────────────────────────────────── */
.materials { background: var(--color-white); border-bottom: 1px solid var(--color-border); }
.materials__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 40px;
}

@media (min-width: 640px) {
  .materials__grid { grid-template-columns: 1fr 1fr; }
}

.materials__card {
  background: var(--color-white);
  border-radius: 12px;
  padding: 28px 24px;
  border: 1px solid var(--color-border);
}

.materials__card h3 { margin-bottom: 12px; }

.materials__tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.materials__tags li {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-secondary);
}

/* ── FAQ ─────────────────────────────────────────────────────── */
.faq { background: #FFFDF9; }
.faq__list {
  margin-top: 40px;
  border-top: 1px solid var(--color-border);
}

.faq__item {
  border-bottom: 1px solid var(--color-border);
}

.faq__item summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  gap: 16px;
  user-select: none;
}

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

.faq__item summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform 0.2s;
}

.faq__item[open] summary::after {
  transform: rotate(45deg);
}

.faq__answer {
  padding: 0 0 20px;
}

.faq__answer p { font-size: 0.95rem; margin: 0; }

/* ── FOOTER ──────────────────────────────────────────────────── */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.75);
  padding: 48px 24px;
  margin-top: auto;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

@media (min-width: 768px) {
  .site-footer__inner { grid-template-columns: 1fr 1fr 1fr; align-items: start; }
}

.site-footer__logo {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  display: block;
  margin-bottom: 8px;
}

.site-footer__tagline { font-size: 0.85rem; margin: 0; color: rgba(255,255,255,0.5); }

.site-footer__note { font-size: 0.85rem; margin: 10px 0 0; color: rgba(255,255,255,0.75); }

.site-footer__contacts {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.site-footer__link {
  color: rgba(255,255,255,0.75);
  font-size: 0.9rem;
  transition: color 0.2s;
  display: inline-block;
}

.site-footer__link:hover { color: #fff; }

.site-footer__link--small { font-size: 0.8rem; }

.site-footer__legal { display: flex; flex-direction: column; gap: 8px; }

.site-footer__copy { font-size: 0.8rem; margin: 0; color: rgba(255,255,255,0.4); }

.site-footer__disclaimer { font-size: 0.75rem; margin: 4px 0 0; color: rgba(255,255,255,0.35); line-height: 1.5; max-width: 480px; }

/* ── POPUP ───────────────────────────────────────────────────── */
.popup-overlay[hidden] { display: none !important; }

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  animation: fadeIn 0.2s ease;
}

@media (min-width: 520px) {
  .popup-overlay { align-items: center; padding: 24px; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.popup {
  background: var(--color-white);
  border-radius: 16px 16px 0 0;
  padding: 32px 24px 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  animation: slideUp 0.25s ease;
}

@media (min-width: 520px) {
  .popup { border-radius: 16px; padding: 40px 36px; }
}

@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--color-text-secondary);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.popup__close:hover { background: var(--color-bg); }

.popup__title { margin-bottom: 6px; font-size: 1.2rem; }

.popup__subtitle { font-size: 0.9rem; color: var(--color-text-secondary); margin-bottom: 24px; }

.popup__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.popup__level--hidden { display: none; }

.popup__back {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: 500;
  padding: 0;
  margin-bottom: 16px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.popup__btn-vk  { background: #0077FF; }
.popup__btn-vk:hover  { background: #005FCC; }
.popup__btn-tg  { background: #27A7E7; }
.popup__btn-tg:hover  { background: #1A8EC2; }
.popup__btn-wa  { background: #25D366; }
.popup__btn-wa:hover  { background: #1DAE52; }

/* ── MOBILE FINAL PASS ───────────────────────────────────────── */
@media (max-width: 480px) {
  :root { --section-padding: 52px 20px; }

  h1 { font-size: 1.85rem; }
  .hero__title {
    font-size: clamp(1.3rem, 7.6vw, 1.85rem);
    max-width: 20ch;
  }
  h2 { font-size: 1.4rem; }

  .advantages__grid { grid-template-columns: 1fr; }

  .catalog__grid { gap: 20px; }

  .product-card__price { font-size: 1.25rem; }

  .popup { padding: 28px 20px 36px; }
}

/* Ensure tap targets are at least 44px */
button, a, summary { min-height: 44px; }
.product-card__dot { min-height: unset; }

/* Smooth scroll offset for sticky header */
[id] { scroll-margin-top: 72px; }
