/* ============================================================
   Ensley — ШАБЛОН КАРТОЧКИ ТОВАРА (product.css)
   Apple-стиль. После colors_and_type.css + site.css.
   ============================================================ */

/* ---- якорные переходы не прячутся под двумя липкими полосами ---- */
html { scroll-padding-top: 104px; }

/* ---- локальная sticky-полоса карточки (приклеивается ПОД плавающей шапкой) ---- */
.pnav { position: sticky; top: 74px; z-index: 44; background: rgba(252,250,246,0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline);
  border-top: 1px solid var(--hairline); transition: transform .42s cubic-bezier(.4,0,.2,1); }
/* когда шапка прячется — полоса поднимается к самому верху и остаётся видна */
body.hdr-hidden .pnav { transform: translateY(-74px); }
@media (prefers-reduced-motion: reduce) { body.hdr-hidden .pnav { transform: none; } }
.pnav__in { display: flex; align-items: center; gap: 18px; padding: 11px var(--gutter); }
.pnav__models { display: flex; gap: 2px; align-items: center; overflow-x: auto; scrollbar-width: none; }
.pnav__models::-webkit-scrollbar { display: none; }
.pnav__models a { font-family: var(--font-ui); font-size: 13.5px; text-transform: lowercase; color: var(--warm-gray);
  white-space: nowrap; padding: 6px 12px; border-radius: var(--r-pill); transition: color 200ms, background 200ms; }
.pnav__models a:hover { color: var(--graphite); background: rgba(157,170,134,.14); }
.pnav__models a.is-here { color: #fff; background: var(--sage); }
.pnav__anchors { display: flex; gap: 2px; align-items: center; margin-left: auto; }
.pnav__anchors a { font-family: var(--font-ui); font-size: 13.5px; text-transform: lowercase; color: var(--warm-gray);
  white-space: nowrap; padding: 6px 12px; border-radius: var(--r-pill); transition: color 200ms; }
.pnav__anchors a:hover { color: var(--olive); }
.pnav__buy { display: flex; align-items: center; gap: 12px; }
.pnav__price { font-family: var(--font-ui); font-size: 14px; color: var(--graphite); white-space: nowrap; }
.pnav__price b { font-weight: 600; }

/* ---- product hero ---- */.prohero { background: var(--cream); overflow: hidden; }
.prohero__grid { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px;
  min-height: clamp(460px, 68vh, 660px); }
.prohero__copy { padding-block: 56px; }
.prohero .eyebrow { margin-bottom: 16px; }
.prohero h1 { font-size: clamp(52px, 9vw, 120px); line-height: .96; margin: 0 0 14px; letter-spacing: -.02em; }
.prohero__tag { font-family: var(--font-display); font-weight: 300; font-size: clamp(22px, 2.4vw, 32px); color: var(--graphite); margin: 0 0 16px; line-height: 1.1; }
.prohero__sub { font-family: var(--font-body); font-size: clamp(16px, 1.4vw, 19px); line-height: 1.55; color: var(--fg-secondary); max-width: 38ch; margin: 0 0 22px; }
.prohero__price { font-family: var(--font-ui); font-size: 16px; color: var(--graphite); margin-bottom: 26px; }
.prohero__price b { font-weight: 600; }
.prohero__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.prohero__media { position: relative; align-self: stretch; }
.prohero__shot { position: relative; height: 100%; min-height: 380px; display: flex; align-items: center; justify-content: center; }
.prohero__shot img { width: 100%; height: 100%; object-fit: cover; }
.prohero--white .prohero__shot { background: var(--white); }
.prohero--white .prohero__shot img { object-fit: contain; padding: 32px; }

/* ---- highlights ---- */
.hl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.hl::-webkit-scrollbar { display: none; }
.hl__tile { position: relative; aspect-ratio: 1 / 1; border-radius: var(--r-card); overflow: hidden; box-shadow: var(--shadow-card); }
.hl__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 700ms var(--ease-out); }
.hl__tile:hover img { transform: scale(1.05); }
.hl__tile .hl__veil { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(42,42,42,0) 45%, rgba(42,42,42,0.62) 100%); }
.hl__tile span { position: absolute; left: 18px; right: 18px; bottom: 18px; color: #fff; font-family: var(--font-ui);
  font-size: 15px; line-height: 1.25; }

/* ---- feature sections ---- */
.feat { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: clamp(28px, 5vw, 72px); }
.feat + .feat { margin-top: clamp(56px, 8vw, 120px); }
.feat--rev .feat__media { order: -1; }
.feat__media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 4 / 3; background: var(--cream); }
.feat__media img { width: 100%; height: 100%; object-fit: cover; }
.feat__media--white { background: var(--white); }
.feat__media--white img { object-fit: contain; padding: 24px; }
.feat__media--portrait { aspect-ratio: 3 / 4; }
.feat .eyebrow { margin-bottom: 12px; }

/* «что ещё посмотреть» и подобные: eyebrow-надзаголовок ставим НАД заголовком, а не сбоку */
.section__head:has(.section-num) { flex-direction: column; align-items: flex-start; gap: 6px; }
.section__head--center:has(.section-num) { align-items: center; }
.feat h2 { margin: 0 0 12px; }
.feat__subline { font-family: var(--font-display); font-weight: 300; font-size: clamp(18px, 1.8vw, 22px); color: var(--graphite); margin: 0 0 14px; line-height: 1.2; }
.feat__text { font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--fg-secondary); margin: 0; max-width: 46ch; }

/* feature — big centered visual variant */
.featbig { text-align: center; }
.featbig .eyebrow { margin-bottom: 12px; }
.featbig h2 { margin: 0 auto 12px; max-width: 18ch; }
.featbig__sub { font-family: var(--font-body); font-size: clamp(16px,1.4vw,19px); color: var(--fg-secondary); max-width: 50ch; margin: 0 auto 36px; line-height: 1.55; }
.featbig__media { border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-card); aspect-ratio: 16/9; }
.featbig__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---- mini compare: компактные горизонтальные карточки-рекомендации ---- */
.mcomp { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.mcomp__card { display: grid; grid-template-columns: 128px 1fr; column-gap: 22px; row-gap: 12px; align-content: center; }
.mcomp__thumb { display: block; grid-column: 1; grid-row: 1 / span 2; width: 128px; height: 128px; aspect-ratio: 1;
  border-radius: var(--r-lg); overflow: hidden; background: var(--cream); align-self: center; margin: 0;
  transition: transform var(--dur-fast) var(--ease-out); }
.mcomp__card:hover .mcomp__thumb { transform: translateY(-3px); }
.mcomp__thumb img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.mcomp__name { grid-column: 2; align-self: end; font-family: var(--font-display); font-weight: 400; font-size: 22px; line-height: 1.12; color: var(--graphite); }
.mcomp__name .tag { display: inline-block; font-family: var(--font-ui); font-size: 11.5px; text-transform: lowercase; color: var(--sage); margin-left: 8px; }
.mcomp__card .alink { grid-column: 2; align-self: start; }

/* ---- buy block ---- */
.buy { background: var(--white); border: 1px solid var(--hairline); border-radius: var(--r-lg); padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow-card); }
.buy__head { text-align: center; margin-bottom: 30px; }
.buy__head h2 { margin: 0 0 8px; }
.buy__head p { font-family: var(--font-body); font-size: 15px; color: var(--fg-secondary); margin: 0; }
.buy__configs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 28px; }
.buy__opt { text-align: left; background: var(--milk); border: 2px solid var(--border-soft); border-radius: var(--r-card);
  padding: 18px 20px; cursor: pointer; transition: border-color 200ms, background 200ms; display: flex; flex-direction: column; gap: 5px; }
.buy__opt:hover { border-color: var(--sage); }
.buy__opt.is-sel { border-color: var(--olive); background: var(--cream); }
.buy__opt .nm { font-family: var(--font-ui); font-size: 14.5px; color: var(--graphite); display: flex; align-items: center; gap: 9px; }
.buy__opt .dot { width: 16px; height: 16px; border-radius: var(--r-full); border: 2px solid var(--border-soft); flex: none; transition: all 200ms; }
.buy__opt.is-sel .dot { border-color: var(--olive); background: var(--olive); box-shadow: inset 0 0 0 3px #fff; }
.buy__opt .pr { font-family: var(--font-ui); font-size: 14px; color: var(--warm-gray); padding-left: 25px; }
/* буй-блок чуть шире, чтобы цена «от 0 000 руб» вставала в одну строку */
#buy .wrap--narrow { max-width: 880px; }
.buy__panel { display: grid; grid-template-columns: 0.78fr 1fr; gap: 32px; align-items: center; }
.buy__photo { aspect-ratio: 1/1; border-radius: var(--r-lg); overflow: hidden; background: var(--white); }
.buy__photo img { width: 100%; height: 100%; object-fit: contain; padding: 16px; }
.buy__detail .price { font-family: var(--font-display); font-weight: 300; font-size: clamp(40px, 4.6vw, 58px); color: var(--graphite); line-height: 1; margin-bottom: 20px; white-space: nowrap; }
.buy__detail .compo { font-family: var(--font-body); font-size: 14.5px; line-height: 1.6; color: var(--fg-secondary); margin: 0 0 20px; }
.buy__btns { display: flex; flex-direction: column; gap: 10px; }
.buy__note { font-family: var(--font-body); font-size: 13px; color: var(--warm-gray); margin: 10px 0 0; }
/* промокод — светлый «купон» в строку: пунктирная рамка стоит на месте,
   проявляется только текст внутри (код проступает из блюра). Размер соразмерен h2. */
.promo-card { margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 14px 28px; flex-wrap: wrap;
  background: var(--cream); border: 1.5px dashed var(--sage); border-radius: var(--r-card); padding: 18px 26px; }
.promo-card__main { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.promo-card__label { font-family: var(--font-ui); font-size: 12px; letter-spacing: .05em; text-transform: lowercase; color: var(--olive); }
.promo-card__code { display: inline-block; font-family: var(--font-ui); font-weight: 600; font-size: 15px; letter-spacing: .1em;
  color: var(--olive); background: var(--white); border: 1px dashed var(--sage); border-radius: var(--r-pill); padding: 7px 16px; }
.promo-card__note { font-family: var(--font-body); font-size: 13.5px; line-height: 1.5; color: var(--warm-gray);
  margin: 0; max-width: 360px; text-align: right; }
.promo-card__note a { color: var(--olive); white-space: nowrap; }
.promo-card__note a:hover { color: var(--graphite); }
@media (max-width: 560px) {
  .promo-card { justify-content: flex-start; }
  .promo-card__note { text-align: left; max-width: none; }
}

/* ---- single quote ---- */
.pquote { max-width: 760px; margin: 0 auto; text-align: center; }
.pquote__meta { font-family: var(--font-ui); font-size: 13px; text-transform: lowercase; color: var(--olive); margin-bottom: 18px; }
.pquote__meta .stars { letter-spacing: 2px; margin-right: 8px; }
.pquote blockquote { font-family: var(--font-display); font-weight: 300; font-size: clamp(20px, 2.4vw, 30px); line-height: 1.4;
  color: var(--graphite); margin: 0 0 20px; }
.pquote__who { font-family: var(--font-ui); font-size: 14px; text-transform: lowercase; color: var(--fg-secondary); }
.pquote__links { display: flex; gap: 26px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }

/* ---- FAQ accordion ---- */
.faq { max-width: 820px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--border-soft); }
.faq__q { width: 100%; text-align: left; background: none; border: none; cursor: pointer; padding: 22px 44px 22px 0;
  font-family: var(--font-display); font-weight: 400; font-size: clamp(18px, 1.7vw, 21px); color: var(--graphite);
  position: relative; line-height: 1.3; }
.faq__q::first-letter { text-transform: uppercase; }
.faq__q .ic { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; transition: transform 300ms var(--ease-out); color: var(--sage); }
.faq__item.is-open .faq__q .ic { transform: translateY(-50%) rotate(45deg); }
.faq__a { max-height: 0; overflow: hidden; transition: max-height 360ms var(--ease-out); }
.faq__a p { font-family: var(--font-body); font-size: 16px; line-height: 1.65; color: var(--fg-secondary); margin: 0 0 22px; max-width: 64ch; }

/* ---- related ---- */
.related { display: flex; flex-wrap: wrap; gap: 14px; }
.related a { font-family: var(--font-ui); font-size: 15px; color: var(--graphite); background: var(--white);
  border: 1px solid var(--hairline); border-radius: var(--r-pill); padding: 12px 20px; display: inline-flex; align-items: center; gap: 8px;
  transition: transform var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast), color var(--dur-fast); }
.related a:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); color: var(--olive); }

/* med disclaimer */
.meddisc { background: var(--sage-light); border-radius: var(--r-card); padding: 16px 22px; font-family: var(--font-body);
  font-size: 14px; color: var(--graphite); display: flex; gap: 12px; align-items: center; }
.meddisc a { color: var(--olive); text-decoration: underline; }

/* ---- responsive ---- */
@media (max-width: 900px) {
  .prohero__grid { grid-template-columns: 1fr; min-height: 0; gap: 0; }
  .prohero__media { order: -1; min-height: 340px; }
  .hl { grid-template-columns: repeat(3, 1fr); grid-auto-flow: row; grid-auto-columns: auto;
    overflow: visible; gap: 14px; padding-bottom: 0; }
  .hl::-webkit-scrollbar { display: none; }
  .prohero__shot { min-height: 340px; }
  .prohero__copy { padding-block: 36px 44px; text-align: center; }
  .prohero__sub { margin-inline: auto; }
  .prohero__cta { justify-content: center; }
  .feat, .feat--rev { grid-template-columns: 1fr; gap: 22px; }
  .feat--rev .feat__media { order: 0; }
  .mcomp { grid-template-columns: 1fr; }
  .buy__configs { grid-template-columns: 1fr; }
  .buy__panel { grid-template-columns: 1fr; gap: 22px; }
  .pnav__anchors { display: none; }
  .pnav__buy .pnav__price { display: none; }
}
@media (max-width: 560px) {
  .prohero__cta { flex-direction: column; align-items: stretch; }
}
/* —— планшет: мини-сравнение держим в 2 колонки —— */
@media (min-width: 601px) and (max-width: 900px) {
  .mcomp { grid-template-columns: 1fr 1fr; gap: 18px; }
}
@media (max-width: 480px) {
  .pnav__in { gap: 12px; padding-block: 9px; }
  .prohero__copy { padding-block: 30px 38px; }
}

/* —— мобайл: 5 преимуществ — сетка 2 кол. (видны все, без скрытого скролла) —— */
@media (max-width: 640px) {
  .hl { grid-template-columns: 1fr 1fr; grid-auto-flow: row; grid-auto-columns: auto;
    overflow: visible; gap: 12px; padding-bottom: 0; }
  .hl__tile:last-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
  .hl__tile span { left: 13px; right: 13px; bottom: 13px; font-size: 13.5px; }
}

/* —— мобайл: «что ещё посмотреть» — компактнее, без обрезки названий —— */
@media (max-width: 480px) {
  .mcomp__card { grid-template-columns: 84px 1fr; column-gap: 15px; }
  .mcomp__thumb { width: 84px; height: 84px; }
  .mcomp__name { font-size: 19px; line-height: 1.1; }
}

/* —— липкая кнопка «купить» на мобайле (строит product.js) —— */
.buybar { display: none; }
@media (max-width: 768px) {
  .buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    display: flex; align-items: center; gap: 14px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(252,250,246,0.93); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--hairline); box-shadow: 0 -10px 26px -14px rgba(42,42,42,0.22);
    transform: translateY(120%); transition: transform .4s var(--ease-out); }
  .buybar.is-in { transform: none; }
  .buybar__price { font-family: var(--font-ui); font-size: 14.5px; color: var(--graphite); white-space: nowrap; }
  .buybar__price b { font-weight: 600; }
  .buybar .btn { margin-left: auto; flex: none; }
}
