.product-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.product-photo {
  background-size: cover;
  background-position: center;
}
.product-visual {
  height: 300px;
}
.product:hover h3 {
  color: #ce7e10;
}
#product-modal {
  width: min(1080px, 94vw);
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 22px;
  background: #fff;
  max-height: 90svh;
  overflow: auto;
}
#product-modal::backdrop {
  background: #18332b99;
  backdrop-filter: blur(8px);
}
#close-modal {
  position: absolute;
  right: 16px;
  top: 12px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid #e8ece6;
  font-size: 26px;
}
.product-experience {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
}
.model-panel {
  padding: 28px;
  background: radial-gradient(ellipse at 50% 40%, #fff 10%, #fff8eb 60%, #eef5e7);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}
.model-top {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  letter-spacing: 2px;
  color: #66806b;
}
.model-top span:last-child {
  color: #d99120;
  font-size: 17px;
}
.model-stage {
  position: relative;
  height: 360px;
}
.model-stage:after {
  content: "";
  position: absolute;
  bottom: 12px;
  left: 30%;
  right: 30%;
  height: 17px;
  background: #73552c20;
  border-radius: 50%;
  filter: blur(9px);
  pointer-events: none;
}
#fruit-canvas {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  animation: model-arrive 0.85s ease both;
}
#fruit-canvas:active {
  cursor: grabbing;
}
#fruit-canvas[hidden],
#model-fallback[hidden] {
  display: none;
}
#model-fallback {
  height: 100%;
  background-repeat: no-repeat;
  border-radius: 15px;
}
.model-controls {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.model-controls button,
.portion-controls button {
  border: 1px solid #dfe5db;
  border-radius: 30px;
  background: #ffffffbd;
  padding: 10px 14px;
  font-size: 11px;
  color: #354b38;
}
.model-controls button:disabled {
  opacity: 0.4;
  cursor: default;
}
#model-hint {
  font-size: 11px;
  text-align: center;
  line-height: 1.8;
  margin: 18px 0 8px;
}
#model-disclaimer {
  font-size: 9px;
  text-align: center;
  color: #7b8175;
  line-height: 1.8;
}
.product-information {
  padding: 42px 36px;
}
.product-information .eyebrow {
  color: #d78b20;
  margin-bottom: 15px;
}
.product-information h2 {
  font-size: 48px;
}
.product-information #modal-description {
  font-size: 13px;
  line-height: 1.8;
  color: #6a7365;
}
.nutrition {
  border-top: 1px solid #edf0e8;
  margin-top: 24px;
  padding-top: 20px;
}
.nutrition-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.nutrition-heading h3 {
  font: 22px Georgia;
  margin: 0;
}
.portion-controls {
  display: flex;
  gap: 4px;
}
.portion-controls button {
  padding: 7px 11px;
  font-size: 10px;
}
.portion-controls [aria-pressed="true"] {
  background: #2e4a38;
  color: white;
  border-color: #2e4a38;
}
.energy {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin: 18px 0;
}
.energy strong {
  font: 38px Georgia;
  color: #d88e24;
}
.energy span {
  font-size: 12px;
}
.energy small {
  font-size: 10px;
  margin-left: auto;
  color: #73806b;
}
.nutrition-row {
  margin: 13px 0;
}
.nutrition-row > div:first-child {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 7px;
}
.nutrition-row strong {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.bar-track {
  height: 6px;
  border-radius: 10px;
  background: #f1f3ed;
  overflow: hidden;
}
.bar-track span {
  display: block;
  height: 100%;
  width: var(--bar-width);
  background: var(--bar-color);
  border-radius: 10px;
  animation: bar-grow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
  transform-origin: left;
}
.nutrition-row:nth-child(2) .bar-track span {
  animation-delay: 0.1s;
}
.nutrition-row:nth-child(3) .bar-track span {
  animation-delay: 0.2s;
}
.nutrition-row:nth-child(4) .bar-track span {
  animation-delay: 0.3s;
}
#nutrition-note {
  font-size: 10px;
  line-height: 1.7;
  color: #7a8174;
  margin: 18px 0 5px;
}
#nutrition-source {
  font-size: 10px;
  color: #2987a4;
  text-decoration: underline;
}
#modal-note {
  font-size: 10px;
  line-height: 1.6;
  color: #7a8174;
  margin: 20px 0 12px;
}
.product-information .button {
  width: 100%;
  font-size: 11px;
}
@keyframes bar-grow {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(1);
  }
}
@keyframes model-arrive {
  from {
    opacity: 0;
    transform: scale(0.65);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@media (max-width: 750px) {
  .product-experience {
    grid-template-columns: 1fr;
  }
  .model-panel {
    padding: 23px;
  }
  .model-stage {
    height: 260px;
  }
  .product-information {
    padding: 30px 25px;
  }
  .product-information h2 {
    font-size: 39px;
  }
  .product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-visual {
    height: 230px;
  }
  #product-modal {
    width: 94vw;
    max-height: 92svh;
  }
  .model-panel {
    padding-top: 30px;
  }
}
@media (max-width: 420px) {
  .product-visual {
    height: 190px;
  }
  .nutrition-heading h3 {
    font-size: 20px;
  }
  .model-controls button {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #fruit-canvas,
  .bar-track span {
    animation: none;
  }
}
.model-panel {
  background: radial-gradient(ellipse at 50% 40%, #fff 35%, #fcfaf5 72%, #f2f7ed);
}
#fruit-canvas {
  perspective: 850px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
}
.photo-float {
  width: 65%;
  height: 75%;
  animation: photo-float 5s ease-in-out infinite;
  transform-style: preserve-3d;
}
.photo-turn {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}
.photo-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  filter: drop-shadow(0 18px 16px #422d1624);
}
.photo-face svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.photo-back {
  transform: rotateY(180deg);
}
.original-photo {
  margin-top: 20px;
  border-top: 1px solid #e6e9df;
  padding-top: 12px;
  font-size: 11px;
  color: #657660;
}
.original-photo summary {
  cursor: pointer;
  text-align: center;
}
.original-photo img {
  display: block;
  max-width: 100%;
  max-height: 300px;
  margin: 14px auto 0;
  border-radius: 12px;
  object-fit: contain;
}
.original-photo p {
  font-size: 9px;
  line-height: 1.8;
}
.original-photo a {
  text-decoration: underline;
}
@keyframes photo-float {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo-float {
    animation: none;
  }
}
.photo-float {
  max-width: 205px;
  max-height: 245px;
}
.nutrition-row .bar-track span {
  animation-delay: 0.35s;
}
.nutrition-row:nth-child(2) .bar-track span {
  animation-delay: 0.45s;
}
.nutrition-row:nth-child(3) .bar-track span {
  animation-delay: 0.55s;
}
.nutrition-row:nth-child(4) .bar-track span {
  animation-delay: 0.65s;
}

#gold-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
  cursor: grab;
  animation: model-arrive 0.85s ease both;
}
#gold-canvas:active {
  cursor: grabbing;
}
#gold-canvas:focus-visible {
  outline: 2px solid #e9a24b;
  outline-offset: -4px;
  border-radius: 16px;
}
#gold-canvas[hidden],
#fruit-canvas[hidden] {
  display: none;
}
@media (prefers-reduced-motion: reduce) {
  #gold-canvas {
    animation: none;
  }
}

/* Photo entrance replaces all orbit/drag interactions. */
#fruit-canvas {
  position: relative;
  display: block;
  perspective: none;
  cursor: default;
  touch-action: auto;
  animation: none;
}
#fruit-canvas:active {
  cursor: default;
}
.fruit-arrival {
  position: absolute;
  filter: drop-shadow(0 18px 13px #78501720);
  transform-origin: 50% 55%;
  animation: fruit-enter 1.2s cubic-bezier(0.16, 0.8, 0.25, 1) both;
}
.fruit-arrival svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.fruit-primary {
  width: 59%;
  height: 70%;
  left: 9%;
  top: 9%;
  --finish: -10deg;
}
.fruit-secondary {
  width: 39%;
  height: 47%;
  right: 5%;
  bottom: 8%;
  --finish: 17deg;
  animation-delay: 0.18s;
}
.nutrition-row .bar-track span {
  animation-delay: 1.05s;
}
.nutrition-row:nth-child(2) .bar-track span {
  animation-delay: 1.15s;
}
.nutrition-row:nth-child(3) .bar-track span {
  animation-delay: 1.25s;
}
.nutrition-row:nth-child(4) .bar-track span {
  animation-delay: 1.35s;
}
@keyframes fruit-enter {
  0% {
    opacity: 0;
    transform: translateY(75px) rotate(-190deg) scale(0.15);
  }
  65% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotate(var(--finish)) scale(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .fruit-arrival {
    animation: none;
    transform: rotate(var(--finish));
  }
  .nutrition-row .bar-track span {
    animation: none;
  }
}
/* Staggered photo cascade: each fruit falls from above, then settles. */
.model-stage {
  overflow: hidden;
}
#fruit-canvas {
  overflow: hidden;
}
.fruit-drop {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--size);
  height: 30%;
  filter: drop-shadow(0 9px 7px #76512524);
  transform: translateY(-100%) rotate(var(--turn));
  animation: fruit-fall 1.65s cubic-bezier(0.3, 0.02, 0.65, 1) var(--delay) both;
}
.fruit-drop svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.nutrition-row .bar-track span {
  animation-delay: 1.6s;
}
@keyframes fruit-fall {
  0% {
    opacity: 0;
    transform: translateY(-680px) rotate(calc(var(--turn) - 210deg));
  }
  8% {
    opacity: 1;
  }
  72% {
    transform: translateY(-90%) rotate(calc(var(--turn) + 9deg));
  }
  86% {
    transform: translateY(-117%) rotate(calc(var(--turn) - 5deg));
  }
  100% {
    opacity: 1;
    transform: translateY(-100%) rotate(var(--turn));
  }
}
@media (prefers-reduced-motion: reduce) {
  .fruit-drop {
    animation: none;
  }
  .nutrition-row .bar-track span {
    animation: none;
  }
}
/* Clean photographic sprites, with independent transparent edges. */
.fruit-drop.clean-cutout {
  width: 49%;
  height: auto;
  aspect-ratio: 1;
  background-size: 300% 100%;
  background-repeat: no-repeat;
  background-position: var(--sample) center;
  filter: drop-shadow(0 13px 10px #59371316);
  animation: none;
  opacity: 0;
  transform: translateY(-600px) rotate(-90deg);
}
.fruit-drop.cutout-0 {
  left: 4%;
  top: 33%;
  --turn: -16deg;
}
.fruit-drop.cutout-1 {
  left: 48%;
  top: 43%;
  --turn: 19deg;
}
.fruit-drop.cutout-2 {
  left: 23%;
  top: 65%;
  --turn: -5deg;
}
.photos-ready .clean-cutout {
  animation: clean-fall 1.65s cubic-bezier(0.32, 0.02, 0.64, 1) var(--delay) both;
}
@keyframes clean-fall {
  0% {
    opacity: 0;
    transform: translateY(-620px) rotate(calc(var(--turn) - 110deg));
  }
  9% {
    opacity: 1;
  }
  76% {
    transform: translateY(-44%) rotate(calc(var(--turn) + 6deg));
  }
  89% {
    transform: translateY(-54%) rotate(calc(var(--turn) - 3deg));
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) rotate(var(--turn));
  }
}
.product-clean-visual {
  position: relative;
  overflow: hidden;
  background: radial-gradient(ellipse at center, #fff 20%, #fbf8f0);
  height: 300px;
}
.product-clean-visual .card-cutout {
  position: absolute;
  width: 51%;
  aspect-ratio: 1;
  background-size: 300% 100%;
  background-repeat: no-repeat;
  filter: drop-shadow(0 8px 7px #59371312);
  transition: transform 0.5s;
}
.card-cutout:nth-child(1) {
  left: 6%;
  top: 10%;
  background-position: 0% 50%;
  transform: rotate(-13deg);
}
.card-cutout:nth-child(2) {
  left: 46%;
  top: 20%;
  background-position: 50% 50%;
  transform: rotate(15deg);
}
.card-cutout:nth-child(3) {
  left: 25%;
  top: 40%;
  background-position: 100% 50%;
  transform: rotate(-5deg);
}
.product:hover .card-cutout:nth-child(1) {
  transform: translateY(-7px) rotate(-18deg);
}
.product-clean-visual > span {
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  z-index: 2;
}
.product-page .model-stage:after {
  bottom: 16%;
  left: 25%;
  right: 25%;
  opacity: 0.5;
}
@media (max-width: 750px) {
  .product-clean-visual {
    height: 240px;
  }
}
@media (max-width: 420px) {
  .product-clean-visual {
    height: 190px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .photos-ready .clean-cutout {
    animation: none;
    opacity: 1;
    transform: translateY(-50%) rotate(var(--turn));
  }
  .product-clean-visual .card-cutout {
    transition: none;
  }
}
