/* ============================================================
   TS promo product card — homepage blocks (Акции/Хиты/Новинки)
   + category listings. Scoped to .product-card-v2 only.
   Colours taken 1:1 from the ts reference mockup.
   ============================================================ */

/* ============================================================
   Homepage PRODUCT card (Хиты продаж / Новинки) — ts detail-page
   style: white bordered card, image on top, body with title +
   price + action button below (NOT the overlay used for Акции).
   ============================================================ */
:is(body.frontpage, .td__similar-grid) .product-card-v2 {
  position: relative;
  display: flex !important;
  flex-direction: column;
  background: #fff !important;
  border: 1px solid #f1e7e1 !important;
  border-radius: 16px !important;
  overflow: hidden;
  box-shadow: none !important;
  padding: 0 !important;
  transition: box-shadow .3s ease, border-color .3s ease;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2:hover {
  box-shadow: 0 16px 40px -24px rgba(60, 40, 30, .35);
  border-color: #e4d9d2;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__link { position: absolute; inset: 0; z-index: 1; }

/* image on top — no own radius/border (card clips it) */
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image,
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image:hover,
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image .image,
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image .image_contain,
:is(body.frontpage, .td__similar-grid) .product-card-v2:hover .product-card-v2__image {
  border: 0 !important;
  border-radius: 0 !important;
  outline: none !important;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #faf1ee;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image .image,
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image .image_contain { position: absolute; inset: 0; width: 100%; height: 100%; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image img,
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image .image img,
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__image .image_contain img {
  width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease;
  border-radius: 0 !important; border: 0 !important;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2:hover .product-card-v2__image img { transform: scale(1.05); }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__rating { display: none; }

/* ---- badges over the image ---- */
/* discount (акция) → LEFT, status (Хит/Новинка) → RIGHT */
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-badges_left {
  position: absolute; right: 10px; left: auto; top: 10px; z-index: 3;
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; margin: 0;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-badge {
  border-radius: 999px; padding: 4px 10px;
  font-size: 11px; line-height: 1; font-weight: 500; letter-spacing: .02em;
  color: #fff !important; white-space: nowrap;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-badge_hit    { background: #c9584a; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-badge_new    { background: #4f6e5c; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-badge_sale   { background: #c9584a; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-badge_action { background: #4f6e5c; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-badge_stock  { background: #8a8178; }

:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-badges_right {
  position: absolute; left: 10px; right: auto; top: 10px; z-index: 3;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start;
  gap: 4px;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-deadline {
  border-radius: 999px; background: rgba(255, 255, 255, .92); padding: 4px 10px;
  font-size: 11px; line-height: 1; font-weight: 500; color: #5b544c !important; white-space: nowrap;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-discount {
  border-radius: 999px; background: #2b2622; padding: 4px 10px;
  font-size: 11px; line-height: 1; font-weight: 500; letter-spacing: .02em; color: #fff !important; white-space: nowrap;
}

/* ---- white body ---- */
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__body {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 12px;
  flex: 1; padding: 14px 16px 16px;
  pointer-events: none; /* clicks pass to the card link… */
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__title {
  display: block; margin: 0; padding: 0;
  font-family: inherit; font-size: 14px; font-weight: 400; line-height: 1.35;
  color: #2b2622;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__pricing { display: flex; flex-direction: row !important; align-items: baseline; flex-wrap: nowrap; gap: 8px; padding: 0; flex: 0 1 auto; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__pricing .product-card-v2__pricing { gap: 8px; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__old-price { font-size: 13px; color: #a79c92; text-decoration: line-through; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__price {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px; font-weight: 600; color: #2b2622 !important; line-height: 1.1;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__price span { font-size: 13px; font-weight: 500; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__price_empty { font-family: inherit; font-size: 14px; color: #8a8178 !important; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__pricing-txt { display: none; }

/* cart button — green circle (…re-enable pointer events for the button) */
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-cart {
  pointer-events: auto;
  flex: 0 0 44px; display: grid; place-items: center; align-self: center;
  width: 44px !important; height: 44px !important; min-height: 44px; max-height: 44px;
  padding: 0 !important; box-sizing: border-box; border-radius: 999px;
  background: #4f6e5c; color: #fff;
  box-shadow: 0 8px 18px -8px rgba(65, 89, 75, .8);
  transition: background .2s ease, transform .2s ease;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-cart:hover { background: #41594b; transform: translateY(-1px); }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-cart svg { width: 20px; height: 20px; }

/* out-of-stock / no-price — full-width outline pill (ts: w-full, px-3 py-2, 12px) */
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-outbtn {
  pointer-events: auto;
  flex: 1 0 100%; width: 100%;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid #4f6e5c; color: #4f6e5c; background: #fff;
  font-size: 12px; font-weight: 500; line-height: 1.2; white-space: nowrap;
  transition: background .2s ease, color .2s ease;
}
:is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-outbtn:hover { background: #4f6e5c; color: #fff; }

/* ============================================================
   Homepage "Акции" slider (authored banner slides: .promo-slide)
   Banner content = image + title + link (no price data).
   TS visual treatment: rounded 3:4 media, hover zoom, arrow.
   ============================================================ */
body.frontpage .promo-slide { display: block; }
body.frontpage .promo-slide .promo-slide-img {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 20px;
  overflow: hidden;
  background: #faf1ee;
  box-shadow: 0 16px 40px -30px rgba(60, 40, 30, .35);
  transition: box-shadow .3s ease;
}
body.frontpage .promo-slide:hover .promo-slide-img { box-shadow: 0 20px 50px -24px rgba(60, 40, 30, .4); }
body.frontpage .promo-slide .promo-slide-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s ease;
}
body.frontpage .promo-slide:hover .promo-slide-img img { transform: scale(1.05); }

/* ---- ts overlays authored inside each slide ---- */

/* top-left status badge */
body.frontpage .promo-slide .promo-badge {
  position: absolute; left: 8px; top: 8px; z-index: 2;
  border-radius: 999px; padding: 4px 9px;
  font-size: 10px; line-height: 1; font-weight: 500; letter-spacing: .02em;
  color: #fff; white-space: nowrap;
}
@media (min-width: 640px) { body.frontpage .promo-slide .promo-badge { left: 12px; top: 12px; font-size: 11px; padding: 4px 10px; } }
body.frontpage .promo-slide .promo-badge_hit { background: #c9584a; }
body.frontpage .promo-slide .promo-badge_new { background: #4f6e5c; }

/* top-right: deadline + discount, grouped, adaptive */
body.frontpage .promo-slide .promo-top-right {
  position: absolute; right: 8px; top: 8px; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end;
  gap: 4px; max-width: 150px;
}
body.frontpage .promo-slide .promo-top-right--narrow { max-width: 92px; }
@media (min-width: 640px) {
  body.frontpage .promo-slide .promo-top-right,
  body.frontpage .promo-slide .promo-top-right--narrow { right: 12px; top: 12px; max-width: none; flex-wrap: nowrap; gap: 6px; }
}
body.frontpage .promo-slide .promo-deadline {
  border-radius: 999px; background: rgba(255, 255, 255, .9); padding: 4px 9px;
  font-size: 10px; line-height: 1; font-weight: 500; color: #5b544c; white-space: nowrap;
}
body.frontpage .promo-slide .promo-discount {
  border-radius: 999px; background: #2b2622; padding: 4px 9px;
  font-size: 10px; line-height: 1; font-weight: 500; letter-spacing: .02em; color: #fff; white-space: nowrap;
}
@media (min-width: 640px) {
  body.frontpage .promo-slide .promo-deadline,
  body.frontpage .promo-slide .promo-discount { font-size: 11px; padding: 4px 10px; }
}

/* bottom price pill */
body.frontpage .promo-slide .promo-pricebar {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff; border-radius: 12px; padding: 8px 10px;
  box-shadow: 0 6px 16px -6px rgba(60, 40, 30, .4);
  transition: background .2s ease;
}
@media (min-width: 640px) {
  body.frontpage .promo-slide .promo-pricebar { left: 12px; right: 12px; bottom: 12px; border-radius: 16px; padding: 10px 14px; }
}
body.frontpage .promo-slide:hover .promo-pricebar { background: #faf6f3; }
body.frontpage .promo-slide .promo-prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
body.frontpage .promo-slide .promo-old { font-size: 11px; color: #a79c92; text-decoration: line-through; }
@media (min-width: 640px) { body.frontpage .promo-slide .promo-old { font-size: 12px; } }
body.frontpage .promo-slide .promo-new {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 16px; font-weight: 600; color: #c9584a; line-height: 1.1;
}
@media (min-width: 640px) { body.frontpage .promo-slide .promo-new { font-size: 18px; } }
body.frontpage .promo-slide .promo-arrow {
  flex: 0 0 auto; display: grid; place-items: center;
  width: 20px; height: 20px; border-radius: 999px;
  background: #f4ebe6; color: #4f6e5c; transition: transform .2s ease;
}
@media (min-width: 640px) { body.frontpage .promo-slide .promo-arrow { width: 24px; height: 24px; } }
body.frontpage .promo-slide:hover .promo-arrow { transform: translate(2px, -2px); }
body.frontpage .promo-slide .promo-arrow svg { width: 12px; height: 12px; }
@media (min-width: 640px) { body.frontpage .promo-slide .promo-arrow svg { width: 14px; height: 14px; } }

body.frontpage .promo-slide p {
  margin: 12px 2px 0;
  font-size: 14px; line-height: 1.35; font-weight: 400;
  color: #5b544c; text-align: left;
  transition: color .2s ease;
}
body.frontpage .promo-slide:hover p { color: #2b2622; }

/* homepage section titles (Акции / Хиты продаж / Новинки) — Playfair, like ts */
body.frontpage h2.mb-25 {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ============================================================
   Акции promo-slide FIXES (theme overrides + hover)
   ============================================================ */

/* 1 & 6: kill the theme's square accent border around the card, and any
   focus/hover outline — scoped by the Акции section wrapper (.promo-slider-frame)
   instead of :has() so it also works on older browsers. ts has no border. */
body.frontpage .promo-slider-frame .content-standard-box,
body.frontpage .promo-slider-frame .content-standard-box__container,
body.frontpage .promo-slide {
  border: 0 !important;
  outline: none !important;
  gap: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.frontpage .promo-slider-frame .content-standard-box:hover,
body.frontpage .promo-slider-frame .content-standard-box__container:hover,
body.frontpage .promo-slider-frame a,
body.frontpage .promo-slider-frame a:hover,
body.frontpage .promo-slider-frame a:focus,
body.frontpage .promo-slider-frame a:focus-visible,
body.frontpage .promo-slider-frame a:active {
  outline: none !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* 1: zoom the PHOTO inside the frame, clipped — never past the card edges */
body.frontpage .promo-slide .promo-slide-img { overflow: hidden !important; }
body.frontpage .promo-slide .promo-slide-img img { transform-origin: center; border-radius: 0 !important; }

/* 2,4,5: badge / discount text must be WHITE (theme link colour was leaking) */
body.frontpage .promo-slide .promo-badge,
body.frontpage .promo-slide .promo-discount { color: #fff !important; }
body.frontpage .promo-slide .promo-badge_hit { background: #c9584a !important; }
body.frontpage .promo-slide .promo-badge_new { background: #4f6e5c !important; }
body.frontpage .promo-slide .promo-discount { background: #2b2622 !important; }
body.frontpage .promo-slide .promo-deadline { color: #5b544c !important; background: rgba(255,255,255,.92) !important; }

/* 3 & 8: prices */
body.frontpage .promo-slide .promo-new { color: #c9584a !important; }
body.frontpage .promo-slide .promo-old { color: #a79c92 !important; }

/* 7: arrow — beige circle, green glyph */
body.frontpage .promo-slide .promo-arrow { background: #f4ebe6 !important; color: #4f6e5c !important; }
body.frontpage .promo-slide .promo-arrow svg { stroke: #4f6e5c !important; }

/* hover zoom — single, forced enlarge (kills the theme's inline 1.025 conflict).
   Base = scale(1); hover = scale up; clipped by the frame's overflow:hidden. */
body.frontpage .promo-slide .promo-slide-img img {
  transform: scale(1) !important;
  transition: transform .45s ease !important;
  transform-origin: center center;
}
body.frontpage .promo-slide:hover .promo-slide-img img,
body.frontpage .promo-slide .promo-slide-img:hover img {
  transform: scale(1.07) !important;
}

/* kill the theme's inline hover border on the photo frame
   (custom head <style>: .promo-slide-img:hover { border:1px solid #b4647d }) */
body.frontpage .promo-slide .promo-slide-img,
body.frontpage .promo-slide .promo-slide-img:hover,
body.frontpage .promo-slider-frame .promo-slide-img,
body.frontpage .promo-slider-frame .promo-slide-img:hover {
  border: 0 !important;
  outline: none !important;
}

/* ---- mobile: keep price + cart on ONE row (Хиты/Новинки) ---- */
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__foot_inline { flex-wrap: nowrap !important; }
:is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__foot_inline .product-card-v2__pricing { min-width: 0; flex: 0 1 auto; }
@media (max-width: 640px) {
  :is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__body { padding: 12px 12px 14px; }
  :is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__foot { gap: 8px; }
  :is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__price { font-size: 16px; }
  :is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__price span { font-size: 11px; }
  :is(body.frontpage, .td__similar-grid) .product-card-v2 .product-card-v2__old-price { font-size: 11px; }
  :is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-cart {
    flex: 0 0 38px; width: 38px !important; height: 38px !important; min-height: 38px; max-height: 38px;
  }
  :is(body.frontpage, .td__similar-grid) .product-card-v2 .pc-cart svg { width: 17px; height: 17px; }
}
