/* Gallery */
.gallery-thumb {
  opacity: 0.45;
  transition: opacity 0.25s ease, outline-color 0.25s ease;
  outline: 1px solid transparent;
  outline-offset: 3px;
}

.gallery-thumb:hover {
  opacity: 0.75;
}

.gallery-thumb.is-active {
  opacity: 1;
  outline-color: rgba(166, 138, 114, 0.6); /* Taupe */
}

.dark .gallery-thumb.is-active {
  outline-color: rgba(166, 138, 114, 0.6); /* Taupe */
}

#gallery-main {
  transition: opacity 0.18s ease;
}

#gallery-main.is-fading {
  opacity: 0;
}

/* Specs table */
.specs-row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.5rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(156, 139, 122, 0.25); /* Mushroom/25 */
}

.specs-row:first-child {
  border-top: 1px solid rgba(156, 139, 122, 0.25); /* Mushroom/25 */
}

/* Personalisation block */
.personalisation-block {
  border: 1px solid rgba(156, 139, 122, 0.25); /* Mushroom/25 */
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: rgba(156, 139, 122, 0.08);
}

.dark .personalisation-block {
  background: rgba(156, 139, 122, 0.06);
}

/* Breadcrumb */
.breadcrumb-sep {
  opacity: 0.3;
}

/* =========================
   Product page layout + gallery (2026-10 redesign)
   Portrait photo box (4:5) that the photo fills edge to edge (no bars), capped
   by the window height so the title, price and buy button stay on the first
   screen. Thumbnails are a slim vertical strip beside it on desktop; on
   phones the photo swipes and a "1 / N" chip replaces the thumbnails.
   ========================= */

.pd-layout {
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
  .pd-wrap {
    padding-top: 2.5rem;
    padding-bottom: 5rem;
  }
  .pd-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.pd-gallery {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.pd-main {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  cursor: zoom-in;
}

.pd-img {
  position: relative;
  z-index: 1;
}

.pd-backdrop {
  position: absolute;
  inset: -10%;
  width: 120%;
  height: 120%;
  max-width: none;
  object-fit: cover;
  filter: blur(24px) brightness(0.9);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/* A photo that is not portrait is shown whole over a blurred copy of itself. */
.pd-main.is-wide .pd-img {
  object-fit: contain;
}

.pd-main.is-wide .pd-backdrop {
  opacity: 1;
}

.pd-counter {
  position: absolute;
  z-index: 11;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  background: rgba(31, 31, 31, 0.55);
  color: #F7F3EF;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  pointer-events: none;
}

.pd-counter:empty {
  display: none;
}

/* Phones: swipe + counter, no thumbnails. */
@media (max-width: 1023px) {
  .pd-thumbs {
    display: none !important;
  }
}

@media (min-width: 1024px) {
  .pd-counter {
    display: none;
  }

  .pd-gallery {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
  }

  .pd-main {
    flex: none;
    width: min(100%, 560px, calc((100vh - 230px) * 0.8));
  }

  @supports (height: 100svh) {
    .pd-main {
      width: min(100%, 560px, calc((100svh - 230px) * 0.8));
    }
  }

  .pd-thumbs {
    order: -1;
    flex: none;
    flex-direction: column;
    width: 4rem;
    max-height: 640px;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 0;
    scrollbar-width: none;
  }

  .pd-thumbs::-webkit-scrollbar {
    display: none;
  }

  .pd-thumbs .gallery-thumb {
    width: 4rem;
    height: 5rem;
  }
}

/* Reassurance line under the buy button */
.pd-assure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.875rem 0 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #6B6159; /* muted-light */
  text-align: center;
}

.dark .pd-assure {
  color: #9C8B7A; /* Mushroom */
}

.pd-assure .material-symbols-outlined {
  font-size: 1rem;
}

/* "Request a custom version": a real secondary button, not a faint link */
.pd-custom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.875rem 1.5rem;
  border: 1px solid rgba(156, 139, 122, 0.45); /* Mushroom */
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #3E342C; /* Espresso */
  transition: background-color 250ms ease-out, border-color 250ms ease-out;
}

.dark .pd-custom-btn {
  color: #F7F3EF; /* Ivory */
}

.pd-custom-btn:hover,
.pd-custom-btn:focus-visible {
  background-color: rgba(166, 138, 114, 0.12); /* Taupe */
  border-color: #A68A72;
}

/* Collapsible detail sections */
.pd-acc {
  border-top: 1px solid rgba(156, 139, 122, 0.25); /* Mushroom/25 */
}

.pd-acc-item {
  border-bottom: 1px solid rgba(156, 139, 122, 0.25);
}

.pd-acc-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #3E342C;
}

.dark .pd-acc-item summary {
  color: #F7F3EF;
}

.pd-acc-item summary::-webkit-details-marker {
  display: none;
}

.pd-acc-item summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 250ms ease-out;
}

.pd-acc-item[open] summary::after {
  transform: rotate(-135deg) translateY(-2px);
}

.pd-acc-body {
  padding: 0 0 1.25rem;
}

/* Photo viewer */
.pd-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(31, 31, 31, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.pd-lightbox[hidden] {
  display: none;
}

.pd-lb-img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 12px;
}

.pd-lb-btn {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: rgba(247, 243, 239, 0.12);
  color: #F7F3EF;
  cursor: pointer;
  transition: background-color 200ms ease-out;
}

.pd-lb-btn:hover,
.pd-lb-btn:focus-visible {
  background: rgba(247, 243, 239, 0.24);
}

.pd-lb-btn[hidden] {
  display: none;
}

.pd-lb-close { top: 1.25rem; right: 1.25rem; }
.pd-lb-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.pd-lb-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }

/* Phones: sticky buy bar */
.pd-sticky {
  display: none;
}

@media (max-width: 1023px) {
  .pd-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 45;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: rgba(247, 243, 239, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -16px 32px -26px rgba(62, 52, 44, 0.45);
    transform: translateY(110%);
    transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  .dark .pd-sticky {
    background: rgba(31, 31, 31, 0.9);
  }

  .pd-sticky.is-on {
    transform: translateY(0);
  }

  .pd-sticky-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
  }

  .pd-sticky-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8125rem;
    font-weight: 500;
  }

  .pd-sticky-price {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6B6159;
  }

  .dark .pd-sticky-price {
    color: #9C8B7A;
  }

  .pd-sticky-btn {
    flex: none;
    padding: 0.875rem 1.5rem;
    border: 0;
    border-radius: 999px;
    background: #A68A72; /* Taupe */
    color: #1F1F1F; /* Charcoal */
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    cursor: pointer;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pd-sticky { transition: none; }
}

/* More from this collection */
.pd-related {
  padding: 3rem 0 5rem;
  border-top: 1px solid rgba(156, 139, 122, 0.25);
}
