/* =========================================
   PETWHEELS — light, modern, brand-gradient
   ========================================= */

:root {
  /* brand */
  --c-orange: #FF7A1A;
  --c-pink: #FF3D78;
  --c-magenta: #C13FA9;
  --c-purple: #7C3AED;
  --c-indigo: #5562F0;
  --c-blue: #2FB8FF;

  --grad-brand: linear-gradient(95deg, #FF7A1A 0%, #FF3D78 28%, #C13FA9 52%, #7C3AED 72%, #2FB8FF 100%);
  --grad-warm: linear-gradient(95deg, #FF7A1A 0%, #FF3D78 60%, #C13FA9 100%);
  --grad-cool: linear-gradient(95deg, #7C3AED 0%, #5562F0 50%, #2FB8FF 100%);
  --grad-soft: linear-gradient(160deg, #FFF5EE 0%, #FFF1F6 35%, #F4ECFF 70%, #ECF8FF 100%);

  /* neutrals */
  --bg: #FAFBFD;
  --bg-alt: #FFFFFF;
  --bg-tint: #F5F2FB;
  --surface: #FFFFFF;
  --line: #E6E8EF;
  --line-soft: #EEF0F6;

  --text: #0E1226;
  --text-mid: #475069;
  --text-soft: #6E7691;
  --text-faint: #9AA1B5;

  /* effects */
  --shadow-sm: 0 1px 2px rgba(15, 18, 38, .04), 0 1px 1px rgba(15, 18, 38, .03);
  --shadow: 0 8px 24px -10px rgba(15, 18, 38, .12), 0 2px 6px rgba(15, 18, 38, .04);
  --shadow-lg: 0 24px 60px -20px rgba(15, 18, 38, .22), 0 8px 20px -10px rgba(15, 18, 38, .08);
  --shadow-brand: 0 18px 40px -16px rgba(193, 63, 169, .42), 0 6px 14px -8px rgba(255, 61, 120, .25);

  --r-sm: 10px;
  --r: 14px;
  --r-lg: 20px;
  --r-xl: 28px;

  --t-fast: 160ms cubic-bezier(.4, .2, .2, 1);
  --t: 240ms cubic-bezier(.4, .2, .2, 1);
  --t-slow: 420ms cubic-bezier(.4, .2, .2, 1);
}

/* base ---------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4 {
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0;
}

p {
  margin: 0;
  color: var(--text-mid);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, .72);
  border-bottom: 1px solid rgba(230, 232, 239, .8);
}

.nav-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 14px 32px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
}

.nav-logo img {
  height: 40px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 6px;
  justify-content: center;
}

.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-mid);
  border-radius: 999px;
  transition: background var(--t), color var(--t);
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(124, 58, 237, .06);
}

.nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: transform var(--t-fast), box-shadow var(--t), background var(--t), color var(--t), border-color var(--t);
  border: 1px solid transparent;
  cursor: pointer;
}

.btn svg {
  flex: none;
}

.btn-lg {
  padding: 13px 22px;
  font-size: 15px;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  color: white;
  background: var(--grad-brand);
  background-size: 180% 100%;
  background-position: 0% 50%;
  box-shadow: var(--shadow-brand);
  border: 0;
  outline: none;
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
}

.btn-primary:hover {
  background-position: 100% 50%;
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-cta {
  color: white;
  background: var(--grad-warm);
  background-size: 180% 100%;
  background-position: 0% 50%;
  box-shadow: 0 16px 36px -14px rgba(255, 61, 120, .55), 0 6px 14px -8px rgba(255, 122, 26, .35);
  font-weight: 700;
  letter-spacing: -.005em;
  border: 0;
  outline: none;
  background-clip: padding-box;
  -webkit-background-clip: padding-box;
}

.btn-cta:hover {
  background-position: 100% 50%;
  transform: translateY(-1px);
}

.btn-ghost {
  color: var(--text-mid);
  background: transparent;
  border-color: var(--line);
}

.btn-ghost:hover {
  color: var(--text);
  background: var(--bg-tint);
  border-color: transparent;
}

.btn-light {
  color: var(--text);
  background: white;
  box-shadow: var(--shadow);
}

.btn-light:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lg);
}

.btn-outline-light {
  color: white;
  border-color: rgba(255, 255, 255, .5);
  background: transparent;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, .12);
  border-color: white;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  padding: 28px 32px 60px;
  min-height: calc(100vh - 60px);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: -10% -5%;
  background:
    radial-gradient(60% 50% at 20% 30%, rgba(255, 122, 26, .14), transparent 60%),
    radial-gradient(50% 55% at 80% 25%, rgba(47, 184, 255, .18), transparent 65%),
    radial-gradient(70% 60% at 55% 95%, rgba(193, 63, 169, .12), transparent 60%),
    var(--grad-soft);
  filter: saturate(110%);
  z-index: -1;
}

.hero-grid {
  max-width: 1320px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 28px;
  align-items: stretch;
  min-height: calc(100vh - 140px);
}

/* viewport (left) */
.viewport {
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.viewport-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line-soft);
  background: linear-gradient(to bottom, rgba(255, 255, 255, .7), rgba(250, 251, 253, .4));
}

/* Model selector — sits where the "Quick preview" label used to. Trigger is
   a pill with the model's thumbnail + name + chevron; clicking opens the
   menu listing every wheelchair model we ship. Today there's only Stride;
   the markup pattern scales to N. */
.model-select {
  position: relative;
}

.model-select-trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 12px 4px 4px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), box-shadow var(--t);
  font-family: inherit;
}
.model-select-trigger:hover {
  border-color: var(--text-soft);
  box-shadow: var(--shadow-sm);
}
.model-select-trigger:focus-visible {
  outline: 2px solid var(--c-pink);
  outline-offset: 2px;
}

.model-select-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-tint);
  flex: none;
}

.model-select-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.01em;
}

.model-select-chevron {
  color: var(--text-soft);
  transition: transform var(--t);
}
.model-select-trigger[aria-expanded="true"] .model-select-chevron {
  transform: rotate(180deg);
}

.model-select-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  padding: 6px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  z-index: 30;
}
.model-select-menu[hidden] {
  display: none;
}

.model-options-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Option's padding is tight on the thumb side (top/bottom/left) so the
   thumbnail almost touches the hover rectangle, but stays generous on the
   right so the title/subtitle still breathe. */
.model-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 5px 14px 5px 5px;
  border-radius: 10px;
  cursor: pointer;
  transition: background var(--t);
}
.model-option:hover,
.model-option:focus-visible {
  background: var(--bg-tint);
  outline: none;
}
.model-option.is-selected {
  background: linear-gradient(95deg, rgba(255, 122, 26, .08), rgba(193, 63, 169, .06));
}

.model-option-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--bg-tint);
  flex: none;
}

.model-option-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.model-option-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.005em;
}
.model-option-desc {
  font-size: 12px;
  color: var(--text-soft);
}

/* Soft footer under the option list — a single muted line with a clock
   icon, signalling that more models are coming without competing for the
   user's attention. */
.model-menu-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  padding: 8px 12px 4px;
  border-top: 1px solid var(--line-soft);
  font-size: 12px;
  color: var(--text-faint);
  font-style: italic;
}
.model-menu-footer svg {
  flex: none;
  color: var(--text-faint);
}

.viewport-tabs {
  display: flex;
  gap: 4px;
  background: var(--bg-tint);
  padding: 4px;
  border-radius: 999px;
}

.vp-tab {
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 999px;
  color: var(--text-soft);
  transition: color var(--t), background var(--t), box-shadow var(--t);
}

.vp-tab.is-active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.vp-tab:hover {
  color: var(--text);
}

.viewport-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  display: inline-block;
}

.dot-live {
  background: #22C55E;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, .5);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .5);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.stage {
  flex: 1;
  position: relative;
  padding: 8px;
  background:
    radial-gradient(60% 70% at 50% 65%, rgba(124, 58, 237, .07), transparent 65%),
    linear-gradient(180deg, #FBFAFE 0%, #F6F8FE 100%);
  overflow: hidden;
  min-height: 460px;
}

.stage-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(124, 58, 237, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 58, 237, .06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(60% 65% at 50% 60%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(60% 65% at 50% 60%, black 30%, transparent 80%);
}

.stage-glow {
  position: absolute;
  left: 50%;
  bottom: 14%;
  transform: translateX(-50%);
  width: 60%;
  height: 36%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(255, 61, 120, .22), transparent 70%);
  filter: blur(20px);
  z-index: 0;
}

.dog-frame {
  position: absolute;
  inset: 1px;
  z-index: 1;
  display: block;
}

/* Fullscreen ("expanded") view — toggled by JS via .is-fullscreen */
.viewport.is-fullscreen {
  border-radius: 0 !important;
  border: 0 !important;
  background: white;
}

.viewport.is-fullscreen .stage {
  padding: 0 !important;
  min-height: 0 !important;
}

.viewport.is-fullscreen .dog-frame {
  width: 100% !important;
  height: 100% !important;
  aspect-ratio: auto !important;
  max-width: none !important;
}

.viewport.is-fullscreen .spec-chip,
.viewport.is-fullscreen .print-stats {
  display: none !important;
}

.dog-frame canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  outline: none;
  touch-action: none;
  background: transparent;
}

/* ===== Live dimension overlay ===== */
.dim-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
  z-index: 3;            /* above the canvas, below the toolbar/loader */
}
.dim-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.dim-line {
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(20, 20, 40, .55));
}
/* Invisible, wide hover target. Re-enables pointer events (the overlay itself
   is pointer-events:none) so hovering the thin line is forgiving. */
.dim-hit {
  stroke: transparent;
  fill: none;
  stroke-width: 18;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
  cursor: grab;
  touch-action: none;
}
.dim-hit:active { cursor: grabbing; }
/* Thigh outline: a path tracing the TighUI line mesh, with a wide invisible
   twin for hover/drag. */
.dim-path {
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(20, 20, 40, .55));
}
.dim-hit-path {
  stroke: transparent;
  fill: none;
  stroke-width: 16;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
  cursor: grab;
  touch-action: none;
}
.dim-hit-path:active { cursor: grabbing; }
.dim-dot {
  fill: #fff;
  stroke: rgba(20, 20, 40, .35);
  stroke-width: 1;
  filter: drop-shadow(0 1px 2px rgba(20, 20, 40, .45));
}
/* Invisible, wide grab target over each endpoint bullet — drag to change the
   param (like dragging the matching side-panel slider). */
.dim-grab {
  fill: transparent;
  pointer-events: all;
  cursor: grab;
  touch-action: none;
}
.dim-grab:active { cursor: grabbing; }
.dim-g { transition: opacity .12s ease; }
.dim-label {
  position: absolute;
  transform: translate(-50%, -50%);
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 10px rgba(20, 20, 40, .16);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity .12s ease;
  font-family: 'Inter', system-ui, sans-serif;
}
.dim-label-val {
  font-size: 12.5px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: .01em;
}

.dog-shadow {
  position: absolute;
  left: 50%;
  bottom: 8%;
  transform: translateX(-50%);
  width: 60%;
  height: 22px;
  background: radial-gradient(50% 50% at 50% 50%, rgba(15, 18, 38, .22), transparent 65%);
  filter: blur(8px);
  z-index: -1;
  pointer-events: none;
}

.vp-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  z-index: 4;
  transition: opacity var(--t-slow);
  pointer-events: none;
}

.vp-loader.is-hidden {
  opacity: 0;
}

.vp-loader-ring {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--c-magenta);
  border-right-color: var(--c-pink);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* spec chips */
.spec-chip {
  position: absolute;
  display: flex;
  flex-direction: column;
  padding: 9px 14px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  box-shadow: var(--shadow);
  font-size: 11px;
  min-width: 90px;
  z-index: 4;
  animation: chipIn .6s var(--t-slow) backwards;
  pointer-events: none;
}

.spec-chip::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: white;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.chip-tl {
  top: 18%;
  left: 6%;
}

.chip-tl::after {
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

.chip-tr {
  top: 22%;
  right: 6%;
  animation-delay: .1s;
}

.chip-tr::after {
  left: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(135deg);
}

.chip-bl {
  bottom: 22%;
  left: 8%;
  animation-delay: .2s;
}

.chip-bl::after {
  right: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(-45deg);
}

.chip-br {
  bottom: 26%;
  right: 6%;
  animation-delay: .3s;
}

.chip-br::after {
  left: -5px;
  top: 50%;
  transform: translateY(-50%) rotate(135deg);
}

@keyframes chipIn {
  from {
    opacity: 0;
    transform: scale(.9);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.chip-label {
  color: var(--text-soft);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: 10px;
}

.chip-value {
  color: var(--text);
  font-weight: 700;
  font-size: 13px;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* vp controls */
.vp-controls {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 4px;
  background: white;
  padding: 6px;
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow);
  z-index: 3;
}

.vp-ctl {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid transparent;   /* colored only when active; transparent keeps size stable. 2px matches the zoom-slider knob */
  color: var(--text-soft);
  transition: background var(--t), color var(--t), border-color var(--t);
}

.vp-ctl:hover {
  background: var(--bg-tint);
  color: var(--text);
}

/* Toggled-on state (the measurements ruler). */
.vp-ctl.is-active {
  background: var(--bg-tint);
  color: var(--c-pink);
  border-color: var(--c-pink);
}

.vp-divider {
  width: 1px;
  height: 18px;
  background: var(--line);
  margin: 0 4px;
}

/* Vertical zoom slider — left edge of the viewport. Top = zoom in. The <input>
   is a normal horizontal range rotated -90° so max ends up at the top,
   deterministically across browsers. No background; sits directly on the scene. */
.vp-zoom {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 2px;
  background: white;
  border-radius: 999px;
  box-shadow: 0 8px 22px -14px rgba(15, 18, 38, .28);
}

.vp-zoom-icon {
  color: var(--text-soft);
  display: grid;
  place-items: center;
}

.vp-zoom-track {
  position: relative;
  width: 22px;
  height: 148px;
}

/* Rotated range. width becomes the vertical length; flex:none overrides the
   global input[type=range] flex:1. Neutral (gray) track + thumb, overriding the
   pink measurement-slider styling. */
.vp-zoom-slider {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 148px;
  height: 22px;
  margin: 0;
  flex: none;
  transform: translate(-50%, -50%) rotate(-90deg);
  cursor: pointer;
}

/* Plain neutral track — no colored progress fill. Higher specificity than the
   global `input[type=range]::...` rules so this wins. The thumb keeps the
   global pink styling (not overridden here). */
input[type=range].vp-zoom-slider::-webkit-slider-runnable-track {
  background: var(--line);
}
input[type=range].vp-zoom-slider::-moz-range-track {
  background: var(--line);
}

/* print stats */
.print-stats {
  position: absolute;
  top: 18px;
  left: 18px;
  display: flex;
  gap: 8px;
  z-index: 2;
}

.stat {
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 6px 10px;
  display: flex;
  flex-direction: column;
  min-width: 64px;
  box-shadow: var(--shadow-sm);
}

.stat-label {
  font-size: 10px;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 600;
}

.stat-value {
  font-size: 13px;
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* TEMP: pricing debug overlay — remove together with the #vpDebug markup
   and the updateDebugPanel() block in script.js. */
.vp-debug {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 400px;
  max-width: calc(100% - 36px);
  max-height: calc(100% - 36px);
  display: flex;
  flex-direction: column;
  background: rgba(15, 18, 38, .92);
  color: #fff;
  border-radius: 12px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  line-height: 1.5;
  box-shadow: var(--shadow-sm);
}

.vp-debug[hidden] {
  display: none !important;
}

.vp-debug-body {
  overflow-y: auto;
  padding: 2px 12px 10px;
}

.dbg-sec {
  margin-top: 8px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: #ffb86b;
}

.dbg-part { margin-top: 6px; }

.dbg-line { color: rgba(255, 255, 255, .92); }

.dbg-rows {
  color: rgba(255, 255, 255, .55);
  font-size: 10px;
  word-break: break-word;
}

.viewport.is-fullscreen .vp-debug {
  display: none !important;
}

/* panel (right) */
.panel {
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  display: flex;
  flex-direction: column;
  /* overflow: visible so the absolutely-positioned material popovers can
     escape the panel's box without being clipped. The panel itself never
     overflows; only intentional floating UI does. */
  overflow: visible;
  position: relative;
  min-height: 460px;
  /* Cap the panel to the grid row height so taller step content scrolls
     internally instead of growing the row (which would resize the canvas).
     The scroll lives on .step-body, not here, so overflow stays visible and
     the color popovers can still escape the panel box. */
  max-height: calc(100vh - 140px);
}

.panel-screen {
  display: none;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  animation: fadeUp .4s var(--t-slow);
}

.panel-screen.is-active {
  display: flex;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: transparent;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  margin-bottom: 14px;
}

.eyebrow-light {
  color: rgba(255, 255, 255, .85);
  background: none;
  -webkit-text-fill-color: initial;
}

.panel-title {
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.05;
  margin-bottom: 16px;
}

.panel-text {
  font-size: 15px;
  color: var(--text-mid);
  margin-bottom: 24px;
}

.quick-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quick-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--r);
  background: var(--bg);
  border: 1px solid var(--line-soft);
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
}

.qbadge {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.quick-list li:nth-child(1) .qbadge {
  background: linear-gradient(135deg, #FF7A1A, #FF3D78);
}

.quick-list li:nth-child(2) .qbadge {
  background: linear-gradient(135deg, #FF3D78, #7C3AED);
}

.quick-list li:nth-child(3) .qbadge {
  background: linear-gradient(135deg, #7C3AED, #2FB8FF);
}

.panel-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.panel-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px dashed var(--line);
  color: var(--text-soft);
  font-size: 12px;
}

.panel-foot svg {
  color: var(--c-purple);
  flex: none;
}

/* stepper */
.stepper {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--text-soft);
  transition: color var(--t), background var(--t);
  font-size: 13px;
}

.step:hover {
  color: var(--text);
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-tint);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
  transition: background var(--t), color var(--t);
}

.step-label {
  font-weight: 600;
}

/* Done steps read the same neutral gray as upcoming ones — only the CURRENT
   step's number is colored (see .step.is-active below). */
.step.is-active .step-num {
  background: var(--grad-warm);
  color: white;
}

.step.is-active {
  color: var(--text);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--line);
  margin: 0 4px;
  border-radius: 2px;
}

/* Connector lines stay neutral gray in every state (no colored fill). */

/* step body */
.step-body {
  display: none;
  flex: 1;
  flex-direction: column;
  /* min-height:0 lets the body shrink below its content size inside the
     flex column. The body itself doesn't scroll — only .step-scroll does —
     so the footer (nav / CTA) stays out of the scroll region. */
  min-height: 0;
  /* visible (not hidden) so the negative-margin expansion on .step-scroll below
     isn't re-clipped here. The panel (overflow:visible, 32px padding) contains
     it, so nothing bleeds outside the panel card. */
  overflow: visible;
  animation: fadeUp .35s;
}

.step-body.is-active {
  display: flex;
}

/* Scrollable content region of a step. overflow:auto clips on ALL sides, which
   cut the shadows off the CTA buttons inside (New pet, Proceed to checkout).
   The negative-margin/padding pair pushes the clip box OUT into the panel's 32px
   padding while keeping the content visually in place — so those shadows now
   have room to render instead of being sliced at the edge. */
.step-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 4px 18px 26px;
  margin: -4px -18px -26px;
}

.step-title {
  font-size: 22px;
  margin-bottom: 6px;
  letter-spacing: -.02em;
}

.step-desc {
  font-size: 14px;
  color: var(--text-mid);
  margin-bottom: 18px;
}

.step-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}

.step-head-row .step-title,
.step-head-row .step-desc {
  margin-bottom: 0;
}

.step-head-row .step-title {
  margin-bottom: 4px;
}

.step-nav {
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px dashed var(--line);
}

/* Review step footer — a fixed block below the scroll area holding the trust
   row, the download CTA, and the Back / Start over nav. */
.review-actions {
  flex: none;
  padding-top: 14px;
}

.review-actions .btn-block {
  margin: 0;
}

.review-actions .trust-row {
  margin: 12px 0;
}

/* The nav already sits below the scroll area; inside the footer it doesn't
   need the dashed divider that separates it from scrolling content. */
.review-actions .step-nav {
  border-top: none;
  padding-top: 0;
}

/* (breed selector removed — measurements alone drive the model) */

/* unit toggle */
.unit-toggle {
  display: flex;
  background: var(--bg-tint);
  padding: 3px;
  border-radius: 999px;
  gap: 2px;
}

.unit-btn {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: 999px;
  transition: background var(--t), color var(--t), box-shadow var(--t);
}

.unit-btn.is-active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* fields / ranges */
.measure-grid,
.wheel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 22px;
  margin-bottom: 16px;
}

/* Header for the secondary "Fine-tune wheel" group between the measure grid
   and the step buttons. Subtle divider, smaller than the step title. */
.subsection-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin: 4px 0 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
  letter-spacing: -0.005em;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-mid);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.field-num {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: inline-grid;
  place-items: center;
  background: var(--grad-warm);
  color: white;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.field-hint {
  color: var(--text-faint);
  font-weight: 500;
}

/* Small "?" help icon at the end of a measurement label; shows a tutorial
   tooltip on hover or focus. Tooltip content is placeholder for now. */
.field-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--line);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  cursor: help;
  position: relative;
  user-select: none;
  font-family: 'Plus Jakarta Sans', sans-serif;
  transition: background var(--t), color var(--t);
}
.field-help:hover,
.field-help:focus-visible {
  background: var(--c-pink);
  color: white;
  outline: none;
}

.field-help-tip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--text);
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  max-width: 280px;
  pointer-events: none;
  box-shadow: 0 6px 18px -8px rgba(15, 18, 38, .35);
  z-index: 30;
}
.field-help-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--text);
}
.field-help:hover .field-help-tip,
.field-help:focus-visible .field-help-tip {
  display: block;
}

.field-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type=range] {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 22px;
}

input[type=range]::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--c-pink) var(--p, 50%), var(--line) var(--p, 50%));
}

input[type=range]::-moz-range-track {
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(to right, var(--c-pink) var(--p, 50%), var(--line) var(--p, 50%));
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--c-pink);
  margin-top: -6px;
  box-shadow: 0 2px 8px rgba(255, 61, 120, .4);
  cursor: grab;
  transition: transform var(--t-fast);
}

input[type=range]:active::-webkit-slider-thumb {
  transform: scale(1.15);
  cursor: grabbing;
}

input[type=range]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--c-pink);
  box-shadow: 0 2px 8px rgba(255, 61, 120, .4);
  cursor: grab;
}

.field-output {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 2px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  background: var(--bg-tint);
  padding: 4px 10px;
  border-radius: 8px;
  font-variant-numeric: tabular-nums;
  min-width: 64px;
  text-align: right;
  transition: box-shadow var(--t), background var(--t);
}
/* Pink ring only when the input itself is focused — clicking the lock
   button or selecting the unit text shouldn't light the ring. */
.field-output:has(.field-value:focus) {
  background: white;
  box-shadow: 0 0 0 2px var(--c-pink) inset;
}

.field-output .unit {
  color: var(--text-soft);
  font-weight: 600;
  margin-left: 2px;
}

/* Typeable numeric input that visually matches the static value display. */
.field-value {
  width: 36px;
  min-width: 0;
  max-width: 4ch;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  font-variant-numeric: inherit;
  text-align: right;
  outline: none;
}
.field-value::-webkit-outer-spin-button,
.field-value::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field-value.is-invalid {
  color: #d93838;
}

/* Disabled slider — for the wheel-radius offset while in auto mode. */
input[type=range]:disabled {
  opacity: .45;
  cursor: not-allowed;
}
input[type=range]:disabled::-webkit-slider-thumb {
  cursor: not-allowed;
  border-color: var(--text-faint);
  box-shadow: none;
}
input[type=range]:disabled::-moz-range-thumb {
  cursor: not-allowed;
  border-color: var(--text-faint);
  box-shadow: none;
}

/* Wheel-radius lock button — sits inside the field-output beside the value.
   Locked icon = auto mode (radius tracks height). Unlocked icon = manual
   override mode; the value input becomes editable and the offset slider
   activates. */
.field-output--radius { padding-right: 4px; }
/* The lock is a real little button — white pill sitting on the gray output
   card, so it reads as clickable instead of as another decoration. */
.radius-lock {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  padding: 0;
  background: white;
  box-shadow: 0 1px 2px rgba(15, 18, 38, 0.127);
  cursor: pointer;
  color: var(--text-soft);
  border-radius: 6px;
  align-self: center;
  transition: color var(--t), background var(--t), border-color var(--t), box-shadow var(--t);
}
.radius-lock:hover {
  color: var(--text);
  border-color: var(--text-soft);
  box-shadow: 0 2px 5px rgba(15, 18, 38, .12);
}
.radius-lock:focus-visible { outline: 2px solid var(--c-pink); outline-offset: 1px; }
.radius-lock .lock-open { display: none; }
.radius-lock.is-unlocked .lock-closed { display: none; }
.radius-lock.is-unlocked .lock-open { display: inline; }
.radius-lock.is-unlocked {
  color: var(--c-pink);
  border-color: rgba(255, 61, 120, .35);
  box-shadow: 0 1px 3px rgba(255, 61, 120, .15);
}

/* Disabled = locked-radius state. Muted text, not-allowed cursor, no focus
   ring (the input can't take focus while disabled, so :has(...:focus) above
   never matches). The unit text is dimmed alongside it so the whole card
   reads as inactive. */
.field-value:disabled {
  cursor: not-allowed;
  color: var(--text-faint);
  -webkit-text-fill-color: var(--text-faint);
  opacity: 1;
}
.field-output:has(.field-value:disabled) .unit {
  color: var(--text-faint);
}

.measure-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--r);
  background: linear-gradient(95deg, rgba(255, 122, 26, .08), rgba(193, 63, 169, .06));
  border: 1px solid rgba(193, 63, 169, .15);
  font-size: 13px;
  color: var(--text-mid);
  margin-bottom: 16px;
}

.measure-tip svg {
  color: var(--c-magenta);
  flex: none;
}

.measure-tip b {
  color: var(--text);
}

.link-inline {
  color: var(--c-magenta);
  font-weight: 600;
  transition: color var(--t);
}

.link-inline:hover {
  color: var(--c-pink);
}

/* style step */
.style-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.group-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-mid);
  text-transform: uppercase;
  letter-spacing: .05em;
}

.group-hint {
  font-size: 12px;
  color: var(--text-soft);
}

/* Material rows — one per material slot. Each row is a clickable color
   chip plus a title/subtitle pair; clicking the chip expands a swatches
   strip in place. Quiet by default so the whole color section reads as
   a list of materials, not a wall of color buttons. */
.material-list {
  display: flex;
  flex-direction: column;
}

.material-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  column-gap: 14px;
  row-gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}
.material-row:first-child {
  border-top: none;
  padding-top: 2px;
}

.material-chip {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line);
  cursor: pointer;
  padding: 3px;
  background: white;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), border-color var(--t), transform var(--t-fast);
}
.material-chip:hover {
  border-color: var(--text-soft);
  box-shadow: var(--shadow);
}
.material-chip[aria-expanded="true"] {
  border-color: var(--c-pink);
  box-shadow: 0 0 0 2px rgba(255, 61, 120, .18), var(--shadow-sm);
}
.material-chip-color {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background-color: var(--c, var(--bg-tint));
  background-repeat: no-repeat;
  overflow: hidden;
}
/* Finish overlay rides on ::before so the base layer (solid color, or
   dual-color gradient) and the finish (metallic stripe / standard sheen)
   are independent — they compose without one rule clobbering the other. */
.material-chip-color::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-repeat: no-repeat;
  pointer-events: none;
}
/* Dual color: base becomes a gradient from primary (--c) to sheen (--c2).
   When combined with .has-metallic, the metallic overlay still draws on
   top via ::before. */
.material-chip-color.has-dual-color {
  background-image: linear-gradient(135deg, var(--c) 0%, var(--c2, var(--c)) 100%);
}
.material-chip-color.has-standard::before {
  background-image: radial-gradient(circle at 28% 22%, rgba(255, 255, 255, .5) 0%, transparent 55%);
}
.material-chip-color.has-metallic::before {
  /* Same diagonal stripe as the popover swatch — sharp top-left edge,
     long soft tail toward the bottom-right. */
  background-image:
    linear-gradient(135deg,
      transparent              0%,
      rgba(255, 255, 255, .2)  35%,
      transparent              45%,
      rgba(255, 255, 255, .4)  55%,
      rgba(255, 255, 255, .3)  65%,
      rgba(255, 255, 255, .2)  75%,
      rgba(255, 255, 255, .1)  85%,
      transparent              100%),
    radial-gradient(circle at 50% 50%,
      transparent       55%,
      rgba(0, 0, 0, .2) 100%);
}
/* has-matte: ::before stays empty — flat base shows through. */

.material-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.material-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.005em;
}
/* Small label-pills rendered beside the chosen filament's name in the row
   title. Driven by the filament's `tags` array. */
.material-tag {
  display: inline-block;
  padding: 1px 6px;
  margin-left: 6px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 4px;
  vertical-align: middle;
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.5;
}
.material-tag-metallic {
  background: linear-gradient(135deg, #C8CFDA, #93989e);
  color: white;
}
.material-tag-matte {
  background: var(--bg-tint);
  color: var(--text-mid);
}
.material-tag-dual-color {
  background: var(--grad-warm);
  color: white;
}
.material-desc {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}

/* Color picker popover. Absolutely positioned under the chip so opening
   it never grows the row — that's what stops the canvas from flickering
   (the hero grid was stretching its left column whenever the right column
   got taller). Scrolls internally when the filament list overflows. */
.material-swatches {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 100%;
  max-width: 320px;
  max-height: 320px;
  overflow-y: auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 30;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.material-swatches[hidden] {
  display: none;
}

.material-swatch-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: background var(--t);
}
.material-swatch-item:hover,
.material-swatch-item:focus-visible {
  background: var(--bg-tint);
  outline: none;
}
.material-swatch-item.is-selected {
  background: linear-gradient(95deg, rgba(255, 122, 26, .08), rgba(193, 63, 169, .06));
}

.material-swatch-color {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: none;
  background-color: var(--c, var(--bg-tint));
  background-repeat: no-repeat;
  box-shadow: 0 1px 3px rgba(15, 18, 38, .14), inset 0 0 0 1px rgba(15, 18, 38, .10);
  overflow: hidden;
}
/* Selected state is signalled by the row's background highlight (the soft
   brand-gradient .is-selected fill). The color shape stays a circle — both
   for the picked option and the unselected ones. */
/* Same composition as .material-chip-color: base layer on the element
   (solid var(--c) or dual-color gradient), finish overlay on ::before. */
.material-swatch-color::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background-repeat: no-repeat;
  pointer-events: none;
}
.material-swatch-color.has-dual-color {
  background-image: linear-gradient(135deg, var(--c) 0%, var(--c2, var(--c)) 100%);
}
.material-swatch-color.has-standard::before {
  background-image: radial-gradient(circle at 30% 26%, rgba(255, 255, 255, .35) 0%, transparent 55%);
}
.material-swatch-color.has-metallic::before {
  background-image:
    linear-gradient(135deg,
      transparent              0%,
      rgba(255, 255, 255, .2)  35%,
      transparent              45%,
      rgba(255, 255, 255, .4)  55%,
      rgba(255, 255, 255, .3)  65%,
      rgba(255, 255, 255, .2)  75%,
      rgba(255, 255, 255, .1)  85%,
      transparent              100%),
    radial-gradient(circle at 50% 50%,
      transparent       55%,
      rgba(0, 0, 0, .2) 100%);
}
/* has-matte: no ::before image — flat color shows through. */

.material-swatch-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.005em;
}

.material-row {
  position: relative;
}

.swatches {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 0;
  position: relative;
  background: transparent;
  transition: transform var(--t-fast);
}

.swatch span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid white;
  box-shadow: var(--shadow);
  transition: box-shadow var(--t);
}

.swatch:hover {
  transform: scale(1.08);
}

.swatch.is-selected span {
  box-shadow: 0 0 0 2px var(--c), 0 6px 14px -4px rgba(0, 0, 0, .2);
}

.seg {
  display: flex;
  background: var(--bg-tint);
  padding: 4px;
  border-radius: 999px;
  gap: 2px;
}

.seg-btn {
  flex: 1;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  border-radius: 999px;
  transition: background var(--t), color var(--t), box-shadow var(--t);
}

.seg-btn.is-active {
  background: white;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.seg-btn:hover {
  color: var(--text);
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.switch {
  position: relative;
  display: inline-block;
  flex: none;
}

.switch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  display: block;
  width: 46px;
  height: 26px;
  background: var(--line);
  border-radius: 999px;
  position: relative;
  transition: background var(--t);
  cursor: pointer;
}

.switch-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .15);
  transition: transform var(--t);
}

.switch input:checked+.switch-track {
  /* Warm gradient (same as the Get STL / Review CTAs) — orange → pink →
     magenta. Stops short of blue so the small control stays calm, but
     keeps a touch of purple in the tail. */
  background: var(--grad-warm);
}

.switch input:checked+.switch-track .switch-thumb {
  transform: translateX(20px);
}

.switch-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.switch-desc {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 1px;
}

/* accessory price chip — value filled from pricing.js CONFIG.accessories */
.acc-price {
  margin-left: auto;
  align-self: center;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-mid);
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 3px 10px;
}

/* review */
.review-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 4px 16px;
  margin-bottom: 16px;
  background: var(--bg);
}

.review-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 13px;
}

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

.review-row span {
  color: var(--text-soft);
}

.review-row b {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.buy-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border-radius: var(--r);
  background: linear-gradient(95deg, rgba(255, 122, 26, .06), rgba(47, 184, 255, .06));
  border: 1px solid rgba(193, 63, 169, .12);
  margin-bottom: 14px;
}

.buy-label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.buy-sub {
  display: block;
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 2px;
}

.buy-price {
  text-align: right;
  flex: none;
}

.buy-amount {
  display: block;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 30px;
  font-weight: 800;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
}

.buy-note {
  font-size: 11px;
  color: var(--text-soft);
}

.trust-row {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-soft);
  margin: 12px 0 4px;
  justify-content: center;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.trust-row svg {
  color: #22C55E;
}

/* scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-soft);
  font-weight: 500;
  animation: bob 2.4s ease-in-out infinite;
}

@keyframes bob {

  0%,
  100% {
    transform: translate(-50%, 0);
    opacity: .8;
  }

  50% {
    transform: translate(-50%, 4px);
    opacity: 1;
  }
}

/* ============ SECTIONS ============ */
.section {
  padding: 110px 0;
  position: relative;
}

.section-how {
  background: white;
}

.section-package {
  background: var(--bg);
}

.section-need {
  background: white;
}

.section-gallery {
  background: var(--bg);
}

.section-quotes {
  padding: 80px 0;
  background:
    radial-gradient(50% 60% at 20% 50%, rgba(255, 61, 120, .06), transparent 60%),
    radial-gradient(50% 60% at 80% 50%, rgba(47, 184, 255, .06), transparent 60%),
    white;
}

.section-faq {
  background: var(--bg);
}

.section-about {
  background: white;
}

.section-cta {
  padding: 90px 0;
  background:
    radial-gradient(60% 80% at 20% 30%, rgba(255, 122, 26, .35), transparent 70%),
    radial-gradient(60% 80% at 80% 70%, rgba(47, 184, 255, .35), transparent 70%),
    linear-gradient(120deg, #4B2A95 0%, #7C3AED 30%, #C13FA9 60%, #FF3D78 90%);
  color: white;
  overflow: hidden;
}

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-title {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.05;
  margin-bottom: 14px;
}

.section-lede {
  font-size: 17px;
  color: var(--text-mid);
}

/* steps grid */
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.step-card {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.step-card-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 800;
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: .04em;
}

.step-card-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: white;
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  margin: 16px 0 20px;
  color: var(--c-magenta);
  box-shadow: var(--shadow-sm);
}

.step-card:nth-child(2) .step-card-icon {
  color: var(--c-pink);
}

.step-card:nth-child(3) .step-card-icon {
  color: var(--c-orange);
}

.step-card:nth-child(4) .step-card-icon {
  color: var(--c-purple);
}

.step-card:nth-child(5) .step-card-icon {
  color: var(--c-indigo);
}

.step-card:nth-child(6) .step-card-icon {
  color: var(--c-blue);
}

.step-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 14.5px;
}

/* two-col layouts */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.two-col-flip {
  grid-template-columns: 1fr 1fr;
}

.two-col .section-title,
.two-col .eyebrow {
  text-align: left;
}

.two-col .section-head {
  text-align: left;
  max-width: none;
  margin: 0 0 28px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text-mid);
}

.check-list b {
  color: var(--text);
  font-weight: 700;
}

.check-list svg {
  color: #22C55E;
  flex: none;
  margin-top: 4px;
}

/* files card */
.files-card {
  background: white;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.files-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.files-size {
  color: var(--text-soft);
  font-weight: 500;
}

.files-list {
  list-style: none;
  padding: 6px 8px;
  margin: 0;
  max-height: 460px;
  overflow-y: auto;
}

.files-list li {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--text);
  border-radius: 8px;
  transition: background var(--t);
  font-family: 'JetBrains Mono', 'SF Mono', monospace;
}

.files-list li:hover {
  background: var(--bg);
}

.file-ico {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(193, 63, 169, .12);
  color: var(--c-magenta);
  font-family: 'Inter', sans-serif;
  letter-spacing: .05em;
}

.file-ico.pdf {
  background: rgba(255, 122, 26, .14);
  color: var(--c-orange);
}

.file-meta {
  color: var(--text-soft);
  font-size: 12px;
}

/* need grid */
.need-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.need-card {
  background: var(--bg);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 26px;
  transition: transform var(--t), box-shadow var(--t);
}

.need-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.need-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: white;
  margin-bottom: 18px;
}

.need-icon-1 {
  background: var(--grad-warm);
}

.need-icon-2 {
  background: linear-gradient(95deg, #FF3D78, #7C3AED);
}

.need-icon-3 {
  background: linear-gradient(95deg, #7C3AED, #5562F0);
}

.need-icon-4 {
  background: var(--grad-cool);
}

.need-card h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.need-card p {
  font-size: 14px;
}

.need-card b {
  color: var(--text);
}

.need-tag {
  display: block;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 12.5px;
  color: var(--text-soft);
}

/* gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.g-card {
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: white;
  border: 1px solid var(--line-soft);
  transition: transform var(--t), box-shadow var(--t);
}

.g-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.g-img {
  aspect-ratio: 4/3;
  background: var(--bg-tint);
  position: relative;
  overflow: hidden;
}

.g-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.g-placeholder {
  display: grid;
  place-items: center;
  color: var(--text-faint);
  font-size: 13px;
  background:
    repeating-linear-gradient(45deg, transparent, transparent 12px, rgba(124, 58, 237, .04) 12px, rgba(124, 58, 237, .04) 24px),
    var(--bg-tint);
}

.g-card figcaption {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.g-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.g-loc {
  font-size: 12.5px;
  color: var(--text-soft);
}

/* quotes */
.quotes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.quote {
  margin: 0;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 28px;
  position: relative;
  box-shadow: var(--shadow);
}

.quote-mark {
  color: rgba(193, 63, 169, .2);
  margin-bottom: 8px;
}

.quote p {
  font-size: 15.5px;
  color: var(--text);
  line-height: 1.55;
  margin-bottom: 16px;
  font-weight: 500;
}

.quote cite {
  font-style: normal;
  font-size: 13.5px;
  color: var(--text-soft);
  font-weight: 600;
}

/* faq */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 0;
  transition: border-color var(--t), box-shadow var(--t);
}

.faq-item[open] {
  border-color: rgba(193, 63, 169, .25);
  box-shadow: var(--shadow);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 22px;
  font-weight: 400;
  color: var(--c-magenta);
  transition: transform var(--t);
  line-height: 1;
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  padding: 0 22px 20px;
  font-size: 14.5px;
  color: var(--text-mid);
}

/* about */
.about-card {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--grad-soft);
  aspect-ratio: 4/3;
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  display: grid;
  place-items: center;
  padding: 28px;
}

.about-card img {
  max-width: 80%;
  height: auto;
  filter: drop-shadow(0 20px 25px rgba(0, 0, 0, .15));
}

.about-badge {
  position: absolute;
  bottom: 22px;
  left: 22px;
  background: white;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.about-badge-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.about-badge-sub {
  display: block;
  font-size: 11.5px;
  color: var(--text-soft);
  margin-top: 1px;
}

.about-text {
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--text-mid);
  margin-bottom: 14px;
}

.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}

.stat-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stat-block b {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-block span {
  font-size: 13px;
  color: var(--text-soft);
  font-weight: 500;
}

/* cta */
.cta-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}

.cta-text h2 {
  color: white;
  font-size: clamp(28px, 3.5vw, 42px);
  margin-bottom: 12px;
  line-height: 1.1;
}

.cta-text p {
  color: rgba(255, 255, 255, .85);
  font-size: 16.5px;
  max-width: 540px;
}

.cta-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cta-actions .btn {
  width: 100%;
}

/* footer */
.footer {
  background: #0E1226;
  color: rgba(255, 255, 255, .7);
  padding: 70px 0 24px;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 60px;
  margin-bottom: 50px;
}

.footer-brand img {
  height: 26px;
  margin-bottom: 14px;
  filter: brightness(1.1);
}

.footer-brand p {
  color: rgba(255, 255, 255, .55);
  font-size: 14px;
  max-width: 280px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.footer-cols .footer-h {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: white;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 14px;
}

.footer-cols a {
  display: block;
  font-size: 14px;
  color: rgba(255, 255, 255, .6);
  padding: 5px 0;
  transition: color var(--t);
}

.footer-cols a:hover {
  color: white;
}

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  padding: 24px 32px 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: rgba(255, 255, 255, .45);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1100px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .viewport,
  .panel {
    min-height: auto;
  }

  /* Stacked layout scrolls with the page — drop the panel height cap and the
     per-step internal scroll so steps render at full height. */
  .panel {
    max-height: none;
  }

  .step-body,
  .step-scroll {
    overflow: visible;
  }

  .nav-links {
    display: none;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .need-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid,
  .quotes-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-col {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .two-col-flip {
    grid-template-areas: "a" "b";
  }

  .two-col-flip .two-col-text {
    grid-area: b;
  }

  .two-col-flip .two-col-art {
    grid-area: a;
  }

  .cta-inner {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {

  .container,
  .nav-inner,
  .hero {
    padding-left: 20px;
    padding-right: 20px;
  }

  .section {
    padding: 80px 0;
  }

  .panel,
  .viewport {
    padding: 22px;
    border-radius: var(--r-lg);
  }

  .panel {
    padding: 22px;
  }

  .measure-grid {
    grid-template-columns: 1fr;
  }

  .steps,
  .need-grid,
  .gallery-grid,
  .quotes-grid {
    grid-template-columns: 1fr;
  }

  .nav-actions .btn-ghost {
    display: none;
  }

  .stepper {
    gap: 0;
  }

  .step-label {
    display: none;
  }

  .step-line {
    margin: 0 2px;
  }

  .print-stats {
    flex-direction: column;
  }

  .spec-chip {
    display: none;
  }

  .buy-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .buy-price {
    text-align: left;
  }

  .about-stats {
    gap: 18px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .footer-bottom,
  .footer-inner {
    padding-left: 20px;
    padding-right: 20px;
  }
}

/* ============ BUILD MODAL + LOCKED STATE ============ */
/* .btn sets display:inline-flex, which beats the UA [hidden] rule — without
   this, the hidden "Get my STL files" button shows stacked under "Build
   model". Force it back to none until JS reveals it post-build. */
.btn[hidden] { display: none !important; }

/* While a CadQuery build runs, lock the customizer controls (the modal's own
   Cancel button lives outside .panel/.nav, so it stays clickable). */
.pw-building .panel button,
.pw-building .panel a.btn,
.pw-building .nav button {
  pointer-events: none;
  opacity: .55;
}

.build-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 18, 38, .45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fadeUp .25s var(--t-slow);
}
.build-modal[hidden] { display: none; }

.build-modal-card {
  width: min(420px, 100%);
  background: white;
  border-radius: var(--r-xl);
  border: 1px solid var(--line-soft);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px 24px;
  text-align: center;
}

.build-spinner {
  width: 44px;
  height: 44px;
  margin: 0 auto 18px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--c-magenta);
  animation: pwspin .8s linear infinite;
}
@keyframes pwspin { to { transform: rotate(360deg); } }

.build-modal-title {
  font-size: 20px;
  margin: 0 0 6px;
}
.build-modal-stage {
  font-size: 14px;
  color: var(--text-mid);
  margin: 0 0 18px;
  min-height: 1.2em;
}

.build-progress {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-tint);
  overflow: hidden;
}
.build-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(to right, var(--c-orange), var(--c-magenta), var(--c-blue));
  transition: width .35s var(--t-slow);
}
.build-modal-pct {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  margin: 10px 0 18px;
}

.build-modal-cancel { width: 100%; justify-content: center; }

/* Error state: tint the bar and stage line red, keep Cancel as a "Close". */
.build-modal.is-error .build-progress-bar { background: #EF4444; }
.build-modal.is-error .build-modal-stage { color: #EF4444; }
.build-modal.is-error .build-spinner {
  animation: none;
  border-top-color: #EF4444;
  border-color: #EF4444;
}

/* =========================================================================
   ACCOUNTS — auth buttons, dropdown, modal, sheets, cart, pets, orders
   ========================================================================= */

/* ---- nav auth buttons ---- */
.btn-signup {
  color: #fff;
  background: var(--c-pink);
  border: 0;
  box-shadow: 0 10px 22px -12px rgba(255, 61, 120, .7);
}
.btn-signup:hover {
  background: #ec2f68;
  transform: translateY(-1px);
}

.auth-cluster { display: flex; align-items: center; gap: 10px; }

/* ---- nav cart ---- */
.nav-cart {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px; height: 40px;
  border-radius: 999px;
  color: var(--text-mid);
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.nav-cart:hover { color: var(--text); background: var(--bg-tint); border-color: transparent; }
.nav-cart-count {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; line-height: 1; color: #fff;
  background: var(--c-pink); border-radius: 999px;
}

/* ---- user menu (dropdown) ---- */
.user-menu { position: relative; }
.user-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: box-shadow var(--t), border-color var(--t);
}
.user-trigger:hover { border-color: transparent; box-shadow: var(--shadow-sm); }
.user-avatar {
  width: 30px; height: 30px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: #aab0bd;          /* flat gray, not the brand gradient */
  overflow: hidden;
}
/* Uploaded picture fills any avatar circle (nav or settings). */
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.user-name {
  font-size: 14px; font-weight: 600; color: var(--text);
  max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.user-chevron { color: var(--text-soft); transition: transform var(--t); }
.user-trigger[aria-expanded="true"] .user-chevron { transform: rotate(180deg); }

.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 240px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  padding: 8px;
  z-index: 200;
  animation: ddIn .16s ease;
}
@keyframes ddIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.user-dropdown-head { padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 2px; }
.user-dropdown-name { font-weight: 700; font-size: 14px; color: var(--text); }
.user-dropdown-email { font-size: 12px; color: var(--text-soft); overflow: hidden; text-overflow: ellipsis; }
.user-dropdown-badge {
  margin-top: 6px; align-self: flex-start;
  font-size: 11px; font-weight: 600; color: var(--c-purple);
  background: rgba(124, 58, 237, .08);
  padding: 3px 8px; border-radius: 999px;
}
.user-dropdown-sep { height: 1px; background: var(--line-soft); margin: 6px 4px; }
.user-dropdown-item {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 10px;
  font-size: 14px; font-weight: 500; color: var(--text-mid);
  background: transparent; border: 0; cursor: pointer; text-align: left;
  transition: background var(--t), color var(--t);
}
.user-dropdown-item svg { color: var(--text-soft); flex: none; }
.user-dropdown-item:hover { background: var(--bg-tint); color: var(--text); }
.user-dropdown-item:hover svg { color: var(--c-purple); }
.user-dropdown-item.is-danger { color: #d33b52; }
.user-dropdown-item.is-danger svg { color: #d33b52; }
.user-dropdown-item.is-danger:hover { background: rgba(211, 59, 82, .08); }

/* These all set display:flex/inline-flex, which beats the UA [hidden] rule
   (same trap as .btn[hidden] above). Without this they'd all show on load. */
.auth-overlay[hidden],
.sheet-overlay[hidden],
.auth-cluster[hidden],
.auth-form[hidden],
.nav-cart[hidden],
.nav-cart-count[hidden] { display: none !important; }

/* ---- shared overlay scrim ---- */
.pw-modal-open { overflow: hidden; }
.auth-overlay, .sheet-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 18, 38, .5);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---- auth modal ---- */
.auth-modal {
  position: relative;
  width: 100%; max-width: 400px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 28px 24px;
  animation: popIn .2s cubic-bezier(.2, .8, .3, 1);
}
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
.auth-close, .sheet-close {
  position: absolute; top: 14px; right: 14px;
  width: 34px; height: 34px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-soft); background: transparent; border: 0; cursor: pointer;
  transition: background var(--t), color var(--t);
}
.auth-close:hover, .sheet-close:hover { background: var(--bg-tint); color: var(--text); }
.auth-head { text-align: center; margin-bottom: 16px; }
.auth-logo { height: 30px; width: auto; margin-bottom: 12px; }
.auth-heading { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 21px; font-weight: 700; color: var(--text); }
.auth-context {
  font-size: 13px; color: var(--text-mid);
  background: var(--bg-tint); border-radius: 10px;
  padding: 10px 12px; margin-bottom: 14px; text-align: center;
}
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  background: var(--bg-tint); border-radius: 999px; padding: 4px; margin-bottom: 18px;
}
.auth-tab {
  padding: 9px; border-radius: 999px; border: 0; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text-soft); background: transparent;
  transition: background var(--t), color var(--t), box-shadow var(--t);
}
.auth-tab.is-active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-field > span { font-size: 13px; font-weight: 600; color: var(--text-mid); }
.auth-field input, .auth-field select {
  width: 100%; padding: 11px 13px;
  font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm);
  transition: border-color var(--t), box-shadow var(--t);
}
.auth-field input:focus, .auth-field select:focus {
  outline: none; border-color: var(--c-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}
.auth-field input:disabled { background: var(--bg-tint); color: var(--text-soft); }
.auth-field select.is-invalid { border-color: #e0526a; box-shadow: 0 0 0 3px rgba(224, 82, 106, .12); }
.auth-form .btn { margin-top: 4px; }
.auth-error {
  margin-top: 12px; font-size: 13px; color: #d33b52;
  background: rgba(211, 59, 82, .08); border-radius: 10px; padding: 10px 12px;
}
.auth-fineprint { margin-top: 14px; font-size: 11px; color: var(--text-faint); text-align: center; }

/* ---- account sheet ---- */
.sheet {
  position: relative;
  width: 100%; max-width: 500px; max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  animation: popIn .2s cubic-bezier(.2, .8, .3, 1);
  overflow: hidden;
}
.sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--line-soft);
}
.sheet-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 19px; font-weight: 700; color: var(--text); }
.sheet-close { position: static; }
.sheet-body { padding: 20px 24px 24px; overflow-y: auto; }
.sheet-lede { font-size: 13px; color: var(--text-mid); margin-bottom: 16px; line-height: 1.5; }
.sheet-loading { display: flex; justify-content: center; padding: 40px 0; }
.sheet-spinner {
  width: 30px; height: 30px; border-radius: 999px;
  border: 3px solid var(--line); border-top-color: var(--c-magenta);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.empty-note { text-align: center; color: var(--text-soft); font-size: 14px; padding: 24px 0; }

/* ---- config summary (used in cart / checkout) ---- */
.cfg-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 18px; margin: 4px 0 10px; }
.cfg-summary li { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-soft); }
.cfg-summary li b { color: var(--text); font-weight: 600; }

/* ---- pets ---- */
.pet-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.pet-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg);
}
.pet-card-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.pet-avatar {
  width: 38px; height: 38px; border-radius: 999px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; color: #fff; background: var(--grad-cool);
}
.pet-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pet-name { font-weight: 600; color: var(--text); font-size: 14px; }
.pet-sub { font-size: 12px; color: var(--text-soft); }
.pet-meas { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.pet-meas span { background: var(--bg-tint); border-radius: 6px; padding: 1px 6px; }
.pet-card-actions { display: flex; gap: 6px; flex: none; }
.mini-btn {
  font-size: 12px; font-weight: 600; color: var(--text-mid);
  padding: 5px 10px; border-radius: 8px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.mini-btn:hover { background: var(--bg-tint); color: var(--text); border-color: transparent; }
.mini-btn.is-danger { color: #d33b52; }
.mini-btn.is-danger:hover { background: rgba(211, 59, 82, .1); }

.pet-form, .settings-form { display: flex; flex-direction: column; gap: 13px; }
.form-h { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; color: var(--text); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-hint { font-size: 12px; color: var(--text-soft); line-height: 1.5; }
.form-hint a { color: var(--c-purple); font-weight: 600; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

/* ---- cart ---- */
.cart-list, .checkout-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; }
.cart-item, .checkout-item {
  padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg);
}
.cart-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }

/* price hugs the right edge; the remove ✕ sits right beside the name */
.cart-item-head .cart-item-price { margin-left: auto; }

.item-remove {
  width: 28px;
  height: 28px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text-mid);
  cursor: pointer;
  transition: color var(--t), border-color var(--t), background var(--t);
}

.item-remove:hover {
  color: #e0475b;
  border-color: #e0475b;
  background: rgba(224, 71, 91, .06);
}
.cart-item-name { font-weight: 700; color: var(--text); font-size: 14px; }
.cart-item-price { font-weight: 700; color: var(--text); }
.cart-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 2px; margin-bottom: 14px;
  border-top: 1px solid var(--line); font-size: 15px;
}
.cart-total b { font-size: 18px; }

/* ---- order success ---- */
.order-success { text-align: center; padding: 8px 0; }
.order-success-ico {
  width: 56px; height: 56px; border-radius: 999px; margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: linear-gradient(135deg, #34D399, #10B981);
}
.order-success h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.order-success p { font-size: 14px; color: var(--text-mid); line-height: 1.55; margin-bottom: 18px; }
.order-success .btn { margin-bottom: 8px; }

/* ---- orders list ---- */
.order-card { border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; }
.order-card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.order-id { display: block; font-weight: 700; color: var(--text); font-size: 14px; }
.order-date { font-size: 12px; color: var(--text-soft); }
.order-status { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.status-pending_payment { color: #b7791f; background: rgba(234, 179, 8, .14); }
.status-paid, .status-in_production { color: #2563eb; background: rgba(37, 99, 235, .12); }
.status-shipped, .status-delivered { color: #059669; background: rgba(16, 185, 129, .14); }
.status-cancelled { color: #dc2626; background: rgba(220, 38, 38, .1); }
.order-items { display: flex; flex-direction: column; gap: 6px; }
.order-line { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-mid); }
.order-card-total {
  display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--line); font-size: 14px;
}

/* ---- settings ---- */
.settings-top { display: flex; align-items: center; gap: 18px; margin-bottom: 4px; }
.settings-fields { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.avatar-edit-wrap { flex: none; }
.avatar-edit {
  position: relative; padding: 0; border: 0; background: none; cursor: pointer;
  border-radius: 999px;
}
.avatar-lg {
  width: 84px; height: 84px; border-radius: 999px; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 700; color: #fff; background: #aab0bd;
  transition: filter var(--t);
}
.avatar-edit:hover .avatar-lg { filter: brightness(.92); }
.avatar-cam {
  position: absolute; right: -2px; bottom: -2px;
  width: 28px; height: 28px; border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; background: var(--c-purple);
  border: 3px solid var(--surface);
}

.settings-sep { height: 1px; background: var(--line-soft); margin: 20px 0; }
.settings-form + .settings-sep { margin-top: 20px; }
#changePassBtn { margin-bottom: 8px; }
.is-danger-ghost { color: #d33b52; }
.is-danger-ghost:hover { background: rgba(211, 59, 82, .08) !important; color: #d33b52 !important; }

/* ---- review step: price + buy row ---- */
.review-price {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 12px 14px; margin-bottom: 12px;
  background: var(--bg-tint); border-radius: var(--r);
}
.review-price-label { font-size: 13px; font-weight: 600; color: var(--text-mid); }
.review-price-amount { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 800; color: var(--text); }
.review-buy { display: flex; flex-direction: column; gap: 10px; }

/* ---- toast ---- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px);
  z-index: 2000;
  background: var(--text); color: #fff;
  font-size: 14px; font-weight: 600;
  padding: 12px 20px; border-radius: 999px;
  box-shadow: var(--shadow-lg);
  opacity: 0; pointer-events: none;
  transition: opacity var(--t), transform var(--t);
}
.toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.toast.is-error { background: #d33b52; }

@media (max-width: 560px) {
  .user-name { display: none; }
  .form-grid, .cfg-summary { grid-template-columns: 1fr; }
  .auth-modal, .sheet { max-width: 100%; }
}

/* ============================================================================
   CHECKOUT PAGE (checkout.html)
   ============================================================================ */
.ck-page {
  background: var(--bg);
  min-height: 100vh;
}

.ck-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 28px;
  background: rgba(250, 251, 253, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}

.ck-logo img { height: 30px; display: block; }

.ck-secure {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
}

/* Same content column as the sticky nav (.nav-inner: 1320px / 32px padding)
   so page content lines up with the header on every account page. */
.ck-main {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 32px 80px;
}

/* full-page states (signin / empty / result / loading) */
.ck-state {
  max-width: 520px;
  margin: 8vh auto 0;
  text-align: center;
}

.ck-state h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 28px;
  margin-bottom: 10px;
}

.ck-state p { color: var(--text-mid); margin-bottom: 22px; }

.ck-result-ico {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
}

.ck-result-ico.is-ok      { background: #22b573; }
.ck-result-ico.is-pending { background: #f5a623; }
.ck-result-ico.is-fail    { background: #e0475b; }

.ck-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

/* two-column checkout — form capped for readability, summary hugging the
   container's right edge so both edges align with the header */
.ck-grid {
  display: grid;
  grid-template-columns: minmax(0, 640px) 400px;
  justify-content: space-between;
  gap: 40px;
  align-items: start;
}

.ck-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 30px;
  margin-bottom: 6px;
}

.ck-h2 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16px;
  margin: 26px 0 12px;
}

.ck-fields { display: flex; flex-direction: column; gap: 12px; }

.ck-row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
}

.ck-cep-hint {
  font-size: 12px;
  color: var(--text-soft);
  padding-bottom: 12px;
}

.auth-field em { font-style: normal; font-weight: 400; color: var(--text-soft); }

/* right: order summary card */
.ck-summary {
  position: sticky;
  top: 84px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  padding: 20px 22px 22px;
  box-shadow: var(--shadow-sm);
}

.ck-summary .ck-h2 { margin-top: 2px; }

.ck-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.ck-item .auth-field { margin-top: 10px; }

.ck-pet.is-invalid { border-color: #e0475b; }

.ck-totals { padding: 14px 0 16px; }

.ck-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  color: var(--text-mid);
  padding: 3px 0;
}

.ck-total-row.is-grand {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
  font-size: 16px;
  color: var(--text);
}

.ck-total-row.is-grand b { font-size: 19px; }

.ck-pay-note {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 12px;
  line-height: 1.5;
}

.ck-methods {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.ck-methods span {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-mid);
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  padding: 3px 9px;
}

@media (max-width: 900px) {
  .ck-grid { grid-template-columns: 1fr; gap: 8px; }
  .ck-summary { position: static; }
}


/* ============================================================================
   MY ORDERS PAGE (orders.html)
   ============================================================================ */
.ck-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  text-decoration: none;
}

.ck-back:hover { color: var(--text); }

/* left-aligned with the header logo (.ck-main already matches .nav-inner) */
#odList { max-width: 860px; }

.od-lede { color: var(--text-mid); font-size: 14px; margin: 6px 0 22px; max-width: 60ch; }

.od-lede a { color: inherit; font-weight: 600; }

/* filter tabs */
.od-tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.od-tab {
  border: 1px solid var(--line-soft);
  background: white;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
}

.od-tab.is-active {
  background: var(--text);
  border-color: var(--text);
  color: #fff;
}

.od-tab-n { opacity: .65; font-weight: 700; }

/* order card */
.od-card {
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.od-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.od-note { font-size: 12.5px; color: var(--text-soft); margin: 2px 0 10px; }

.od-card .order-items { padding: 8px 0; border-top: 1px solid var(--line-soft); }

.od-card .order-line { padding: 3px 0; }

.od-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  margin-top: 6px;
}

.od-total { font-size: 13.5px; color: var(--text-mid); }

.od-total b { font-size: 16px; color: var(--text); margin-left: 6px; }

.od-actions { display: flex; align-items: center; gap: 8px; }

.od-pay { padding: 9px 18px; font-size: 13.5px; }

/* production timeline */
.od-timeline {
  display: flex;
  align-items: center;
  margin: 10px 0 6px;
}

.od-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 58px;
}

.od-step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-soft);
}

.od-step.is-done .od-step-dot { background: #22b573; }

.od-step.is-now .od-step-dot {
  box-shadow: 0 0 0 4px rgba(34, 181, 115, .18);
}

.od-step-label { font-size: 10.5px; font-weight: 600; color: var(--text-soft); }

.od-step.is-done .od-step-label { color: var(--text-mid); }

.od-step-bar {
  flex: 1;
  height: 2px;
  background: var(--line-soft);
  margin: 0 2px 16px;
}

.od-step-bar.is-done { background: #22b573; }

/* expandable details */
.od-details {
  border-top: 1px dashed var(--line-soft);
  margin-top: 12px;
  padding-top: 12px;
}

.od-detail-item { padding: 6px 0 10px; }

.od-block { margin-top: 10px; }

.od-block h4 {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-soft);
  margin-bottom: 4px;
}

.od-block p { font-size: 13px; color: var(--text-mid); line-height: 1.55; }

.od-dim { color: var(--text-soft); font-size: 12px; }

@media (max-width: 560px) {
  .od-card-foot { flex-direction: column; align-items: stretch; }
  .od-actions { justify-content: flex-end; flex-wrap: wrap; }
  .od-step { min-width: 44px; }
}


/* secure line under the checkout title (chrome now comes from site-header.js) */
.ck-secure-line {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-soft);
  margin: 2px 0 4px;
}


/* ============================================================================
   MY PETS PAGE (pets.html)
   ============================================================================ */
.pt-head { margin-bottom: 4px; }

.pt-title-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* the add-a-pet card (first tile of the gallery): one flat column —
   paw image (full width), button, hint */
.pt-card-add {
  align-items: center;
  justify-content: center;
  padding: 20px 20px 24px;
  gap: 14px;
}

.pt-add-paw {
  width: auto;
  max-width: 42%;
  height: auto;
  display: block;
  margin: 10px auto 14px;
}

.pt-add-hint {
  font-size: 12.5px;
  color: var(--text-soft);
  text-align: center;
  line-height: 1.5;
  max-width: 26ch;
}

/* lede spans the full content width; search sits close underneath */
.pt-lede { max-width: none; margin: 6px 0 12px; }

/* search — NGOs / clinics can have dozens of pets on file */
.pt-toolbar { margin-bottom: 18px; }

.pt-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 9px 16px;
  color: var(--text-soft);
}

.pt-search:focus-within { border-color: var(--c-magenta); }

.pt-search input {
  border: none;
  outline: none;
  background: none;
  flex: 1;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
}

.pt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.pt-card {
  background: white;
  border: 1px solid var(--line-soft);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.pt-cover {
  aspect-ratio: 4 / 3;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.pt-cover-empty {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: var(--text-soft);
}

.pt-strip {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: white;
}

.pt-strip img {
  width: 52px;
  height: 40px;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}

.pt-body { padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.pt-name-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.pt-name {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

/* assigned-device chip: the wheelchair (from a paid order) this pet uses */
.pt-device {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  color: #2563eb;
  background: rgba(37, 99, 235, .12);
  white-space: nowrap;
}

.pt-device.is-none { color: var(--text-soft); background: var(--bg); border: 1px solid var(--line-soft); }

/* measurement rows: one per line, label left, value flush right — every
   value shares the same edge (Weight included) and nothing can overflow
   the card at narrow widths */
.pt-meas {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0;
  margin: 0;
}

.pt-meas li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-soft);
}

.pt-meas b { color: var(--text); font-weight: 700; font-variant-numeric: tabular-nums; }

.pt-missing { font-size: 12.5px; color: #b7791f; }

.pt-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: auto; padding-top: 4px; }

/* ============================================================================
   PET FORM MODAL (pet-form.js — shared by pets page, customizer, checkout)
   ============================================================================ */
.pf-overlay, .pf-tut-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 38, .45);
  backdrop-filter: blur(4px);
  z-index: 220;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pf-tut-overlay { z-index: 230; }

.pf-overlay[hidden], .pf-tut-overlay[hidden] { display: none; }

.pf-modal {
  position: relative;
  background: white;
  border-radius: var(--r);
  box-shadow: 0 30px 80px -20px rgba(15, 18, 38, .35);
  width: 480px;
  max-width: 100%;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 26px 26px 22px;
}

.pf-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 21px;
  margin-bottom: 14px;
}

.pf-modal form { display: flex; flex-direction: column; gap: 12px; }

/* photo strip */
.pf-photos-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.pf-photos-label em { font-style: normal; font-weight: 400; color: var(--text-soft); }

.pf-photos-count { font-size: 12px; color: var(--text-soft); font-weight: 600; }

.pf-photos {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.pf-thumb {
  position: relative;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

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

.pf-thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 18, 38, .72);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.pf-add-photos {
  width: 76px;
  height: 76px;
  border: 1.5px dashed var(--line-soft);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-mid);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
}

.pf-add-photos:hover { border-color: var(--c-magenta); color: var(--text); }

/* photo how-to popup */
.pf-tut {
  position: relative;
  background: white;
  border-radius: var(--r);
  box-shadow: 0 30px 80px -20px rgba(15, 18, 38, .35);
  width: 900px;
  max-width: 100%;
  padding: 48px 52px 40px;
}

.pf-tut-overlay.is-drag .pf-tut { outline: 3px dashed var(--c-magenta); outline-offset: -14px; }

.pf-tut-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 40px;
  align-items: center;
}

.pf-tut-ill {
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pf-tut-ill img { width: 100%; height: auto; display: block; }

.pf-tut-text h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 21px;
  margin-bottom: 12px;
}

.pf-tut-text p {
  font-size: 14px;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 12px;
}

/* upload controls: their own centered section under the two columns */
.pf-tut-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 36px;
}

.pf-upload-btn { display: inline-flex; cursor: pointer; }

.pf-drop-hint {
  display: block;
  font-size: 12.5px;
  color: var(--text-soft);
}

@media (max-width: 640px) {
  .pf-tut { padding: 32px 24px 28px; }
  .pf-tut-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ============================================================================
   PET PICKERS (measure step + checkout items)
   ============================================================================ */
.pet-pick-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin: 14px 0 22px;
}

.pet-pick-field { flex: 1; min-width: 0; }

.pet-pick-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

/* add-pet buttons share the trigger's 44px height for a level control row */
.pet-pick-add,
.ck-pet-add {
  flex-shrink: 0;
  white-space: nowrap;
  height: 44px;
  display: inline-flex;
  align-items: center;
}

/* pet dropdown — reuses the wheelchair model-select look, stretched to the
   field width, chevron pinned right. Height matches the add-pet buttons so
   the row reads as one control group. */
.pet-select { width: 100%; }

.pet-select-trigger {
  width: 100%;
  height: 44px;
  border-radius: 999px;
  padding: 5px 14px 5px 5px;
}

.pet-select-trigger.is-invalid { border-color: #e0475b; }

.pet-select-trigger .model-select-chevron { margin-left: auto; flex: none; }

.pet-select-name {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

/* the menu may be wider than a narrow trigger (checkout sidebar) so option
   rows never wrap to double height; open() caps max-height to the viewport */
.pet-select-menu {
  width: max(100%, 300px);
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

.pet-select-menu::-webkit-scrollbar { width: 6px; }
.pet-select-menu::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.pet-select-menu::-webkit-scrollbar-track { background: transparent; }

/* In checkout the menu anchors to the whole pet row (dropdown + button), so
   it spans the full width of the order-item section. */
.ck-pet-row { position: relative; }
.ck-pet-row .pet-select { position: static; }
.ck-pet-row .pet-select-menu { width: 100%; left: 0; }

.pet-select-menu .model-option-text { flex: 1; min-width: 0; }

.pet-select-menu .model-option-name,
.pet-select-menu .model-option-desc {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* search inside the dropdown (appears once the pet list is long) */
.pp-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 2px 6px;
  padding: 6px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text-soft);
}

.pp-search:focus-within { border-color: var(--c-magenta); }

/* hard reset: generic .auth-field input rules otherwise inflate this field */
.pet-select-menu .pp-search input {
  border: none;
  outline: none;
  background: none;
  box-shadow: none;
  flex: 1;
  height: auto;
  padding: 0;
  margin: 0;
  border-radius: 0;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text);
}

.pp-none {
  font-size: 12.5px;
  color: var(--text-soft);
  padding: 8px 12px;
}

/* static "New pet" row pinned to the bottom of the dropdown (checkout).
   Rounded hover pill, inset from the menu edges, brand warm colors. */
.pp-add {
  position: sticky;
  bottom: 0;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 12px;
  margin-top: 4px;
  border: none;
  border-radius: 10px;
  background: white;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--c-orange);
  cursor: pointer;
  transition: background var(--t);
}

.pp-add span {
  background: var(--grad-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pp-add:hover {
  background: linear-gradient(95deg, rgba(255, 122, 26, .10), rgba(193, 63, 169, .08));
}

/* display:flex above would defeat the hidden attribute — never render the
   row unless the picker explicitly enables it (checkout only) */
.pp-add[hidden] { display: none !important; }

/* paw fallback: contained icon on a soft tint instead of a cropped photo */
.model-select-thumb.is-paw,
.model-option-thumb.is-paw {
  object-fit: contain;
  padding: 6px;
  background: var(--bg-tint);
}

.ck-pet-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.ck-pet-mount { flex: 1; min-width: 0; }


/* measurement fields frozen by a selected pet (measure-step picker) */
.field.is-locked {
  opacity: .55;
  pointer-events: none;
}

.field.is-locked .field-value { color: var(--text-soft); }


/* ============================================================================
   PAYMENT-LINK SHARE DIALOG (share-link.js)
   ============================================================================ */
.sh-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 18, 38, .45);
  backdrop-filter: blur(4px);
  z-index: 240;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sh-overlay[hidden] { display: none; }

.sh-modal {
  position: relative;
  background: white;
  border-radius: var(--r);
  box-shadow: 0 30px 80px -20px rgba(15, 18, 38, .35);
  width: 460px;
  max-width: 100%;
  padding: 26px 26px 24px;
}

.sh-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 19px;
  margin-bottom: 8px;
}

.sh-sub {
  font-size: 13px;
  color: var(--text-mid);
  line-height: 1.55;
  margin-bottom: 16px;
}

.sh-linkrow {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.sh-linkrow input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  background: var(--bg);
  padding: 10px 12px;
  font-size: 12.5px;
  color: var(--text-mid);
  overflow: hidden;
  text-overflow: ellipsis;
}

.sh-linkrow .btn { flex-shrink: 0; }

/* share targets, Android-share-sheet style row of tiles */
.sh-tiles {
  display: flex;
  gap: 10px;
}

.sh-tile {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: white;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-mid);
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t);
}

.sh-tile:hover {
  border-color: var(--text-soft);
  box-shadow: var(--shadow-sm);
  color: var(--text);
}

.sh-tile-ico {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-mid);
}

/* the link-share alternative under the main pay button — enough clearance
   that the CTA's glow shadow doesn't wash over it */
.ck-paylink {
  margin-top: 16px;
  position: relative;
  z-index: 1;
  background: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
