/* ═══════════════════════════════════════════════════════════════════════
   Витрина Snowshop: раскладки страниц поверх дизайн-системы (ds.css).
   Все размеры и цвета берутся из токенов ds.css.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Общее ───────────────────────────────────────────────────────────── */

.page { min-height: 100vh; display: flex; flex-direction: column; }
.page > main { flex: 1; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.wrap-mid { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 1000px; margin: 0 auto; padding: 0 24px; }

.section { padding: 56px 0; }
.section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; margin-bottom: 22px;
}
.page-head { padding: 40px 0 0; }
.kicker { color: var(--color-accent-700); }
.lede { opacity: 0.8; max-width: 56ch; }

/* Заглушка вместо фотографии — чертёжная штриховка с кодом детали */
.ph {
  width: 100%; height: 100%; display: grid; place-items: center;
  padding: 10px; text-align: center;
  font-family: var(--font-heading); font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 45%, transparent);
  background:
    repeating-linear-gradient(45deg,
      transparent 0 9px,
      color-mix(in srgb, var(--color-text) 5%, transparent) 9px 10px),
    var(--color-surface);
}
.ph-dark {
  color: rgba(242, 242, 243, 0.55);
  background:
    repeating-linear-gradient(45deg,
      transparent 0 9px, rgba(242, 242, 243, 0.08) 9px 10px),
    rgba(242, 242, 243, 0.04);
}
.figure { position: relative; }
.figure > img { width: 100%; height: 100%; object-fit: cover; }

/* Флеш-сообщения */
.flashes { position: fixed; top: 16px; right: 16px; z-index: 80; display: grid; gap: 8px; max-width: 340px; }
.flash {
  padding: 11px 14px; font-size: 13px; background: var(--color-bg);
  border: 1px solid var(--color-divider); box-shadow: var(--shadow-md);
  display: flex; gap: 10px; align-items: flex-start;
}
.flash-success { border-left: 3px solid var(--color-accent); }
.flash-error { border-left: 3px solid #b3261e; }
.flash button { background: none; border: 0; cursor: pointer; font-size: 16px; line-height: 1; opacity: 0.5; }

/* Honeypot — скрыт от людей, виден ботам */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Шапка ───────────────────────────────────────────────────────────── */

.topbar {
  background: var(--color-accent-900); color: var(--color-bg);
  font-size: 12px; letter-spacing: 0.04em;
}
.topbar-inner {
  max-width: 1200px; margin: 0 auto; padding: 7px 24px;
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.topbar-sep { opacity: 0.5; }
.topbar-phone { margin-left: auto; opacity: 0.85; }

.header {
  border-bottom: 1px solid var(--color-divider);
  background: var(--color-bg);
  position: sticky; top: 0; z-index: 20;
}
.header .nav { padding: 14px 0; }
.brand {
  font-size: 24px; letter-spacing: 0.1em; text-transform: uppercase;
  display: flex; align-items: baseline; gap: 2px; text-decoration: none; color: inherit;
}
.brand-dot { color: var(--color-accent); }
.mainnav {
  display: flex; align-items: center; gap: 22px;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.mainnav a { color: inherit; text-decoration: none; font-size: 14px; }
.mainnav a:hover, .mainnav a[aria-current='page'] { color: var(--color-accent); }
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.header-search { width: 210px; }
.burger { display: none; }

/* ── Главная ─────────────────────────────────────────────────────────── */

.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; padding: 56px 0 8px; }
.hero h1 { font-size: 58px; line-height: 1.02; margin-bottom: 16px; text-wrap: pretty; }
.hero-lede { font-size: 17px; max-width: 46ch; opacity: 0.85; }
.hero-actions { display: flex; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.hero-figure { height: 400px; }

.statstrip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--color-divider); margin-top: 56px; border: 1px solid var(--color-divider);
}
.statstrip > div { background: var(--color-bg); padding: 20px 22px; }
.stat-value { font-family: var(--font-heading); font-size: 34px; line-height: 1; }
.stat-label { font-size: 13px; opacity: 0.7; margin-top: 4px; }

.band { background: var(--color-accent-900); color: var(--color-bg); margin-top: 56px; padding: 48px 0; }
.band h6 { opacity: 0.7; margin-bottom: 20px; }
.band a { color: var(--color-bg); }
.band-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.season { border: 1px solid rgba(242, 242, 243, 0.28); padding: 22px; }
.season-head { display: flex; align-items: baseline; gap: 12px; }
.season-num { font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.1em; opacity: 0.6; }
.season-head h2 { margin: 0; font-size: 38px; }
.season-figure { height: 170px; margin: 18px 0; border: 1px solid rgba(242, 242, 243, 0.28); overflow: hidden; }
.season-figure img { width: 100%; height: 100%; object-fit: cover; }
.season-list { font-size: 14px; line-height: 1.9; opacity: 0.85; }

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

.pitch-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--color-divider); border: 1px solid var(--color-divider); margin-top: 56px;
}
.pitch { background: var(--color-bg); padding: 28px; display: flex; gap: 18px; }
.pitch-num { font-family: var(--font-heading); font-size: 15px; color: var(--color-accent-700); letter-spacing: 0.1em; }
.pitch h4 { margin-bottom: 6px; }
.pitch p { margin: 0; font-size: 14px; opacity: 0.8; max-width: 38ch; }

/* ── Карточка товара в сетке ─────────────────────────────────────────── */

.product-card { padding: 0; }
.product-card-figure {
  height: 150px; border-bottom: 1px solid var(--color-divider);
  display: block; overflow: hidden;
}
.product-card-figure img { width: 100%; height: 100%; object-fit: cover; }
.catalog-grid .product-card-figure { height: 160px; }
.product-card-body { padding: 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.product-card-title { font-family: var(--font-heading); font-weight: var(--font-heading-weight); font-size: 17px; line-height: 1.2; color: inherit; text-decoration: none; }
a.product-card-title:hover { color: var(--color-accent); }
.product-card-meta { font-size: 12px; opacity: 0.6; font-variant-numeric: tabular-nums; }
.product-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 8px; }
.price { font-family: var(--font-heading); font-size: 22px; }
.card-topline { display: flex; justify-content: space-between; align-items: center; gap: 8px; }

/* ── Каталог ─────────────────────────────────────────────────────────── */

.catalog { padding: 40px 0 64px; }
.catalog h1 { font-size: 44px; margin-bottom: 28px; }
.catalog-layout { display: grid; grid-template-columns: 230px 1fr; gap: 32px; align-items: start; }
.catalog-side { position: sticky; top: 96px; }
.filter-title {
  font-family: var(--font-heading); font-size: 13px; letter-spacing: 0.08em;
  text-transform: uppercase; opacity: 0.6; margin-bottom: 10px;
}
.filter-title + .filter-title, .catalog-side .filter-title:not(:first-child) { margin-top: 24px; }
.filter-list { display: flex; flex-direction: column; gap: 9px; }
.filter-list .radio { justify-content: space-between; width: 100%; }
.filter-count { font-size: 12px; opacity: 0.5; font-variant-numeric: tabular-nums; }
.price-range { display: flex; align-items: center; gap: 8px; }
.price-range .input { width: 70px; }
.catalog-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--color-divider); padding-bottom: 12px; margin-bottom: 22px;
}
.catalog-toolbar .count { font-size: 13px; opacity: 0.7; }
.sortbox { display: flex; align-items: center; gap: 8px; }
.sortbox span { font-size: 12px; opacity: 0.6; text-transform: uppercase; letter-spacing: 0.06em; }
.sortbox .input { width: 180px; }
.catalog-more { display: flex; justify-content: center; margin-top: 36px; }
.empty { padding: 48px; text-align: center; }

/* ── Карточка товара (PDP) ───────────────────────────────────────────── */

.pdp { padding: 28px 0 64px; }
.breadcrumb { font-size: 12px; opacity: 0.65; margin-bottom: 24px; letter-spacing: 0.04em; text-transform: uppercase; }
.breadcrumb a { color: inherit; text-decoration: none; }
.breadcrumb a:hover { color: var(--color-accent); }
.pdp-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: start; }
.pdp-figure { height: 420px; }
.pdp-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 20px; }
.pdp-thumb { height: 96px; border: 1px solid var(--color-divider); overflow: hidden; padding: 0; background: none; cursor: pointer; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb[aria-current="true"] { outline: 2px solid var(--color-accent); outline-offset: -2px; }
.pdp h1 { font-size: 40px; margin-bottom: 10px; text-wrap: pretty; }
.pdp-partno { font-size: 13px; opacity: 0.6; font-variant-numeric: tabular-nums; margin-bottom: 20px; }
.pdp-price-row {
  display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap;
  padding-bottom: 20px; border-bottom: 1px solid var(--color-divider);
}
.pdp-price { font-family: var(--font-heading); font-size: 40px; line-height: 1; }
.pdp-blurb { margin-top: 20px; font-size: 15px; opacity: 0.85; max-width: 52ch; }
.pdp-buy { display: flex; align-items: center; gap: 12px; margin-top: 24px; }
.pdp-buy .btn-primary { flex: 1; height: 42px; font-size: 15px; }
.pdp-note { font-size: 13px; opacity: 0.7; margin-top: 14px; }
.pdp-specs { margin-top: 36px; }
.pdp-specs h4 { margin-bottom: 8px; }
.pdp-specs th { width: 42%; border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent); }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--color-divider); }
.qty .btn { border: 0; width: 38px; height: 42px; font-size: 18px; }
.qty-value {
  width: 44px; text-align: center; font-family: var(--font-heading);
  font-size: 17px; font-variant-numeric: tabular-nums;
  border: 0; background: transparent; padding: 0; -moz-appearance: textfield;
}
.qty-value::-webkit-outer-spin-button, .qty-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-sm .btn { width: 30px; height: 32px; font-size: 15px; }
.qty-sm .qty-value { width: 34px; font-size: 15px; }

/* ── Корзина и оформление ────────────────────────────────────────────── */

.cart { padding: 40px 0 72px; }
.cart h1, .checkout h1 { font-size: 44px; margin-bottom: 28px; }
.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 32px; align-items: start; }
.cart-item { display: flex; gap: 12px; align-items: center; }
.cart-thumb {
  width: 56px; height: 56px; flex: none; border: 1px solid var(--color-divider);
  display: grid; place-items: center; overflow: hidden;
  font-family: var(--font-heading); font-size: 11px; letter-spacing: 0.06em;
  color: var(--color-accent-700); text-align: center; line-height: 1.2; padding: 4px;
}
.cart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-item-title { font-family: var(--font-heading); font-size: 16px; }
.cart-item-title a { color: inherit; text-decoration: none; }
.cart-item-title a:hover { color: var(--color-accent); }
.cart-table td { vertical-align: middle; }
.summary { padding: 22px; }
.summary h4 { margin-bottom: 14px; }
.summary-row { display: flex; justify-content: space-between; font-size: 14px; padding: 7px 0; }
.summary-row span:first-child { opacity: 0.7; }
.summary-row.is-last { border-bottom: 1px solid var(--color-divider); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; }
.summary-total-label { font-family: var(--font-heading); font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; }
.summary-total-value { font-family: var(--font-heading); font-size: 30px; font-variant-numeric: tabular-nums; }
.summary-note { font-size: 12px; opacity: 0.65; margin-top: 12px; }

.checkout { padding: 40px 0 72px; }
.checkout-layout { display: grid; grid-template-columns: 1fr 340px; gap: 32px; align-items: start; }
.form-grid { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
.choice-row { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }

/* Пока Stripe.js поднимает форму, блок не должен схлопываться в полоску */
#stripe-checkout { min-height: 60px; }
.pay-loading {
  padding: 26px 0; text-align: center; font-size: 14px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}

.confirm { padding: 56px 0 72px; text-align: center; }
.confirm-box { padding: 40px; max-width: 620px; margin: 0 auto; text-align: left; }
.confirm h1 { font-size: 44px; }

/* ── Контакты ────────────────────────────────────────────────────────── */

.contact { padding: 40px 0 72px; }
.contact h1 { font-size: 44px; margin-bottom: 8px; }
.contact-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: start; margin-top: 34px; }
.contact-form { padding: 26px; }
.info-stack { display: grid; gap: 1px; background: var(--color-divider); border: 1px solid var(--color-divider); }
.info-cell { background: var(--color-bg); padding: 18px 20px; }
.info-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; }
.info-value { font-family: var(--font-heading); font-size: 22px; }
.info-value.is-big { font-size: 26px; }
.info-note { font-size: 13px; opacity: 0.7; }
.contact-map { height: 220px; margin-top: 28px; }

/* ── О компании ──────────────────────────────────────────────────────── */

.about { padding: 40px 0 72px; }
.about h1 { font-size: 46px; margin-bottom: 20px; max-width: 24ch; text-wrap: pretty; }
.about-figure { height: 300px; margin-bottom: 34px; }
.about-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.about-layout p { font-size: 16px; opacity: 0.9; }
.about-facts { display: grid; gap: 1px; background: var(--color-divider); border: 1px solid var(--color-divider); align-content: start; }
.about-fact { background: var(--color-bg); padding: 18px 20px; }
.about-fact-value { font-family: var(--font-heading); font-size: 30px; }
.about-fact-label { font-size: 13px; opacity: 0.7; }

/* ── Правовые страницы (Terms, Privacy) ──────────────────────────────── */

.legal { padding: 40px 0 72px; }
.legal h1 { font-size: 44px; margin-bottom: 10px; max-width: 20ch; text-wrap: pretty; }
.legal .lede { max-width: 58ch; }
.legal-meta {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 30px 0 40px;
  background: var(--color-divider); border: 1px solid var(--color-divider);
}
.legal-meta-cell { background: var(--color-bg); padding: 16px 20px; }
.legal-meta-cell .info-value { font-size: 19px; }
.legal-body { max-width: 68ch; }
.legal-body h2 {
  font-family: var(--font-heading); font-size: 22px; letter-spacing: 0.02em;
  margin: 34px 0 10px; padding-top: 14px; border-top: 1px solid var(--color-divider);
}
.legal-body h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.legal-body p, .legal-body li { font-size: 15px; line-height: 1.65; opacity: 0.9; }
.legal-body p { margin-bottom: 12px; }
.legal-body ul { margin: 0 0 14px; padding-left: 20px; }
.legal-body li { margin-bottom: 8px; }
.legal-body a { color: var(--color-accent-700); text-underline-offset: 3px; }
.legal-body strong { opacity: 1; }
.legal-body code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 13px;
  background: var(--color-surface); padding: 1px 5px; border: 1px solid var(--color-divider);
}

/* ── Подвал ──────────────────────────────────────────────────────────── */

.footer { background: var(--color-accent-900); color: var(--color-bg); padding: 44px 0 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-brand { font-family: var(--font-heading); font-size: 24px; letter-spacing: 0.1em; text-transform: uppercase; }
.footer-tagline { font-size: 13px; opacity: 0.75; margin-top: 8px; max-width: 32ch; }
.footer-col { font-size: 13px; line-height: 2; opacity: 0.85; }
.footer-col a, .footer-col span { color: inherit; text-decoration: none; display: block; }
.footer-col a:hover { color: var(--color-bg); text-decoration: underline; }
.footer-label { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.6; }
.footer-bottom {
  border-top: 1px solid rgba(242, 242, 243, 0.2); margin-top: 32px; padding-top: 14px;
  font-size: 12px; opacity: 0.6; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ── Адаптив ─────────────────────────────────────────────────────────── */

@media (max-width: 1080px) {
  .hero h1 { font-size: 46px; }
  .grid-4 { grid-template-columns: repeat(3, 1fr); }
  .catalog-layout { grid-template-columns: 200px 1fr; gap: 24px; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .header-search { width: 150px; }
  .mainnav { gap: 16px; }
}

@media (max-width: 860px) {
  .header .nav { flex-wrap: wrap; gap: 10px; }
  .burger {
    display: inline-flex; order: 2; width: 40px; height: 36px;
    align-items: center; justify-content: center;
  }
  .mainnav {
    order: 4; width: 100%; display: none; flex-direction: column;
    align-items: flex-start; gap: 12px; padding: 10px 0 6px;
    border-top: 1px solid var(--color-divider);
  }
  .mainnav.is-open { display: flex; }
  .header-tools { order: 3; margin-left: 0; }
  .header-search { width: 130px; }

  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; }
  .hero h1 { font-size: 40px; }
  .hero-figure { height: 260px; }
  .statstrip { grid-template-columns: 1fr; margin-top: 36px; }
  .band { margin-top: 36px; padding: 36px 0; }
  .band-grid { grid-template-columns: 1fr; }
  .section { padding: 36px 0; }
  .grid-4, .grid-3, .grid-2, .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .pitch-grid { grid-template-columns: 1fr; margin-top: 36px; }

  .catalog-layout { grid-template-columns: 1fr; }
  .catalog-side { position: static; }
  .catalog h1, .cart h1, .checkout h1, .contact h1 { font-size: 34px; }

  .pdp-layout { grid-template-columns: 1fr; gap: 28px; }
  .pdp-figure { height: 300px; }
  .pdp h1 { font-size: 32px; }

  .cart-layout, .checkout-layout, .contact-layout, .about-layout { grid-template-columns: 1fr; }
  .about h1 { font-size: 34px; }
  .legal h1 { font-size: 34px; }
  .legal-meta { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .wrap, .wrap-mid, .wrap-narrow { padding: 0 16px; }
  .topbar-inner { padding: 7px 16px; gap: 10px; font-size: 11px; }
  .topbar-sep, .topbar-phone { display: none; }
  .grid-4, .grid-3, .grid-2, .catalog-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero-actions .btn { flex: 1; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .brand { font-size: 20px; }
  .header-search { display: none; }

  /* Таблица корзины превращается в карточки */
  .cart-table thead { display: none; }
  .cart-table tr { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 12px 0; border-bottom: 1px solid var(--color-divider); }
  .cart-table td { display: block; border: 0; padding: 2px 0; }
  .cart-table td:first-child { grid-column: 1 / -1; }
  .cart-table td[data-label]::before {
    content: attr(data-label) ' '; font-size: 11px; text-transform: uppercase;
    letter-spacing: 0.08em; opacity: 0.55; margin-right: 6px;
  }
}

@media print {
  .topbar, .header, .footer, .btn { display: none; }
}
