/* Each composition keeps the photographed product and its own visual palette. */
.bakery-gallery .cake-photo { width: clamp(280px, 27vw, 370px); border-radius: 0; }
.bakery-gallery .cake-marquee-group { gap: 38px; padding-right: 38px; align-items: end; }
.cake-photo-stage { position: relative; display: grid; place-items: center; height: 300px; isolation: isolate; }
.cake-photo-stage::before { content: ''; position: absolute; inset: 14% 4% 2%; z-index: -1; border-radius: 50%; background: radial-gradient(ellipse, var(--product-glow, #d5c4b51c), transparent 70%); pointer-events: none; }
.cake-photo[data-palette="citrus"] { --product-glow: #d8b75a26; }
.cake-photo[data-palette="rose"] { --product-glow: #d9a2b524; }
.cake-photo[data-palette="blue"] { --product-glow: #a4c7cd25; }
.cake-photo[data-palette="botanical"] { --product-glow: #a8baa423; }
.cake-photo[data-palette="terracotta"] { --product-glow: #cb986621; }
.bakery-gallery .cake-photo .cake-photo-stage .cake-photo-product { width: 100%; height: 100%; max-height: 300px; aspect-ratio: auto; object-fit: contain; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.bakery-gallery .cake-photo[data-presentation="cutout"] .cake-photo-stage .cake-photo-product { padding: 12px 3px 2px; filter: drop-shadow(0 9px 7px #66463211); }
.bakery-gallery .cake-photo[data-presentation="portrait-cutout"] .cake-photo-stage .cake-photo-product { padding: 0 40px; filter: drop-shadow(0 9px 8px #405b6115); }
.bakery-gallery .cake-photo[data-presentation="detail-cutout"] .cake-photo-stage .cake-photo-product {
  padding: 8px 22px 0;
  filter: drop-shadow(0 5px 5px #6646320e);
  /* Only the photographed lower crop dissolves; no missing cake is implied. */
  mask-image: linear-gradient(to bottom, #000 0%, #000 88%, #000e 94%, #0008 98%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 88%, #000e 94%, #0008 98%, transparent 100%);
}
.bakery-gallery .cake-photo:is([data-presentation="cutout"], [data-presentation="portrait-cutout"], [data-presentation="detail-cutout"]) {
  --product-mist-width: 90%;
  --product-contact-width: 57%;
}
.bakery-gallery .cake-photo[data-presentation="portrait-cutout"] { --product-mist-width: 76%; --product-contact-width: 42%; }
.bakery-gallery .cake-photo[data-presentation="detail-cutout"] { --product-mist-width: 84%; --product-contact-width: 49%; }
.bakery-gallery .cake-photo:is([data-presentation="cutout"], [data-presentation="portrait-cutout"], [data-presentation="detail-cutout"]) .cake-photo-stage .cake-photo-product {
  position: relative;
  z-index: 1;
  object-position: center bottom;
}
.bakery-gallery .cake-photo:is([data-presentation="cutout"], [data-presentation="portrait-cutout"], [data-presentation="detail-cutout"]) .cake-photo-stage::before {
  inset: auto auto -3px 50%;
  width: var(--product-mist-width);
  height: 18%;
  z-index: 0;
  border-radius: 0;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 72%, #fffdf9e0 0%, #fffdf9ab 24%, #fffdf963 45%, #fffdf920 62%, transparent 77%);
  filter: blur(4px);
}
.bakery-gallery .cake-photo:is([data-presentation="cutout"], [data-presentation="portrait-cutout"], [data-presentation="detail-cutout"]) .cake-photo-stage::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 3px;
  width: var(--product-contact-width);
  height: 9px;
  z-index: 0;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, #6e54421a 0%, #6e54420c 40%, transparent 73%);
  filter: blur(2px);
  pointer-events: none;
}
.bakery-gallery .cake-photo[data-presentation="photograph"] .cake-photo-stage { padding: 16px 0 10px; }
.bakery-gallery .cake-photo[data-presentation="photograph"] .cake-photo-stage .cake-photo-product { height: auto; max-height: 264px; border-radius: 4px; box-shadow: 0 13px 23px -20px #4a2d4266; }
.bakery-gallery .cake-photo[data-presentation="wide"] { width: clamp(340px, 32vw, 440px); }
.bakery-gallery .cake-photo[data-presentation="wide"] .cake-photo-stage .cake-photo-product { height: auto; max-height: 275px; border-radius: 4px; box-shadow: 0 13px 23px -20px #4a2d4266; }
.bakery-gallery .cake-photo > span { margin-top: 20px; text-align: center; font-size: 12px; letter-spacing: .015em; }
.bakery-gallery .cake-photo:focus-visible { outline: 2px solid #ac7b94; outline-offset: 6px; }
.bakery-gallery .cake-marquee-track.is-single .cake-marquee-group { width: 100%; max-width: 100%; justify-content: center; }
.bakery-gallery .cake-marquee-track.is-single .cake-photo { max-width: calc(100% - 40px); }
.bakery-gallery .cake-marquee:has(.is-single) { mask-image: none; -webkit-mask-image: none; }
@media (max-width: 700px) {
  .bakery-gallery .cake-photo { width: 280px; }
  .bakery-gallery .cake-photo[data-presentation="wide"] { width: 320px; }
  .bakery-gallery .cake-marquee-group { gap: 24px; padding-right: 24px; }
  .cake-photo-stage { height: 250px; }
  .bakery-gallery .cake-photo .cake-photo-stage .cake-photo-product { max-height: 250px; }
  .bakery-gallery .cake-photo[data-presentation="portrait-cutout"] .cake-photo-stage .cake-photo-product { padding-inline: 26px; }
  .bakery-gallery .cake-photo[data-presentation="detail-cutout"] .cake-photo-stage .cake-photo-product { padding-inline: 16px; }
  .bakery-gallery .cake-photo > span { margin-top: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .bakery-gallery .cake-photo:hover .cake-photo-stage .cake-photo-product, .bakery-gallery .cake-photo:focus-visible .cake-photo-stage .cake-photo-product { transform: none; }
}
