/* Responsive photography and the product page. Breakpoint: tablets <= 1024px. */

/* Native disclosure triangles are inconsistent across browsers, especially Safari. */
summary {
  list-style: none;
}
summary::-webkit-details-marker {
  display: none;
}
summary::marker {
  content: "";
}
.detail-info summary,
.gallery-editor > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.detail-info summary::after,
.gallery-editor > summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 400;
  flex: none;
}
.detail-info details[open] > summary::after,
.gallery-editor[open] > summary::after {
  content: "−";
}

.product-detail {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.product-gallery {
  position: relative;
  min-width: 0;
  background: var(--stone);
}
.product-gallery-track {
  display: grid;
  gap: 2px;
}
.product-photo {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
  background: var(--stone);
}
.product-photo:hover {
  opacity: 1;
}
.product-photo img {
  display: block;
  width: 100%;
  height: calc(100svh - var(--header));
  min-height: 480px;
  object-fit: contain;
}
.photo-zoom-plus {
  position: absolute;
  right: 24px;
  bottom: 24px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: #fff;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.product-gallery-dots {
  position: sticky;
  bottom: 48px;
  display: flex;
  flex-direction: column;
  width: 40px;
  margin: -100px 0 20px 16px;
  z-index: 2;
}
.product-gallery-dots button {
  padding: 6px;
  width: 28px;
  height: 24px;
  display: grid;
  place-items: center;
}
.product-gallery-dots span {
  display: block;
  width: 4px;
  height: 4px;
  background: #999;
  border-radius: 50%;
}
.product-gallery-dots [aria-current="true"] span {
  background: #191919;
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 3px #191919;
}
.product-gallery-count {
  position: absolute;
  left: 26px;
  bottom: 12px;
  font-size: 10px;
  margin: 0;
}
.detail-info {
  position: sticky;
  top: var(--header);
  padding: 40px clamp(28px, 4vw, 72px) 48px;
}
.detail-info h1 {
  font-size: 22px;
}
.detail-price {
  margin: 12px 0 36px;
}
.size-label {
  font-size: 11px;
  margin-bottom: 12px;
}
.size-options {
  border: 0;
  padding: 0;
  margin: 0 0 30px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.size-option {
  position: relative;
  cursor: pointer;
}
.size-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.size-option > span:first-of-type {
  display: grid;
  place-items: center;
  min-width: 44px;
  min-height: 44px;
  border: 1px solid transparent;
  padding: 8px;
}
.size-option input:checked + span {
  border-color: var(--ink);
}
.size-option input:focus-visible + span {
  outline: 2px solid #9e7136;
  outline-offset: 3px;
}
.size-option input:disabled + span {
  opacity: 0.35;
  text-decoration: line-through;
  cursor: not-allowed;
}
.detail-info .primary {
  border-radius: 0;
}
.detail-info .purchase-actions {
  margin-bottom: 12px;
}
.detail-info details {
  font-size: 12px;
}
.detail-info .text-button {
  margin-bottom: 20px;
}
.editorial-story picture {
  display: block;
  min-width: 0;
}
.editorial-story img {
  display: block;
  height: auto;
  object-fit: contain;
}

/* Management: each photo has its own preview, file input and saved path. */
.photo-slot {
  border-top: 1px solid var(--line);
  margin-top: 36px;
  padding-top: 28px;
}
.photo-slot h2 {
  font-size: 22px;
}
.photo-slot-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  max-width: 760px;
  gap: 24px;
}
.photo-slot-device {
  min-width: 0;
}
.photo-slot .settings-photo {
  width: 100%;
  height: 220px;
  object-fit: contain;
  background: #eee;
}
.photo-slot input:not([type="hidden"]) {
  width: 100%;
}
.photo-slot label {
  display: block;
  margin: 14px 0 6px;
}
.photo-slot .primary {
  margin-top: 12px;
}
.photo-status,
.slot-status {
  min-height: 1.6em;
  margin: 10px 0;
}
.photo-slot .secondary {
  margin-top: 18px;
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  /* One source, full-bleed on every screen. Crop edges; never distort the image. */
  .campaign > img,
  .campaign picture img {
    object-fit: cover;
    object-position: center;
  }
  .campaign picture {
    inset: 0;
    height: 100%;
  }
  .campaign-copy {
    align-self: center;
    margin: 0;
    padding: 24px;
    background: none;
  }
  .boutique-home:not(.has-scrolled):not(.panel-open):has(
      .first-campaign:not(.no-image)
    ) .boutique-header {
    background: transparent;
  }
  .campaign .hero-search {
    bottom: 34px;
  }
  .campaign .scroll-prompt {
    bottom: 8px;
  }
  .product-detail {
    display: block;
  }
  .product-gallery-track {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }
  .product-gallery-track::-webkit-scrollbar {
    display: none;
  }
  .product-photo {
    flex: 0 0 100%;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .product-photo img {
    height: min(72svh, 850px);
    min-height: 0;
    aspect-ratio: 4 / 5;
  }
  .product-gallery-dots {
    position: static;
    flex-direction: row;
    justify-content: center;
    width: auto;
    margin: 0;
    padding: 10px 48px;
  }
  .product-gallery-count {
    bottom: 13px;
  }
  .detail-info {
    position: static;
    padding: 28px 24px 40px;
  }
  .detail-info h1 {
    font-size: 21px;
  }
  .detail-price {
    margin-bottom: 28px;
  }
  .editorial-story {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 600px) {
  .photo-slot-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px), (hover: none) and (pointer: coarse) {
  .scroll-prompt {
    display: none;
  }
}

/* YONDER-UI-20260929-11: full-bleed campaign images on every viewport. */
.campaign > img, .campaign picture img { object-fit: cover !important; }
.campaign picture { inset: 0; width: 100%; height: 100%; }
