/* Product-detail modal — versioned separately so cached base CSS cannot hide the new layout. */
.product-detail-dialog {
  width: min(1120px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.product-detail-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1.08fr);
  width: 100%;
  height: min(860px, calc(100vh - 32px));
  height: min(860px, calc(100dvh - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: hidden;
}

.product-detail-media {
  position: relative;
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  margin: 0;
  padding: 28px;
  background: linear-gradient(145deg, #f8f3e9, #e9decc);
}

.product-detail-media img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  background: rgba(255, 253, 249, 0.5);
}

.product-detail-photo-tag {
  position: absolute;
  left: 22px;
  bottom: 18px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 3px;
  background: rgba(255, 253, 249, 0.88);
  color: #6a4b29;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.product-detail-copy {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  padding: 34px 34px 26px;
  scrollbar-color: #d6bb86 transparent;
  scrollbar-width: thin;
}

.product-detail-category {
  display: block;
  margin: 0 48px 8px 0;
  color: var(--orange-deep, #764c23);
}

.product-detail-copy h2 {
  margin: 0 48px 9px 0;
  color: var(--ink, #352519);
  font-family: var(--font-display, 'Manrope', sans-serif);
  font-size: clamp(25px, 3vw, 35px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.product-detail-summary {
  margin: 0 0 16px;
  color: var(--muted, #786a5d);
  font-size: 12px;
  line-height: 1.6;
}

.product-detail-intro {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-left: 3px solid var(--yellow, #d6aa4c);
  border-radius: 0 5px 5px 0;
  background: #f8f3e9;
}

.product-detail-intro h3 {
  margin: 0 0 5px;
  color: var(--orange-deep, #764c23);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.product-detail-intro p {
  margin: 0;
  color: #55483a;
  font-size: 11px;
  line-height: 1.6;
}

.product-detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px 16px;
  margin: 0;
}

.product-detail-facts > div {
  min-width: 0;
  padding-top: 8px;
  border-top: 1px solid var(--line, rgba(61, 43, 29, 0.14));
}

.product-detail-facts dt {
  margin: 0 0 4px;
  color: var(--orange-deep, #764c23);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.045em;
}

.product-detail-facts dd {
  margin: 0;
  color: #5f5448;
  font-size: 10px;
  line-height: 1.55;
}

.product-detail-note {
  margin: 14px 0 0;
  padding: 9px 10px;
  border-radius: 4px;
  background: #fbf8f2;
  color: var(--muted, #786a5d);
  font-size: 9px;
  line-height: 1.5;
}

.product-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line, rgba(61, 43, 29, 0.14));
}

.product-detail-actions > span {
  color: var(--muted, #786a5d);
  font-size: 9px;
  line-height: 1.45;
}

.product-detail-actions .button {
  flex: none;
  min-height: 40px;
  white-space: nowrap;
}

.product-detail-dialog .sample-preview-close {
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-color: rgba(118, 76, 35, 0.16);
  background: rgba(255, 253, 249, 0.94);
  color: var(--orange-deep, #764c23);
  box-shadow: 0 4px 14px rgba(53, 37, 25, 0.08);
}

.service-sample-photo.product-details-trigger {
  cursor: pointer;
}

.service-sample-photo .photo-arrow {
  top: auto;
  right: 11px;
  bottom: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 31px;
  padding: 0 11px;
  transform: none;
  border: 1px solid rgba(255, 253, 249, 0.8);
  border-radius: 999px;
  background: rgba(255, 253, 249, 0.94);
  color: var(--orange-deep, #764c23);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.01em;
  opacity: 1;
  pointer-events: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.service-sample-photo:hover .photo-arrow,
.service-sample-photo:focus-visible .photo-arrow {
  transform: translateY(-2px);
  background: var(--yellow, #d6aa4c);
}

@media (max-width: 900px) {
  .product-detail-dialog {
    width: min(720px, calc(100vw - 24px));
  }

  .product-detail-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(210px, 34vh) minmax(0, 1fr);
    height: min(900px, calc(100vh - 24px));
    height: min(900px, calc(100dvh - 24px));
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }

  .product-detail-media {
    padding: 16px 44px 16px 16px;
  }

  .product-detail-copy {
    padding: 24px 25px 20px;
  }
}

@media (max-width: 600px) {
  .product-detail-dialog {
    width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
    border-radius: 9px;
  }

  .product-detail-shell {
    grid-template-rows: minmax(175px, 27vh) minmax(0, 1fr);
    height: calc(100vh - 16px);
    height: calc(100dvh - 16px);
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .product-detail-media {
    padding: 12px 42px 12px 12px;
  }

  .product-detail-photo-tag {
    left: 12px;
    bottom: 10px;
    font-size: 7px;
  }

  .product-detail-copy {
    padding: 18px 16px 16px;
  }

  .product-detail-copy h2 {
    margin-right: 34px;
    font-size: 24px;
  }

  .product-detail-category {
    margin-right: 38px;
  }

  .product-detail-facts {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .product-detail-facts dd {
    font-size: 10px;
  }

  .product-detail-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .product-detail-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-sample-photo .photo-arrow {
    transition: none;
  }
}


/* Mobile readability and touch targets for product details */
@media (max-width: 600px) {
  .product-detail-dialog .sample-preview-close {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    top: 10px;
    right: 10px;
  }
  .product-detail-summary { font-size: 13px; }
  .product-detail-intro p { font-size: 12px; }
  .product-detail-facts dt { font-size: 10px; }
  .product-detail-facts dd { font-size: 11px; line-height: 1.6; }
  .product-detail-note { font-size: 11px; line-height: 1.55; }
  .product-detail-actions > span { font-size: 10px; }
  .product-detail-actions .button { min-height: 46px; }
}


/* Golden-orange surfaces for product detail interactions */
.product-detail-media { background: linear-gradient(145deg, #FFF0B5, #FFD66A); }
.product-detail-media img { background: rgba(255, 254, 248, .72); }
.product-detail-intro { background: #FFF1BD; border-left-color: #E49A12; }
.product-detail-note { background: #FFF7D9; }
.product-detail-dialog .sample-preview-close { background: rgba(255, 250, 226, .96); border-color: rgba(142, 60, 0, .22); }
.service-sample-photo .photo-arrow { background: rgba(255, 248, 218, .96); border-color: rgba(255, 255, 255, .92); }
.service-sample-photo:hover .photo-arrow, .service-sample-photo:focus-visible .photo-arrow { background: #FFC233; }
