/* ===== Карточка товара (PDP) — поверх styles.css/catalog.css ===== */

#pdpBody { padding-bottom: 88px; }   /* место под липкую CTA */

/* ---------- скелетон загрузки ---------- */
.pdp-skel { padding: 0 0 var(--s3); }
.pdp-skel__img { width: 100%; aspect-ratio: 1 / 1.12; background: #efece6; }
.pdp-skel__line { height: 18px; border-radius: 8px; background: #efece6; margin: 16px var(--s3) 0; }
.pdp-skel__line--sm { width: 50%; height: 14px; }
.pdp-skel__img, .pdp-skel__line { animation: pdpPulse 1.1s var(--easing) infinite; }
@keyframes pdpPulse { 50% { opacity: 0.5; } }

/* ===================== ГАЛЕРЕЯ ===================== */
.pgal { position: relative; background: #fff; }
.pgal__track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.pgal__track::-webkit-scrollbar { display: none; }
.pgal__slide { flex: 0 0 100%; scroll-snap-align: center; position: relative; }
.pgal__img {
  width: 100%; aspect-ratio: 1 / 1.12;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  background-color: #fff;
}
.pgal__slide--video .pgal__play, .pgal__play {
  position: absolute; inset: 0; margin: auto; width: 64px; height: 64px; border: none;
  border-radius: 50%; background: rgba(27,30,35,0.6); color: #fff; display: grid; place-items: center;
  cursor: pointer; backdrop-filter: blur(4px);
}
.pgal__play .icon { width: 26px; height: 26px; }

/* плавающие кнопки поверх фото */
.pgal__nav {
  position: absolute; top: calc(var(--s2) + env(safe-area-inset-top, 0)); z-index: 5;
  width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(27,30,35,0.5); color: #fff; display: grid; place-items: center;
  backdrop-filter: blur(8px); transition: transform 0.15s var(--easing), background 0.2s var(--easing);
}
.pgal__nav:active { transform: scale(0.92); }
.pgal__nav .icon { width: 20px; height: 20px; }
.pgal__nav--back { left: var(--s2); }
.pgal__nav-grp { position: absolute; top: calc(var(--s2) + env(safe-area-inset-top, 0)); right: var(--s2); z-index: 5; display: flex; gap: 8px; }
.pgal__nav-grp .pgal__nav { position: static; top: auto; }
.pgal__nav-grp .pgal__nav--bell { position: relative; }   /* якорь для бейджа уведомлений */
.pgal__nav.is-on { background: var(--accent); }
.pgal__nav.is-on .icon { fill: #fff; stroke: #fff; }

.pgal__badge {
  position: absolute; left: var(--s3); bottom: 14px; z-index: 4;
  background: var(--accent); color: #fff; font-family: var(--display); font-weight: 800;
  font-size: 12px; padding: 5px 10px; border-radius: var(--r-xs); letter-spacing: 0.01em;
}
.pgal__oos {
  position: absolute; right: var(--s3); bottom: 14px; z-index: 4;
  background: rgba(27,30,35,0.86); color: #fff; font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: var(--r-xs);
}
.pgal__dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; z-index: 4; }
.pgal__dot { width: 6px; height: 6px; border-radius: 50%; background: rgba(27,30,35,0.25); transition: all 0.2s var(--easing); }
.pgal__dot.is-on { background: var(--accent); width: 18px; border-radius: 3px; }

.pgal__thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 12px var(--s3) 4px; background: #fff; }
.pgal__thumbs::-webkit-scrollbar { display: none; }
.pgal__thumb { flex: 0 0 auto; width: 52px; height: 60px; border-radius: var(--r-xs); border: 1.5px solid transparent; background: #fff; padding: 0; overflow: hidden; cursor: pointer; position: relative; }
.pgal__thumb.is-on { border-color: var(--accent); }
.pgal__thumb-img { width: 100%; height: 100%; background-size: contain; background-repeat: no-repeat; background-position: center; }
.pgal__thumb-play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(27,30,35,0.3); color: #fff; }
.pgal__thumb-play .icon { width: 16px; height: 16px; }

/* ===================== ИНФО ===================== */
.pdp-info { padding: var(--s3); }
.pdp-seller { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.pdp-seller__name { font-size: 13px; font-weight: 700; color: var(--ink); }
.pdp-orig { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: #2e7d52; }
.pdp-orig .icon { width: 13px; height: 13px; stroke: #2e7d52; }

/* рейтинг */
.pdp-rate { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: var(--ink); margin-bottom: 8px; cursor: pointer; }
.pdp-rate b { font-weight: 800; font-size: 14px; }
.pdp-rate span { font-size: 13px; color: var(--ink-muted); border-bottom: 1px dashed var(--border-strong); }
.pdp-rate--empty span { color: var(--ink-dim); }

.stars { position: relative; display: inline-flex; line-height: 0; }
.stars__bg, .stars__fg { display: inline-flex; }
.stars__fg { position: absolute; top: 0; left: 0; overflow: hidden; white-space: nowrap; }
.stars .icon { width: 15px; height: 15px; flex: 0 0 15px; stroke: none; }
.stars__bg .icon { fill: #dcd8d0; }
.stars__fg .icon { fill: #f5a623; }

.pdp-name { font-family: var(--display); font-weight: 800; font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; margin: 4px 0 14px; }

/* цвет */
.pdp-opt { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pdp-opt__lbl { font-size: 14px; color: var(--ink-muted); }
.pdp-opt__lbl b { color: var(--ink); font-weight: 700; }
.pdp-sw { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.12); }

/* размеры */
.pdp-block { margin-bottom: 18px; }
.pdp-block__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.pdp-block__t { font-size: 14px; font-weight: 700; }
.pdp-link { background: none; border: none; color: var(--accent); font-weight: 600; font-size: 13px; cursor: pointer; padding: 0; }
.pdp-sizes { display: flex; flex-wrap: wrap; gap: 8px; }
.pdp-size {
  min-width: 50px; height: 44px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1.5px solid var(--border-strong); background: var(--card); color: var(--ink);
  font-weight: 700; font-size: 14px; cursor: pointer; display: grid; place-items: center;
  transition: all 0.15s var(--easing);
}
.pdp-size.is-sel { border-color: var(--dark); background: var(--dark); color: #fff; }
.pdp-sizes--ph .pdp-size.is-ph { border-style: dashed; color: var(--ink-dim); background: transparent; cursor: default; }
.pdp-hint { font-size: 12.5px; color: var(--ink-muted); margin-top: 9px; }

/* цена */
.pdp-price { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pdp-price b { font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: -0.01em; }
.pdp-price s { font-size: 15px; color: var(--ink-dim); text-decoration-color: var(--ink-dim); }
.pdp-price__disc { background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px; padding: 3px 8px; border-radius: 7px; }
.pdp-price--sale b { color: var(--accent); }

.pdp-cashback {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted);
  background: var(--accent-soft); border-radius: var(--r-sm); padding: 8px 12px; margin-bottom: 18px;
}
.pdp-cashback .icon { width: 17px; height: 17px; stroke: var(--accent); }

/* наличие */
.pdp-avail { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; background: var(--bg-alt); border-radius: var(--r); margin-bottom: 16px; }
.pdp-avail .icon { width: 20px; height: 20px; stroke: #2e7d52; flex: 0 0 20px; margin-top: 1px; }
.pdp-avail b { display: block; font-size: 14px; font-weight: 700; }
.pdp-avail span { display: block; font-size: 12.5px; color: var(--ink-muted); margin-top: 2px; }
.pdp-avail--oos .icon { stroke: var(--ink-muted); }
.pdp-avail--low { background: #fff6e6; }
.pdp-avail--low .icon { stroke: #f3a712; }

/* CTA */
.pdp-cta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pdp-cta__main { width: 100%; }
.pdp-add {
  width: 100%; height: 54px; border: none; border-radius: var(--r); cursor: pointer;
  background: var(--accent); color: #fff; font-family: var(--display); font-weight: 800; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  transition: background 0.18s var(--easing), transform 0.12s var(--easing);
}
.pdp-add .icon { width: 19px; height: 19px; }
.pdp-add:active { transform: scale(0.99); background: var(--accent-dark); }
.pdp-add.is-disabled { background: var(--bg-alt); color: var(--ink-dim); cursor: default; }
.pdp-buy {   /* вторичная кнопка — outline/ghost (принцип 1: один primary на действие) */
  width: 100%; height: 54px; border: 1.5px solid var(--border-strong); border-radius: var(--r); cursor: pointer;
  background: transparent; color: var(--ink); font-family: var(--display); font-weight: 800; font-size: 16px;
  transition: transform 0.12s var(--easing), background 0.2s var(--easing), border-color 0.2s var(--easing);
}
.pdp-buy:active { transform: scale(0.99); background: var(--bg-alt); border-color: var(--ink-muted); }
.pdp-notify {
  width: 100%; height: 54px; border: 1.5px solid var(--border-strong); border-radius: var(--r); cursor: pointer;
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.pdp-notify .icon { width: 18px; height: 18px; }

/* степпер на месте кнопки */
.pdp-qty { height: 54px; border-radius: var(--r); }
.pdp-qty .qtyst__btn { flex-basis: 54px; height: 54px; }
.pdp-qty .qtyst__n { font-size: 17px; }
.pdp-qty--sticky { height: 48px; min-width: 132px; }
.pdp-qty--sticky .qtyst__btn { flex-basis: 46px; height: 48px; }

/* перки */
.pdp-perks { display: flex; flex-wrap: wrap; gap: 8px 16px; padding-top: 4px; }
.pdp-perk { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-muted); }
.pdp-perk .icon { width: 16px; height: 16px; stroke: var(--ink-muted); }

/* ===================== СЕКЦИИ ===================== */
.pdp-sec { padding: var(--s3); border-top: 8px solid var(--bg-alt); }
.pdp-sec__t { font-family: var(--display); font-weight: 800; font-size: 19px; letter-spacing: -0.01em; display: flex; align-items: center; gap: 8px; }
.pdp-sec__n { font-size: 14px; font-weight: 700; color: var(--ink-dim); }
.pdp-sec__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.pdp-sec > .pdp-sec__t { margin-bottom: 14px; }

/* характеристики */
.specs { display: flex; flex-direction: column; gap: 11px; }
.spec { display: flex; align-items: baseline; gap: 6px; font-size: 14px; }
.spec__k { color: var(--ink-muted); flex: 0 0 auto; max-width: 45%; }
.spec__dots { flex: 1; border-bottom: 1px dotted var(--border-strong); transform: translateY(-3px); min-width: 12px; }
.spec__v { color: var(--ink); font-weight: 600; flex: 0 0 auto; max-width: 52%; text-align: right; }

/* описание */
.pdp-desc { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.pdp-desc--ph { color: var(--ink-muted); background: var(--bg-alt); border-radius: var(--r); padding: 14px 16px; font-size: 13.5px; }

/* пустые состояния (отзывы/вопросы) */
.pdp-empty { text-align: center; padding: 14px 10px 6px; }
.pdp-empty .icon { width: 30px; height: 30px; color: var(--ink-dim); margin-bottom: 10px; }
.pdp-empty .stars, .pdp-empty svg[class] { }
.pdp-empty__t { font-family: var(--display); font-weight: 800; font-size: 16px; }
.pdp-empty__s { font-size: 13.5px; color: var(--ink-muted); margin: 6px auto 14px; max-width: 32ch; }
.pdp-ghost {
  height: 44px; padding: 0 22px; border-radius: var(--r); border: 1.5px solid var(--border-strong);
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer;
}
.pdp-ghost:active { background: var(--bg-alt); }

/* рейтинг-сводка + отзывы (когда есть данные) */
.pdp-rsum { margin-bottom: 16px; }
.pdp-rsum__big { display: flex; align-items: center; gap: 12px; }
.pdp-rsum__big b { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: 1; }
.pdp-rsum__big span { font-size: 13px; color: var(--ink-muted); }
.pdp-reviews { display: flex; flex-direction: column; gap: 14px; }
.pdp-rev { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }
.pdp-rev__top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pdp-rev__who { font-weight: 700; font-size: 14px; }
.pdp-rev__date { font-size: 12px; color: var(--ink-dim); }
.pdp-rev__stars { margin: 6px 0 8px; }
.pdp-rev__text { font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.pdp-rev__photos { display: flex; gap: 8px; margin-top: 10px; }
.pdp-rev__ph { width: 60px; height: 60px; border-radius: var(--r-sm); background: #fff; background-size: cover; background-position: center; border: 1px solid var(--border); }
.pdp-more {
  width: 100%; margin-top: 14px; height: 48px; border: 1.5px solid var(--border-strong); border-radius: var(--r);
  background: var(--card); color: var(--ink); font-weight: 700; font-size: 14px; cursor: pointer;
}
.pdp-more:active { background: var(--bg-alt); }

/* вопросы */
.pdp-qlist { display: flex; flex-direction: column; gap: 12px; }
.pdp-q { background: var(--card); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; }
.pdp-q__q { font-weight: 700; font-size: 14px; }
.pdp-q__a { font-size: 13.5px; color: var(--ink-muted); margin-top: 6px; line-height: 1.5; }
.pdp-q__wait { font-size: 12.5px; color: var(--ink-dim); margin-top: 6px; }

/* похожие */
.pdp-sec--similar { padding-left: 0; padding-right: 0; }
.pdp-sec--similar .kicker { padding: 0 var(--s3); margin-bottom: 14px; }

/* ===================== ЛИПКАЯ CTA ===================== */
.pdp-sticky {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(120%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom, 0));
  width: 100%; max-width: var(--app-max); z-index: 45;
  display: flex; align-items: center; gap: 12px; padding: 10px var(--s3);
  background: rgba(255,255,255,0.94); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  transition: transform 0.28s var(--easing);
}
.pdp-sticky.is-show { transform: translateX(-50%) translateY(0); }
.pdp-sticky__price { display: flex; flex-direction: column; line-height: 1.1; flex: 0 0 auto; }
.pdp-sticky__price b { font-family: var(--display); font-weight: 800; font-size: 19px; }
.pdp-sticky__price s { font-size: 12px; color: var(--ink-dim); }
.pdp-sticky__cta { flex: 1; }
.pdp-sticky .pdp-add { height: 48px; font-size: 15px; }

@media (prefers-reduced-motion: reduce) {
  .pdp-skel__img, .pdp-skel__line { animation: none; }
  .pdp-sticky { transition: none; }
}
