/* ============================================================
   Product Card  (_product_card.html)
   ============================================================ */

/* ── Обёртка карточки ── */
.pc {
  background: var(--bs-body-bg, #fff);
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pc:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.09);
}

/* ── Блок изображения ── */
.pc__img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 16px 16px 0 0;
  overflow: hidden;          /* картинка не вылезает, кнопка — снаружи через .pc */
  background: #f4f0ec;
  flex-shrink: 0;
}

.pc__img-link {
  display: block;
  width: 100%;
  height: 100%;
}

.pc__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.pc:hover .pc__img {
  transform: scale(1.05);
}

.pc__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #ccc;
}

/* ── Рамка «в корзине» ── */
.pc__img-ring {
  position: absolute;
  inset: 0;
  border-radius: 16px 16px 0 0;
  border: 2.5px solid #0071e3;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.25s;
}
.pc.in-cart .pc__img-ring {
  opacity: 1;
}

/* ── Кнопка избранного ── */
.pc__fav {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.82);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
  transition: background 0.15s, transform 0.15s;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.pc__fav:hover {
  background: #fff;
  transform: scale(1.12);
}
.pc__fav .bi {
  font-size: 15px;
  color: #888;
  transition: color 0.15s;
}
.pc__fav .bi-heart-fill {
  color: #E24B4A;
}

/* ── Бейджи на картинке ── */
.pc__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  z-index: 2;
}
.pc__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 20px;
  letter-spacing: 0.01em;
  line-height: 1.5;
}
.pc__badge--sale { background: rgba(226, 75, 74, 0.90); color: #fff; }
.pc__badge--713  { background: rgba(20, 20, 20, 0.75);  color: #fff; }

/* ──────────────────────────────────────────────────────
   КНОПКА / СТЕППЕР  —  позиционирование на стыке
   ──────────────────────────────────────────────────────
   Якорь — дочерний элемент .pc (не img-wrap, у которого overflow:hidden!).
   .pc имеет position:relative и overflow:visible.

   Логика:
     bottom = высота pc__body  → нижний край якоря совпадает с низом img-wrap.
     transform: translateY(50%) → сдвигает якорь вниз на половину его высоты,
     итого центр кнопки (48px) лежит точно на границе картинки и тела.
     Верхние 24px кнопки заходят на картинку,
     нижние 24px видны над телом карточки.

   Высота pc__body выставляется JS-ом (см. product_card.js → pcPositionAnchors).
   CSS-переменная --pc-body-h служит фолбэком.
   ────────────────────────────────────────────────────── */
.pc__cart-anchor {
  position: absolute;
  bottom: var(--pc-body-h, 118px);   /* переопределяется JS */
  right: 12px;
  z-index: 10;
  transform: translateY(50%);        /* центр кнопки — ровно на линии стыка */
}

/* Кнопка «В корзину» */
.pc__cart-btn {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #0071e3;
  border: 2px solid white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.12s;
}
.pc__cart-btn:hover  { background: rgb(0, 51, 100); }
.pc__cart-btn:active { transform: scale(0.93); }
.pc__cart-btn .bi {
  font-size: 20px;
  color: #fff;
}

/* Кнопка «По запросу» */
.pc__cart-btn--request {
  width: 100%;
  height: 38px;
  border-radius: 10px;
  background: #f4f0ec;
  color: #555;
  font-size: 13px;
  margin-top: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}
.pc__cart-btn--request:hover { background: #ece8e2; }

/* Степпер */
.pc__stepper {
  display: flex;
  align-items: center;
  height: 48px;
  background: #0071e3;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgb(0, 51, 100);
}
.pc__step-btn {
  width: 36px;
  height: 48px;
  background: transparent;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 20px;
  font-weight: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s;
  flex-shrink: 0;
  line-height: 1;
}
.pc__step-btn:hover  { background: rgba(0, 0, 0, 0.14); }
.pc__step-btn:active { background: rgba(0, 0, 0, 0.24); }

.pc__step-input {
  width: 32px;
  text-align: center;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  background: transparent;
  border: none;
  outline: none;
  user-select: none;
  -moz-appearance: textfield;
}
.pc__step-input::-webkit-inner-spin-button,
.pc__step-input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* ── Тело карточки ── */
.pc__body {
  padding: 12px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.pc__brand {
  font-size: 10px;
  color: #999;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pc__title {
  margin: 0;
  font-size: inherit;
  font-weight: inherit;
}
.pc__title-link {
  font-size: 13px;
  font-weight: 400;
  color: inherit;
  text-decoration: none !important;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pc__title-link:hover {
  color: inherit;
  text-decoration: none !important;
}

.pc__meta {
  font-size: 11px;
  color: #999;
  line-height: 1.5;
  margin-top: 2px;
}

.pc__footer {
  margin-top: auto;
  padding-top: 8px;
}

.pc__price-block {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pc__price-old {
  font-size: 11px;
  color: #aaa;
  text-decoration: line-through;
}
.pc__price {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.2;
}
.pc__price-cur {
  font-size: 12px;
  font-weight: 400;
  color: #999;
}
.pc__price-request {
  font-size: 14px;
  color: #0071e3;
  font-style: italic;
}