.product-page { background: var(--paper); }
.product-page [hidden] { display: none !important; }
.product-header { background: rgba(255, 253, 249, .96); }
.product-main {
  max-width: var(--max);
  min-height: 70vh;
  margin: 0 auto;
  padding: clamp(28px, 4vw, 58px) 28px clamp(80px, 9vw, 124px);
}
.product-back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: clamp(24px, 3vw, 40px);
  padding: 8px 0;
  border-bottom: 1px solid transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
}
.product-back:hover { color: var(--ink); border-bottom-color: currentColor; }
.product-loading { padding: 100px 0; color: var(--muted); text-align: center; }
.product-detail {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(380px, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
}
.product-gallery {
  width: 100%;
  max-width: 660px;
  min-width: 0;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.product-gallery.single { grid-template-columns: minmax(0, 1fr); }
.product-gallery.single .product-thumbnails { display: none; }
.product-thumbnails {
  display: grid;
  gap: 10px;
}
.product-thumbnail {
  aspect-ratio: 4 / 5;
  padding: 0;
  overflow: hidden;
  border: 1px solid transparent;
  background: var(--paper-deep);
  cursor: pointer;
}
.product-thumbnail.active { border-color: var(--ink); }
.product-thumbnail img { width: 100%; height: 100%; object-fit: cover; }
.product-main-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  margin: 0;
  overflow: hidden;
  background: var(--paper-deep);
}
.product-main-visual img { width: 100%; height: 100%; object-fit: cover; }
.product-main-visual img.image-error { padding: 24%; object-fit: contain; opacity: .35; }
.product-zoom-open {
  position: absolute;
  inset: 0;
  width: 100%;
  padding: 0;
  border: 0;
  color: var(--white);
  background: transparent;
  cursor: zoom-in;
  font: inherit;
}
.product-zoom-open:disabled { cursor: default; opacity: 1; }
.product-zoom-open:focus-visible { outline: 3px solid var(--earth); outline-offset: -5px; }
.product-zoom-hint {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 9px 13px;
  border-radius: 999px;
  color: #fff;
  background: rgba(35, 30, 26, .82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .2s ease, transform .2s ease;
}
.product-zoom-open:not(:disabled):hover .product-zoom-hint,
.product-zoom-open:not(:disabled):focus-visible .product-zoom-hint { opacity: 1; transform: translateY(0); }
.product-information {
  position: sticky;
  top: 104px;
  padding-top: 8px;
}
.product-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0 0 20px;
  color: var(--earth);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.product-breadcrumb i { color: var(--line); font-style: normal; }
.product-stock-badge {
  display: inline-block;
  margin-bottom: 17px;
  padding: 7px 10px;
  color: var(--ink);
  background: var(--white);
  font-size: 13px;
  font-weight: 700;
}
.product-stock-badge.available { color: #33412d; background: #edf2e8; }
.product-stock-badge.soldout { color: #6f675f; background: #eeeae4; }
.product-stock-badge.review { color: #6d4d31; background: #f6e7d5; }
.product-information h1 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(38px, 4vw, 58px);
  line-height: 1.02;
  text-wrap: balance;
}
.product-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin: 22px 0 0;
  font-size: 26px;
  font-weight: 700;
}
.product-price-regular { color: var(--muted); font-size: 18px; font-weight: 500; text-decoration: line-through; }
.product-price-sale { color: var(--earth-dark); font-size: 29px; font-weight: 700; }
.product-price-discount {
  padding: 5px 8px;
  color: #fffdf9;
  background: var(--earth);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}
.product-status { margin: 12px 0 0; color: #635c55; font-size: 17px; line-height: 1.6; }
.product-size-block {
  margin-top: 32px;
  padding-top: 25px;
  border-top: 1px solid var(--line);
}
.product-size-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.product-size-heading h2 { margin: 0; font-family: var(--sans); font-size: 16px; font-weight: 700; }
.product-size-heading span { color: var(--muted); font-size: 15px; }
.product-size-options { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.product-size-option {
  min-width: 48px;
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}
.product-size-option:hover:not(:disabled), .product-size-option.selected { color: var(--white); background: var(--ink); border-color: var(--ink); }
.product-size-option:disabled { color: #9c948c; background: #eeeae4; cursor: not-allowed; text-decoration: line-through; }
.product-size-option.review:disabled { color: #75583e; background: #f6e7d5; text-decoration: none; }
.product-action {
  width: 100%;
  min-height: 54px;
  margin-top: 22px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  color: var(--white);
  background: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  transition: background .2s ease, color .2s ease;
}
.product-action:hover:not(:disabled) { color: var(--ink); background: transparent; }
.product-action:disabled { color: #8e867f; border-color: var(--line); background: #e8e3dc; cursor: not-allowed; }
.product-description-block { max-width: 680px; margin-top: 34px; padding-top: 28px; border-top: 1px solid var(--line); }
.product-description-block .eyebrow { font-size: 14px; letter-spacing: .12em; }
.product-description { margin-top: 15px; color: #5d554e; font-size: 18px; line-height: 1.75; white-space: pre-line; }
.product-description p { margin: 0 0 12px; }
.product-error { max-width: 700px; padding: 80px 0 120px; }
.product-error h1 { margin-top: 12px; font-size: clamp(42px, 6vw, 72px); }
.product-error > p:not(.eyebrow) { margin: 18px 0 30px; color: var(--muted); }
.product-footer { margin-top: 0; }

body.product-lightbox-open { overflow: hidden; }
.product-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 2vw, 30px);
  background: rgba(24, 20, 17, .94);
}
.product-lightbox[hidden] { display: none; }
.product-lightbox-surface {
  width: min(100%, 1600px);
  height: min(94vh, 1050px);
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  background: #181512;
  box-shadow: 0 26px 80px rgba(0, 0, 0, .42);
}
.product-lightbox-header,
.product-lightbox-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px clamp(18px, 3vw, 34px);
  color: #fff;
  background: #211d19;
}
.product-lightbox-header { border-bottom: 1px solid rgba(255, 255, 255, .14); }
.product-lightbox-header .eyebrow { margin: 0 0 3px; color: #d7c2ad; font-size: 11px; }
.product-lightbox-header h2 { margin: 0; color: #fff; font-family: var(--sans); font-size: 17px; }
.product-lightbox button {
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  background: rgba(255, 255, 255, .08);
  cursor: pointer;
  font: inherit;
}
.product-lightbox button:hover:not(:disabled),
.product-lightbox button:focus-visible { color: #211d19; background: #fff; }
.product-lightbox button:focus-visible { outline: 3px solid #d8b28d; outline-offset: 2px; }
.product-lightbox button:disabled { opacity: .28; cursor: default; }
.product-lightbox-close { width: 44px; height: 44px; border-radius: 50%; font-size: 27px; line-height: 1; }
.product-lightbox-stage {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 54px;
  align-items: stretch;
  gap: 12px;
  padding: 14px;
  background: #100e0c;
}
.product-lightbox-arrow { align-self: center; width: 50px; height: 50px; border-radius: 50%; font-size: 21px; }
.product-lightbox-viewport {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #171411;
  cursor: default;
  touch-action: none;
  user-select: none;
}
.product-lightbox-viewport.is-zoomed { cursor: grab; }
.product-lightbox-viewport.is-dragging { cursor: grabbing; }
.product-lightbox-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: center;
  will-change: transform;
  transition: transform .16s ease;
  pointer-events: none;
}
.product-lightbox-viewport.is-dragging .product-lightbox-image { transition: none; }
.product-lightbox-footer { border-top: 1px solid rgba(255, 255, 255, .14); }
.product-zoom-controls { display: flex; align-items: center; gap: 7px; }
.product-zoom-controls button { min-width: 42px; height: 38px; padding: 0 12px; border-radius: 999px; font-weight: 700; }
#productZoomReset { min-width: 68px; }
#productLightboxStatus { min-width: 180px; margin: 0; text-align: center; font-size: 14px; font-weight: 700; }
.product-lightbox-help { margin: 0; color: #c9bdb2; font-size: 12px; text-align: right; }

@media (max-width: 900px) {
  .product-detail { grid-template-columns: minmax(0, .92fr) minmax(320px, 1fr); gap: 34px; }
  .product-gallery { grid-template-columns: 60px minmax(0, 1fr); gap: 10px; }
}

@media (max-width: 760px) {
  .product-header { height: 68px; }
  .product-main { padding: 22px 14px 80px; }
  .product-back { margin: 0 6px 20px; }
  .product-detail { grid-template-columns: 1fr; gap: 34px; }
  .product-gallery, .product-gallery.single { display: flex; flex-direction: column; }
  .product-main-visual { width: 100%; order: 1; }
  .product-zoom-open { pointer-events: none; }
  .product-zoom-hint { display: none; }
  .product-thumbnails { width: 100%; display: flex; order: 2; gap: 8px; overflow-x: auto; scrollbar-width: none; }
  .product-gallery.single .product-thumbnails { display: none; }
  .product-thumbnails::-webkit-scrollbar { display: none; }
  .product-thumbnail { flex: 0 0 62px; width: 62px; }
  .product-information { position: static; padding: 0 6px; }
  .product-information h1 { font-size: clamp(36px, 10vw, 48px); }
  .product-price { margin-top: 18px; font-size: 23px; }
  .product-size-block { margin-top: 26px; }
  .product-action { min-height: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  .product-action, .product-zoom-hint, .product-lightbox-image { transition: none; }
}
