/*
 * Puer-RnD — основной стиль.
 * Перенесён 1:1 из эталонных макетов design/*.dc.html (инлайн <style> + инлайн-стили
 * шапки/футера/Frap вынесены в классы). Дизайн-токены — DESIGN-starbucks.md.
 */

/* --- Токены --- */
:root {
  --pr-cream: #f2f0eb;
  --pr-white: #ffffff;
  --pr-green: #00754a;
  --pr-green-dark: #006241;
  --pr-house: #1e3932;     /* House Green */
  --pr-mint: #d4e9e2;
  --pr-gold: #cba258;
  --pr-ink: rgba(0, 0, 0, 0.87);
  --pr-ink-mute: rgba(0, 0, 0, 0.58);
  --pr-max: 1240px;
  --pr-card-shadow: 0 0 0.5px rgba(0, 0, 0, 0.14), 0 1px 1px rgba(0, 0, 0, 0.24);
  --pr-card-shadow-hover: 0 0 0.5px rgba(0, 0, 0, 0.14), 0 8px 16px rgba(0, 0, 0, 0.1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--pr-cream);
  font-family: Manrope, "Helvetica Neue", Helvetica, Arial, sans-serif;
  letter-spacing: -0.16px;
  color: var(--pr-ink);
  min-height: 100vh;
}
::selection { background: var(--pr-mint); }

a { color: inherit; }

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

/* --- GLOBAL NAV (sticky 99 -> 83 -> 72 -> 64) --- */
.pr-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 99px;
  background: var(--pr-white);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 2px 2px rgba(0, 0, 0, 0.06), 0 0 2px rgba(0, 0, 0, 0.07);
}
.pr-nav__inner {
  max-width: var(--pr-max);
  height: 100%;
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.pr-nav__logo { flex: none; display: flex; align-items: center; }
.pr-nav__logo img { height: 70px; width: auto; display: block; }
.pr-navlinks { display: flex; gap: 32px; align-items: center; }
.pr-navlinks a {
  color: var(--pr-ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 16px;
}
.pr-nav__icons { display: flex; align-items: center; gap: 22px; flex: none; }
.pr-nav__icons a {
  text-decoration: none;
  padding: 6px;
  color: var(--pr-ink);
  display: flex;
  position: relative;
}
.pr-nav__icons a:active { transform: scale(0.95); }
.pr-badge {
  position: absolute;
  top: 0;
  right: 0;
  background: var(--pr-green);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Кнопки --- */
.pr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  background: var(--pr-green);
  color: #fff;
  border: 1px solid var(--pr-green);
  border-radius: 50px;
  padding: 16px 36px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.pr-btn:active { transform: scale(0.95); }
.pr-btn--ghost { background: #fff; color: var(--pr-green); border-color: #fff; }

/* --- FOOTER (House Green) --- */
.pr-footer {
  background: var(--pr-house);
  color: #fff;
  padding: 72px 0 40px;
}
.pr-foot-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 40px;
}
.pr-footer img { height: 64px; width: auto; display: block; margin-bottom: 18px; }
.pr-footer p { font-size: 15px; line-height: 1.7; color: rgba(255, 255, 255, 0.7); margin: 0; max-width: 280px; }
.pr-foot-head {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--pr-gold);
  margin-bottom: 16px;
}
.pr-foot-links { display: flex; flex-direction: column; gap: 12px; }
.pr-foot-links a { color: rgba(255, 255, 255, 0.7); text-decoration: none; font-size: 15px; }
.pr-foot-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 48px;
  padding-top: 24px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
}

/* --- FLOATING FRAP CART --- */
.pr-frap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--pr-green);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.24), 0 8px 12px rgba(0, 0, 0, 0.14);
  transition: all 0.2s ease;
}
.pr-frap:active { transform: scale(0.95); box-shadow: 0 0 6px rgba(0, 0, 0, 0.24); }

.pr-navlinks a.pr-navlinks--active {
  color: var(--pr-green-dark);
  font-weight: 600;
  border-bottom: 2px solid var(--pr-green-dark);
  padding-bottom: 2px;
}

/* --- Заглушка изображения (полосатый плейсхолдер из макетов) --- */
.pr-ph {
  background-image: repeating-linear-gradient(135deg, #e4dfd4 0, #e4dfd4 10px, #ece7dd 10px, #ece7dd 20px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.38);
  font: 500 11px/1.4 ui-monospace, Menlo, monospace;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  padding: 12px;
}
.pr-ph img { width: 100%; height: 100%; object-fit: cover; }
/* Когда в плейсхолдере реальное фото — убираем отступ/полоски, чтобы
   изображение заполняло контейнер целиком (корзина, чекаут, категории). */
.pr-ph:has(img) { padding: 0; }

/* --- Заголовок страницы (кремовый) --- */
.pr-head { background: var(--pr-cream); max-width: var(--pr-max); margin: 0 auto; padding: 56px 40px 36px; }
.pr-head h1 { font-size: 48px; line-height: 1.1; font-weight: 700; color: var(--pr-green-dark); margin: 0 0 14px; }
.pr-head p { font-size: 19px; line-height: 1.7; color: var(--pr-ink-mute); margin: 0; max-width: 580px; }
@media (max-width: 479px) {
  .pr-head { padding: 40px 20px 28px; }
  .pr-head h1 { font-size: 32px; overflow-wrap: anywhere; }
  .pr-head p { font-size: 16px; }
}
.pr-crumb { font-size: 14px; color: var(--pr-ink-mute); margin-bottom: 18px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-crumb a { color: var(--pr-green); text-decoration: none; }

/* --- Сетка карточек --- */
.pr-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pr-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* --- Карточка товара --- */
.pr-card {
  position: relative;
  background: var(--pr-white);
  border-radius: 12px;
  box-shadow: var(--pr-card-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pr-card:hover { transform: translateY(-3px); box-shadow: var(--pr-card-shadow-hover); }

/* Обёртка картинки карточки — контекст для сердечка (нижний-правый угол). */
.pr-card__media { position: relative; }

/* Сердечко «в избранное» (карточка + PDP). Залив — фирменное золото. */
.pr-fav {
  position: absolute; bottom: 10px; right: 10px; z-index: 3;
  width: 34px; height: 34px; display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 50%; background: rgba(255,255,255,0.92);
  box-shadow: 0 1px 4px rgba(0,0,0,0.18); cursor: pointer; padding: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
.pr-fav svg { width: 19px; height: 19px; fill: none; stroke: var(--pr-house); stroke-width: 2; transition: fill 0.15s ease, stroke 0.15s ease, transform 0.15s ease; }
.pr-fav:hover { background: #fff; }
.pr-fav:active { transform: scale(0.86); }
.pr-fav--on svg { fill: var(--pr-gold); stroke: var(--pr-gold); }
.pr-fav--on { animation: pr-fav-pop 0.28s ease; }
@keyframes pr-fav-pop { 0%{transform:scale(1)} 45%{transform:scale(1.25)} 100%{transform:scale(1)} }
.pr-card__img { position: relative; aspect-ratio: 1/1; text-decoration: none; display: block; overflow: hidden; }
.pr-card__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-card__badges { position: absolute; top: 12px; left: 12px; z-index: 2; display: flex; gap: 6px; }
.pr-card__body { padding: 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pr-card__name { font-size: 16px; font-weight: 600; color: var(--pr-ink); line-height: 1.25; text-decoration: none; }
.pr-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; flex-wrap: wrap; }
.pr-card__price { font-size: 18px; font-weight: 700; color: var(--pr-ink); white-space: nowrap; }
.pr-card__price-old { font-size: 13px; font-weight: 600; color: rgba(0, 0, 0, 0.4); text-decoration: line-through; white-space: nowrap; }
.pr-card__price--sale { color: #c8362f; }
.pr-card__unit { font-size: 12px; color: rgba(0, 0, 0, 0.45); white-space: nowrap; }

.pr-pill-form {
  align-self: flex-start; font-size: 12px; font-weight: 600; color: var(--pr-house);
  background: var(--pr-mint); padding: 4px 12px; border-radius: 50px; text-transform: lowercase;
  display: inline-block; white-space: nowrap;
}
.pr-badge-new { background: var(--pr-green); color: #fff; }
.pr-badge-hit { background: var(--pr-gold); color: var(--pr-house); }
.pr-badge-sale { background: #c8362f; color: #fff; }
.pr-badge-exclusive { background: var(--pr-house); color: #fff; }
.pr-badge-lao { background: #6b4b2a; color: #fff; }
.pr-badge-tag {
  font-family: Manrope, sans-serif; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; padding: 4px 11px; border-radius: 50px;
}
.pr-stars { display: inline-flex; gap: 4px; }
.pr-star {
  font-size: 28px; line-height: 1; color: #ddd; background: none; border: none;
  cursor: pointer; padding: 0; transition: color 0.12s;
}
.pr-star.on { color: var(--pr-gold); }
.pr-btn-sm {
  display: inline-flex; align-items: center; gap: 6px; background: var(--pr-green); color: #fff;
  border: 1px solid var(--pr-green); border-radius: 50px; padding: 9px 18px; font-weight: 600;
  font-size: 14px; cursor: pointer; transition: all 0.2s ease; font-family: inherit;
}
.pr-btn-sm:active { transform: scale(0.95); }
.pr-btn-secondary {
  display: inline-flex; align-items: center; background: #fff; color: var(--pr-green);
  border: 1.5px solid var(--pr-green); border-radius: 50px; padding: 9px 18px; font-weight: 600;
  font-size: 14px; cursor: pointer; text-decoration: none; transition: all 0.2s ease; font-family: inherit;
}
.pr-btn-secondary:hover { background: var(--pr-green); color: #fff; }

/* --- Каталог: layout фильтры + сетка --- */
.pr-layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.pr-side { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 28px; max-height: calc(100vh - 140px); overflow-y: auto; padding-right: 6px; }
.pr-side__head { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--pr-ink-mute); margin-bottom: 12px; }
.pr-side__block { border-top: 1px solid #eee; padding-top: 24px; }
.pr-tree { display: flex; flex-direction: column; }

/* Строка-ссылка (лист без детей) */
.pr-tree__row { display: flex; align-items: center; gap: 8px; border-radius: 8px; padding: 8px 10px; font-size: 15px; text-decoration: none; color: rgba(0,0,0,0.78); transition: background 0.15s ease; }
.pr-tree__row:hover { background: var(--pr-cream); }
.pr-tree__row--active { background: var(--pr-mint); color: var(--pr-house); font-weight: 700; }
.pr-tree__count { font-size: 12px; color: rgba(0,0,0,0.4); font-weight: 500; margin-left: auto; flex-shrink: 0; }
.pr-tree__link { flex: 1; color: inherit; text-decoration: none; }
.pr-tree__row--active .pr-tree__link { color: inherit; }

/* details/summary — родительский узел с детьми */
.pr-tree__details { border: none; }
.pr-tree__details > summary { list-style: none; cursor: pointer; }
.pr-tree__details > summary::-webkit-details-marker { display: none; }
.pr-tree__details > summary.pr-tree__row { display: flex; align-items: center; gap: 8px; }
.pr-tree__arrow { font-size: 11px; color: rgba(0,0,0,0.35); transition: transform 0.18s ease; flex-shrink: 0; }
.pr-tree__details[open] > summary .pr-tree__arrow { transform: rotate(90deg); }
.pr-tree__details[open] > summary { color: var(--pr-house); font-weight: 600; }

/* Дети сдвинуты вправо */
.pr-tree__children { padding-left: 14px; display: flex; flex-direction: column; border-left: 2px solid var(--pr-mint); margin-left: 10px; }
.pr-collect-btn { display: block; width: 100%; text-align: left; cursor: pointer; font-family: inherit; font-size: 15px; border-radius: 8px; padding: 9px 12px; background: #fff; color: rgba(0,0,0,0.78); border: 1px solid #e3e0d8; text-decoration: none; }
.pr-collect-btn--active { background: var(--pr-mint); color: var(--pr-house); border-color: var(--pr-green); font-weight: 700; }

/* Подборки: раскрывающаяся группа с чекбоксами (мультивыбор) */
.pr-filter-group { border: none; }
.pr-filter-summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.pr-filter-summary::-webkit-details-marker { display: none; }
.pr-filter-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pr-green); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.pr-filter-caret { margin-left: auto; color: rgba(0,0,0,0.4); transition: transform .18s ease; }
.pr-filter-group[open] .pr-filter-caret { transform: rotate(180deg); }
.pr-filter-checks { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.pr-check { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 7px 8px; border-radius: 8px; font-size: 15px; color: rgba(0,0,0,0.82); }
.pr-check:hover { background: var(--pr-cream); }
.pr-check input { width: 17px; height: 17px; accent-color: var(--pr-green); cursor: pointer; }

.pr-input { width: 100%; background: #fff; border: 1px solid #d6dbde; border-radius: 4px; padding: 10px 12px; font-size: 15px; font-family: inherit; color: var(--pr-ink); outline: none; }
.pr-input:focus { border-color: var(--pr-green); }
.pr-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.pr-search-input { width: 100%; background: #fff; border: 1px solid #d6dbde; border-radius: 50px; padding: 13px 18px 13px 42px; font-size: 15px; font-family: inherit; color: var(--pr-ink); outline: none; }
.pr-search-go { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: none; border-radius: 50%; background: var(--pr-green); color: #fff; cursor: pointer; padding: 0; }
.pr-search-go:active { transform: translateY(-50%) scale(0.92); }
.pr-search-input:focus { border-color: var(--pr-green); }
.pr-sort { flex: none; background: #fff; border: 1px solid #d6dbde; border-radius: 50px; padding: 13px 18px; font-size: 15px; font-weight: 600; font-family: inherit; color: var(--pr-ink); cursor: pointer; outline: none; }

/* Строка результатов + переключатель количества */
.pr-results { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.pr-perpage { display: inline-flex; align-items: center; gap: 6px; }
.pr-perpage__lbl { font-size: 13px; color: rgba(0,0,0,0.5); margin-right: 4px; }
.pr-perpage__opt { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 7px 10px; border: 1px solid #d6dbde; border-radius: 50px; font-size: 14px; font-weight: 600; color: var(--pr-ink); text-decoration: none; transition: all .15s ease; }
.pr-perpage__opt:hover { border-color: var(--pr-green); }
.pr-perpage__opt--active { background: var(--pr-house); border-color: var(--pr-house); color: #fff; }
/* --- Переключатель «товаров в ряд» (каталог, только мобилка) --- */
.pr-results__ctl { display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
.pr-cols-toggle { display: none; }   /* на десктопе сетка 3-кол, переключатель не нужен */
@media (max-width: 767px) {
  /* Сегментированный контрол: одна рамка, две секции с разделителем внутри */
  .pr-cols-toggle { display: inline-flex; border: 1px solid #d6dbde; border-radius: 9px; overflow: hidden; }
  .pr-cols-opt { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 34px; border: none; background: #fff; color: rgba(0,0,0,0.45); cursor: pointer; padding: 0; transition: background .15s ease, color .15s ease; }
  .pr-cols-opt + .pr-cols-opt { border-left: 1px solid #d6dbde; }
  .pr-cols-opt--active { background: var(--pr-house); color: #fff; }
}
/* Сетку по data-cols держим ≥320px, чтобы не ломать sub-320 (там всегда 1 колонка) */
@media (min-width: 320px) and (max-width: 767px) {
  .pr-grid[data-cols="1"] { grid-template-columns: 1fr; }
  .pr-grid[data-cols="2"] { grid-template-columns: repeat(2, 1fr); }
}

/* Пагинация */
.pr-pager { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 40px; }
.pr-pager__pg, .pr-pager__cur, .pr-pager__nav { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 50px; font-size: 15px; font-weight: 600; text-decoration: none; }
.pr-pager__pg { color: var(--pr-ink); border: 1px solid #d6dbde; }
.pr-pager__pg:hover { border-color: var(--pr-green); }
.pr-pager__cur { background: var(--pr-house); color: #fff; }
.pr-pager__gap { color: rgba(0,0,0,0.4); padding: 0 4px; }
.pr-pager__nav { color: var(--pr-house); border: 1px solid var(--pr-house); }
.pr-pager__nav:hover { background: var(--pr-mint); }
.pr-pager__nav--off { color: rgba(0,0,0,0.3); border-color: #e7e7e7; }

/* --- PDP --- */
.pr-pdp { display: flex; gap: 56px; align-items: flex-start; }
.pr-pdp__col { width: calc(50% - 28px); flex: none; }
.pr-pdp__gallery { position: relative; aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; box-shadow: var(--pr-card-shadow); cursor: zoom-in; }
.pr-pdp__gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Характеристики + Профиль вкуса */
.pr-charcols { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.pr-charcols--single { grid-template-columns: 1fr; max-width: 620px; }
.pr-charcols .val { text-align: right; overflow-wrap: anywhere; }

/* Лайтбокс */
.pdp-lb { position: fixed; inset: 0; z-index: 200; background: rgba(30,57,50,.96);
  display: none; align-items: center; justify-content: center; overscroll-behavior: contain; }
.pdp-lb:not([hidden]) { display: flex; }
.pdp-lb__track { display: flex; width: 100%; height: 100%; transition: transform .25s ease; touch-action: pan-y; }
.pdp-lb__track img { min-width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.pdp-lb__close { position: absolute; top: 16px; right: 16px; width: 44px; height: 44px; border: none; border-radius: 50%;
  background: rgba(255,255,255,.15); color: #fff; font-size: 26px; cursor: pointer; display: flex; align-items: center; justify-content: center; z-index: 10; }
.pdp-lb__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border: none;
  border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; font-size: 30px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; z-index: 10; }
.pdp-lb__prev { left: 12px; }
.pdp-lb__next { right: 12px; }
.pdp-lb__dots { position: absolute; bottom: 20px; left: 0; right: 0; display: flex; gap: 8px; justify-content: center; }
.pdp-lb__dots i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); display: block; }
.pdp-lb__dots i.on { background: #fff; }
.pr-stock-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; letter-spacing: 0.3px; padding: 5px 14px; border-radius: 50px; margin-bottom: 18px; }
.pr-stock--available { background: var(--pr-mint); color: var(--pr-house); }
.pr-stock--partial { background: #fef3e2; color: #b7791f; }
.pr-stock--soldout { background: #fde8e8; color: #c0392b; }
.pr-weight { display: flex; flex-direction: column; align-items: center; gap: 8px; background: #fff; border: none; padding: 0; font-family: inherit; cursor: pointer; }
.pr-weight[disabled] { opacity: 0.5; cursor: not-allowed; }
.pr-weight__circle { width: 72px; height: 72px; border-radius: 50%; border: 2px solid #e7e7e7; display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; background: #f9f9f9; transition: border 0.15s ease; }
.pr-weight--active .pr-weight__circle { border-color: var(--pr-green); color: var(--pr-green); }
.pr-weight--off .pr-weight__price { text-decoration: line-through; color: rgba(0,0,0,0.3); }
.pr-chartable { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid #e7e7e7; }
.pr-chartable__k { font-size: 15px; color: var(--pr-ink-mute); }
.pr-chartable__v { font-size: 15px; font-weight: 600; color: var(--pr-ink); text-align: right; }

/* --- Search overlay --- */
.pr-search-overlay[hidden] { display: none; }
.pr-search-backdrop { position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.42); }
.pr-search-panel { position: fixed; top: 0; left: 0; right: 0; z-index: 101; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18); }
.pr-search-row { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-radius: 10px; text-decoration: none; border-bottom: 1px solid #f0f0f0; }
.pr-search-row:hover { background: #f9f9f9; }

/* --- Аккаунт: Auth, Profile, Orders --- */
/* Tabs */
.pr-auth-tabs { display: flex; gap: 6px; background: #e7e3da; border-radius: 50px; padding: 5px; margin-bottom: 28px; }
.pr-auth-tab { flex: 1; text-align: center; border: none; cursor: pointer; font-size: 15px; font-weight: 600; padding: 11px; border-radius: 50px; text-decoration: none; color: rgba(0,0,0,0.55); transition: all .2s ease; }
.pr-auth-tab--active { background: #fff; color: var(--pr-house); box-shadow: 0 1px 4px rgba(0,0,0,0.14); }

/* Auth card */
.pr-authcard { background: #fff; border-radius: 12px; box-shadow: 0 0 0.5px rgba(0,0,0,0.14), 0 1px 1px rgba(0,0,0,0.24); padding: 36px 34px; }
.pr-authcard h1 { font-size: 28px; font-weight: 700; color: var(--pr-house); margin: 0 0 6px; }
.pr-authcard p { font-size: 15px; color: rgba(0,0,0,0.58); margin: 0 0 26px; }
.pr-auth-fields { display: flex; flex-direction: column; gap: 16px; }

/* OAuth button */
.pr-oauth-btn { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; background: #fff; border: 1px solid #d6dbde; border-radius: 50px; padding: 13px; font-size: 15px; font-weight: 600; color: rgba(0,0,0,0.87); text-decoration: none; transition: border-color .2s; box-sizing: border-box; }
.pr-oauth-btn:hover { border-color: var(--pr-green); }
.pr-oauth-icon { width: 24px; height: 24px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; flex: none; }

/* Field helpers */
.pr-field-label { display: block; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; color: var(--pr-ink); margin-bottom: 7px; }
.pr-field-error { font-size: 13px; color: #c0392b; margin-top: 4px; }
.pr-form-error { background: #fdecea; border: 1px solid #f5c6cb; border-radius: 8px; padding: 10px 14px; font-size: 14px; color: #8b1a1a; margin-bottom: 16px; }
.pr-alert { border-radius: 8px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.pr-alert--success { background: #d4e9e2; color: var(--pr-house); }

/* Auth inputs inherit from checkout */
.pr-authcard input[type="text"],
.pr-authcard input[type="email"],
.pr-authcard input[type="password"],
.pr-authcard input[type="tel"] { width: 100%; box-sizing: border-box; border: 1.5px solid #d6dbde; border-radius: 6px; padding: 13px 14px; font-size: 16px; font-family: inherit; color: var(--pr-ink); background: #fff; outline: none; transition: border-color .15s; }
.pr-authcard input:focus { border-color: var(--pr-green); }

/* Avatar */
.pr-avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--pr-house); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; flex: none; }

/* Account layout */
.pr-acc { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.pr-acc__side { position: sticky; top: 120px; display: flex; flex-direction: column; gap: 4px; }
.pr-acc__nav { display: flex; align-items: center; gap: 12px; text-decoration: none; border: none; background: none; font-family: inherit; font-size: 15px; font-weight: 500; padding: 13px 16px; border-radius: 10px; color: rgba(0,0,0,0.7); cursor: pointer; transition: background .15s; width: 100%; text-align: left; }
.pr-acc__nav:hover { background: var(--pr-cream); }
.pr-acc__nav--active { background: var(--pr-mint); color: var(--pr-house); font-weight: 700; }
.pr-acc__nav--logout { color: rgba(0,0,0,0.45); }
.pr-acc__title { font-size: 24px; font-weight: 700; color: var(--pr-ink); margin: 0 0 24px; }

/* Profile form */
.pr-profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 680px; }
.pr-profile-grid input { width: 100%; box-sizing: border-box; border: 1.5px solid #d6dbde; border-radius: 6px; padding: 13px 14px; font-size: 15px; font-family: inherit; color: var(--pr-ink); background: #fff; outline: none; transition: border-color .15s; }
.pr-profile-grid input:focus { border-color: var(--pr-green); }
.pr-profile-actions { display: flex; gap: 12px; margin-top: 24px; }

/* Orders accordion */
.pr-order { border: 1px solid #e7e7e7; border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.pr-order[open] { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.pr-order__head { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 16px; padding: 18px 20px; }
.pr-order__head::-webkit-details-marker { display: none; }
.pr-order__meta { display: flex; align-items: center; gap: 12px; flex: 1; flex-wrap: wrap; }
.pr-order__num { font-weight: 700; font-size: 15px; color: var(--pr-house); }
.pr-order__date { font-size: 13px; color: rgba(0,0,0,0.5); }
.pr-order__badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 50px; }
.pr-order__badge--new { background: #d4e9e2; color: var(--pr-house); }
.pr-order__badge--paid { background: #cff4d2; color: #155724; }
.pr-order__badge--in_transit { background: #fff3cd; color: #856404; }
.pr-order__badge--delivered { background: #d4e9e2; color: var(--pr-house); }
.pr-order__badge--cancelled { background: #f8d7da; color: #842029; }
.pr-order__total { font-size: 17px; font-weight: 700; flex: none; }
.pr-order__arrow { font-size: 11px; color: rgba(0,0,0,0.35); transition: transform .18s; flex: none; }
.pr-order[open] .pr-order__arrow { transform: rotate(90deg); }
.pr-order__body { padding: 0 20px 20px; border-top: 1px solid #f0f0f0; }
.pr-order__line { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f5f5f5; }
.pr-order__summary { margin-top: 14px; padding-top: 14px; border-top: 1px solid #ebebeb; }
.pr-order__sumrow { display: flex; justify-content: space-between; font-size: 14px; color: rgba(0,0,0,0.6); padding: 4px 0; }
.pr-order__sumrow--total { font-size: 16px; font-weight: 700; color: var(--pr-ink); border-top: 1px solid #e7e7e7; margin-top: 8px; padding-top: 10px; }

/* --- Корзина и Checkout --- */
.pr-cart { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }
.pr-cart__back { display: inline-flex; align-items: center; gap: 8px; margin-top: 24px; color: var(--pr-green); text-decoration: none; font-weight: 600; font-size: 15px; }

/* Строка корзины */
.pr-line { display: flex; align-items: center; gap: 20px; padding: 22px 0; border-bottom: 1px solid #e7e7e7; }
.pr-line__img { flex: none; width: 96px; height: 96px; border-radius: 12px; overflow: hidden; }
.pr-line__img img { width: 100%; height: 100%; object-fit: cover; }
.pr-line__info { flex: 1; min-width: 0; }
.pr-line__name { font-size: 17px; font-weight: 600; color: var(--pr-ink); text-decoration: none; display: block; margin-bottom: 8px; }
.pr-line__name:hover { color: var(--pr-green); }
.pr-line__total { flex: none; width: 110px; text-align: right; font-size: 17px; font-weight: 700; color: var(--pr-ink); }
.pr-line__del { flex: none; background: none; border: none; cursor: pointer; color: rgba(0,0,0,0.32); padding: 6px; display: flex; transition: color 0.15s; }
.pr-line__del:hover { color: var(--pr-green); }

/* Степпер */
.pr-stepper { display: flex; align-items: center; gap: 10px; flex: none; }
.pr-stepper__btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid #d6dbde; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; color: rgba(0,0,0,0.7); transition: border-color 0.15s, color 0.15s; }
.pr-stepper__btn:hover:not(:disabled) { border-color: var(--pr-green); color: var(--pr-green); }
.pr-stepper__btn:disabled { opacity: 0.38; cursor: not-allowed; }
.pr-stepper__qty { font-size: 16px; font-weight: 700; min-width: 22px; text-align: center; }

/* Итого (корзина + checkout) */
.pr-cart__summary { background: #f9f9f9; border-radius: 12px; box-shadow: 0 0 0.5px rgba(0,0,0,0.14), 0 1px 1px rgba(0,0,0,0.24); padding: 28px; }
.pr-cart__summary h2 { font-size: 20px; font-weight: 700; color: var(--pr-ink); margin: 0 0 20px; }
.pr-summary__row { display: flex; justify-content: space-between; font-size: 15px; color: rgba(0,0,0,0.58); padding: 8px 0; }
.pr-summary__row span:last-child { font-weight: 600; color: var(--pr-ink); }
.pr-summary__divider { height: 1px; background: rgba(0,0,0,0.1); margin: 14px 0; }
.pr-summary__total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0 22px; font-size: 17px; font-weight: 700; color: var(--pr-ink); }

/* Checkout layout */
.pr-checkout { display: grid; grid-template-columns: 1fr 380px; gap: 48px; align-items: start; }
.pr-checkout > * { min-width: 0; }   /* не даём грид-колонкам распирать контейнер */
.pr-checkout input[type="text"], .pr-checkout input[type="email"], .pr-checkout textarea { width: 100%; box-sizing: border-box; border: 1.5px solid #d6dbde; border-radius: 8px; padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--pr-ink); background: #fff; outline: none; transition: border-color 0.15s; }
.pr-checkout input:focus, .pr-checkout textarea:focus { border-color: var(--pr-green); }

/* --- Главная: герой / категории / чай месяца (адаптив) --- */
.pr-hero { max-width: var(--pr-max); margin: 0 auto; display: flex; align-items: center; gap: 56px; padding: 80px 40px 96px; }
.pr-hero__text { width: calc(42% - 28px); flex: none; }
.pr-hero__media { width: calc(58% - 28px); flex: none; }
.pr-hero__text h1 { font-size: 56px; }
.pr-hero__text p { font-size: 19px; }
.pr-hero__img { display: block; width: 100%; height: 480px; object-fit: cover; object-position: center;
  border-radius: 12px; box-shadow: var(--pr-card-shadow); }

.pr-cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; }
.pr-cat {
  text-decoration: none; background: #fff; border-radius: 12px; box-shadow: var(--pr-card-shadow);
  padding: 18px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px;
}
.pr-cat__ic { width: 60px; height: 60px; border-radius: 50%; overflow: hidden; flex: none; }
.pr-cat__ic svg, .pr-cat__ic img { width: 100%; height: 100%; display: block; object-fit: cover; }
.pr-cat__name { font-size: 17px; font-weight: 600; color: var(--pr-ink); }

.pr-tom { max-width: var(--pr-max); margin: 0 auto; display: grid; grid-template-columns: 42% 58%;
  grid-template-areas: "head media" "body media"; align-items: center; padding: 0; }
.pr-tom__head { grid-area: head; padding: 72px 56px 0 0; }
.pr-tom__body { grid-area: body; padding: 16px 56px 72px 0; }
.pr-tom__media { grid-area: media; min-height: 440px; display: block; position: relative;
  overflow: hidden; align-self: stretch; }
.pr-tom__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* Бургер + мобильное меню */
.pr-burger { display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; padding: 8px; background: none; border: none; cursor: pointer; }
.pr-burger span { display: block; height: 2px; border-radius: 2px; background: var(--pr-ink); transition: 0.2s; }
.pr-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.pr-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.pr-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.pr-mobmenu { display: none; }

/* --- Страницы allauth (сброс пароля, подтверждение e-mail и т.п.) --- */
.pr-allauth { background: #fff; border-radius: 14px; box-shadow: var(--pr-card-shadow); padding: 32px; }
.pr-allauth h1 { font-size: 26px; font-weight: 700; color: var(--pr-green-dark); margin: 0 0 12px; }
.pr-allauth p { font-size: 15px; line-height: 1.6; color: var(--pr-ink-mute); margin: 0 0 16px; }
.pr-allauth label { display: block; font-size: 14px; font-weight: 600; color: var(--pr-ink); margin-bottom: 6px; }
.pr-allauth input[type="text"], .pr-allauth input[type="email"],
.pr-allauth input[type="password"] {
  width: 100%; box-sizing: border-box; border: 1.5px solid #d6dbde; border-radius: 8px;
  padding: 12px 14px; font-size: 15px; font-family: inherit; color: var(--pr-ink);
  background: #fff; outline: none; transition: border-color 0.15s;
}
.pr-allauth input:focus { border-color: var(--pr-green); }
.pr-allauth button, .pr-allauth button[type="submit"], .pr-allauth [type="submit"] {
  display: inline-flex; align-items: center; justify-content: center; width: 100%;
  margin-top: 20px; background: var(--pr-green); color: #fff; border: 1px solid var(--pr-green);
  border-radius: 50px; padding: 14px 22px; font-weight: 600; font-size: 16px;
  font-family: inherit; cursor: pointer; transition: background 0.2s;
}
.pr-allauth button:hover { background: var(--pr-green-dark); }
.pr-allauth a { color: var(--pr-green); font-weight: 600; text-decoration: none; }
.pr-allauth a:hover { text-decoration: underline; }
.pr-allauth ul { list-style: none; padding: 0; margin: 6px 0 0; }
.pr-allauth ul li { font-size: 13px; color: #c0392b; }
.pr-allauth form > p, .pr-allauth form > div { margin: 0 0 14px; }
.pr-allauth__msgs { margin-bottom: 16px; }
.pr-allauth__msg { background: var(--pr-mint); color: var(--pr-house); border-radius: 10px;
  padding: 12px 16px; font-size: 14px; margin-bottom: 8px; }

/* --- Responsive (из макетов) --- */
@media (max-width: 1023px) {
  .pr-layout { grid-template-columns: 1fr; }
  .pr-side { position: static; max-height: none; overflow: visible; padding-right: 0; }
}
@media (max-width: 899px) {
  .pr-pdp { flex-direction: column; }
  .pr-pdp__col { width: 100% !important; }
  .pr-charcols { grid-template-columns: 1fr !important; gap: 40px !important; }
}
@media (max-width: 1023px) {
  .pr-nav { height: 83px; }
  /* Десктоп-меню не влезает на планшетах портрет (iPad Mini 768 и т.п.) —
     переключаемся на бургер уже с планшета. */
  .pr-navlinks { display: none; }
  .pr-burger { display: flex; }
  .pr-mobmenu { display: block; position: absolute; top: 100%; left: 0; right: 0;
    background: #fff; box-shadow: var(--pr-card-shadow); border-top: 1px solid #eee; z-index: 60; }
  .pr-mobmenu[hidden] { display: none; }
  .pr-mobmenu a { display: block; padding: 15px 24px; font-size: 16px; font-weight: 500;
    color: var(--pr-ink); text-decoration: none; border-bottom: 1px solid #f3f3f3; }
  /* Корзина/оформление/аккаунт — одна колонка уже с планшета: боковая сводка
     380px (и сайдбар аккаунта) не помещались, блок «Итого» вылезал вправо. */
  .pr-checkout { grid-template-columns: 1fr; }
  .pr-cart, .pr-acc { grid-template-columns: minmax(0, 1fr); }
  .pr-acc > * { min-width: 0; }
  .pr-acc__side { position: static; flex-direction: row; flex-wrap: wrap; }
  .pr-cart__summary { position: static !important; }
  /* Узкие карточки (планшет 4-кол / мобильный 2-кол): подвал в колонку,
     цена сверху, кнопка на всю ширину — ничего не разъезжается. */
  .pr-card__foot { flex-direction: column; align-items: stretch; gap: 10px; }
  .pr-card__foot > button { width: 100%; justify-content: center; }
}
@media (max-width: 767px) {
  .pr-nav { height: 72px; }
  /* Герой: колонкой, фото после текста, компактнее */
  .pr-hero { flex-direction: column; align-items: stretch; gap: 28px; padding: 28px 24px 48px; }
  .pr-hero__text, .pr-hero__media { width: 100%; }
  .pr-hero__media { order: -1; }   /* фото — в самый верх над текстом */
  .pr-hero__text h1 { font-size: 34px; }
  .pr-hero__text p { font-size: 16px; margin-bottom: 28px; }
  .pr-hero__btn { display: inline-flex; }
  .pr-hero__img { height: 240px; }
  /* Категории: по 3 в ряд, компактные плашки */
  .pr-cats { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .pr-cat { padding: 14px 10px; gap: 10px; align-items: center; text-align: center; }
  .pr-cat__ic { width: 46px; height: 46px; }
  .pr-cat__name { font-size: 13px; line-height: 1.25; }
  /* Чай месяца: название → фото (уменьшенное) → описание */
  .pr-tom { grid-template-columns: 1fr; grid-template-areas: "head" "media" "body"; }
  .pr-tom__head { padding: 36px 24px 14px; }
  .pr-tom__head h2 { font-size: 28px; }
  .pr-tom__media { min-height: 200px; border-radius: 12px; margin: 0 24px; }
  .pr-tom__body { padding: 16px 24px 40px; }
  .pr-container, .pr-nav__inner { padding: 0 24px; }
  /* PDP: текст влево, фото full-bleed */
  .pr-pdp__col, .pr-pdp__col h1, .pr-pdp__col p { text-align: left; }
  .pr-pdp__gallery { width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; }
  .pr-foot-grid { grid-template-columns: 1fr 1fr; }
  .pr-grid, .pr-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .pr-toolbar { flex-direction: column; align-items: stretch; }
  .pr-profile-grid { grid-template-columns: 1fr; }
  .pr-line { flex-wrap: wrap; }
  .pr-line__info { order: 1; width: calc(100% - 116px); }
  .pr-line__img { order: 0; }
  .pr-stepper { order: 3; }
  .pr-line__total { order: 4; }
  .pr-line__del { order: 2; }
}
@media (max-width: 479px) {
  .pr-nav { height: 64px; }
  .pr-container, .pr-nav__inner { padding: 0 16px; }
  /* Узкие экраны (360px и уже): компактная шапка, чтобы не было гориз. прокрутки */
  .pr-nav__inner { gap: 12px; }
  .pr-nav__logo img { height: 52px; }
  .pr-nav__icons { gap: 12px; }
  .pr-nav__icons a { padding: 4px; }
  .pr-foot-grid { grid-template-columns: 1fr; }
  /* Карточки товара — по 2 в ряд даже на узких экранах (компактнее) */
  .pr-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .pr-grid--3 { grid-template-columns: 1fr; }
  .pr-cats { grid-template-columns: repeat(3, 1fr); }
  .pr-tom__media { margin: 0 16px; }
}
@media (max-width: 319px) {
  /* Экстрим-узкие (обложка складных, напр. Galaxy Fold 280px): 2 плитки в ряд,
     плотнее шапка — чтобы не было горизонтальной прокрутки. */
  .pr-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pr-grid { grid-template-columns: 1fr; }
  .pr-nav__logo img { height: 44px; }
  .pr-nav__icons { gap: 10px; }
  .pr-nav__icons a { padding: 3px; }
}

/* ============================================================
   Быстрое добавление в корзину (поповер / боттом-шит) + тост
   Токены — DESIGN-starbucks.md (Green Accent #00754A, 50px пилюли).
   ============================================================ */

/* счётчик на плавающей Frap-кнопке */
.pr-frap { position: fixed; }
.pr-frap__count {
  position: absolute; top: -2px; right: -2px;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--pr-gold); color: var(--pr-house);
  font-size: 11px; font-weight: 700; line-height: 20px; text-align: center;
  border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,0.24);
}
.pr-frap__count[hidden] { display: none; }
.pr-badge[hidden] { display: none; }

/* контейнер окна: мобайл — боттом-шит снизу */
.qa-sheet { position: fixed; inset: 0; z-index: 120; display: none; }
.qa-sheet.open { display: block; }
.qa-sheet__overlay { position: absolute; inset: 0; background: rgba(30,57,50,.4); }
.qa-sheet__panel {
  position: absolute; left: 0; right: 0; bottom: 0; background: #fff;
  border-radius: 16px 16px 0 0; padding: 18px 18px 24px; max-height: 80vh; overflow: auto;
  box-shadow: 0 -6px 24px rgba(0,0,0,.18);
  transform: translateY(0); transition: transform .22s ease;
}
.qa-sheet.closing .qa-sheet__panel { transform: translateY(100%); }
.qa-sheet__handle { width: 40px; height: 4px; border-radius: 2px; background: #d6dbde; margin: 0 auto 14px; }
.qa-sheet__title { font-size: 13px; font-weight: 600; color: var(--pr-ink-mute); margin-bottom: 14px; }
.qa-sheet__pills { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.qa-sheet__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.qa-sheet__price { font-size: 20px; font-weight: 700; color: var(--pr-ink); }

.qa-pill {
  border: 1px solid #d6dbde; background: #fff; border-radius: 50px; padding: 9px 16px;
  font: 600 14px Manrope, sans-serif; color: var(--pr-ink); cursor: pointer; transition: all .15s ease;
}
.qa-pill small { font-weight: 500; color: var(--pr-ink-mute); margin-left: 6px; }
.qa-pill.sel { background: var(--pr-green); border-color: var(--pr-green); color: #fff; }
.qa-pill.sel small { color: rgba(255,255,255,.8); }

.qa-stepper { display: flex; align-items: center; gap: 14px; }
.qa-step {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--pr-green);
  background: #fff; color: var(--pr-green); font-size: 20px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; font-family: inherit;
}
.qa-step:disabled { border-color: #e7e7e7; color: rgba(0,0,0,.38); cursor: default; }
.qa-step__val { font-size: 18px; font-weight: 700; min-width: 22px; text-align: center; }

.qa-add {
  width: 100%; background: var(--pr-green); color: #fff; border: none; border-radius: 50px;
  padding: 14px; font: 600 16px Manrope, sans-serif; cursor: pointer; transition: transform .1s ease;
}
.qa-add:active { transform: scale(.98); }
.qa-add:disabled { background: #cfd4d7; cursor: not-allowed; }

/* десктоп — поповер вместо нижнего листа */
@media (min-width: 768px) {
  .qa-sheet__overlay { background: rgba(30,57,50,.18); }
  .qa-sheet__panel {
    position: absolute; left: auto; right: auto; bottom: auto; width: 300px;
    border-radius: 12px; box-shadow: 0 8px 24px rgba(0,0,0,.18); max-height: none;
    transition: opacity .15s ease;
  }
  .qa-sheet.closing .qa-sheet__panel { transform: none; opacity: 0; }
  .qa-sheet__handle { display: none; }
}

/* кнопка карточки: краткий фидбек «Добавлено ✓» */
.pr-btn-sm.is-added, .pr-btn.is-added { background: var(--pr-house); border-color: var(--pr-house); }
.pr-btn-sm[disabled] { background: #cfd4d7; border-color: #cfd4d7; cursor: not-allowed; }

/* тост */
.qa-toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%) translateY(12px);
  background: var(--pr-house); color: #fff; padding: 12px 22px; border-radius: 50px;
  font: 600 15px Manrope, sans-serif; box-shadow: 0 8px 24px rgba(0,0,0,.22);
  z-index: 130; opacity: 0; transition: opacity .2s ease, transform .2s ease; pointer-events: none;
}
.qa-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.qa-toast.err { background: #c0392b; }

/* Плашка «техническая отладка» (каталог/корзина) */
.pr-maint {
  display: flex; align-items: flex-start; gap: 12px;
  max-width: 1180px; margin: 18px auto 0; padding: 14px 20px;
  background: #fff7e6; border: 1px solid #f0c674; border-left: 4px solid #e0a800;
  border-radius: 12px; color: #7a5a00;
  font-size: 15px; font-weight: 600; line-height: 1.45;
}
.pr-maint svg { margin-top: 1px; color: #e0a800; }
@media (max-width: 1220px) { .pr-maint { margin-left: 20px; margin-right: 20px; } }

/* Вкладки «Обзоры / Отзывы» на карточке товара + сокращённая карточка обзора */
.pr-tabs { display: flex; gap: 22px; border-bottom: 2px solid #eee; margin-bottom: 26px; }
.pr-tab { appearance: none; background: none; border: none; font-family: inherit; font-size: 22px; font-weight: 400; color: rgba(0,0,0,0.4); padding: 6px 2px 12px; margin-bottom: -2px; border-bottom: 2px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; transition: color .15s; }
.pr-tab:hover { color: rgba(0,0,0,0.7); }
.pr-tab.is-active { color: var(--pr-house); border-bottom-color: var(--pr-green); }
.pr-tab__n { font-size: 12px; font-weight: 700; color: #fff; background: var(--pr-green); border-radius: 50px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; }
.pr-tab:not(.is-active) .pr-tab__n { background: #cfcfcf; }
.pr-obzor { background: var(--pr-cream); border-radius: 12px; padding: 22px; overflow: hidden; }
.pr-obzor__text { margin: 12px 0 0; font-size: 14px; line-height: 1.6; color: rgba(0,0,0,0.7); overflow-wrap: anywhere; }
.pr-obzor__more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 600; color: var(--pr-green); text-decoration: none; }
.pr-obzor__more:hover { text-decoration: underline; }
.pr-obzor-chip { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: rgba(0,0,0,0.7); background: var(--pr-cream); padding: 7px 14px; border-radius: 50px; }
/* Обзор дегустации: сетки шкал/баров — 2 колонки, на узких экранах 1 (без переполнения) */
.pr-obzor-scales { display: grid; grid-template-columns: 1fr 1fr; }
.pr-obzor-bars { display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 600px) { .pr-obzor-scales, .pr-obzor-bars { grid-template-columns: 1fr; } }

/* Лента обзоров: сетка + блок товара-драйвера покупки внутри карточки */
.pr-obzor-feed { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }
.pr-obzor__prod { display: flex; align-items: center; gap: 12px; text-decoration: none; background: #fff; border-radius: 10px; padding: 10px; margin-bottom: 14px; }
.pr-obzor__thumb { flex: none; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; background: var(--pr-cream); display: block; }
.pr-obzor__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pr-obzor__prodinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-obzor__prodname { font-size: 14px; font-weight: 700; color: var(--pr-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-obzor__prodprice { font-size: 13px; color: var(--pr-green); font-weight: 600; margin-top: 2px; }
.pr-obzor__prodgo { flex: none; font-size: 13px; font-weight: 600; color: var(--pr-green); }

/* «С этим чаем берут» / «Сопутствующие товары»: десктоп — статичный ряд из 4,
   планшет/мобилка — карусель со снапом (см. JS data-carousel в product_detail.html). */
.pr-rel { position: relative; }
.pr-rel__track { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.pr-rel__item { min-width: 0; }
.pr-rel__nav {
  /* top ~30% — центр квадратного фото карточки (aspect-ratio:1/1), а не всей
     карточки, иначе стрелка на границе фото/текста перекрывает сердечко
     избранного (bottom:10px справа на фото). */
  position: absolute; top: 30%; transform: translateY(-50%); z-index: 3;
  width: 44px; height: 44px; border: 2px solid #fff; border-radius: 50%;
  background: var(--pr-green); color: #fff;
  box-shadow: 0 0 6px rgba(0,0,0,0.24), 0 8px 12px rgba(0,0,0,0.18);
  display: none; align-items: center; justify-content: center;
  cursor: pointer; font-size: 24px; line-height: 1; padding: 0;
  transition: background 0.15s ease, transform 0.15s ease;
}
.pr-rel__nav:hover { background: var(--pr-house); }
.pr-rel__nav:active { transform: translateY(-50%) scale(0.9); }
.pr-rel__nav.is-hidden { display: none; }
.pr-rel__prev { left: 8px; }
.pr-rel__next { right: 8px; }

@media (max-width: 1023px) {
  /* Планшет, широкий: 3 карточки в кадре */
  .pr-rel__track {
    display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-bottom: 2px;
  }
  .pr-rel__track::-webkit-scrollbar { display: none; }
  .pr-rel__item { flex: 0 0 auto; width: calc((100% - 40px) / 3); scroll-snap-align: start; }
  .pr-rel__nav { display: flex; }
}
@media (max-width: 899px) {
  /* Планшет, узкий: 2 карточки в кадре */
  .pr-rel__track { gap: 16px; }
  .pr-rel__item { width: calc((100% - 16px) / 2); }
}
@media (max-width: 767px) {
  /* Мобилка: 1 карточка на весь экран + край следующей — понятно, что список листается */
  .pr-rel__track { gap: 14px; }
  .pr-rel__item { width: 80%; }
}
@media (max-width: 767px) { .pr-obzor-feed { grid-template-columns: 1fr; } }
