/* hurmajeans.html: photos on the left (a two-column grid on desktop, a
   swipeable row with arrows and dots on phones) and a sticky info column on the right.
   Shared tokens and controls come from store.css. */

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--text);
}

.product-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
}

@media (min-width: 900px) {
  .product-layout {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
    gap: 40px;
    align-items: start;
  }
}

/* ---------- Photos ---------- */
/* Phones: one photo per swipe, with arrows and dots. Each photo is exactly
   the row's width so the snap points and the dot/arrow maths line up. */
.product-photos-wrap {
  position: relative;
}

.product-photos {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.product-photos::-webkit-scrollbar {
  display: none;
}

.product-photo {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
  aspect-ratio: 3 / 4;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  /* Product shots and model photos are both on pure white. */
  background: #ffffff;
  overflow: hidden;
  cursor: zoom-in;
}

.product-photo:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: -2px;
}

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

/* Product shots (cut-outs and close-ups) are shown whole. */
.product-photo.is-product img {
  object-fit: contain;
  padding: 12px;
}

.product-photos-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: rgba(235, 232, 226, 0.8);
  color: var(--text);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.product-photos-prev {
  left: 8px;
}

.product-photos-next {
  right: 8px;
}

.product-photos-arrow[disabled] {
  opacity: 0;
  pointer-events: none;
}

.product-dots {
  display: flex;
  justify-content: center;
  gap: 2px;
  margin-top: 6px;
}

/* 6px dot inside a larger tap target. */
.product-dot {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.product-dot::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  margin: auto;
  border-radius: 50%;
  background: var(--border);
  transition: background-color 0.2s ease;
}

.product-dot.is-active::before {
  background: var(--text);
}

/* Desktop: a two-column grid, with the first two photos (front and back)
   full width, each on its own row. */
@media (min-width: 900px) {
  .product-photos {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    overflow: visible;
  }

  .product-photo:nth-child(-n + 2) {
    grid-column: 1 / -1;
  }

  .product-photos-arrow,
  .product-dots {
    display: none;
  }
}

/* ---------- Info column ---------- */
@media (min-width: 900px) {
  .product-info {
    position: sticky;
    top: 84px;
  }
}

.product-name {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 3px;
  text-transform: uppercase;
  line-height: 1.25;
  margin-bottom: 4px;
}

.product-info > .product-price {
  margin-bottom: 18px;
}

.ship-line {
  font-size: 11px;
  letter-spacing: 0.3px;
  color: var(--muted);
  margin-bottom: 10px;
}

.product-info .soldout-badge {
  margin-bottom: 10px;
}

/* ---------- Story line + details / size guide / shipping ---------- */
/* Always visible, between the buttons and the Details section. */
.product-story {
  margin-top: 20px;
  color: var(--body-text);
  font-size: 12.5px;
  line-height: 1.7;
}

.product-story:empty {
  display: none;
}

.product-sections {
  margin-top: 20px;
  border-top: 1px solid var(--border);
}

.product-section {
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 80px;
}

.product-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  cursor: pointer;
  list-style: none;
}

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

.product-section summary::after {
  content: "+";
  font-size: 16px;
  font-weight: 300;
  line-height: 1;
}

.product-section[open] summary::after {
  content: "\2212";
}

.product-section summary:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.product-section-body {
  padding-bottom: 16px;
  color: var(--body-text);
  font-size: 12.5px;
}

.product-section-body p + p,
.product-section-body p + div,
.product-section-body div + p {
  margin-top: 8px;
}

/* Production status: a timeline set by the dashboard's stage for this colour. */
.production-status[hidden] {
  display: none;
}

.production-steps {
  list-style: none;
}

.production-step {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 26px;
  padding-left: 22px;
  font-size: 11px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

/* The dot. */
.production-step::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 8px;
  z-index: 1;
  width: 9px;
  height: 9px;
  box-sizing: border-box;
  border: 1px solid var(--input-border);
  border-radius: 50%;
  background: var(--bg);
}

/* The line down to the next dot. */
.production-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 17px;
  bottom: -8px;
  width: 1px;
  background: var(--border);
}

.production-step.is-done::before {
  border-color: var(--text);
  background: var(--text);
}

.production-step.is-done:not(:last-child)::after {
  background: var(--text);
}

.production-step.is-current {
  font-weight: 500;
  color: var(--text);
}

.production-step.is-current::before {
  left: 1px;
  top: 6px;
  width: 13px;
  height: 13px;
  border-color: var(--text);
  background: radial-gradient(circle, var(--text) 0 3px, var(--bg) 3.5px);
}

.product-specs > div:first-child {
  border-top: 0;
}

.product-specs > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--border);
}

.product-specs dt {
  font-size: 10px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 2px;
}

/* Size chart image; tap to enlarge (lightbox.js). */
.size-chart-zoom {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  overflow: hidden;
  cursor: zoom-in;
}

.size-chart-zoom img {
  display: block;
  width: 100%;
  height: auto;
}

.size-chart-zoom:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

/* Size chart table (filled in once the chart is ready). */
.size-chart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 4px;
}

.size-chart-table th,
.size-chart-table td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.size-chart-table th:first-child,
.size-chart-table td:first-child {
  text-align: left;
}

.size-chart-table th {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}
