.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-instagram-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  max-width: 100%;
  padding: 0.5rem 0.75rem;
  margin: 0 0 0.75rem;
  border: 1px solid var(--line, rgba(14, 14, 14, 0.1));
  border-radius: 8px;
  color: var(--muted, #666);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.product-instagram-link svg {
  flex-shrink: 0;
}

.product-instagram-link:hover {
  color: var(--ink, #0e0e0e);
  border-color: currentColor;
}

.product-instagram-link:focus-visible {
  outline: 2px solid var(--accent, #ff3b00);
  outline-offset: 3px;
}

.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-side-picker { display: flex; gap: 4px; width: fit-content; margin: 0 auto 14px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--cream, #f6efe8); }
.product-side-picker button { min-width: 104px; min-height: 44px; padding: 10px 20px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); font: inherit; cursor: pointer; }
.product-side-picker button[aria-pressed="true"] { background: var(--ink, #2b2a26); color: #fff; }
.product-side-picker button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.product-main-image[aria-busy="true"] { opacity: .65; }

.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-details {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line, rgba(14, 14, 14, 0.1));
  padding-top: 1rem;
}

.product-specs-details summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

.product-specs-details summary::-webkit-details-marker {
  display: none;
}

.product-specs-details summary::after {
  content: "▾";
  display: inline-block;
  margin-left: 0.5rem;
  transition: transform 0.15s ease;
}

.product-specs-details[open] summary::after {
  transform: rotate(180deg);
}

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

.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;
}

.add-to-cart-trigger {
  margin-bottom: 1.2rem;
}

.product-form .add-to-cart-trigger[hidden] {
  display: none;
}

.size-picker .button {
  margin-top: 0.9rem;
}

.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;
  }
}

.product-personalize {
  padding: 16px;
  margin: 16px 0;
  border: 1px solid #a9b79c;
  border-radius: 12px;
  background: #eef2e8;
}
.product-personalize .button {
  width: 100%;
}
.product-personalize p {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.5;
}
