/* ── Font faces ──────────────────────────────────────────────── */
@font-face {
  font-family: 'Overpass Mono';
  src: url('../source/fonts/Overpass_Mono/OverpassMono-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Manrope';
  src: url('../source/fonts/Manrope/Manrope-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ── Reset & Base ─────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 300;
  font-size: 12px;
  background: #ffffff;
  color: #111111;
  overflow: hidden;
  /* Prevents Safari & Chrome on mobile from auto-scaling font sizes */
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  /* Prevents double-tap zoom on buttons and interactive elements */
  touch-action: manipulation;
}

/* ── Design tokens — edit these to resize the UI ─────────────── */
:root {
  /* ▸ Site header */
  --header-h:             5dvh;   /* height of the top header bar */

  /* ▸ Options panel */
  --options-panel-w:      380px;  /* width of the right panel */

  /* ui options panel padding*/
  --panel-padding:       3.7dvh;   /* padding inside the options panel */

  /* ▸ Swatch colour square */
  --swatch-w:             60px;   /* swatch width AND height of the colour area */
  --swatch-color-h:       60px;   /* colour square height */

  /* ▸ Selection indicator bar below the colour square */
  --swatch-indicator-gap: 3px;    /* transparent space between colour square and bar */
  --swatch-indicator-h:   1px;    /* height of the selection bar */

  /* ▸ Derived total cell height = 60 + 3 + 1 = 64px */
  --swatch-h: calc(var(--swatch-color-h) + var(--swatch-indicator-gap) + var(--swatch-indicator-h));

  /* ▸ Gap between swatches */
  --swatch-gap:           8px;
}

/* ── Site Header ─────────────────────────────────────────────── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 30;
  flex-shrink: 0;
}

#site-logo {
  height: 5.5dvh;
  width: auto;
  display: block;
  /* logo asset is light-gray; darken it to match Hermès brand black */
  filter: brightness(0);
}

/* Mobile logo — hidden on desktop, shown in portrait media query below */
#site-logo-mobile {
  height: 10dvh;
  width: auto;
  display: none;
  filter: brightness(0);
}

/* ── Layout ───────────────────────────────────────────────────── */
#app {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  overflow: hidden;
  padding: 36px;
}

/* Viewer fills the entire viewport as the background layer */
#viewer-container {
  position: absolute;
  inset: 0;
  overflow: hidden;        /* clips the off-screen left portion of the iframe */
  background: #f0ede8;
}

#api-frame {
  position: absolute;
  top: 0;
  left: calc(-1 * var(--options-panel-w));    /* shift iframe left so model centres in the non-panel area */
  width: calc(100% + var(--options-panel-w)); /* compensate to keep right edge at screen edge */
  height: 100%;
  border: none;
  display: block;
}

/* ── Category Tabs — top-left floating bar ────────────────────── */
#category-tabs {
  position: absolute;
  top: var(--panel-padding);
  left: var(--panel-padding);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  z-index: 20;
  max-width: calc(100vw - var(--options-panel-w) - 40px); /* 40px = left offset + breathing room */
}

.cat-tab {
  background: #ffffff;
  border: 0px solid #cccccc;
  padding: 16px 24px 14px;
  font-family: 'Overpass Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.0em;
  text-transform: uppercase;
  color: #444444;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.cat-tab:hover {
  border-color: #888888;
  color: #111111;
}

.cat-tab.active {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
  font-weight: 500;
}

/* ── Options Panel — right floating column ────────────────────── */
#options-panel {
  position: absolute;
  top: var(--panel-padding);
  right: var(--panel-padding);
  bottom: var(--panel-padding);
  width: var(--options-panel-w);  /* ▸ panel width — change token in :root above */
  /*height: 100%;/*/
  background: #ffffff;
  border-left: 1px solid #e0e0e0;
  display: flex;
  flex-direction: column;
  z-index: 20;
  overflow: hidden;
  /* margin removed, now handled by #app padding */
}

#panel-header {
  padding: 24px 22px 16px;
  border-bottom: 1px solid #e8e8e8;
  flex-shrink: 0;
}

#panel-title {
  font-family: 'Manrope', sans-serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.03em;
  color: #111111;
}

#panel-subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: #888888;
  margin-top: 6px;
  line-height: 1.5;
}

/* ── Subcategory Panel wrapper — holds scroll + gradient overlay ─ */
#subcategory-panel-wrap {
  position: relative;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* Gradient fade at the bottom — hidden once scrolled to the end */
#subcategory-panel-wrap::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,1) 100%);
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.2s ease;
}

#subcategory-panel-wrap.at-bottom::after {
  opacity: 0;
}

/* ── Subcategory Panel (scrollable content inside options panel) ─ */
#subcategory-panel {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  /* ▸ vertical padding (top/bottom) | sides sized so 5×60 + 4×8 = 332px fits in 360-28 = 332px */
  padding: 4px 24px 4px;  /* ▸ vertical = 4px | sides = 14px */
}

#subcategory-panel::-webkit-scrollbar {
  width: 3px;
}
#subcategory-panel::-webkit-scrollbar-track {
  background: transparent;
}
#subcategory-panel::-webkit-scrollbar-thumb {
  background: #cccccc;
}

/* ── Sub-group sections ───────────────────────────────────────── */
.subgroup-section {
  margin-bottom: 16px;
}

.subgroup-label {
  font-family: 'Overpass Mono', monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaaaaa;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f0f0f0;
}

/* ── Swatch Grid (img / pck-img) ──────────────────────────────── */
.swatch-grid {
  display: grid;
  grid-template-columns: repeat(5, var(--swatch-w));  /* ▸ 5 cols × 60px = 300px */
  gap: var(--swatch-gap);                              /* ▸ 8px gap → total 332px */
}

/* Each swatch cell: 60px colour square + 3px gap + 1px bar = 64px tall */
.swatch {
  width:  var(--swatch-w);  /* ▸ 60px */
  height: var(--swatch-h);  /* ▸ 64px (derived in :root) */
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

/* ▸ Colour square — top 60px of the cell (driven by --swatch-color set via JS) */
.swatch::before {
  content: '';
  display: block;
  width:  var(--swatch-w);
  height: var(--swatch-color-h);
  background-color: var(--swatch-color, #cccccc);
}

/* ▸ Selection indicator bar — 1px line at the very bottom of the cell */
.swatch::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width:  var(--swatch-w);            /* ▸ 60px — same as colour square */
  height: var(--swatch-indicator-h);  /* ▸ 1px */
  background: #111111;
  opacity: 0;
  transition: opacity 0.15s;
}

.swatch:hover::after {
  opacity: 0.4;
}

.swatch.active::after {
  opacity: 1;
}

/* ▸ Optional icon image — covers the colour square when present */
.swatch img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--swatch-color-h);
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* ── Toggle Buttons (btn-tgl / neon) ─────────────────────────── */
.btn-toggle-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tgl-btn {
  background: #ffffff;
  border: 1px solid #cccccc;
  padding: 5px 12px;
  font-family: inherit;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555555;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.tgl-btn:hover {
  border-color: #888888;
  color: #111111;
}

.tgl-btn.active {
  background: #111111;
  border-color: #111111;
  color: #ffffff;
}

/* ── Preset Cards ─────────────────────────────────────────────── */
.preset-list {
  display: flex;
  flex-direction: row;
  gap: 8px;
}

.preset-card {
  background: #ffffff;
  border: 0px solid #cccccc;
  padding: 0;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  flex: 1;
  position: relative;
  transition: border-color 0.12s;
}

.preset-card-swatch {
  width: 100%;
  aspect-ratio: 1;
  flex-shrink: 0;
  display: block;
  object-fit: cover;
}

.preset-card-label {
  padding: 6px 8px 7px;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #555555;
  text-align: left;
  line-height: 1.3;
}

/* ▸ Selection indicator bar — same pattern as .swatch::after */
.preset-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: #111111;
  opacity: 0;
  transition: opacity 0.15s;
}

.preset-card:hover::after {
  opacity: 0.4;
}

.preset-card:hover .preset-card-label {
  color: #111111;
}

.preset-card.active::after {
  opacity: 1;
}

.preset-card.active .preset-card-label {
  color: #111111;
}

/* ── Info Text (opt-text) ─────────────────────────────────────── */
.info-text {
  font-size: 11px;
  line-height: 1.65;
  color: #555555;
  white-space: pre-line;
}

/* ── pck placeholder ──────────────────────────────────────────── */
.pck-placeholder {
  font-size: 10px;
  color: #aaaaaa;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 0;
}

/* ── Panel drag handle — hidden on desktop, shown in portrait media query ── */
#panel-drag-handle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px 0 6px;
  cursor: grab;
  flex-shrink: 0;
  touch-action: none; /* prevents scroll interference during drag */
}

#panel-drag-handle:active {
  cursor: grabbing;
}

#panel-drag-pill {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: #cccccc;
}

/* ── Loading Overlay ──────────────────────────────────────────── */
#loading-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#loading-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

#loading-anim {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
}

/* ── Export Overlay ───────────────────────────────────────────── */
#export-overlay {
  position: fixed;
  inset: 0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

#export-overlay.export-overlay--visible {
  opacity: 1;
  pointer-events: all;
}

#export-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

#export-anim {
  width: 120px;
  height: 120px;
  object-fit: contain;
  display: block;
}

#export-progress-bar-wrap {
  width: 180px;
  height: 2px;
  background: #e8e8e8;
  border-radius: 2px;
  overflow: hidden;
}

#export-progress-bar {
  height: 100%;
  width: 0%;
  background: #111111;
  border-radius: 2px;
  transition: width 0.35s ease;
}

#export-progress-label {
  font-family: 'Overpass Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #aaaaaa;
  text-transform: uppercase;
}

/* ── Panel Navigation (Back / Continue) ──────────────────────── */
#panel-nav {
  display: flex;
  align-items: center;
  padding: 14px;
  flex-shrink: 0;
  transition: opacity 0.4s ease;
}

#panel-nav.nav--loading {
  opacity: 0;
  pointer-events: none;
}

#nav-continue {
  flex: 1;
  padding: 14px 24px 12px;
}

/* Back button collapses when .nav-back--collapsed is present.
   Transition overrides .cat-tab's shorter transition so all properties animate together. */
#nav-back {
  overflow: hidden;
  max-width: 200px;
  margin-right: 8px;
  padding: 14px 24px 12px;
  border: 1px solid #cccccc;
  transition:
    max-width 0.35s ease,
    opacity 0.35s ease,
    margin-right 0.35s ease,
    padding-left 0.35s ease,
    padding-right 0.35s ease,
    border-left-width 0.35s ease,
    border-right-width 0.35s ease,
    background 0.12s,
    color 0.12s,
    border-color 0.12s;
}

#nav-back.nav-back--collapsed {
  max-width: 0;
  opacity: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  border-left-width: 0;
  border-right-width: 0;
  pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NARROW LANDSCAPE — scrollable tab strip
   Activates on landscape viewports ≤ 1200 px (resized browser windows,
   small laptops, etc.).  Tabs become nowrap + scroll-snap, matching the
   portrait and mobile-landscape behaviour.  The portrait and touch-landscape
   media queries that follow in the cascade override this where needed.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (orientation: landscape) and (max-width: 1600px) {

  #category-tabs {
    /* Stretch strip to the full viewer width so tabs can scroll off both edges */
    left: 0;
    right: var(--options-panel-w);
    max-width: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Inner padding keeps the first/last tab breathing room — identical to portrait */
    padding: 0 var(--panel-padding);
    align-items: center;
  }

  #category-tabs::-webkit-scrollbar {
    display: none;
  }

  #category-tabs .cat-tab {
    scroll-snap-align: center;
    flex-shrink: 0;
  }
}
/* END @media narrow landscape */

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE PORTRAIT LAYOUT
   Activates on any screen that is taller than wide (phones + tablets portrait).
   All measurements are CSS custom properties — tweak only the :root block below.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (orientation: portrait) {

  /* ── Mobile design tokens — override the desktop values above ── */
  :root {
    --header-h:           52px;   /* ▸ mobile header height */
    --mobile-tabs-h:      76px;   /* ▸ horizontal category-tab strip height */
    --panel-snap-high:    60dvh;  /* ▸ expanded panel height */
    --panel-snap-low:     29dvh;  /* ▸ collapsed panel height */
    --panel-overdrag-max: 90dvh;  /* ▸ absolute ceiling for overdrag (rubber-band top) */
    --panel-overdrag-min: 10dvh;  /* ▸ absolute floor for overdrag (rubber-band bottom) */
    --panel-overlap-px:   40px;   /* ▸ how much the panel top overlaps the viewer */
    --swatch-color-h:     50px;   /* ▸ slightly shorter swatches on mobile */
  }

  /* ── Header logos ──────────────────────────────────────────── */
  #site-logo        { display: none; }
  #site-logo-mobile { display: block; }

  #loading-anim {
    width: 100px;
    height: 100px;
  }

  #export-anim {
    width: 100px;
    height: 100px;
  }
  /* ... rest of existing mobile rules */

  /* ── Viewer fills the full screen ─────────────────────────── */
  #app {
    padding: 0;
    top: var(--header-h);
  }

  /* Iframe no longer needs to offset for a side panel */
  #api-frame {
    left: 0;
    width: 100%;
  }

  /* Viewer stops just past the panel top — panel overlaps it by --panel-overlap-px.
     bottom: auto releases the inset:0 bottom anchor so explicit height takes over. */
  #viewer-container {
    bottom: auto;
    height: calc(100dvh - var(--header-h) - var(--panel-snap-high) + var(--panel-overlap-px));
    transition: height 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  /* ── Category tab strip — fixed horizontal scroll bar ──────── */
  #category-tabs {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    height: var(--mobile-tabs-h);
    max-width: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch; /* momentum scroll on iOS */
    scroll-snap-type: x mandatory;
    scrollbar-width: none;       /* Firefox */
    padding: 0 16px;
    gap: 8px;
    align-items: center;
    /* no background — transparent over viewer */
    z-index: 20;
  }

  #category-tabs::-webkit-scrollbar {
    display: none; /* Chrome / Safari */
  }

  /* Each tab snaps to center when scrolled */
  #category-tabs .cat-tab {
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  /* ── Options panel — bottom sheet ─────────────────────────── */
  #options-panel {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: var(--panel-snap-high);
    border-radius: 0;
    border-left: none;
    border-top: 1px solid #e0e0e0;
    /* Height changes are animated by JS snapPanel(); no CSS transition here */
  }

  /* ── Show drag handle on mobile ────────────────────────────── */
  #panel-drag-handle {
    display: flex;
  }
  /* ── Panel header doubles as a drag zone on mobile ───────── */
  /* (title/subtitle area has no interactivity, so the extra hitbox is safe) */
  #panel-header {
    padding-top: 6px;
    touch-action: none; /* tells iOS Safari this element handles its own touch */
    user-select: none;
    cursor: grab;
  }
  /* ── Nav buttons fill the full panel width ─────────────────── */
  #nav-continue {
    flex: 1;
  }

  /* ── Swatch grid — full-width, 5 equal columns ─────────────── */
  .swatch-grid {
    grid-template-columns: repeat(5, 1fr);
  }

  /* Swatch cells are square — width driven by 1fr column, height matches via aspect-ratio */
  .swatch {
    width: 100%;
    height: auto; /* release the fixed --swatch-h so aspect-ratio can work */
    /* Restore the gap + indicator bar space below the colour square */
    padding-bottom: calc(var(--swatch-indicator-gap) + var(--swatch-indicator-h));
  }

  .swatch::before {
    width: 100%;
    height: auto;
    aspect-ratio: 1; /* colour square is always as tall as it is wide */
  }

  .swatch::after {
    width: 100%;
  }

  .swatch img {
    height: auto;
    aspect-ratio: 1;
  }

  /* Back button collapse animation unchanged — already works */

  /* ── Subtitle: fade + collapse when panel is snapped to the low anchor ── */
  #panel-subtitle {
    max-height: 80px;   /* tall enough for any subtitle; actual height is shorter */
    overflow: hidden;
    transition:
      opacity      0.25s ease,
      max-height   0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
      margin-top   0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  }

  #options-panel.panel--snapped-low #panel-subtitle {
    opacity: 0;
    max-height: 0;
    margin-top: 0;
  }
}
/* END @media (orientation: portrait) */

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE LANDSCAPE LAYOUT
   Activates on touch screens in landscape orientation (phones rotated).
   The bottom-sheet drag system is portrait-only; here the panel becomes a
   conventional right-side column but with a compact dvh-based header and
   the same clipped scrollable tab strip as portrait.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) and (orientation: landscape) {

  /* ── Compact header — scales with viewport height, never oversized ── */
  :root {
    --header-h: min(44px, 11dvh);
  }

  #site-logo        { display: none; }
  #site-logo-mobile { display: block; height: min(40px, 10dvh); }

  /* ── Category tabs — clipped horizontal scroll strip, same as portrait ── */
  #category-tabs {
    position: fixed;
    top: calc(var(--header-h) + var(--panel-padding) * 0.5);
    left: 0;
    right: var(--options-panel-w); /* stop before the right panel */
    height: 52px;
    max-width: none;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0 var(--panel-padding);
    gap: 8px;
    align-items: center;
    z-index: 20;
  }

  #category-tabs::-webkit-scrollbar { display: none; }

  #category-tabs .cat-tab {
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  /* ── App area — push down past the header ── */
  #app {
    padding: 0;
    top: var(--header-h);
  }

  /* ── Safe-area insets — prevents content hiding under the notch/Dynamic Island ── */
  #site-header {
    padding-left:  env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  #category-tabs {
    /* Shift strip right/left so tabs aren't hidden under the notch */
    left:  env(safe-area-inset-left);
    right: calc(var(--options-panel-w) + env(safe-area-inset-right));
    padding-left:  max(var(--panel-padding), env(safe-area-inset-left));
    padding-right: var(--panel-padding);
  }

  #options-panel {
    right: env(safe-area-inset-right);
  }
}
/* END @media mobile landscape */

/* ═══════════════════════════════════════════════════════════════════════════
   SUMMARY PANEL
   Read-only overview of the current configuration. Rendered inside
   #subcategory-panel when the synthetic Summary tab is active.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Each row: group label above, content (swatch + name + edit) below ── */
.summary-row {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-bottom: 1px solid #f0f0f0;
}

.summary-row:last-child {
  border-bottom: none;
}

/* Greyed-out row when nothing is selected for this group */
.summary-row--empty .summary-group-label {
  color: #cccccc;
}

/* ── Group label (ALL CAPS, matching .subgroup-label) ── */
.summary-group-label {
  font-family: 'Overpass Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #aaaaaa;
}

/* ── Row content: swatch square + info column ── */
.summary-row-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* ── Square swatch — 56px, same colour mechanic as .swatch::before ── */
.summary-swatch {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  background-color: var(--swatch-color, #cccccc);
  overflow: hidden;
}

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

/* ── Info column: colour name + Edit button ── */
.summary-option-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch; /* fills the swatch height */
  gap: 0;
}

.summary-option-name {
  font-family: 'Manrope', sans-serif;
  font-size: 14px;
  color: #222222;
}

.summary-option-name strong {
  font-weight: 600;
}

/* ── Edit label (decorative — click is handled by the parent content div) ── */
.summary-edit-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  pointer-events: none; /* parent div handles the click */
  font-family: 'Manrope', sans-serif;
  font-size: 13px;
  color: #888888;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Hover on the whole content area lights up the Edit label */
.summary-row-content:hover .summary-edit-btn {
  color: #222222;
}

.summary-row-content:hover {
  opacity: 0.8;
}

/* ── Pattern block: stacked sub-rows under a single PATTERN header ── */
.summary-pattern-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 4px;
}

/* Each child row reuses .summary-row-content layout */
.summary-pattern-subrow {
  gap: 14px;
}

/* Sub-label above the colour name (e.g. "Leather Fill", "Accent A") */
.summary-pattern-sublabel {
  font-family: 'Overpass Mono', monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaaaaa;
  margin-bottom: 2px;
}

/* Empty child placeholder — greyed swatch */
.summary-swatch--empty {
  opacity: 0.35;
}

.summary-option-name--empty {
  color: #cccccc;
}

/* Export button variant — same size/shape as Continue but filled black */
#nav-continue.nav-continue--export {
  background: #111111;
  color: #ffffff;
  border-color: #111111;
}

#nav-continue.nav-continue--export:hover {
  background: #333333;
  border-color: #333333;
}

