/* Аркона — карточка товара (single-product). Выверено по товар1.pdf / товар2.pdf.
   Переиспользует токены и .container/.btn/.ph из tokens.css/base.css. */

/* ---------- ХЛЕБНЫЕ КРОШКИ ---------- */
.crumbs {
  padding-top: 28px;
}
.crumbs .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-nav);
  color: var(--ink-muted);
}
.crumbs a { color: var(--ink-muted); }
.crumbs a:hover { color: var(--ink); }
.crumbs__sep { color: var(--ink-soft); }
.crumbs__current { color: var(--ink); }

/* ---------- ОБЩАЯ СЕКЦИЯ ТОВАРА ---------- */
.product {
  padding-top: 34px;
  padding-bottom: 72px;
}
.product__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--col-gap);
  align-items: start;
}
/* грид-дети не должны растягиваться под длинные неразрывные слова */
.product__gallery,
.product__info { min-width: 0; }
.product__short,
.product__desc,
.product__title,
.acc__inner,
.pcard__name { overflow-wrap: break-word; }

/* ---------- ГАЛЕРЕЯ ---------- */
.product__stage {
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--placeholder);
  border-radius: 0;            /* фото без скруглений */
  overflow: hidden;
}
.product__stage .ph { border-radius: 0; }
.product__stage-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product__thumbs {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.product__thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  background: var(--placeholder);
  border: 1px solid transparent;
  border-radius: 0;            /* фото без скруглений */
  overflow: hidden;
  cursor: pointer;
  transition: border-color .2s var(--ease);
}
.product__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product__thumb:hover { border-color: var(--line-strong); }
.product__thumb.is-active { border-color: var(--ink); }

/* ---------- ИНФОРМАЦИЯ ---------- */
.product__title {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0;
  color: var(--ink);
}
.product__price {
  margin-top: 22px;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
}
/* Макет «цена2»: новая цена 24 SemiBold 2C2C2C, старая 18.7 Regular 999999 зачёркнута,
   стоит СПРАВА от новой на расстоянии 23.6. WooCommerce печатает <del> первым,
   поэтому меняем местами через order. */
.product__price {
  display: flex;
  align-items: baseline;
  gap: 23.6px;
  flex-wrap: wrap;
}
.product__price .amount,
.product__price bdi { font-weight: 600; }
.product__price ins {
  order: 1;
  text-decoration: none;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
}
.product__price del {
  order: 2;
  margin: 0;
  font-size: 18.7px;
  font-weight: 400;
  color: #999999;
  text-decoration: line-through;
  text-decoration-color: #999999;
}
.product__price del .amount,
.product__price del bdi { font-weight: 400; }

/* Количество + степпер */
.product__buy { margin-top: 30px; }
/* Эталон из макета «товар1»: подпись 12.7px обычным начертанием цветом 2C2C2C,
   кнопки 30x30 БЕЗ скруглений, между ними поле шириной 50.
   «−» неактивна при количестве 1: фон F5F5F5, знак 999999.
   «+» активна: фон ECECEC, знак 2C2C2C размером 18.7. */
.product__qty-label {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 22px;
}
.qty {
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.qty__btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: var(--ink);
  background: #ECECEC;
  border-radius: 0;
  transition: background-color .2s var(--ease), color .2s var(--ease);
}
.qty__btn:hover { background: #E2E2E2; }
.qty__btn[disabled],
.qty__btn.is-off { background: #F5F5F5; color: #999999; cursor: default; }
.qty__input {
  width: 50px;
  height: 30px;
  text-align: center;
  border: 0;
  background: none;
  font-size: var(--fs-base);
  font-weight: 500;
  color: var(--ink);
  -moz-appearance: textfield;
}
.qty__input::-webkit-outer-spin-button,
.qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* Кнопка + избранное */
.product__actions {
  margin-top: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.product__addcart {
  min-height: 44px;
  padding-inline: 28px;
  text-transform: uppercase;
  letter-spacing: var(--ls-wide);
}
.btn-fav {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex: none;
  color: var(--ink);
  border-radius: var(--radius);
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
/* просьба клиента 30.08: серой плашки под сердцем нет, при наведении
   заливается само сердце в rgb(44,44,44) */
.btn-fav:hover, .btn-fav:focus-visible { background: transparent; }
.btn-fav svg, .btn-fav svg path { transition: fill .2s var(--ease); fill: none; }
.btn-fav:hover svg, .btn-fav:hover svg path,
.btn-fav:focus-visible svg, .btn-fav:focus-visible svg path { fill: var(--ink); }
.btn-fav.is-active, .btn-fav[aria-pressed="true"] { color: var(--ink); }
.btn-fav.is-active svg, .btn-fav.is-active svg path,
.btn-fav[aria-pressed="true"] svg, .btn-fav[aria-pressed="true"] svg path { fill: var(--ink); }

/* Краткое и полное описание */
.product__short {
  margin-top: 36px;
  color: var(--ink);
}
.product__short p { margin: 0 0 18px; line-height: 1.4; }
.product__short p:last-child { margin-bottom: 0; }

.product__desc {
  margin-top: 26px;
  color: var(--ink);
  line-height: 1.4;
}
.product__desc p { margin: 0 0 20px; }
.product__desc p:last-child { margin-bottom: 0; }

/* ---------- АККОРДЕОНЫ ---------- */
.accordion {
  margin-top: 40px;
  border-top: 1px solid var(--line);
}
.acc__item { border-bottom: 1px solid var(--line); }
.acc__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 18px 0;              /* шаг строк аккордеона в макете 57, было 61 */
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}
.acc__caret {
  flex: none;
  color: var(--ink-muted);
  transition: transform .28s var(--ease);
}
.acc__item.is-open .acc__caret { transform: rotate(180deg); }

.acc__body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .3s var(--ease);
}
.acc__item.is-open .acc__body { grid-template-rows: 1fr; }
.acc__inner {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.5;
}
.acc__item.is-open .acc__inner { padding-bottom: 22px; }
.acc__inner p { margin: 0 0 14px; }
.acc__inner p:last-child { margin-bottom: 0; }
.acc__list { margin: 0 0 14px; }
.acc__list li {
  position: relative;
  padding-left: 16px;
  margin-bottom: 4px;
}
.acc__list li::before {
  content: "•";
  position: absolute;
  left: 2px;
  color: var(--ink-muted);
}

/* ---------- ВАМ МОЖЕТ ПОНРАВИТЬСЯ ---------- */
.related { padding-bottom: 96px; }
.related__title {
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--ink);
  margin-bottom: 34px;
}
.related__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.pcard__media {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--placeholder);
  border-radius: 0;            /* фото без скруглений */
  overflow: hidden;
}
.pcard__media .ph { width: 100%; height: 100%; }
.pcard__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s var(--ease);
}
.pcard:hover .pcard__media img { transform: scale(1.02); }
.pcard__name {
  margin-top: 18px;
  font-size: var(--fs-base);
  line-height: 1.35;
  color: var(--ink);
  /* до двух строк, дальше многоточие; высота зарезервирована — цены на одном уровне */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(2 * 1.35em);
}
.pcard__name:hover { color: var(--ink-muted); }
.pcard__price {
  margin-top: 14px;
  font-size: 19px;
  font-weight: 600;
  color: var(--ink);
}

/* ============================================================= */
/* ПЛАНШЕТ                                                        */
/* ============================================================= */
@media (max-width: 899px) {
  .product { padding-bottom: 56px; }
  .product__grid { grid-template-columns: 1fr; gap: 28px; }
  .product__gallery { max-width: 560px; }
  .related__grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
}

/* ============================================================= */
/* ТЕЛЕФОН                                                        */
/* ============================================================= */
@media (max-width: 599px) {
  .crumbs { padding-top: 18px; }
  .crumbs .container { gap: 6px; font-size: 12px; }

  .product { padding-top: 20px; padding-bottom: 48px; }
  .product__grid { gap: 22px; }
  .product__gallery { max-width: none; }

  /* фото на всю ширину, миниатюры лентой */
  .product__thumbs {
    margin-top: 12px;
    grid-auto-flow: column;
    grid-auto-columns: 72px;
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
  }
  .product__thumbs::-webkit-scrollbar { display: none; }
  .product__thumb { scroll-snap-align: start; }

  .product__title { font-size: 21px; }
  .product__price { margin-top: 16px; font-size: 22px; }

  .product__buy { margin-top: 24px; }
  .qty__btn { width: 40px; height: 40px; }
  .qty__input { height: 40px; }

  /* кнопка на всю ширину, сердечко рядом */
  .product__actions { margin-top: 20px; gap: 12px; }
  .product__addcart { flex: 1; min-width: 0; }

  .product__short { margin-top: 28px; }
  .product__desc { margin-top: 22px; }
  .accordion { margin-top: 32px; }

  .related { padding-bottom: 56px; }
  .related__title { font-size: 18px; margin-bottom: 22px; }
  .related__grid { grid-template-columns: repeat(2, 1fr); gap: 16px 14px; }
  .pcard__name { margin-top: 12px; font-size: 14px; }
  .pcard__price { margin-top: 8px; font-size: 17px; }
}

@media (max-width: 400px) {
  .related__grid { gap: 14px 12px; }
}

/* Карточки в блоках «Вам может понравиться» и в избранном: цены как в макете «цена1» */
.pcard__price {
  display: flex;
  align-items: baseline;
  gap: 17.8px;
  flex-wrap: wrap;
}
.pcard__price ins {
  order: 1;
  text-decoration: none;
  font-size: 18.7px;
  font-weight: 600;
  color: var(--ink);
}
.pcard__price del {
  order: 2;
  margin: 0;
  font-size: 15.3px;
  font-weight: 400;
  color: #999999;
  text-decoration: line-through;
  text-decoration-color: #999999;
}
.pcard__price del .amount,
.pcard__price del bdi { font-weight: 400; }
