/* Model page: top split, price box, key numbers, colours, spin viewer, sticky bar. */

.model-top {
  display: grid;
  gap: 24px;
  padding-block: 32px;
}
.model-top__media { order: -1; }
.model-top__tagline { color: var(--ink-2); max-width: 48ch; font-size: 0.95rem; }
.model-top__intro { color: var(--ink-2); max-width: 60ch; font-size: 1rem; line-height: 1.6; margin: var(--space-3) 0 0; }
@media (min-width: 1025px) {
  .model-top { grid-template-columns: 5fr 7fr; align-items: stretch; gap: 40px; }
  .model-top__media { order: 0; }
  /* The price card stretches to the media column's own height (a grid item
     with align-items: stretch is only as tall as its OWN content unless it's
     also a flex column that spaces its children out). */
  .model-top__info { display: flex; flex-direction: column; justify-content: space-between; }
}

/* container-type, not a viewport media query: the price box sits in a narrow
   5fr column even on a wide screen, so the CTA row must react to ITS OWN
   width, not the viewport's — a media query alone let "Tanya via WhatsApp"
   wrap inside a ~420px-wide box at 1280px viewport width. */
/* `.card`'s own 16px padding otherwise reads as an indent against the H1
   sitting flush left right above it — bleeding the card 16px past its
   column on both sides keeps the card SHAPE (background/shadow) while its
   text content lands exactly where the H1 does. */
.price-box { display: flex; flex-direction: column; gap: 12px; container-type: inline-size; margin-inline: -16px; width: calc(100% + 32px); }
.price-row { display: flex; justify-content: space-between; gap: 12px; font-size: 1.05rem; }
.price-box__cta { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
@container (min-width: 420px) {
  .price-box__cta { flex-direction: row; }
}

.model-hero-media img, .model-top__media picture img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: var(--r-media); background: var(--surface-2); }

.spin { margin: 0; position: relative; cursor: grab; touch-action: pan-y; overflow: hidden; border-radius: var(--r-media); background: var(--surface-2); }
.spin.is-grabbing { cursor: grabbing; }
/* The source renders carry a lot of empty margin around the car; scaling the
   image ~18% (object-fit: contain still governs its own base fit) crops that
   margin away against the figure's own overflow:hidden instead of shipping a
   visibly small car in a mostly-empty frame. */
.spin__img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; transform: scale(1.18); user-select: none; -webkit-user-drag: none; }
.spin__hint {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(20, 20, 20, 0.72);
  color: #fff;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  font-size: 0.8rem;
  transition: opacity 200ms var(--ease);
}
.spin__hint--hidden { opacity: 0; pointer-events: none; }
/* A wide colour overlay (4+ dots + the colour name) can reach far enough
   right on a narrow phone to collide with a bottom-right hint chip — moving
   the hint to the top on narrow screens keeps the two panels apart instead
   of shrinking either one illegibly. */
@media (max-width: 640px) {
  .spin__hint { top: 12px; right: 12px; bottom: auto; }
}

[data-swatch-viewer] { position: relative; }
[data-swatch-viewer] img { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: var(--r-media); background: var(--surface-2); }

/* Colours + active colour name live INSIDE the viewer card, bottom-left, so
   the hint (bottom-right) and the colour picker read as one cohesive panel
   instead of controls scattered below a photo. */
.viewer-overlay {
  position: absolute;
  left: 12px;
  bottom: 12px;
  max-width: calc(100% - 24px);
  background: rgba(255, 255, 255, 0.9);
  border-radius: var(--r-card);
  padding: 12px;
}
.colors { display: flex; flex-wrap: wrap; gap: 10px; }
.color-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface-2);
  cursor: pointer;
  padding: 0;
  overflow: hidden;
  display: inline-flex;
  flex-shrink: 0;
}
.color-dot img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; pointer-events: none; }
.color-dot[aria-pressed='true'] img { outline: 2px solid var(--brand); outline-offset: 2px; }
.color-label { margin-top: 8px; margin-bottom: 0; font-size: 0.85rem; color: var(--ink-2); }

/* Touch target floor without growing the visible 32px dot: real padding
   enlarges the button's own bounding box (what a touch sweep measures) to
   44x44, a matching negative margin keeps the surrounding layout (the 10px
   gap between dots) visually unchanged. */
@media (pointer: coarse) {
  .color-dot {
    width: 44px;
    height: 44px;
    padding: 6px;
    margin: -6px;
    background: transparent;
  }
}

/* A small caption above the key-numbers strip when the two versions a model
   is sold in (2-battery/1-battery) would otherwise read as one unlabelled
   set of numbers — every figure in the strip is the 2-battery column's. */
.key-numbers-version { color: var(--ink-2); font-size: 0.85rem; margin-bottom: 8px; }

/* Key numbers as one full-width metric bar under the split, not loose tiles. */
.key-numbers {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  background: var(--surface-2);
  border-radius: var(--r-card);
  margin-block: 24px;
}
.key-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  padding: 20px;
  border-left: 1px solid var(--line);
}
.key-tile:first-child { border-left: none; }
.key-tile strong { font-size: 1.5rem; }
.key-tile span { font-size: 0.85rem; color: var(--ink-2); }

/* Ambience band (Step 1.5): one AI scene, 16:9, between the key numbers and
   the next-step links — omitted entirely (no wrapper, no gap) when the scene
   was dropped or never generated. */
.model-ambience-wrap { margin-block: 24px; }
.model-ambience-wrap .ai-figure img { aspect-ratio: 16 / 9; border-radius: var(--r-media); }

/* One labelled row of next-step links, not loose grey pills. */
.next-steps { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.next-steps a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
}
.next-steps a:hover { text-decoration: underline; }
/* Touch target floor without growing the visible 26px text line: padding
   grows the link's own bounding box (what a touch sweep measures) to 44px
   tall, a matching negative margin keeps the .next-steps 10px gap visually
   unchanged (measured live: these arrow links were 26px tall on a touch
   device). */
@media (pointer: coarse) {
  .next-steps a {
    min-height: 44px;
    padding-block: 10px;
    margin-block: -10px;
  }
}

.model-sections { padding-bottom: 24px; }
