/* Product detail */
/* Top breathing room — the single-product .wrap lacks the top padding that .hs-page
   carries, so notices/breadcrumbs sat flush under the header.
   Было --s6 + --s5 у самих крошек = 2.75rem над хлебными крошками; ужато вдвое. */
/* Крошки ровно посередине между верхним меню и фото товара: padding-top у
   .wrap обнулён, и единственный вертикальный отступ задают сами крошки —
   поэтому сверху и снизу от них получается одинаково. */
.single-product .wrap { padding-top: 0; }
.single-product .breadcrumbs { padding-block: var(--s5); }

.pd { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s10); padding-bottom: var(--s10); }

/* Gallery */
.pd-gallery { display: flex; flex-direction: column; gap: var(--s4); position: sticky; top: var(--s4); }
.pd-main { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); aspect-ratio: 1/1; display: grid; place-items: center; padding: 0; }
.pd-main img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: opacity .2s ease; }
.pd-main img.is-fading { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .pd-main img { transition: none; } }
.pd-main__flag { position: absolute; top: var(--s5); left: var(--s5); }
/* Флекс, а не сетка 4x: число ракурсов у товаров разное (5, 7, 9), и остаток
   последнего ряда в grid прижимался влево. Фиксированная ширина превью
   вместо 1fr — иначе они растягивались на четверть ширины галереи. */
.pd-thumbs { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); }
.pd-thumb { flex: 0 0 auto; width: clamp(56px, 15%, 76px); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--r-md); aspect-ratio: 1/1; display: grid; place-items: center; padding: 0; }
.pd-thumb img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.pd-thumb.is-active { border-color: var(--brand); }

/* Info */
/* Было 900 — заголовок выглядел тяжелее, чем у Amazon. */
.pd-title { font-size: var(--text-2xl); font-weight: 500; letter-spacing: -0.01em; margin: var(--s2) 0 var(--s3); line-height: 1.15; }
.pd-rating { display: flex; align-items: center; gap: var(--s2); margin-bottom: var(--s5); }
.stars { color: var(--cta); letter-spacing: 1px; font-size: var(--text-base); }
.pd-rating__val { font-weight: 700; color: var(--ink); }
.pd-rating__count { font-size: var(--text-base); color: var(--brand); }
.pd-rating__count:hover { text-decoration: underline; }

.pd-price { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); margin-bottom: var(--s5); }
.pd-price__row { display: flex; align-items: center; gap: var(--s4); }
.pd-price__now { font-family: var(--font-display); font-weight: 900; font-size: var(--text-3xl); color: var(--ink); line-height: 1; }
/* Цена ещё не заполнена: подпись вместо суммы + неактивная кнопка. */
.pd-price__now--tba { font-family: var(--font-body, inherit); font-weight: 600; font-size: var(--text-lg); color: var(--ink-2); }
.pd-buy--tba { display: block; }
.pd-buy--tba .pd-buy__add { width: 100%; opacity: .55; cursor: not-allowed; }
.pd-buy__tba-note { margin-top: var(--s2); font-size: var(--text-sm); color: var(--ink-2); }
.pd-price__compare { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s3); flex-wrap: wrap; }
.pd-price__amazon { font-size: var(--text-base); color: var(--ink-3); }
.pd-price__amazon s { color: var(--ink-3); }
.pd-price__save { font-size: var(--text-base); font-weight: 700; color: var(--emerald-dark); }
.pd-guarantee { display: flex; align-items: center; gap: 8px; margin-top: var(--s4); padding-top: var(--s4); border-top: 1px dashed var(--border-2); font-size: var(--text-sm); font-weight: 600; color: var(--ink-2); }
.pd-guarantee svg { width: 20px; height: 20px; color: var(--emerald); flex-shrink: 0; }

/* Urgency — single dominant red pill */
.pd-urgency { margin-bottom: var(--s4); }

/* Assurance chips — calm green reassurance row (lighter than urgency) */
.pd-assure { display: flex; flex-wrap: wrap; gap: var(--s4); margin-bottom: var(--s6); }
.assure-chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--text-xs); font-weight: 600; line-height: 1.2;
  color: var(--emerald-dark);
  background: transparent;
  border: none;
  padding: 0;
}
.assure-chip svg { width: 13px; height: 13px; color: var(--emerald); flex-shrink: 0; }

.pd-trust-link {
  display: inline-block; margin-bottom: var(--s5);
  font-size: var(--text-sm); font-weight: 600; color: var(--brand);
}
.pd-trust-link:hover { color: var(--brand-dark); text-decoration: underline; }

.pd-buy { display: flex; gap: var(--s3); margin-bottom: var(--s4); }
.qty { display: flex; align-items: center; border: 1.5px solid var(--border-2); border-radius: var(--r-md); overflow: hidden; }
.qty__btn { width: 46px; height: 100%; font-size: 1.3rem; color: var(--ink-2); }
.qty__btn:hover { background: var(--surface); color: var(--brand); }
.qty__val {
    width: 54px !important;
    border: none !important;
    border-inline: 1.5px solid var(--border-2) !important;
    font-weight: 700 !important;
    height: 100%;
    border-left: 1.5px solid var(--border-2);
    border-right: 1.5px solid var(--border-2);
    border-radius: 0 !important;
    text-align: center !important;
    padding: 0 !important;
    -moz-appearance: textfield;
    appearance: textfield;
}
/* Kill the native number-input spinner — it reserves space on the right and
   pushes the value off-centre despite text-align:center. */
.qty__val::-webkit-outer-spin-button,
.qty__val::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
.pd-buy__add { flex: 1; }
/* Rounded-rect CTA like the mockup (override the global .btn pill radius). */
.pd-buy__add.btn { border-radius: var(--r-md); }

.pd-pay { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-bottom: var(--s5); }
.pd-pay__label { font-size: var(--text-sm); color: var(--ink-3); margin-right: 4px; }
.pay-chip--lt { background: var(--surface); border: 1px solid var(--border); color: var(--ink-3); font-size: var(--text-sm); font-weight: 600; padding: 5px 11px; }

.pd-perks { display: flex; flex-direction: column; gap: var(--s4); border-top: 1px solid var(--border); padding-top: var(--s5); }
.pd-perks li { display: flex; align-items: center; gap: var(--s3); font-size: var(--text-base); color: var(--ink-2); }
.pd-perks svg { width: 20px; height: 20px; color: var(--emerald); flex-shrink: 0; }

/* Tabs */
.pd-tabs { border-top: 1px solid var(--border); padding-top: var(--s8); margin-bottom: var(--s10); }
.tabs__nav { display: flex; gap: var(--s2); border-bottom: 1px solid var(--border); margin-bottom: var(--s6); }
.tab { padding: var(--s3) var(--s5); font-weight: 600; font-size: var(--text-md); color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--ink-2); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.tabs__panel { display: none; }
.tabs__panel.is-active { display: block; }
.tabs__panel p { font-size: var(--text-md); color: var(--ink-2); margin-bottom: var(--s4); max-width: 75ch; }
/* Глобальный ресет `ul { list-style: none }` в core.css нужен меню и карточкам,
   поэтому маркеры возвращаем точечно — только внутри текста вкладок.
   Описание с Amazon приходит списком «About this item», без этого оно
   выглядело сплошным блоком. Скоуп строго на панель desc: в Shipping
   списки .ship-list рисуют свой кружок через ::before, и нативный маркер
   дал бы два буллита разом. */
.tabs__panel[data-panel="desc"] ul,
.tabs__panel[data-panel="desc"] ol { padding-left: 1.35em; margin-bottom: var(--s4); max-width: 75ch; }
.tabs__panel[data-panel="desc"] ul { list-style: disc; }
.tabs__panel[data-panel="desc"] ol { list-style: decimal; }
.tabs__panel[data-panel="desc"] li { font-size: var(--text-md); color: var(--ink-2); line-height: 1.65; margin-bottom: var(--s2); }
.tabs__panel[data-panel="desc"] li::marker { color: var(--brand); }
.pd-condition { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s4); margin-top: var(--s5); }
.pd-condition > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--s4); }
.pd-condition__k { display: block; font-size: var(--text-xs); color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 4px; }
.pd-condition__v { font-size: var(--text-base); font-weight: 600; color: var(--ink); }

/* Shipping & Returns panel */
.ship-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s8); max-width: 860px; }
.ship-block h3 { font-size: var(--text-lg); font-weight: 700; margin-bottom: var(--s3); }
.ship-block p { font-size: var(--text-md); color: var(--ink-2); margin-bottom: var(--s4); max-width: none; }
.ship-list { display: flex; flex-direction: column; gap: var(--s3); }
.ship-list li { position: relative; padding-left: var(--s5); font-size: var(--text-base); color: var(--ink-2); line-height: 1.5; }
.ship-list li::before { content: ''; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--emerald); }
.ship-note { font-size: var(--text-base); color: var(--ink-3); margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--border); }

.spec-table { max-width: 720px; }
.spec-table th, .spec-table td { text-align: left; padding: var(--s3) var(--s4); border-bottom: 1px solid var(--border); font-size: var(--text-base); }
.spec-table th { width: 30%; color: var(--ink-2); font-weight: 600; }
.spec-table td { color: var(--ink); }

.rev-summary { display: flex; gap: var(--s8); align-items: center; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s6); margin-bottom: var(--s6); }
.rev-summary__score { text-align: center; }
.rev-summary__score > span:first-child { font-family: var(--font-display); font-weight: 900; font-size: var(--text-3xl); display: block; }
.rev-summary__score small { color: var(--ink-3); font-size: var(--text-sm); }
.rev-summary__score .stars { display: block; margin: 4px 0; }
.rev-summary__bars { flex: 1; display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.rev-bar { display: flex; align-items: center; gap: var(--s3); font-size: var(--text-sm); color: var(--ink-2); }
.rev-bar span:first-child { width: 26px; }
.rev-bar span:last-child { width: 32px; text-align: right; color: var(--ink-3); }
.rev-bar__track { flex: 1; height: 8px; background: var(--border); border-radius: var(--r-full); overflow: hidden; }
.rev-bar__track i { display: block; height: 100%; background: var(--cta); }
.rev { padding: var(--s5) 0; border-bottom: 1px solid var(--border); }
.rev__head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
.rev__head strong { font-size: var(--text-base); }
.rev p { font-size: var(--text-base); color: var(--ink-2); margin-bottom: var(--s2); }
.rev__by { font-size: var(--text-sm); color: var(--ink-3); }

/* ===== MOBILE ===== */
@media (max-width: 760px) {
  .pd { grid-template-columns: 1fr; gap: var(--s6); }
  .pd-gallery { position: static; }
  .pd-title { font-size: var(--text-xl); }
  .pd-price__now { font-size: var(--text-2xl); }
  .pd-buy { flex-direction: column; }
  .pd-buy__add { width: 100%; }
  .qty { align-self: flex-start; height: 48px; }
  .tabs__nav { overflow-x: auto; }
  .tab { white-space: nowrap; font-size: var(--text-base); padding: var(--s3) var(--s4); }
  .pd-condition { grid-template-columns: 1fr; }
  .ship-grid { grid-template-columns: 1fr; gap: var(--s6); }
  .rev-summary { flex-direction: column; gap: var(--s4); align-items: stretch; }
  .rev-summary__bars { max-width: none; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: var(--s3); }
  .sec-head__title { font-size: var(--text-xl); }
}

/* Rating stars use inline SVG (theme) — keep them horizontal + coloured */
.pd-rating .stars { display: inline-flex; align-items: center; gap: 2px; }
.pd-rating .stars svg { display: block; width: 15px; height: 15px; }
.pd-rating .stars .star--on { color: var(--cta); fill: var(--cta); }
.pd-rating .stars .star--off { color: var(--border-2); fill: var(--border-2); }
