.product-photo-trigger {
  display: block;
  width: 100%;
  padding: 0;
  cursor: zoom-in;
}

.featured-photo-trigger {
  height: 100%;
  border-radius: inherit;
}

.featured-photo-trigger:focus-visible {
  outline-offset: -5px;
}

.reference .story-photo::after {
  pointer-events: none;
}

.reference #story, .reference .hero-photo, .reference .story-photo,
.reference .product, .reference .contact, .product-sheet {
  border-radius: 24px;
}

.reference .product .product-image, .sheet-photo {
  border-radius: 16px;
}

.reference .discover, .reference .story-link, .reference .whatsapp,
.reference .season, .reference .season button, .dialog-close {
  border-radius: 999px;
}

#products .product {
  --product-card-padding: 12px 12px 20px;
  padding: 0;
  display: grid;
}

#products .product > h3 {
  margin: 0;
  min-height: 0;
  border-radius: inherit;
}

.product-card-button {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  padding: var(--product-card-padding);
  border-radius: inherit;
  text-align: start;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.product-card-button > * {
  width: 100%;
  pointer-events: none;
}

.product-card-button:focus-visible {
  outline-offset: -3px;
}

.product-card-button .product-name {
  width: auto;
  min-height: 48px;
  margin: 18px 4px 8px;
}

@media (hover: hover) {
  .product-card-button:hover .product-name {
    color: var(--gold);
    text-decoration: underline;
  }
}

@media (max-width: 400px) {
  #products .product { --product-card-padding: 8px; }
}

html { scrollbar-gutter: stable; }
html:has(dialog[open]) {
  overflow: hidden;
}

dialog::backdrop {
  background: rgb(0 0 0 / 80%);
}

.product-sheet {
  width: min(880px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  padding: 60px 28px 28px;
  border: 1px solid var(--gold);
  background: #21140f;
  color: var(--text);
}

.product-sheet-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.product-sheet h2 {
  margin: 0 0 24px;
  font-size: clamp(32px, 4vw, 48px);
}

.product-sheet h3 { color: var(--gold); margin-bottom: 0; }
.product-sheet p { margin-top: 4px; white-space: pre-line; }
.sheet-gallery-image { position: relative; }
.sheet-photo {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  touch-action: pan-y pinch-zoom;
}
.sheet-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  padding: 0;
  background: transparent;
  color: #fff;
  font: 400 38px/1 Georgia, serif;
  text-shadow: 0 1px 5px #000, 0 0 3px #000;
}
.gallery-prev { left: 4px; }
.gallery-next { right: 4px; }
.product-sheet .gallery-position { margin: 6px 0 0; text-align: center; font-size: 13px; }
.sheet-closing-ghost { position: fixed; z-index: 12; pointer-events: none; overflow: hidden; }

.dialog-close {
  position: absolute;
  z-index: 1;
  top: 10px;
  right: 12px;
  min-height: 44px;
  padding: 6px 14px;
  border: 1px solid var(--gold);
  background: #21140f;
  color: #fff;
}

.photo-viewer {
  --viewer-gutter: max(12px, env(safe-area-inset-left), env(safe-area-inset-right));
  --viewer-clearance: max(62px, calc(env(safe-area-inset-top) + 54px), env(safe-area-inset-bottom));
  position: fixed;
  inset: 0;
  margin: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  border: 0;
  padding: var(--viewer-clearance) var(--viewer-gutter);
  overflow: hidden;
  background: transparent;
}

.photo-viewer[open] {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
}
.photo-viewer::backdrop { background: rgb(13 9 7 / 98%); }
.photo-viewer .dialog-close {
  top: max(10px, env(safe-area-inset-top));
  right: var(--viewer-gutter);
}
.photo-viewer img {
  display: block;
  width: min(100%, calc(max(1px, 100dvh - 2 * var(--viewer-clearance)) * var(--photo-ratio, 1)));
  height: auto;
  aspect-ratio: var(--photo-ratio, 1);
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  object-position: center;
}

@media (prefers-reduced-motion: no-preference) {
  dialog[open]::backdrop {
    animation: reveal 580ms cubic-bezier(.22, .75, .2, 1) both;
  }

  dialog[open].is-closing::backdrop {
    animation: dismiss-backdrop 580ms cubic-bezier(.4, 0, .3, 1) both;
  }
}

.is-closing .dialog-close { pointer-events: none; }

@keyframes dismiss-backdrop {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes reveal {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 650px) {
  .product-sheet { padding-inline: 16px; }
  .product-sheet-content { grid-template-columns: 1fr; gap: 18px; }
}

#productDetails:empty { display: none; }
#productShare { margin-top: 18px; }
#shareProduct { border: 1px solid var(--gold); border-radius: 999px; padding: 8px 16px; min-height: 44px; }
#shareOptions { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 10px; }
#shareOptions a { color: var(--gold); }
#siteLoading {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: min(60dvh, 400px);
  padding: 20px;
  text-align: center;
}

#retryContent {
  padding: 9px 18px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  background: #21140f;
}
.reference footer.site-footer { display: block; }
.site-footer .footer-brand { margin: 0 0 15px; padding: 0; border: 0; text-transform: none; color: var(--gold); font-size: 17px; }
.footer-columns { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px 40px; }
.footer-columns h2 { font: inherit; font-size: 16px; font-weight: 650; margin: 0 0 8px; color: var(--text); }
.footer-columns address { font-style: normal; }
.footer-visit .directions { display: inline-block; margin-top: 2px; color: var(--gold); }
.site-footer #storeHours { margin: 9px 0 0; padding: 0; border: 0; font-size: inherit; white-space: pre-line; }
#extraContacts { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
#extraContacts a { display: inline-flex; align-items: center; gap: 9px; min-height: 36px; }
@media (max-width: 680px) { .footer-columns { grid-template-columns: 1fr; } }

@media (max-width: 750px) {
  .reference #whatsapp.catalog-whatsapp {
    position: fixed;
    bottom: max(16px, env(safe-area-inset-bottom));
    right: max(16px, env(safe-area-inset-right));
    z-index: 5;
    margin: 0;
    box-shadow: 0 6px 20px rgb(0 0 0 / 45%);
  }
}
