/* Shared machine presentation for the shop and the Cagliari collection. */
button.product-gallery-trigger {
  position: relative;
  width: 100%;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  cursor: zoom-in;
}
.product-gallery-trigger img { mix-blend-mode: multiply; filter: none; }
.gallery-photo-hint {
  position: absolute;
  right: .8rem;
  bottom: .5rem;
  padding: .35rem .6rem;
  border: 1px solid #bba47a;
  border-radius: 2rem;
  background: #fbf5e9;
  color: #343c2c;
  font: 600 .67rem/1.3 system-ui, sans-serif;
}
.product-gallery-trigger:focus-visible,
.product-gallery-dialog button:focus-visible,
.product-gallery-dialog a:focus-visible { outline: 3px solid #aa7d44; outline-offset: 3px; }
.product-gallery-dialog {
  box-sizing: border-box;
  width: min(760px, calc(100vw - 24px));
  max-width: none;
  max-height: 90vh;
  max-height: 90dvh;
  padding: 0 1.5rem 1.5rem;
  border: 1px solid #bba47a;
  border-radius: 12px;
  background: #fbf5e9;
  color: #343c2c;
  box-shadow: 0 24px 70px #211d1566;
  overscroll-behavior: contain;
}
.product-gallery-dialog::backdrop { background: #202b23c9; backdrop-filter: blur(4px); }
.gallery-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  background: #fbf5e9;
  border-bottom: 1px solid #bba47a66;
}
.gallery-heading h2 { margin: 0; font: 400 clamp(1.3rem, 4vw, 1.85rem)/1.2 Georgia, serif; }
.product-gallery-dialog button {
  font: inherit;
  cursor: pointer;
  color: #343c2c;
  background: #fbf5e9;
  border: 1px solid #bba47a;
  border-radius: 5px;
  min-height: 44px;
  min-width: 44px;
  padding: .5rem;
  touch-action: manipulation;
}
.product-gallery-dialog .gallery-close { flex: 0 0 44px; font-size: 1.8rem; line-height: 1; }
.gallery-stage { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: .5rem; align-items: center; padding-top: 1rem; }
.gallery-stage img { display: block; width: 100%; height: min(46vh, 370px); object-fit: contain; mix-blend-mode: multiply; }
.gallery-counter { text-align: center; font-size: .78rem; color: #655033; margin: .6rem 0; }
.gallery-thumbnails { display: flex; justify-content: center; gap: .7rem; margin-bottom: 1.5rem; }
.gallery-thumbnails button { width: 78px; height: 78px; padding: 5px; }
.gallery-thumbnails img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.gallery-thumbnails button[aria-pressed="true"] { outline: 2px solid #7b5938; outline-offset: 2px; background: #eadcc4; box-shadow: none; }
.gallery-description { border-top: 1px solid #bba47a66; padding-top: 1rem; font: 400 .94rem/1.8 system-ui, sans-serif; }
.gallery-description p { margin: .6rem 0 1rem; }
.gallery-description .gallery-eyebrow { font-size: .67rem; letter-spacing: .13em; color: #7b5938; font-weight: 700; }
.gallery-description .gallery-intro { font-size: 1.1rem; line-height: 1.65; }
.gallery-description ul { padding-left: 1.25rem; }
.gallery-description li + li { margin-top: .35rem; }
.gallery-enquiry { display: inline-block; margin-top: .5rem; color: inherit; text-underline-offset: .25em; }
.coffee-collection .products { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; }
.coffee-collection .products article { height: 100%; }
.coffee-collection .products .product-gallery-trigger { padding: 0; }
@media (max-width: 1050px) {
  .coffee-collection .products, #grid.coffee-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .product-gallery-dialog { padding-inline: 1rem; }
  .gallery-stage { gap: .2rem; }
  .gallery-stage img { height: min(36vh, 260px); }
  .gallery-description { font-size: .88rem; }
  .gallery-photo-hint { font-size: .6rem; right: .4rem; padding: .3rem .45rem; }
}
