.product-page {
  width: min(100% - 2rem, 1100px);
  display: grid;
}

.back-link {
  display: inline-flex;
  margin-bottom: 1.1rem;
  color: var(--accent, #ff3b00);
  text-decoration: none;
  font-weight: 700;
}

.back-link:hover {
  text-decoration: underline;
}

.product-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: start;
}

.product-main-image {
  aspect-ratio: 3 / 4;
  width: 100%;
  padding: 0;
  border: 1px solid var(--line, rgba(14, 14, 14, 0.1));
  border-radius: var(--radius, 14px);
  overflow: hidden;
  background: var(--paper-deep, #e4e0d8);
  cursor: zoom-in;
  transition: transform 0.35s var(--ease, ease);
}

.product-main-image:hover {
  transform: scale(1.01);
}

.product-main-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.product-extra-images {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 2rem;
  width: 100%;
}

.product-extra-figure {
  margin: 0;
  border: 1px solid var(--line, rgba(14, 14, 14, 0.1));
  border-radius: var(--radius, 14px);
  overflow: hidden;
  background: var(--paper-deep, #e4e0d8);
}

.product-extra-figure img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

body.lightbox-open {
  overflow: hidden;
}

.image-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
}

.image-lightbox.is-open {
  display: flex;
}

.image-lightbox[hidden] {
  display: none !important;
}

.image-lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.88);
  cursor: zoom-out;
}

.image-lightbox-content {
  position: relative;
  z-index: 1;
  max-width: 92vw;
  max-height: 92vh;
}

.image-lightbox-content img {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
}

.image-lightbox-close {
  position: absolute;
  top: -0.5rem;
  right: -0.5rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: var(--ink, #0e0e0e);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.product-details h1 {
  font-family: var(--font-display, sans-serif);
  letter-spacing: -0.03em;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.55rem;
}

.product-price {
  margin: 0 0 1.25rem;
  font-family: var(--font-display, sans-serif);
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent, #ff3b00);
}

.product-specs {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.5rem;
}

.product-specs div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 0.25rem;
}

.product-specs dt {
  color: var(--muted, #6f6f6f);
  font-weight: 650;
}

.product-specs dd {
  margin: 0;
}

.product-form fieldset {
  border: none;
  margin: 0 0 1.2rem;
  padding: 0;
}

.product-form legend {
  margin-bottom: 0.6rem;
  font-weight: 700;
}

.option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.option-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line, rgba(14, 14, 14, 0.1));
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.option-chip:has(input:checked) {
  background: var(--ink, #0e0e0e);
  border-color: var(--ink, #0e0e0e);
  color: #fff;
}

.option-chip input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-hint {
  color: var(--muted, #6f6f6f);
}

.auth-hint a {
  color: var(--accent, #ff3b00);
  font-weight: 700;
}

.size-guide {
  margin-top: 2rem;
}

@media (max-width: 860px) {
  .product-layout {
    grid-template-columns: 1fr;
  }

  .product-extra-images {
    grid-template-columns: 1fr;
  }
}
