/* PDP base and container layout */
.pdp-page {
  min-height: 100vh;
  background: #ffffff;
}

.pdp-breadcrumb {
  max-width: 1300px;
  margin: 28px auto 0;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pdp-breadcrumb a {
  color: #4e4e4e;
  transition: color 160ms ease;
}

.pdp-breadcrumb a:hover,
.pdp-breadcrumb a:focus-visible {
  color: var(--ink);
}

.pdp-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 55fr) minmax(0, 45fr);
  gap: 60px;
  max-width: 1300px;
  margin: 40px auto 60px;
  padding: 0 20px;
  align-items: start;
}

/* Left column media gallery */
.pdp-media-column {
  min-width: 0;
  position: sticky;
  top: calc(var(--header-height) + 40px);
  align-self: start;
}

.pdp-media-gallery {
  display: grid;
  grid-template-columns: minmax(58px, 15%) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.pdp-thumbnail-track {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdp-thumbnail {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 1px solid #eaeaea;
  border-radius: 0;
  padding: 0;
  background: #f6f3ee;
  cursor: pointer;
  display: block;
  overflow: hidden;
  transition: border-color 160ms ease;
}

.pdp-thumbnail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-thumbnail:hover,
.pdp-thumbnail:focus-visible,
.pdp-thumbnail.is-active {
  border-color: #121212;
}

.pdp-main-display {
  min-width: 0;
}

.pdp-main-image-window {
  width: 100%;
  margin: 0;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background: #f6f3ee;
}

.pdp-main-image-window img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 160ms ease;
}

.pdp-main-image-window.is-switching img {
  opacity: 0.36;
}

.pdp-mobile-carousel {
  display: none;
}

.pdp-gallery-item {
  width: 100%;
  margin: 0;
  overflow: hidden;
  background: #f6f3ee;
}

.pdp-gallery-item-square {
  aspect-ratio: 1 / 1;
}

.pdp-gallery-item-portrait {
  aspect-ratio: 4 / 5;
}

.pdp-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pdp-gallery-dots {
  display: none;
}

/* Right column sticky information and buy box */
.pdp-info-column {
  position: sticky;
  top: calc(var(--header-height) + 40px);
  align-self: start;
  min-width: 0;
  max-height: calc(100vh - var(--header-height) - 80px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 8px 0 0;
  scrollbar-width: thin;
  scrollbar-color: #d6d6d6 transparent;
}

.pdp-info-column::-webkit-scrollbar {
  width: 4px;
}

.pdp-info-column::-webkit-scrollbar-track {
  background: transparent;
}

.pdp-info-column::-webkit-scrollbar-thumb {
  background: #d6d6d6;
}

.pdp-eyebrow {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.pdp-info-column h1 {
  margin: 0 0 10px;
  color: #121212;
  font-family: Didot, Georgia, serif;
  font-size: 28px;
  font-weight: 400;
  line-height: 1.16;
  letter-spacing: 0;
}

.pdp-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 22px;
}

.pdp-current-price {
  color: #b87333;
  font-size: 20px;
  font-weight: 700;
  line-height: 1;
}

.pdp-compare-price {
  color: var(--muted);
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  text-decoration: line-through;
}

.pdp-short-copy {
  max-width: 460px;
  margin: 0 0 28px;
  color: #555555;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.72;
}

.pdp-buy-box {
  margin: 0;
}

.pdp-variant-group {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
}

.pdp-variant-group legend {
  margin: 0 0 12px;
  padding: 0;
  color: #121212;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pdp-size-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pdp-size-option {
  position: relative;
  display: inline-flex;
  min-width: 58px;
  cursor: pointer;
}

.pdp-size-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.pdp-size-option span {
  width: 100%;
  min-height: 42px;
  padding: 10px 20px;
  border: 1px solid #eaeaea;
  background: #ffffff;
  color: #121212;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: border-color 160ms ease, background 160ms ease;
}

.pdp-size-option:hover span,
.pdp-size-option input:focus-visible + span,
.pdp-size-option input:checked + span,
.pdp-size-option.is-active span {
  border-color: #121212;
}

.stone-uniqueness-notice {
  margin: 0 0 24px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  color: #8b8b8b;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.58;
}

.stone-uniqueness-notice span {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border: 1px solid #d6d6d6;
  border-radius: 50%;
  color: #888888;
  display: inline-grid;
  place-items: center;
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
}

.pdp-atc-button {
  width: 100%;
  height: 50px;
  border: none;
  background: #121212;
  color: #ffffff;
  cursor: pointer;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s;
}

.pdp-atc-button:hover,
.pdp-atc-button:focus-visible {
  background: #333333;
}

.pdp-atc-button.is-loading {
  background: #333333;
  cursor: wait;
}

/* Accordion details */
.pdp-accordions {
  margin-top: 28px;
  border-bottom: 1px solid #eaeaea;
}

.pdp-accordion {
  border-top: 1px solid #eaeaea;
}

.pdp-accordion h2 {
  margin: 0;
}

.pdp-accordion-button {
  width: 100%;
  min-height: 52px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #121212;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-align: left;
  text-transform: uppercase;
}

.pdp-accordion-button span {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
}

.pdp-accordion-button span::before,
.pdp-accordion-button span::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 14px;
  height: 1px;
  background: #121212;
  transform: translateY(-50%);
  transition: opacity 160ms ease, transform 160ms ease;
}

.pdp-accordion-button span::after {
  transform: translateY(-50%) rotate(90deg);
}

.pdp-accordion-button[aria-expanded="true"] span::after {
  opacity: 0;
  transform: translateY(-50%);
}

.pdp-accordion-panel {
  padding: 0 0 22px;
}

.pdp-accordion-panel[hidden] {
  display: none;
}

.pdp-accordion-panel p {
  margin: 0;
  color: #585858;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.72;
}

/* You may also like recommendations */
.pdp-recommendations {
  max-width: 1300px;
  margin: 0 auto;
  padding: 40px 20px;
}

.pdp-recommendations h2 {
  margin: 0 0 35px;
  color: #121212;
  font-family: Didot, Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.05em;
  text-align: center;
}

.pdp-recommendation-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  gap: 24px;
}

/* Slide-out cart drawer */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: rgb(18 18 18 / 0);
  transition: background 220ms ease;
}

.cart-drawer.is-open {
  pointer-events: auto;
  background: rgb(18 18 18 / 0.22);
}

.cart-drawer-inner {
  position: absolute;
  top: 0;
  right: 0;
  width: min(100vw, 390px);
  height: 100%;
  padding: 28px 24px;
  background: #ffffff;
  box-shadow: -20px 0 48px rgb(18 18 18 / 0.12);
  display: flex;
  flex-direction: column;
  transform: translateX(105%);
  transition: transform 260ms ease;
}

.cart-drawer.is-open .cart-drawer-inner {
  transform: translateX(0);
}

.cart-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eaeaea;
}

.cart-drawer-header h2 {
  margin: 0;
  color: #121212;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
}

.cart-drawer-close {
  width: 34px;
  height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  color: #121212;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.cart-drawer-close span {
  position: relative;
  width: 16px;
  height: 16px;
}

.cart-drawer-close span::before,
.cart-drawer-close span::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 16px;
  height: 1px;
  background: #121212;
}

.cart-drawer-close span::before {
  transform: rotate(45deg);
}

.cart-drawer-close span::after {
  transform: rotate(-45deg);
}

.cart-line-item {
  padding: 22px 0;
  border-bottom: 1px solid #eaeaea;
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.cart-line-item img {
  width: 82px;
  aspect-ratio: 1 / 1;
  display: block;
  object-fit: cover;
  background: #f6f3ee;
}

.cart-line-item p {
  margin: 0 0 8px;
  color: #121212;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.cart-line-item span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.cart-drawer-summary {
  margin-top: auto;
  padding-top: 20px;
}

.cart-drawer-summary p {
  margin: 0 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #121212;
  font-size: 13px;
  line-height: 1;
}

.cart-checkout-button,
.cart-continue-button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cart-checkout-button {
  border: 1px solid #121212;
  background: #121212;
  color: #ffffff;
}

.cart-continue-button {
  margin-top: 10px;
  border: 1px solid #e1e1e1;
  background: #ffffff;
  color: #121212;
  cursor: pointer;
}

@media (max-width: 768px) {
  .pdp-breadcrumb {
    margin-top: 20px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
  }

  .pdp-breadcrumb::-webkit-scrollbar {
    display: none;
  }

  .pdp-wrapper {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 28px auto 40px;
  }

  .pdp-media-gallery {
    display: block;
  }

  .pdp-thumbnail-track,
  .pdp-main-image-window {
    display: none;
  }

  .pdp-mobile-carousel {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .pdp-mobile-carousel::-webkit-scrollbar {
    display: none;
  }

  .pdp-gallery-item,
  .pdp-gallery-item-square,
  .pdp-gallery-item-portrait {
    flex: 0 0 100%;
    aspect-ratio: 1 / 1;
    scroll-snap-align: start;
  }

  .pdp-gallery-dots {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .pdp-gallery-dots button {
    width: 7px;
    height: 7px;
    border: 1px solid #121212;
    border-radius: 50%;
    padding: 0;
    background: transparent;
    cursor: pointer;
  }

  .pdp-gallery-dots button.is-active {
    background: #121212;
  }

  .pdp-info-column {
    position: static;
    max-height: none;
    overflow: visible;
    padding-top: 10px;
  }

  .pdp-media-column {
    position: static;
  }

  .pdp-info-column h1 {
    font-size: 26px;
  }

  .pdp-short-copy {
    max-width: none;
  }

  .pdp-recommendations {
    margin-top: 0;
    padding: 34px 20px;
  }

  .pdp-recommendation-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px 14px;
  }

  .cart-drawer-inner {
    width: min(100vw, 360px);
  }
}

@media (max-width: 520px) {
  .pdp-wrapper,
  .pdp-breadcrumb {
    padding-left: 16px;
    padding-right: 16px;
  }

  .pdp-size-option {
    flex: 1 1 calc(50% - 8px);
  }

  .cart-drawer-inner {
    width: 100vw;
  }
}
