/* ── Cruise Store (drivers only) — mismo lenguaje visual del sitio:
      negro profundo, dorado Cruise (#D4AF37), Cinzel para títulos ── */
:root {
  --st-gold: #D4AF37;
  --st-gold-soft: rgba(212, 175, 55, .35);
  --st-ink: #0b0b0d;
  --st-panel: #121316;
  --st-line: rgba(255, 255, 255, .08);
  --st-txt: #f5f3ec;
  --st-muted: rgba(245, 243, 236, .55);
}

/* ── Carga agradable: spinner al instante + entrada con fade ── */
.st-spinner {
  width: 38px; height: 38px; margin: 60px auto; border-radius: 50%;
  border: 3px solid rgba(212, 175, 55, .18); border-top-color: var(--st-gold);
  animation: st-spin .8s linear infinite;
}
@keyframes st-spin { to { transform: rotate(360deg); } }
@keyframes st-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
#store-shop, .store-gate, .store-success { animation: st-in .45s cubic-bezier(.2, .7, .2, 1) both; }
.store-gate[hidden], #store-shop[hidden], .store-success[hidden] { animation: none; }
.st-card { animation: st-in .5s cubic-bezier(.2, .7, .2, 1) .05s both; }
.st-card:nth-child(2) { animation-delay: .12s; }
.st-card:nth-child(3) { animation-delay: .19s; }

.store-hero { padding: 96px 24px 8px; text-align: center; }
.store-hero .kicker { letter-spacing: .35em; }
.store-hero p { color: var(--st-muted); max-width: 560px; margin: 14px auto 0; }
.store-hero .sec-title em { font-style: normal; }

.store-wrap {
  max-width: 1160px; margin: 0 auto; padding: 32px 20px 96px;
  display: grid; grid-template-columns: 1.35fr .9fr; gap: 28px;
  align-items: start;
}
@media (max-width: 940px) { .store-wrap { grid-template-columns: 1fr; } }

/* ── Catálogo ── */
.store-grid { display: grid; gap: 48px; }

.st-card {
  border-radius: 20px;
  transition: border-color .2s, transform .2s;
}
.st-card__media {
  display: flex; align-items: center; justify-content: center;
  padding: 0 0 18px; min-height: 200px;
}
.st-card__media img { max-width: 100%; max-height: 230px; object-fit: contain; }
/* Las caras de la business card mandan sobre la regla anterior: si el img
   queda capado a 230px mientras la cara es más alta, la imagen se comprime
   y los textos vivos (posicionados en %) ya no caen donde el arte dice. */
.st-card__media .st-face, .st-card__media .bc-back__bg { max-height: none; }
/* Solo el cuadro de abajo lleva panel; la tarjeta flota sobre el fondo */
.st-card__body {
  padding: 20px 22px 22px;
  background: var(--st-panel); border: 1px solid var(--st-line);
  border-radius: 20px;
}
.st-card__body:hover { border-color: var(--st-gold-soft); }
.st-card__name { font-family: Cinzel, serif; font-size: 19px; font-weight: 700; color: var(--st-txt); }
.st-card__desc { color: var(--st-muted); font-size: 13.5px; margin-top: 6px; line-height: 1.55; }
.st-card__row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px; gap: 12px; flex-wrap: wrap;
}
.st-card__price { font-family: Arial, sans-serif; font-size: 22px; font-weight: 700; color: #fff; }

.st-qty {
  display: inline-flex; align-items: center; gap: 0;
  border: 1px solid var(--st-line); border-radius: 12px; overflow: hidden;
}
.st-qty button {
  width: 38px; height: 38px; background: none; border: none; cursor: pointer;
  color: var(--st-gold); font-size: 19px; font-weight: 600;
}
.st-qty button:hover { background: rgba(212, 175, 55, .08); }
.st-qty span {
  min-width: 34px; text-align: center; color: var(--st-txt);
  font: 600 15px Inter, sans-serif;
}

/* ── Coming soon: imagen borrosa + badge, sin compra ── */
.st-card--soon .st-card__media { position: relative; }
.st-card--soon .st-card__media img { filter: blur(7px) brightness(.55); }
.st-soon {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, .78); color: var(--st-gold);
  border: 1px solid var(--st-gold); border-radius: 999px; padding: 8px 22px;
  font: 600 12.5px Inter, sans-serif; letter-spacing: .18em; text-transform: uppercase;
  white-space: nowrap;
}
.st-card--soon .st-qty { opacity: .35; pointer-events: none; }

/* ── Personalización + preview de la tarjeta ── */
.st-custom {
  margin-top: 18px; border-top: 1px dashed var(--st-line); padding-top: 18px;
}
.st-custom h4 {
  font-family: Cinzel, serif; font-size: 13px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--st-gold); margin: 0 0 12px;
}
.st-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-fields .full { grid-column: 1 / -1; }
@media (max-width: 520px) { .st-fields { grid-template-columns: 1fr; } }

.st-in {
  width: 100%; box-sizing: border-box; background: #0d0e11;
  border: 1px solid var(--st-line); border-radius: 12px;
  padding: 12px 14px; color: var(--st-txt); font: 500 14px Inter, sans-serif;
  transition: border-color .2s;
}
.st-in:focus { outline: none; border-color: var(--st-gold); }
.st-in::placeholder { color: rgba(245, 243, 236, .3); }

/* Preview de la tarjeta — dos caras con flip */
.st-preview { margin-top: 18px; }
.st-preview__tabs {
  display: inline-flex; gap: 4px; background: #0d0e11; border: 1px solid var(--st-line);
  border-radius: 999px; padding: 4px; margin-bottom: 14px;
}
.st-preview__tabs button {
  border: none; background: none; cursor: pointer; border-radius: 999px;
  padding: 7px 18px; color: var(--st-muted); font: 600 12.5px Inter, sans-serif;
  letter-spacing: .06em;
}
.st-preview__tabs button.on { background: var(--st-gold); color: #000; }
/* En teléfono los tabs estorban: se gira tocando la tarjeta */
@media (max-width: 640px) { .st-preview__tabs { display: none; } }

.st-cardface {
  position: relative; width: 100%; aspect-ratio: 1050/600; border-radius: 14px;
  background: #000; border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .55);
  perspective: 1400px; cursor: pointer;
}
.st-cardface__inner {
  position: absolute; inset: 0;
  transform-style: preserve-3d;
  transition: transform .7s cubic-bezier(.2, .75, .25, 1);
}
.st-cardface.flipped .st-cardface__inner { transform: rotateY(180deg); }
.st-face {
  position: absolute; inset: 0; border-radius: 14px; overflow: hidden;
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
}
img.st-face { width: 100%; height: 100%; object-fit: cover; }
.st-face--back { transform: rotateY(180deg); }

/* Dorso = diseño real (store-card-back-template.png) con nombre/teléfono
   borrados; los spans se escriben EN VIVO desde los campos de personalización.
   Posiciones calcadas del arte 1050×600: nombre x92 y112 · teléfono x128 y268. */
.bc-back__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.bc-back__pv {
  position: absolute; color: #fff; font-family: Cinzel, serif;
  white-space: nowrap;
}
.bc-back__pv--name {
  left: 8.8%; top: 18%; max-width: 46%;
  font-weight: 400; font-size: clamp(11px, 4.55cqw, 48px);
  letter-spacing: .1em; text-transform: uppercase;
}
.bc-back__pv--phone {
  left: 14.9%; top: 47%; max-width: 42%;
  font-weight: 400; font-size: clamp(9px, 2.85cqw, 30px);
  letter-spacing: .06em;
}
.st-cardface { container-type: inline-size; }

/* ── Panel del pedido (derecha) ── */
.st-order {
  position: sticky; top: 96px;
  background: var(--st-panel); border: 1px solid var(--st-line);
  border-radius: 20px; padding: 24px;
}
@media (max-width: 940px) { .st-order { position: static; } }
.st-order h3 {
  font-family: Cinzel, serif; font-size: 17px; letter-spacing: .12em;
  color: var(--st-txt); margin: 0 0 16px; text-transform: uppercase;
}
.st-order__line {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 8px 0; font-size: 14px; color: var(--st-muted);
  border-bottom: 1px solid var(--st-line);
}
.st-order__line b { color: var(--st-txt); font-weight: 600; }
.st-order__line--free b { color: #fff; }
.st-order__total {
  display: flex; justify-content: space-between; padding: 14px 0 4px;
  font-family: Arial, sans-serif; font-size: 20px; font-weight: 700; color: #fff;
}

.st-ship { margin-top: 16px; display: grid; gap: 10px; }
.st-ship .row2 { display: grid; grid-template-columns: 2fr 1fr 1.2fr; gap: 10px; }
@media (max-width: 520px) { .st-ship .row2 { grid-template-columns: 1fr; } }

.st-pay {
  margin-top: 18px; width: 100%; border: none; cursor: pointer;
  background: linear-gradient(135deg, #e5c558, #c9a227);
  color: #0b0b0d; border-radius: 14px; padding: 15px;
  font: 700 15px Inter, sans-serif; letter-spacing: .04em;
  transition: transform .15s, box-shadow .2s;
}
.st-pay:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(212, 175, 55, .25); }
.st-pay:disabled { opacity: .45; cursor: not-allowed; }

.st-note { margin-top: 12px; font-size: 12px; color: var(--st-muted); text-align: center; }

/* ── Botón Comenzar/Confirmar (misma familia dorada que st-pay) ── */
.st-start {
  border: none; cursor: pointer;
  background: linear-gradient(135deg, #e5c558, #c9a227);
  color: #0b0b0d; border-radius: 12px; padding: 11px 26px;
  font: 700 13.5px Inter, sans-serif; letter-spacing: .05em;
  transition: transform .15s, box-shadow .2s;
}
.st-start:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(212, 175, 55, .25); }
.st-start:disabled { opacity: .45; cursor: not-allowed; }
#bc-confirm { margin-top: 12px; width: 100%; padding: 13px; }

/* ── Sugerencias de dirección ── */
.st-addr { position: relative; }
.st-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30;
  background: #17181c; border: 1px solid var(--st-line); border-radius: 12px;
  overflow: hidden; box-shadow: 0 16px 34px rgba(0, 0, 0, .5);
}
.st-suggest__item {
  display: block; width: 100%; text-align: left; border: none; cursor: pointer;
  background: none; color: var(--st-txt); padding: 11px 14px;
  font: 500 13px Inter, sans-serif; line-height: 1.35;
}
.st-suggest__item:hover { background: rgba(212, 175, 55, .1); color: var(--st-gold); }

.st-msg {
  display: none; margin-top: 12px; padding: 11px 14px; border-radius: 12px;
  font-size: 13.5px; line-height: 1.5;
}
.st-msg.err { display: block; background: rgba(255, 80, 80, .1); border: 1px solid rgba(255, 80, 80, .35); color: #ff9c9c; }
.st-msg.ok { display: block; background: rgba(90, 200, 120, .1); border: 1px solid rgba(90, 200, 120, .35); color: #9fe0b6; }

/* ── Estados: login / no-driver / éxito ── */
.store-gate { max-width: 520px; margin: 0 auto; padding: 110px 24px; text-align: center; }
.store-gate h1 { font-family: Cinzel, serif; color: var(--st-txt); font-size: 26px; }
.store-gate p { color: var(--st-muted); margin: 14px 0 26px; line-height: 1.6; }
.store-gate .st-pay { width: auto; padding: 14px 34px; }

.store-success { max-width: 620px; margin: 0 auto; padding: 110px 24px; text-align: center; }
.store-success .big {
  width: 74px; height: 74px; margin: 0 auto 22px; border-radius: 50%;
  border: 2px solid var(--st-gold); display: flex; align-items: center; justify-content: center;
}
.store-success .big svg { width: 34px; height: 34px; stroke: var(--st-gold); }
.store-success h1 { font-family: Cinzel, serif; color: var(--st-txt); }
.store-success p { color: var(--st-muted); line-height: 1.65; }

/* el EMAIL es el valor mas largo del dorso — un punto mas chico para que
   nunca se corte contra el QR */
.bc-back__val--sm { font-size: clamp(8px, 1.6cqw, 18px); }

/* el footer baja al fondo aunque la vista sea corta (gate/blocked/exito) */
body:has(#cruise-store){display:flex;flex-direction:column;min-height:100vh}
#cruise-store{flex:1}
