/* Our photography: a violet rim and the sunny plate mark, with natural food colours. */
.food-photo {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  flex: none;
  overflow: hidden;
  background: #f8f6f1;
  border-radius: 14px;
  isolation: isolate;
}
.food-photo .photo-crop {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  border-radius: inherit;
}
.food-photo .photo-crop > .atlas-photo {
  position: absolute;
  display: block !important;
  width: 300% !important;
  height: 300% !important;
  max-width: none !important;
  max-height: none !important;
  object-fit: fill !important;
  margin: 0 !important;
  border-radius: 0 !important;
  transform: none !important;
}
.food-photo .photo-crop > .fallback-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0;
  border-radius: 0;
}
.photo-frame {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 2px solid #6337cf40;
  box-shadow: inset 0 0 0 2px #f8f6f1;
  border-radius: 16px;
}
.photo-frame::after {
  content: '';
  position: absolute;
  z-index: 2;
  right: 6px;
  bottom: 6px;
  width: 22px;
  height: 22px;
  border: 1px solid #6337cf40;
  border-radius: 50%;
  background: #f8f6f1 url('/brand/het-eigen-bord.svg') center/19px 19px no-repeat;
  pointer-events: none;
}
:root[data-theme='dark'] .photo-frame {
  border-color: #c5acff70;
}
.product-card .product-thumbnail {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  margin: 0 0 10px;
  border-radius: 14px;
  background: #f8f6f1;
}
.fruit-picture figure > .product-detail-photo {
  width: min(45%, 360px);
  height: auto;
  aspect-ratio: 1;
  margin: 0;
  border-radius: 20px;
}
.fruit-picture figcaption {
  min-width: 0;
}
/* Invullen (29-10): de foto staat open boven de vraag; klein genoeg om de knoppen in beeld te houden. */
.preference-form .fruit-picture figure > .product-detail-photo {
  width: min(100%, 180px);
  margin: 0 auto;
  flex: none;
}
.product-detail-photo.photo-frame::after {
  width: 32px;
  height: 32px;
  right: 10px;
  bottom: 10px;
  background-size: 27px 27px;
}
.meal-visual.photo-frame {
  border-radius: 14px;
}
.meal-visual.photo-frame::after {
  width: 16px;
  height: 16px;
  right: 3px;
  bottom: 3px;
  background-size: 13px 13px;
}
.meal-visual.meal-visual-hero.photo-frame {
  border-radius: 18px 18px 0 0;
  border-width: 0 0 2px;
  box-shadow: none;
}
.meal-visual.meal-visual-hero.photo-frame::after {
  width: 30px;
  height: 30px;
  right: 10px;
  bottom: 10px;
  background-size: 25px 25px;
}
.meal-photo-collage > .food-photo {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  border-radius: 0;
}
.meal-photo-collage > .food-photo:not(:first-child) {
  display: none;
}
.meal-photo-collage.meal-visual-hero {
  gap: 10px;
  padding: 18px;
}
.meal-photo-collage.meal-visual-hero > .food-photo {
  display: block;
  width: calc((100% - 20px) / 3);
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
}
.food-item .food-photo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  margin-right: 8px;
}
.food-item .photo-frame::after {
  width: 11px;
  height: 11px;
  right: 1px;
  bottom: 1px;
  background-size: 9px 9px;
}
.food-item.with-photo {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0;
}
.food-item.with-photo > span:not(.food-photo) {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.food-item.with-photo > small {
  margin-left: 6px;
}
.lunch-photo-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.lunch-photo-heading .food-photo {
  width: 80px;
  height: 80px;
}
.lunch-photo-heading h2 {
  margin: 0;
  flex: 1;
  min-width: 0;
}
.custom-meal-photo {
  width: 100%;
  margin: 0 0 14px;
}
.custom-meal-photo .meal-visual {
  width: 100%;
  height: 150px;
  min-height: 0;
}
.custom-meal-photo .meal-photo-collage > .food-photo {
  display: block;
  width: 33.333%;
  height: auto;
  aspect-ratio: 1;
}
@media (max-width: 540px) {
  .catalogue-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .product-card {
    padding: 20px;
  }
  .product-card h2 {
    font-size: 21px;
    overflow-wrap: break-word;
  }
}
@media (max-width: 740px) {
  .fruit-picture figure > .product-detail-photo {
    width: min(100%, 320px);
    margin: 0 auto;
    flex: none;
  }
  .product-card .product-thumbnail {
    margin-bottom: 8px;
  }
  .food-item.with-photo {
    font-size: 13px;
    min-height: 58px;
  }
  .food-item.with-photo > small {
    font-size: 10px;
  }
  .food-item .food-photo {
    width: 34px;
    height: 34px;
    margin-right: 6px;
  }
  .lunch-photo-heading .food-photo {
    width: 68px;
    height: 68px;
  }
  .lunch-photo-heading h2 {
    font-size: 20px;
  }
  .meal-photo-collage.meal-visual-hero {
    padding: 16px;
    gap: 8px;
  }
  .meal-photo-collage.meal-visual-hero > .food-photo {
    width: calc((100% - 16px) / 3);
  }
}

/* A quiet marker on opened photos; the explanation appears once in the footer. */
.photo-ai-label {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  padding: 2px 6px;
  border-radius: 5px;
  background: #f8f6f1ed;
  color: #6337cf;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.02em;
  pointer-events: none;
}
.fruit-picture figure {
  justify-content: center;
}
.app-legal .photo-explanation {
  flex-basis: 100%;
  margin: 2px 0 0;
  font-size: 11px;
  line-height: 1.6;
  color: var(--muted);
}

/* Photo and title follow the same product action as the existing button. */
.product-card .product-photo-open,
.product-card .product-title-open {
  display: block;
  width: 100%;
  border: 0;
  padding: 0;
  margin: 0;
  min-height: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  text-align: left;
  font: inherit;
  line-height: inherit;
  letter-spacing: inherit;
}
.product-card .product-photo-open {
  border-radius: 16px;
}
.product-card .product-title-open {
  min-height: 44px;
}
.product-card .product-title-open:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.product-card .product-photo-open:hover .photo-frame {
  border-color: var(--green);
}
