/**
 * Katalóg (stáčené / lisované / poháre / kakao / doplňky / malé balenia):
 * jednotná veľkosť kariet v mriežke, obrázok v pevnom priestore (object-fit: contain).
 * „Product card“ = bunka .w-layout-cell > a > .whitebgkornoutky (bez zmeny HTML).
 */

.rpoduct-wrapper {
  --sc-catalog-card-row: clamp(10.5rem, 19vmin, 14rem);
  --sc-catalog-title-row: minmax(2.75rem, max-content);
  max-width: 100%;
  min-width: 0;
}

.wrapper-to-move-to-left:has(.rpoduct-wrapper) {
  min-width: 0;
  max-width: 100%;
}

/* Jednotná výška každého riadku mriežky (prepíše Webflow #w-node grid-template-rows) */
.rpoduct-wrapper .quick-stack.wf-layout-layout {
  grid-template-rows: unset !important;
  grid-auto-rows: var(--sc-catalog-card-row);
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  column-gap: clamp(0.65rem, 2.4vw, 0.9rem);
  row-gap: clamp(0.65rem, 2.4vw, 0.9rem);
}

@media screen and (min-width: 768px) {
  .rpoduct-wrapper .quick-stack.wf-layout-layout {
    column-gap: clamp(1.1rem, 1.4vw, 1.35rem);
    row-gap: clamp(1.1rem, 1.4vw, 1.35rem);
  }
}

/* Užší blok mriežky na veľkých obrazovkách (Webflow má 82vw) */
@media screen and (min-width: 992px) {
  .rpoduct-wrapper {
    width: min(72vw, 100%) !important;
    max-width: 100%;
  }
}

.rpoduct-wrapper .quick-stack.wf-layout-layout > .w-layout-cell {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  align-items: stretch;
  align-self: stretch;
}

/* Odkaz ako karta: link-block-15 / 16 / 18 / 19, pinocchio, … */
.rpoduct-wrapper .w-layout-cell > a.w-inline-block {
  display: flex !important;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
}

.rpoduct-wrapper .whitebgkornoutky {
  display: grid !important;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr var(--sc-catalog-title-row);
  grid-template-areas: "media" "title";
  width: 100% !important;
  height: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  box-sizing: border-box;
  padding: clamp(0.25rem, 0.85vmin, 0.45rem);
  padding-bottom: 0;
  position: relative;
  align-items: stretch;
  justify-items: stretch;
}

.rpoduct-wrapper .whitebgkornoutky .lowerpartname {
  grid-area: title;
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 2;
  width: 100%;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

/* Oblasť obrázka — náhľad mierne zmenšený v bunke (object-fit: contain) */
.rpoduct-wrapper .whitebgkornoutky > .image-29 {
  grid-area: media;
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 80% !important;
  height: 80% !important;
  max-width: 80% !important;
  max-height: 80% !important;
  min-width: 0;
  min-height: 0;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
  justify-self: center;
  align-self: center;
  pointer-events: none;
}

/* Stáčené kornoutky — JUMBO karta o niečo väčšia */
.rpoduct-wrapper .whitebgkornoutky > .image-29.corn11.ds-fx-v {
  width: 110% !important;
  height: 110% !important;
  max-width: 110% !important;
  max-height: 110% !important;
}

/* Menší náhľad pre MISKY produkty (pohárky/misky + kakao) */
.rpoduct-wrapper .whitebgkornoutky > .image-29.sc-misky-small {
  width: 62% !important;
  height: 62% !important;
  max-width: 62% !important;
  max-height: 62% !important;
}

.rpoduct-wrapper .whitebgkornoutky > .image-30 {
  grid-area: media;
  position: absolute !important;
  z-index: 3;
  width: auto !important;
  max-width: min(32%, 4.5rem);
  height: auto !important;
  inset: 14% auto auto 10%;
  pointer-events: none;
}

@media screen and (max-width: 479px) {
  .rpoduct-wrapper {
    --sc-catalog-card-row: clamp(9.5rem, 34vw, 12.5rem);
  }

  .rpoduct-wrapper .quick-stack.wf-layout-layout {
    column-gap: clamp(0.65rem, 3.2vw, 0.9rem);
    row-gap: clamp(0.65rem, 3.2vw, 0.9rem);
  }
}
