/* The inner window trims the studio margins while the stage contains the whole product. */
.pic, .photo-stage {
  display: grid;
  place-items: center;
  container-type: size;
  overflow: hidden;
  min-width: 0;
}

.photo-stage {
  height: clamp(400px, 38vw, 520px);
  background: linear-gradient(180deg, #fbf9f6 0%, #f3eee7 100%);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

.photo-stage.landscape {
  height: clamp(240px, 24vw, 355px);
}

.gallery {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 28px;
}

.gallery figure {
  min-width: 0;
}

.pic > .cutout-photo,
.photo-stage > .cutout-photo {
  display: block;
  width: 100cqw;
  height: 100cqh;
  min-height: 0;
  min-width: 0;
  box-sizing: border-box;
  padding: 16px;
  object-fit: contain;
  background: transparent;
  mix-blend-mode: normal;
  transition: transform .3s var(--ease);
}

.product:hover .pic > .cutout-photo {
  transform: scale(1.03);
}

.pic.cutter-pair {
  display: grid;
  grid-template-columns: minmax(0, .46fr) minmax(0, .54fr);
  align-items: stretch;
  justify-items: stretch;
  gap: 8px;
  padding: 12px 10px;
  box-sizing: border-box;
}

.cutter-variant {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
}

.variant-photo {
  display: grid;
  place-items: center;
  container-type: size;
  min-height: 0;
}

.variant-label {
  text-align: center;
  font-size: .92rem;
  line-height: 1.5;
  font-weight: 600;
  color: var(--ink-soft);
}

.gallery.cutter-gallery {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.gallery.cutter-gallery .photo-stage {
  height: clamp(320px, 31vw, 410px);
}

.gallery.cutter-gallery .photo-stage.landscape {
  height: clamp(210px, 21vw, 270px);
}

.gallery.bench-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.gallery.bench-gallery figure:first-child {
  grid-column: 1 / -1;
}

.gallery.bench-gallery figure:first-child .photo-stage.landscape {
  height: clamp(220px, 22vw, 290px);
}

.gallery.bench-gallery figure:not(:first-child) .photo-stage.landscape {
  height: clamp(160px, 16vw, 210px);
}

.machine-crop {
  position: relative;
  display: block;
  width: min(100cqw, var(--fit));
  overflow: hidden;
}

.pic .machine-crop img,
.gallery .machine-crop img {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--w);
  height: var(--h);
  max-width: none;
  object-fit: fill;
  background: transparent;
  mix-blend-mode: multiply;
}

/* 3+2 Balanced Product Card Grid (shared across Home & Products page) */
.product-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 20px;
}

.product {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  min-height: 0;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease);
}

.product:nth-child(-n+3) {
  grid-column: span 2;
}

.product:nth-child(n+4) {
  grid-column: span 3;
}

.pic {
  width: 100%;
  height: 232px;
  background: linear-gradient(180deg, #fbf9f6 0%, #f4efe8 100%);
  border-bottom: 1px solid #ede6dc;
}

.product:nth-child(n+4) .pic {
  height: 215px;
}

.product:hover {
  transform: translateY(-3px);
  border-color: var(--blue);
  box-shadow: var(--shadow-md);
}

.prodtext {
  padding: 18px 58px 22px 22px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.prodtext small {
  display: inline-flex;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: .88rem;
  font-weight: 700;
}

.prodtext h3 {
  font-size: clamp(20px, 1.5vw, 23px);
  line-height: 1.32;
  letter-spacing: -.02em;
  margin: 4px 0 0;
  color: var(--ink);
  transition: color .2s var(--ease);
}

.prodtext p {
  font-size: .94rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
}

.product .arr {
  position: absolute;
  right: 18px;
  bottom: 20px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--pale);
  color: var(--blue);
  display: grid;
  place-items: center;
  font: 600 16px/1 system-ui, sans-serif;
  transition: all .2s var(--ease);
}

.product:hover .arr {
  background: var(--blue);
  color: #fff;
  transform: translate(2px, -2px);
}

@media (max-width: 959px) {
  .product-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
  .product:nth-child(n) {
    grid-column: auto;
  }
  .product:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .photo-stage { height: clamp(320px, 96vw, 525px); }
  .photo-stage.landscape { height: clamp(185px, 57vw, 320px); }
  .gallery.bench-gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery.bench-gallery figure:first-child .photo-stage.landscape,
  .gallery.bench-gallery figure:not(:first-child) .photo-stage.landscape {
    height: clamp(185px, 57vw, 320px);
  }
}

@media (max-width: 640px) {
  .product-list {
    grid-template-columns: minmax(0, 1fr);
  }
  .product:last-child:nth-child(odd) {
    grid-column: auto;
  }
  .pic,
  .product:nth-child(n+4) .pic {
    height: 210px;
  }
  .prodtext {
    padding: 16px 56px 18px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product:hover,
  .product:hover .arr,
  .product:hover .pic > .cutout-photo {
    transform: none !important;
  }
}

[data-photo="fruit-peeler"] { --fit: 80.7692cqh; aspect-ratio: 420 / 520; --w: 130.9524%; --h: 121.5385%; --x: -20.9524%; --y: -18.2692%; }
[data-photo="bral"] { --fit: 97.8535cqh; aspect-ratio: 775 / 792; --w: 101.9355%; --h: 138.3838%; --x: -1.9355%; --y: -23.2323%; }
[data-photo="cutter"] { --fit: 55.0847cqh; aspect-ratio: 195 / 354; --w: 307.6923%; --h: 112.9944%; --x: -103.0769%; --y: -6.7797%; }
[data-photo="manual-cutter"] { --fit: 308.6093cqh; aspect-ratio: 466 / 151; --w: 128.7554%; --h: 264.9007%; --x: -14.1631%; --y: -84.1060%; }
[data-photo="bench"] { --fit: 215.0538cqh; aspect-ratio: 400 / 186; --w: 100.0000%; --h: 130.6452%; --x: 0.0000%; --y: -18.8172%; }
[data-photo="bench-b"] { --fit: 190.4762cqh; aspect-ratio: 400 / 210; --w: 100.0000%; --h: 115.7143%; --x: 0.0000%; --y: -7.6190%; }
[data-photo="bench-c"] { --fit: 163.5514cqh; aspect-ratio: 350 / 214; --w: 114.2857%; --h: 113.5514%; --x: -6.8571%; --y: -7.0093%; }
[data-photo="collection"] { --fit: 157.4194cqh; aspect-ratio: 488 / 310; --w: 122.9508%; --h: 127.0968%; --x: -11.6803%; --y: -14.5161%; }
[data-photo="trolley"] { --fit: 69.6296cqh; aspect-ratio: 282 / 405; --w: 141.8440%; --h: 104.9383%; --x: -21.6312%; --y: -1.9753%; }
[data-photo="trolley-a"] { --fit: 45.1852cqh; aspect-ratio: 183 / 405; --w: 218.5792%; --h: 104.9383%; --x: -55.7377%; --y: -1.9753%; }
[data-photo="trolley-c"] { --fit: 46.2287cqh; aspect-ratio: 190 / 411; --w: 210.5263%; --h: 103.4063%; --x: -52.6316%; --y: -1.9465%; }
