/* LUMEN A — product page. Loaded only by sections/lumen-a-pdp.liquid.
 *
 * Page-scoped rather than folded into lumen-a-craft.css: nothing here is used
 * anywhere else, and the homepage should not pay for the gallery's rules.
 */

.a-pdp { background: var(--a-ground); color: var(--a-ink); padding-block: 2.5rem var(--a-pad); }

.a-pdp__grid {
  display: grid;
  grid-template-columns: minmax(0, 58fr) minmax(0, 42fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
  max-width: var(--a-max);
  margin-inline: auto;
  padding-inline: var(--a-bleed);
}

/* ------------------------------------------------------------------ crumbs */
.a-crumbs { font-size: 0.75rem; color: var(--a-muted); margin: 0 0 1.5rem; }
.a-crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; }
.a-crumbs li + li::before { content: '/'; margin-right: 0.5rem; color: var(--a-line-strong); }
.a-crumbs a { color: inherit; }

/* ----------------------------------------------------------------- gallery */
.a-gal__track { display: grid; gap: 0.75rem; }
.a-gal__slide { position: relative; margin: 0; }
.a-gal__btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--a-surface);
  cursor: zoom-in;
  border-radius: var(--a-radius);
  overflow: hidden;
}
.a-gal__btn:focus-visible { outline: 2px solid var(--a-accent); outline-offset: 3px; }
.a-gal__img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform var(--dur-card) var(--ease);
}
@media (hover: hover) and (pointer: fine) {
  .a-gal__btn:hover .a-gal__img { transform: scale(1.03); }
}
.a-gal__dots { display: none; }

/* Mobile: one plate at a time, snapped, with dots. */
@media (max-width: 60rem) {
  .a-gal__track {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin-inline: calc(-1 * var(--a-bleed));
    padding-inline: var(--a-bleed);
  }
  .a-gal__track::-webkit-scrollbar { display: none; }
  .a-gal__slide { flex: 0 0 86%; scroll-snap-align: center; }
  .a-gal__dots {
    display: flex;
    gap: 0.375rem;
    justify-content: center;
    list-style: none;
    margin: 0.875rem 0 0;
    padding: 0;
  }
  .a-gal__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--a-line-strong);
    opacity: 0.4;
    transition: opacity var(--dur-control) var(--ease), transform var(--dur-control) var(--ease);
  }
  .a-gal__dot.is-current { opacity: 1; transform: scale(1.35); background: var(--a-ink); }
}

/* The zoom dialog is a native <dialog>: Escape, backdrop, focus return and
   inertness all come for free. Without JS the plate is simply not zoomable. */
dialog[data-zoom] img { border-radius: var(--a-radius); }

/* -------------------------------------------------------------- buy column */
.a-pdp__buy {
  position: sticky;
  top: calc(var(--a-bar-h) + 1.25rem);
}
.a-pdp__title {
  font-size: clamp(1.625rem, 2.6vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0;
  overflow-wrap: normal;
}
.a-pdp__type {
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--a-muted);
  margin: 0.5rem 0 1.75rem;
}

.a-pdp__form { margin-top: 0.5rem; }
.a-pdp__desc { margin-top: 1.75rem; color: var(--a-muted); max-width: 60ch; }

/* -------------------------------------------------------------- below fold */
.a-pdp__below {
  max-width: var(--a-max);
  margin: var(--a-pad) auto 0;
  padding-inline: var(--a-bleed);
  display: grid;
  gap: var(--a-pad);
}
.a-pdp__below > section { max-width: 60rem; }

/* --------------------------------------------------------- sticky mobile ATC
 * A phone's buy button must never be more than a thumb away. Desktop already
 * has the sticky buy column, so this bar exists only below the breakpoint.
 */
.a-atc {
  position: fixed;
  inset: auto 0 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem var(--a-bleed) calc(0.75rem + env(safe-area-inset-bottom, 0px));
  background: color-mix(in srgb, var(--a-ground) 92%, transparent);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--a-line);
}
.a-atc__meta { display: grid; line-height: 1.2; }
.a-atc__name { font-size: 0.8125rem; font-weight: 600; }
.a-atc__price { font-size: 0.75rem; color: var(--a-muted); font-variant-numeric: tabular-nums; }
.a-atc form { margin-left: auto; }
.a-atc .a-cta { width: auto; padding-inline: 1.5rem; }
@media (min-width: 60rem) {
  .a-atc { display: none; }
}
@media (max-width: 60rem) {
  .a-pdp__grid { grid-template-columns: 1fr; }
  /* Sticky under a mobile ATC bar would pin the buybox to a moving target. */
  .a-pdp__buy { position: static; }
  /* Clear the fixed bar so the footer's last line is reachable. */
  .a-pdp { padding-bottom: 6rem; }
}
