/* ==========================================================================
   NODO Kit Builder · ESTILOS
   Extiende el lenguaje visual de nodoslw.com: fondo negro, Montserrat,
   acento azul #002eff, líneas finas y composición editorial.
   Mobile first.
   ========================================================================== */

/* =========================
   RESET + TOKENS
========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #000;
  --fg: #fff;
  --muted: #8a8a8a;
  --dim: #666;
  --line: #222;
  --line-strong: #3a3a3a;
  --surface: #080808;
  --accent: #002eff;
  --accent-text: #7c93ff;   /* azul legible para texto pequeño sobre negro */
  --alert: #e8b04b;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gutter: 24px;
  --nav-height: 82px;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

[hidden] {
  display: none !important;
}

/* =========================
   BASE
========================= */
body {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.6;
  background: var(--bg);
  color: var(--fg);
  padding-bottom: 84px; /* espacio para la barra fija en móvil */
}

h1, h2, h3, h4 {
  font-weight: 600;
}

p {
  color: var(--muted);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
}

button, input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 40;
  padding: 12px 16px;
  background: #fff;
  color: #000;
  text-decoration: none;
}

.skip-link:focus {
  top: 16px;
}

.noscript {
  padding: 24px;
  text-align: center;
  color: #fff;
}

/* =========================
   NAVBAR (igual que el sitio)
========================= */
.nav {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 30;
}

.nav-brand {
  display: flex;
}

.logo {
  width: 110px;
  height: auto;
}

.menu {
  position: relative;
}

#toggle {
  font-family: 'Arial Rounded MT Bold', 'Montserrat', system-ui, sans-serif;
  font-size: 28px;
  line-height: 1;
  min-width: 44px;
  min-height: 34px;
  background: none;
  border: none;
  color: #fff;
}

#menu-items {
  position: absolute;
  right: 0;
  top: 44px;
  display: none;
  flex-direction: column;
  text-align: right;
  gap: 12px;
  white-space: nowrap;
}

#menu-items.open {
  display: flex;
}

#menu-items a {
  font-size: 18px;
  color: #999;
  text-decoration: none;
  transition: color 0.2s ease;
}

#menu-items a:hover {
  color: #fff;
}

/* =========================
   HERO
========================= */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px var(--gutter) 96px;
}

.season {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Fecha límite de pedidos */
.order-note {
  margin-top: 14px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.order-note:empty {
  display: none;
}

.order-note strong {
  font-weight: 500;
  color: #fff;
}

.order-note--hero {
  margin-top: 0;
  margin-bottom: 28px;
}

.order-note--panel {
  margin-top: 0;
  font-size: 0.75rem;
  color: #a8a8a8;
}

.spark {
  width: 12px;
  height: 12px;
  fill: var(--accent);
  animation: twinkle 3.2s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(2.75rem, 12vw, 7rem);
  line-height: 1;
}

.note {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 520px;
}

.dynamic {
  margin-top: 32px;
  display: flex;
  gap: 12px;
  font-size: 1.5rem;
}

.we {
  color: #777;
}

#word {
  color: var(--accent);
  transition: opacity 0.3s ease;
}

.subtitle {
  margin-top: 8px;
  max-width: 520px;
  font-size: 1.125rem;
  color: var(--muted);
}

.hero-actions {
  margin-top: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.link-arrow {
  font-size: 0.875rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-arrow:hover {
  color: #fff;
}

/* =========================
   BOTONES
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 28px;
  border: 1px solid #fff;
  background: transparent;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  background: #fff;
  color: #000;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: #fff;
  border-color: #fff;
  color: #000;
}

.btn-block {
  display: flex;
  width: 100%;
  min-height: 56px;
}

.btn.is-disabled,
.btn.is-disabled:hover {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--muted);
}

.link-button {
  display: block;
  margin: 16px auto 0;
  padding: 8px;
  background: none;
  border: none;
  font-size: 0.8125rem;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.link-button:hover {
  color: #fff;
}

/* =========================
   SEPARADOR + SECCIONES (sistema editorial del sitio)
========================= */
.separator {
  height: 1px;
  background: var(--line);
  margin: 0 var(--gutter);
  position: relative;
}

.separator::after {
  content: '';
  position: absolute;
  right: 0;
  width: 48px;
  height: 1px;
  background: var(--accent);
}

.section {
  padding: 88px var(--gutter);
  max-width: 1360px;
  margin: 0 auto;
  scroll-margin-top: 40px;
}

.section-title {
  font-size: clamp(2.3rem, 6vw, 3.8rem);
  line-height: 1.15;
  position: relative;
}

.section-title.is-marked::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -12px;
  width: 40px;
  height: 2px;
  background: var(--accent);
}

.section-lead {
  margin-top: 28px;
  max-width: 560px;
}

.verb {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =========================
   PREVIEW (lienzo del kit)
   Las posiciones vienen de catalog.js en porcentajes,
   así que la composición escala sola con el contenedor.
========================= */
.stage {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #060606;
  border: 1px solid var(--line);
  container-type: inline-size;
}

.piece {
  position: absolute;
  transform: translate(-50%, -50%) rotate(var(--rotation, 0deg));
}

.piece img {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
  pointer-events: none;
}

.piece-count {
  position: absolute;
  z-index: 40;
  transform: translate(-50%, -50%);
  padding: 0.2em 0.6em;
  background: var(--accent);
  font-size: 3.6cqw;
  font-weight: 600;
  line-height: 1.4;
  animation: fade-in 0.35s ease both;
}

.piece--enter {
  animation: piece-in 0.55s var(--ease) both;
}

.piece--label {
  width: auto !important;
  padding: 0.7em 1.1em;
  border: 1px solid var(--line-strong);
  background: #111;
  font-size: 3.2cqw;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: #ccc;
}

/* Tipo C: mosaico sencillo cuando faltan imágenes */
.stage--simple {
  display: flex;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  gap: 4cqw;
  padding: 8cqw;
}

.stage--simple .piece {
  position: static;
  transform: none;
  width: 24% !important;
}

.stage--simple .piece--label {
  width: auto !important;
}

.stage-render {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: fade-in 0.5s ease both;
}

.stage--empty::before {
  content: '';
  position: absolute;
  inset: 10%;
  border: 1px dashed var(--line-strong);
}

.stage-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20%;
  text-align: center;
  font-size: 0.9375rem;
  color: var(--muted);
}

.preview {
  position: relative;
}

.preview::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 48px;
  height: 1px;
  background: var(--accent);
}

.stage-tags {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  pointer-events: none;
}

.stage-tags li {
  max-width: 100%;
  padding: 4px 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--accent);
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  animation: fade-in 0.4s ease both;
}

/* =========================
   INSPÍRATE
========================= */
.kits {
  margin: 56px calc(var(--gutter) * -1) 0;
  padding: 0 var(--gutter) 8px;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 78%;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--gutter);
  scrollbar-width: none;
}

.kits::-webkit-scrollbar {
  display: none;
}

/* Flechas del carrusel: solo donde no se desliza con el dedo */
.kits-nav {
  display: none;
}

.kits-arrow {
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--line-strong);
  font-size: 1.125rem;
  line-height: 1;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}

.kits-arrow:hover:not(:disabled) {
  border-color: #fff;
}

.kits-arrow:disabled {
  opacity: 0.3;
  cursor: default;
}

.kit-card {
  display: flex;
  flex-direction: column;
  scroll-snap-align: start;
}

.kit-card .verb {
  margin-top: 20px;
  color: var(--accent-text);
}

.kit-card h3 {
  margin-top: 4px;
  font-size: 1.25rem;
  font-weight: 500;
}

.kit-photo {
  display: block;
  width: 100%;
  height: 100%;
  padding: 5%;
  object-fit: contain;
}

.kit-stage.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
}

.kit-list {
  margin-top: 12px;
}

.kit-list li {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
  color: #bbb;
}

.kit-foot {
  margin-top: auto;
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.kit-price {
  font-size: 1.5rem;
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.kit-foot .btn {
  padding: 0 18px;
}

/* =========================
   CONSTRUCTOR
========================= */
.progress {
  margin: 48px calc(var(--gutter) * -1) 0;
  padding: 0 var(--gutter);
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scrollbar-width: none;
}

.progress::-webkit-scrollbar {
  display: none;
}

.progress a {
  display: flex;
  gap: 8px;
  padding: 10px 0;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.progress-number {
  color: var(--dim);
  transition: color 0.3s ease;
}

.progress .is-done a {
  color: #fff;
  border-color: var(--accent);
}

.progress .is-done .progress-number {
  color: var(--accent-text);
}

.builder {
  margin-top: 16px;
}

.step {
  padding: 44px 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: var(--nav-height);
}

.builder-steps > div > .step:first-child {
  border-top: none;
}

.step-header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 28px;
}

.step-number {
  padding-top: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--accent-text);
}

.step-title {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.25;
}

.step-hint {
  margin-top: 4px;
  font-size: 0.875rem;
}

.group + .group {
  margin-top: 36px;
}

.group-title {
  margin-bottom: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 56px;
  padding: 12px;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.25s ease, background 0.25s ease, opacity 0.25s ease, transform 0.25s var(--ease);
}

.option:hover {
  border-color: var(--line-strong);
}

.option:active {
  transform: scale(0.985);
}

.option::after {
  content: '';
  position: absolute;
  top: 10px;
  right: 10px;
  width: 8px;
  height: 8px;
  background: var(--accent);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.25s ease, transform 0.35s var(--ease);
}

.option.is-selected {
  border-color: var(--accent);
  background: #05071a;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.option.is-selected::after {
  opacity: 1;
  transform: none;
}

.option.is-blocked {
  opacity: 0.38;
}

.option.is-conflict {
  border-color: var(--alert);
  box-shadow: inset 0 0 0 1px var(--alert);
}

.option.is-conflict::after {
  background: var(--alert);
}

.option:disabled {
  opacity: 0.38;
  cursor: default;
}

.option-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  margin-bottom: 10px;
}

.option-media img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  transition: transform 0.5s var(--ease);
}

.option:hover .option-media img,
.option.is-selected .option-media img {
  transform: scale(1.05);
}

/* Producto sin imagen: tarjeta neutral con su nombre */
.is-empty {
  background: #101010;
  border: 1px solid var(--line);
}

.media-name {
  padding: 8px;
  text-align: center;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.option-name {
  padding-right: 16px;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
}

.option-desc {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
}

.option-flag {
  margin-top: 4px;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #bbb;
}

.option-flag:empty {
  display: none;
}

.option--text {
  justify-content: center;
}

.option--none {
  border-style: dashed;
}

.option--none .option-name {
  font-weight: 400;
  color: var(--muted);
}

.option--none.is-selected {
  border-style: solid;
  border-color: var(--line-strong);
  background: var(--surface);
  box-shadow: none;
}

.option--none.is-selected::after {
  background: var(--dim);
}

.option--none.is-selected .option-name {
  color: #fff;
}

.group-extra:empty {
  display: none;
}

.chooser {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  animation: fade-in 0.35s ease both;
}

.chooser-label {
  flex-basis: 100%;
  font-size: 0.875rem;
  color: #ccc;
}

.included-note {
  margin-top: 24px;
  font-size: 0.875rem;
}

.included-note:empty {
  display: none;
}

.item-quantity {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fade-in 0.35s ease both;
}

.item-quantity-label {
  margin-right: auto;
  font-size: 0.875rem;
  color: #ccc;
}

.item-quantity-value {
  min-width: 24px;
  text-align: center;
  font-weight: 500;
}

.notice {
  margin-top: 14px;
  font-size: 0.875rem;
  animation: fade-in 0.35s ease both;
}

.notice:empty {
  display: none;
}

.notice.is-alert,
.status.is-alert {
  padding-left: 12px;
  border-left: 2px solid var(--alert);
  color: var(--alert);
}

/* Campos */
.field {
  margin-top: 24px;
  animation: fade-in 0.35s ease both;
}

.field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: 1rem;
  transition: border-color 0.25s ease;
}

.field input::placeholder {
  color: #555;
}

.field input:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent);
}

/* Cantidad */
.quantity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.quantity-btn {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  background: transparent;
  border: 1px solid var(--line-strong);
  font-size: 1.25rem;
  line-height: 1;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.quantity-btn:hover:not(:disabled) {
  border-color: #fff;
}

.quantity-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.quantity .quantity-btn {
  width: 56px;
  height: 56px;
}

.quantity-input {
  width: 104px;
  height: 56px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  -moz-appearance: textfield;
  appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.quantity-unit {
  color: var(--muted);
}

.tiers {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tiers button {
  display: flex;
  gap: 10px;
  min-height: 44px;
  align-items: center;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.tiers strong {
  font-weight: 500;
  color: var(--accent-text);
}

.tiers button:hover {
  border-color: var(--line-strong);
}

.tiers .is-active button {
  border-color: var(--accent);
  background: #05071a;
  color: #fff;
}

/* =========================
   PANEL "TU KIT"
========================= */
.panel {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: #030303;
  scroll-margin-top: var(--nav-height);
}

.panel .preview {
  background: #060606;
  border-bottom: 1px solid var(--line);
}

.panel .stage {
  border: none;
}

.panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px 18px;
}

.panel-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.panel-title {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.panel-kit-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.8125rem;
  color: var(--accent-text);
}

.panel-head .link-button {
  margin: 0;
  padding: 0;
  font-size: 0.75rem;
  white-space: nowrap;
}

.summary:empty,
.status:empty {
  display: none;
}

.summary li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  font-size: 0.875rem;
  animation: fade-in 0.35s ease both;
}

.summary-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summary .is-muted {
  color: var(--muted);
}

.summary-remove {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  font-size: 1.125rem;
  line-height: 1;
  color: var(--dim);
  transition: color 0.2s ease;
}

.summary-remove:hover {
  color: #fff;
}

.status {
  font-size: 0.9375rem;
  color: #ccc;
}

.price {
  animation: fade-in 0.4s ease both;
}

.price-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: #ccc;
}

.price-discount {
  white-space: nowrap;
  color: var(--accent-text);
}

.price-total {
  margin-top: 2px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.price-total .price-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.price-total-value {
  font-size: 1.875rem;
  font-weight: 600;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.price-tax,
.kit-price small {
  margin-left: 4px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--muted);
}

.price-nudge {
  font-size: 0.75rem;
  color: var(--accent-text);
}

.price-nudge:empty {
  display: none;
}

.contact-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-fields input {
  width: 100%;
  padding: 8px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  font-size: 0.875rem;
}

.contact-fields input::placeholder {
  color: var(--dim);
}

.contact-fields input:focus {
  outline: none;
  border-bottom-color: var(--accent);
  box-shadow: 0 1px 0 var(--accent);
}

.price-note {
  font-size: 0.6875rem;
  line-height: 1.45;
  text-align: center;
  color: var(--dim);
}

/* =========================
   CHIPS (variantes de un producto)
========================= */
.chip {
  min-height: 40px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--muted);
  transition: border-color 0.25s ease, color 0.25s ease, background 0.25s ease;
}

.chip:hover {
  border-color: var(--line-strong);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: #05071a;
  color: #fff;
}

.chip--card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: calc(50% - 4px);
  padding: 12px 8px 10px;
  line-height: 1.3;
}

.chip--card img {
  width: 100%;
  height: 72px;
  object-fit: contain;
}

.chooser-group {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.chooser-group-label {
  flex-basis: 100%;
  margin-top: 6px;
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.chooser-note {
  flex-basis: 100%;
  font-size: 0.75rem;
}

.step-footnote {
  margin-top: 24px;
  padding-left: 12px;
  border-left: 2px solid var(--accent);
  font-size: 0.875rem;
  color: #ccc;
}

/* =========================
   CONTACTO (igual que el sitio)
========================= */
.contact {
  padding-top: 120px;
  padding-bottom: 120px;
}

.contact-actions {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.contact-email {
  font-size: 1.25rem;
  text-decoration: none;
  color: #fff;
  position: relative;
  width: fit-content;
}

.contact-email::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 32px;
  height: 2px;
  background: var(--accent);
}

.contact-idea {
  max-width: 560px;
  margin-top: 40px;
}

.contact-actions .btn {
  align-self: flex-start;
}

.contact-info {
  margin-top: 64px;
}

.contact-info a {
  color: inherit;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* =========================
   BARRA FIJA (móvil) + TOAST
========================= */
.bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--line);
}

.bar-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.bar-stage {
  width: 48px;
  flex-shrink: 0;
}

.bar-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.bar-text strong {
  font-size: 0.9375rem;
  font-weight: 600;
}

.bar-text span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  color: var(--muted);
}

.bar-cta {
  padding: 0 20px;
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(92px + env(safe-area-inset-bottom));
  z-index: 25;
  padding: 14px 18px;
  background: #fff;
  color: #000;
  font-size: 0.875rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.4s var(--ease);
}

.toast.is-visible {
  opacity: 1;
  transform: none;
}

/* =========================
   ANIMACIONES
========================= */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.8s var(--ease);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes piece-in {
  from {
    opacity: 0;
    transform: translate(-50%, -44%) rotate(var(--rotation, 0deg)) scale(0.96);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes twinkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.45;
    transform: scale(0.8);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* =========================
   TABLET
========================= */
@media (min-width: 620px) {
  .options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kits-nav {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 28px;
  }

  .kits {
    margin-top: 20px;
    grid-auto-columns: 44%;
    gap: 24px;
  }

  .hero-actions {
    flex-direction: row;
    gap: 32px;
  }

  .toast {
    left: auto;
    right: 24px;
    max-width: 380px;
  }
}

/* =========================
   DESKTOP: constructor a la izquierda, "Tu kit" fijo a la derecha
========================= */
@media (min-width: 1000px) {
  :root {
    --gutter: 32px;
  }

  body {
    padding-bottom: 0;
  }

  #toggle {
    display: none;
  }

  #menu-items {
    position: static;
    display: flex;
    flex-direction: row;
    gap: 32px;
  }

  #menu-items a {
    font-size: 0.9375rem;
  }

  .section {
    padding-top: 120px;
    padding-bottom: 120px;
  }

  .progress {
    margin-inline: 0;
    padding-inline: 0;
    gap: 32px;
  }

  .builder {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 400px;
    gap: 72px;
    align-items: start;
  }

  .chooser-group-label {
    flex-basis: 64px;
    margin-top: 0;
  }

  .chip--card {
    width: 132px;
  }

  /* El último paso no sube hasta arriba: así "Tu kit" sigue completo a su lado. */
  .builder-steps {
    padding-bottom: 40px;
  }

  #paso-cantidad {
    scroll-margin-top: calc(100vh - 340px);
  }

  /* "Tu kit" cabe completo en la pantalla, sin scroll propio: el preview es
     lo único que cede altura; el resumen, el precio y el botón siempre se ven. */
  .panel {
    position: sticky;
    top: calc(var(--nav-height) + 12px);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - var(--nav-height) - 24px);
    margin-top: 12px;
    overflow: hidden;
  }

  .panel .preview {
    flex: 0 1000 400px;   /* cede altura antes que el resumen */
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    container-type: size;
  }

  .panel .stage {
    flex: none;
    width: min(100cqw, 100cqh);
    height: min(100cqw, 100cqh);
  }

  .panel-body {
    flex: 0 1 auto;
    min-height: 0;
    gap: 10px;
    padding: 14px 20px 14px;
  }

  .panel-body > * {
    flex-shrink: 0;
  }

  .panel-body > .summary {
    flex-shrink: 1;
    min-height: 78px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong) transparent;
  }

  .summary li {
    min-height: 26px;
    font-size: 0.8125rem;
  }

  .summary-remove {
    width: 24px;
    height: 24px;
    font-size: 1rem;
  }

  .status {
    font-size: 0.875rem;
  }

  .btn-block {
    min-height: 48px;
  }

  .kits {
    grid-auto-columns: 320px;
  }

  .bar {
    display: none;
  }

  .toast {
    bottom: 32px;
    left: 32px;
    right: auto;
  }
}

/* Pantallas bajas (laptops): el preview pasa a un lado del resumen. */
@media (min-width: 1000px) and (max-height: 800px) {
  .builder {
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: 56px;
  }

  .panel {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-rows: auto 1fr;
    align-content: start;
    gap: 10px 16px;
    padding: 14px 16px;
  }

  .panel .preview {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: start;
    width: 150px;
    height: 150px;
    border: 1px solid var(--line);
  }

  .panel .preview::after,
  .panel .stage-tags {
    display: none;
  }

  .panel-body {
    display: contents;
  }

  .panel-head,
  .summary {
    grid-column: 2;
  }

  .panel-body > .summary {
    min-height: 116px;
    max-height: 150px;
  }

  .panel-body > :not(.panel-head):not(.summary) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1240px) {
  .options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
