.product-gallery {
  --gallery-ink: #30241e;
  --gallery-muted: #654439;
  --gallery-line: #e7d5c7;
  --gallery-accent: #963b27;
  color: var(--gallery-ink);
  padding-block: clamp(.85rem, 2.4vw, 1.9rem) clamp(1.1rem, 2.7vw, 2.2rem);
}

.product-gallery .product-gallery__title {
  max-width: 36ch;
  margin: 0 0 clamp(.9rem, 2.3vw, 1.6rem);
  color: inherit;
  font-size: clamp(1.9rem, 3.6vw, 3.2rem);
  line-height: 1.06;
  letter-spacing: -.03em;
  text-wrap: balance;
}

.product-gallery__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.37fr) minmax(0, 1fr);
  align-items: start;
  gap: clamp(1rem, 4vw, 3.75rem);
}

.product-gallery__media, .product-gallery__figure {
  min-width: 0;
  margin: 0;
}

.product-gallery__main {
  display: block;
  overflow: hidden;
  border-radius: clamp(.72rem, 1.4vw, 1.15rem);
  background: #efdfd2;
}

.product-gallery__main img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.product-gallery [data-product-caption] {
  margin: .42rem 0 .05rem;
  color: var(--gallery-muted);
  font-size: .88rem;
  line-height: 1.4;
}

.product-gallery__thumbs {
  display: flex;
  align-items: flex-start;
  gap: clamp(.32rem, 1.15vw, .65rem);
  margin: .45rem -4px 0;
  padding: 4px;
  overflow-x: auto;
  list-style: none;
  scrollbar-width: thin;
}

.product-gallery__thumb {
  display: grid;
  flex: 0 0 clamp(43px, 17.7%, 106px);
  place-items: center;
  min-width: 0;
  min-height: 44px;
  border: 2px solid transparent;
  border-radius: .55rem;
  padding: 2px;
  background: transparent;
}

.product-gallery__thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: .32rem;
  background: #efdfd2;
}

.product-gallery__thumb[aria-current='true'] {
  border-color: var(--gallery-accent);
}

.product-gallery__thumb:hover {
  border-color: var(--gallery-muted);
}

.product-gallery :is(a, button):focus-visible {
  outline: 2px solid #245a6c;
  outline-offset: 2px;
}

.product-gallery__details {
  min-width: 0;
  padding: clamp(1.15rem, 3vw, 2rem);
  border: 1px solid var(--gallery-line);
  border-radius: clamp(.72rem, 1.4vw, 1.15rem);
  background: #fffaf4;
}

.product-gallery .product-gallery__price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .12rem .55rem;
  margin: 0 0 .9rem;
  color: var(--gallery-muted);
  font-size: .92rem;
  line-height: 1.35;
}

.product-gallery__price strong {
  color: var(--gallery-ink);
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.product-gallery__details .product-gallery__cta {
  display: flex;
  box-sizing: border-box;
  justify-content: space-between;
  align-items: center;
  gap: .6rem;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: .8rem 1rem;
  border-radius: .55rem;
  white-space: normal;
}

.product-gallery__details .product-gallery__cta > svg {
  flex: 0 0 auto;
}

.product-gallery__details .product-gallery__extra {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .9rem;
  margin-top: .85rem;
  font-size: .96rem;
}

.product-gallery__details .product-gallery__note {
  margin: .75rem 0 0;
  color: var(--gallery-muted);
  font-size: .9rem;
  line-height: 1.45;
}

.product-gallery__description {
  margin-block-start: clamp(.7rem, 2vw, 1.4rem);
  line-height: 1.55;
}

.product-gallery__description p {
  max-width: 66ch;
}

@media (max-width: 760px) {
  .product-gallery {
    padding-block-start: .62rem;
  }

  .product-gallery .product-gallery__title {
    margin-bottom: .72rem;
  }

  .product-gallery__layout {
    grid-template-columns: minmax(0, 1fr);
    gap: .68rem;
  }

  .product-gallery__thumbs {
    margin-top: .32rem;
  }

  .product-gallery__details {
    padding: .66rem .82rem;
  }

  .product-gallery .product-gallery__price {
    margin-bottom: .55rem;
  }
}
