/* ═══════════════════════════════════════════════════════
   Product Card — Global equal-height styling
   Applied everywhere: homepage, listing, offers, etc.
   ═══════════════════════════════════════════════════════ */

/* Grid items stretch to fill row height */
.wc-block-product-template {
  align-items: stretch !important;
}

/* Each product list item fills its grid cell */
.wc-block-product-template > .wc-block-product {
  display: flex;
  flex-direction: column;
}

/* Inner card wrapper fills the li and arranges content vertically */
.wc-block-product-template > .wc-block-product > .wp-block-group {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  flex: 1 1 auto;
}

/* Override WP is-layout-constrained centering — keep left alignment */
.wc-block-product-template > .wc-block-product > .wp-block-group > * {
  margin-left: 0 !important;
  margin-right: auto !important;
  max-width: 100%;
  text-align: left;
}

/* Aspect-ratio 1/1 — packshoty YONELLE są kwadratowe, kadr dopasowany by obraz
   wypełniał kadr bez whitespace. Ujednolicone z yb2-product-grid / V2 produkcja. */
.wc-block-product-template .wc-block-components-product-image {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.wc-block-product-template .wc-block-components-product-image a {
  display: block;
  width: 100%;
  height: 100%;
}

.wc-block-product-template .wc-block-components-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition:
    opacity 0.35s ease,
    transform 0.45s ease;
}

.wc-block-product-template
  .wc-block-components-product-image
  .yonelle-product-item-hover-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain !important;
  object-position: center;
  display: block;
  opacity: 0;
  pointer-events: none;
  transform: scale(1.015);
  transition:
    opacity 0.35s ease,
    transform 0.45s ease;
}

.wc-block-product-template
  > .wc-block-product:has(.yonelle-product-item-hover-image):hover
  .wc-block-components-product-image
  img:not(.yonelle-product-item-hover-image),
.wc-block-product-template
  > .wc-block-product:has(.yonelle-product-item-hover-image):focus-within
  .wc-block-components-product-image
  img:not(.yonelle-product-item-hover-image) {
  opacity: 0;
}

.wc-block-product-template
  > .wc-block-product:hover
  .wc-block-components-product-image
  .yonelle-product-item-hover-image,
.wc-block-product-template
  > .wc-block-product:focus-within
  .wc-block-components-product-image
  .yonelle-product-item-hover-image {
  opacity: 1;
  transform: scale(1);
}

.wc-block-product-template .wc-block-components-product-image__inner-container {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.wc-block-product-template
  .wc-block-components-product-image__inner-container
  > div {
  position: absolute;
  top: 0;
  left: 0;
}

@media (hover: none) {
  .wc-block-product-template
    .wc-block-components-product-image
    .yonelle-product-item-hover-image {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .wc-block-product-template .wc-block-components-product-image img,
  .wc-block-product-template
    .wc-block-components-product-image
    .yonelle-product-item-hover-image {
    transition: none;
  }
}

/* Title grows to absorb leftover space, pushing button to bottom */
.wc-block-product-template .wp-block-post-title {
  flex: 1 1 auto;
}

/* ───────────────────────────────────────────────────────────────
   Kordian atom 3 (T2a): font weights/sizes matching v2 product-grid
   (yb2-product-grid) which is 1:1 z Figmą. Override tylko w kontekście
   listing/shop — theme.json font presets pozostają bez zmian.
   ─────────────────────────────────────────────────────────────── */

/* Nazwa produktu: body-m (16px) + weight 600 — zgodne z .yb2-product-grid__card-category */
.wc-block-product-template .wp-block-post-title,
.wc-block-product-template .wp-block-post-title a {
  font-size: var(--wp--preset--font-size--body-m, 16px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.32px;
}

/* Kategoria (post-terms): small-title (12px) uppercase — zgodne z .yb2-product-grid__card-series */
.wc-block-product-template .wp-block-post-terms {
  font-size: var(--wp--preset--font-size--small-title, 12px);
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.24px;
  text-transform: uppercase;
}

/* Cena: body-s (14px) bold — zgodne z .yb2-product-grid__card-price */
.wc-block-product-template .wc-block-components-product-price {
  font-size: var(--wp--preset--font-size--body-s, 14px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.28px;
}

/* ═══════════════════════════════════════════════════════
   Omnibus
   ═══════════════════════════════════════════════════════ */

/* Kontener całej sekcji cenowej — flex-col, gap 4px */
.yonelle-price-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
}

.yonelle-price-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  white-space: nowrap;
  color: var(--y-beige-900, #272725);
}

.yonelle-price-main {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.32px;
  line-height: 1.5;
  margin: 0;
  color: var(--y-beige-900, #272725);
}

.yonelle-price-main .woocommerce-Price-amount,
.yonelle-price-main .price {
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  color: inherit;
}

.yonelle-price-points {
  font-size: 12px;
  letter-spacing: 0.24px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--y-beige-900, #272725);
  white-space: nowrap;
}

.yonelle-regular-line {
  font-size: 10px;
  letter-spacing: 0.2px;
  line-height: 1.5;
  color: var(--y-beige-900, #272725);
  font-weight: 400;
  margin: 0;
  white-space: nowrap;
}

.yonelle-regular-line__price {
  text-decoration: line-through;
  text-decoration-skip-ink: none;
}

.yonelle-regular-line__price .woocommerce-Price-amount,
.yonelle-regular-line__price .price {
  font-size: inherit;
  color: inherit;
}

.yonelle-regular-line__pct {
  font-weight: 700;
  font-style: normal;
}

.yonelle-omnibus {
  font-size: 10px;
  letter-spacing: 0.2px;
  line-height: 1.5;
  color: var(--y-beige-900, #272725);
  font-weight: 400;
  margin: 0;
}

.yonelle-omnibus__price {
  text-decoration: line-through;
  text-decoration-skip-ink: none;
}

.yonelle-omnibus__price .woocommerce-Price-amount,
.yonelle-omnibus__price .price {
  font-size: inherit;
  color: inherit;
}

.yonelle-omnibus__pct {
  font-weight: 700;
  font-style: normal;
}

.y-product-promotional-text {
  display: inline-block;
  padding: 3px 10px;
  background: var(--display-promotion-text-bg);
  color: var(--display-promotion-text-color);
  margin-bottom: 16px;
  position: relative;
  border-radius: 4px;
  z-index: 5;
}

.y-product-promotional-text strong {
  font-weight: 700;
}

.y-product-promotional-text__icon {
  margin-left: 5px;
  display: inline-block;
}

.y-product-promotional-text__icon svg path {
  fill: currentColor;
}

.y-product-promotional-text__icon > span {
  background: var(--display-promotion-text-bg);
  color: var(--display-promotion-text-color);
  position: absolute;
  left: 0;
  max-width: 250px;
  top: calc(100% + 10px);
  padding: 3px 10px 6px 10px;
  font-size: 12px;
  border-radius: 4px;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 100ms ease-in-out,
    visibility 100ms ease-in-out;
}

.y-product-promotional-text__icon:hover > span {
  visibility: visible;
  opacity: 1;
}

.yonelle-coupon-discount {
  display: inline-block;
  background: var(--y-beige-900, #272725);
  color: var(--y-beige-100, #faf9f6);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  padding: 6px 12px;
  margin: 0 0 10px 0;
}

.yonelle-coupon-discount__info {
  cursor: help;
  margin-left: 4px;
  font-style: normal;
  position: relative;
}

.yonelle-coupon-discount__info::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  white-space: normal;
  width: max-content;
  max-width: min(320px, 80vw);
  overflow-wrap: anywhere;
  text-align: left;
  background: var(--y-beige-900, #272725);
  color: var(--y-beige-100, #faf9f6);
  font-size: 11px;
  line-height: 1.4;
  padding: 6px 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 10;
}

.yonelle-product-sticky-bar__price .yonelle-coupon-discount {
  display: none !important;
}

.yonelle-coupon-discount__info:hover::after {
  opacity: 1;
}

#omnibus-price-data {
  display: none;
}
.wc-block-product-template__responsive {
  grid-gap: 16px;
}

:root
  :where(
    .yb-add-to-cart-wrapper.is-style-underline-bottom
      .yb-add-to-cart-wrapper--typography
  ) {
  font-family: var(--wp--preset--font-family--body);
  font-size: var(--wp--preset--font-size--body-s);
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.28px;
  line-height: 1.5;
  text-decoration: none;
  text-transform: none;
}

:root
  :where(
    .yb-add-to-cart-wrapper.is-style-underline-bottom
      .yb-add-to-cart-wrapper--color
  ) {
  background-color: transparent !important;
  color: var(--wp--preset--color--beige-900) !important;
}

:root
  :where(
    .yb-add-to-cart-wrapper.is-style-underline-bottom
      .yb-add-to-cart-wrapper--border
  ) {
  border-radius: 0px !important;
  border-color: var(--wp--preset--color--beige-900) !important;
  border-width: 0 0 1px 0 !important;
  border-style: solid !important;
}

:root
  :where(
    .yb-add-to-cart-wrapper.is-style-underline-bottom
      .yb-add-to-cart-wrapper--spacing
  ) {
  padding-top: 4px !important;
  padding-right: 0px !important;
  padding-bottom: 4px !important;
  padding-left: 0px !important;
}
