body.product-detail-open {
  overflow: hidden;
}

.product-title-button {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  text-align: left;
}

.product-title-button:hover,
.product-title-button:focus-visible {
  color: var(--brand);
}

.product-media-button[data-product-detail-open] {
  cursor: pointer;
}

.product-detail-backdrop {
  align-items: center;
  background: rgb(31 13 18 / 78%);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: clamp(0.75rem, 2vw, 2rem);
  position: fixed;
  z-index: 800;
}

.product-detail-dialog {
  background: #fffaf4;
  border: 1px solid rgb(104 31 50 / 12%);
  border-radius: 1.5rem;
  box-shadow: 0 30px 90px rgb(0 0 0 / 36%);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  max-height: min(880px, calc(100dvh - 2rem));
  max-width: 1240px;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.product-detail-close {
  align-items: center;
  background: rgb(255 250 244 / 94%);
  border: 1px solid rgb(104 31 50 / 20%);
  border-radius: 50%;
  color: var(--brand);
  cursor: pointer;
  display: flex;
  font-size: 1.7rem;
  height: 2.75rem;
  justify-content: center;
  line-height: 1;
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2.75rem;
  z-index: 3;
}

.product-detail-gallery {
  background: #efe4d7;
  min-height: 620px;
  overflow: hidden;
  padding: clamp(1rem, 2.4vw, 2rem);
}

.product-detail-media-layout {
  display: grid;
  gap: 1rem;
  grid-template-columns: 78px minmax(0, 1fr);
  height: 100%;
}

.product-detail-media-layout.single-image {
  grid-template-columns: minmax(0, 1fr);
}

.product-detail-thumbnails {
  align-content: start;
  display: grid;
  gap: 0.7rem;
  max-height: 100%;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.product-detail-thumbnail {
  background: #fffaf4;
  border: 2px solid transparent;
  border-radius: 0.75rem;
  cursor: pointer;
  height: 78px;
  overflow: hidden;
  padding: 0;
  width: 78px;
}

.product-detail-thumbnail.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgb(104 31 50 / 10%);
}

.product-detail-thumbnail img {
  height: 100%;
  object-fit: contain;
  width: 100%;
}

.product-detail-main-image {
  align-items: center;
  background: #f7eee3;
  border: 0;
  border-radius: 1.1rem;
  cursor: zoom-in;
  display: flex;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  padding: 1rem;
  position: relative;
}

.product-detail-main-image img {
  height: 100%;
  max-height: 720px;
  object-fit: contain;
  transition: transform 180ms ease;
  width: 100%;
}

.product-detail-main-image:hover img,
.product-detail-main-image:focus-visible img {
  transform: scale(1.025);
}

.product-detail-main-image span {
  background: rgb(255 250 244 / 92%);
  border: 1px solid rgb(104 31 50 / 16%);
  border-radius: 999px;
  bottom: 1rem;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  padding: 0.55rem 0.75rem;
  position: absolute;
  right: 1rem;
  white-space: nowrap;
  z-index: 2;
}

.product-detail-empty-image {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
}

.product-detail-info {
  overflow-y: auto;
  padding: clamp(2rem, 4vw, 3.5rem);
}

.product-detail-kicker {
  color: var(--brand-2);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}

.product-detail-info h2 {
  color: var(--ink);
  font: 700 clamp(1.65rem, 3vw, 2.45rem)/1.08 "Fraunces", serif;
  padding-right: 2.5rem;
}

.product-detail-sku {
  color: var(--muted);
  font-size: 0.8rem;
  margin: 0.55rem 0 1.75rem;
}

.product-option-group {
  border: 0;
  margin: 0 0 1.5rem;
  padding: 0;
}

.product-option-group legend {
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
}

.product-option-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.product-option {
  align-items: center;
  background: #fff;
  border: 1px solid rgb(104 31 50 / 24%);
  border-radius: 0.7rem;
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 800;
  justify-content: center;
  min-height: 46px;
  min-width: 50px;
  overflow: hidden;
  padding: 0.55rem 0.8rem;
}

.product-option.with-image {
  align-items: stretch;
  flex-direction: column;
  gap: 0.35rem;
  height: 92px;
  padding: 0.3rem;
  width: 78px;
}

.product-option.with-image img {
  background: #f3e8dc;
  border-radius: 0.45rem;
  height: 56px;
  object-fit: contain;
  width: 100%;
}

.product-option.with-image span {
  font-size: 0.68rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-option:hover:not(:disabled),
.product-option:focus-visible,
.product-option.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px rgb(104 31 50 / 10%);
  color: var(--brand);
}

.product-option.active {
  background: #f4e4e6;
}

.product-option:disabled {
  cursor: not-allowed;
  opacity: 0.34;
}

.product-detail-warning {
  background: #f7e9dd;
  border-radius: 0.8rem;
  color: var(--brand);
  margin-bottom: 1rem;
  padding: 0.9rem;
}

.product-detail-purchase {
  border: 1px solid rgb(104 31 50 / 14%);
  border-radius: 1rem;
  display: grid;
  gap: 0.75rem;
  margin-top: 1.8rem;
  padding: 1.15rem;
}

.product-detail-purchase > div {
  align-items: end;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.product-detail-purchase strong {
  color: var(--ink);
  font-size: 1.55rem;
}

.product-detail-purchase p {
  color: var(--muted);
  font-size: 0.82rem;
}

.product-detail-stock {
  color: var(--brand-2);
  font-size: 0.78rem;
  font-weight: 800;
}

.product-detail-add {
  background: var(--brand);
  border: 0;
  border-radius: 0.8rem;
  color: #fff;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  min-height: 52px;
  width: 100%;
}

.product-detail-add:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

@media (max-width: 900px) {
  .product-detail-backdrop {
    align-items: stretch;
    padding: 0;
  }

  .product-detail-dialog {
    border-radius: 0;
    display: block;
    max-height: 100dvh;
    overflow-y: auto;
  }

  .product-detail-gallery {
    min-height: min(62dvh, 580px);
  }

  .product-detail-info {
    overflow: visible;
  }
}

@media (max-width: 560px) {
  .product-detail-gallery {
    min-height: 420px;
    padding: 0.75rem;
  }

  .product-detail-media-layout {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .product-detail-main-image {
    grid-row: 1;
  }

  .product-detail-thumbnails {
    display: flex;
    grid-row: 2;
    overflow-x: auto;
    overflow-y: hidden;
  }

  .product-detail-thumbnail {
    flex: 0 0 64px;
    height: 64px;
    width: 64px;
  }

  .product-detail-info {
    padding: 1.5rem 1.1rem 2rem;
  }

  .product-detail-purchase > div {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .product-detail-main-image img {
    transition: none;
  }
}

