﻿/* ==========================================================================
   Landing Collar Calmante â€” estilos
   Vanilla CSS, mobile-first. Sin frameworks.
   ========================================================================== */

:root {
  /* Marca principal (primario) #7a2487 */
  --brand-900: #2b0e33;
  --brand-700: #5a1a68;
  --brand-600: #7a2487;
  --brand-500: #8e34a0;
  --brand-100: #f0e2f5;
  --brand-50:  #f9f2fb;

  /* Marca secundaria #032b86 */
  --secondary:      #032b86;
  --secondary-100:  #e1e8f7;
  --secondary-50:   #eef2fb;

  --ink:       #1a1f2e;
  --ink-soft:  #4a5168;
  --ink-muted: #7a8098;

  --line:      #e2e4ee;
  --surface:   #ffffff;
  --canvas:    #f6f6fb;

  --danger:    #b3261e;
  --danger-bg: #fdecea;
  --ok:        #1f6b47;
  --ok-bg:     #e6f4ec;

  --radius-sm: 8px;
  --radius:    12px;
  --radius-lg: 20px;

  --shadow-sm: 0 1px 2px rgba(122, 36, 135, .06);
  --shadow:    0 6px 20px rgba(122, 36, 135, .08);
  --shadow-lg: 0 18px 48px rgba(122, 36, 135, .12);

  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--canvas);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px;
}

/* --------------------------------------------------------------- barra top */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 10px 0;
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}
.site-header__brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
.site-header__logo {
  height: 56px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
}

/* ------------------------------------------------------------------- layout */
.hero {
  padding: 24px 0 40px;
}

.hero__grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
  align-items: start;
}

/* -------------------------------------------------------------- galerÃ­a img */
.gallery__frame {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px;
  overflow: hidden;
}

.gallery__img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--brand-50);
}

.gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.gallery__thumb {
  flex: 1;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  background: var(--brand-50);
  border: 1px solid var(--line);
  padding: 6px;
  cursor: pointer;
}
.gallery__thumb[aria-current="true"] { border-color: var(--brand-600); }
.gallery__thumb img { width: 100%; height: 100%; object-fit: contain; }

/* -------------------------------------------------------------- info producto */
.product { margin-top: 24px; }

.product__title {
  font-size: clamp(28px, 6vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--brand-900);
}

.product__lead {
  margin-top: 12px;
  color: var(--ink-soft);
  font-size: 16px;
  max-width: 52ch;
}

.price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 6px;
}
.price__now {
  font-size: clamp(30px, 7vw, 40px);
  font-weight: 800;
  color: var(--brand-600);
  letter-spacing: -.02em;
}
.price__note { font-size: 14px; color: var(--ink-muted); }

/* ---------------------------------------------------------------- formulario */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  margin-top: 24px;
}

.card__title {
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  color: var(--brand-900);
  letter-spacing: .01em;
}
.card__subtitle {
  text-align: center;
  font-size: 14px;
  color: var(--ink-muted);
  margin-top: 4px;
}

.fieldset {
  border: 0;
  padding: 0;
  margin: 20px 0 0;
}
.fieldset__legend {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 0;
  margin-bottom: 10px;
}

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

.field { display: block; }

.field__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.field__label .opt {
  font-weight: 400;
  color: var(--ink-muted);
}

/* Aviso bajo el selector de ciudad (p. ej. cobertura de contraentrega). */
.field__hint {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.input,
.select {
  width: 100%;
  font: inherit;
  font-size: 16px; /* evita zoom en iOS */
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 16px;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}

.select {
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9' fill='none'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%234d5c55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  cursor: pointer;
}
.select:disabled {
  background-color: var(--canvas);
  color: var(--ink-muted);
  cursor: not-allowed;
}

.input::placeholder { color: var(--ink-muted); }

.input:focus-visible,
.select:focus-visible {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px rgba(122, 36, 135, .18);
}

.input[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .12);
}

/* honeypot: fuera de la vista y del foco, pero presente en el DOM */
.hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* --------------------------------------------------------------- resumen sel */
.summary {
  margin-top: 16px;
  background: var(--brand-50);
  border: 1px dashed var(--brand-100);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.summary strong { color: var(--brand-900); }

/* -------------------------------------------------------------------- botÃ³n */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
  text-decoration: none;
  color: #fff;
  background: var(--brand-600);
  border: 0;
  border-radius: 999px;
  padding: 16px 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(122, 36, 135, .28);
  transition: background .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--brand-700); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(122, 36, 135, .4); outline-offset: 2px; }
.btn[disabled] {
  background: var(--ink-muted);
  box-shadow: none;
  cursor: progress;
  opacity: .8;
}

.btn--submit { margin-top: 20px; }

/* ------------------------------------------------------- consentimiento */
.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
  cursor: pointer;
}
.consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: var(--brand-600);
  cursor: pointer;
}
.consent a { color: var(--brand-600); text-decoration: underline; }
.consent a:hover { color: var(--brand-700); }

/* -------------------------------------------------------------- modal */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, .5);
  backdrop-filter: blur(2px);
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 480px;
  max-height: 80vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 28px 22px;
}
.modal__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: var(--canvas);
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.modal__close:hover { background: var(--line); }
.modal__title { font-size: 20px; font-weight: 800; color: var(--brand-900); margin: 0 0 12px; }
.modal__body p { margin: 0 0 12px; font-size: 14px; color: var(--ink-soft); }
.btn--sm { width: auto; padding: 10px 20px; margin-top: 8px; }

.btn__spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}
.is-sending .btn__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .btn__spinner { animation-duration: 2s; }
  * { scroll-behavior: auto !important; }
}

/* ------------------------------------------------------------------ mensajes */
.message {
  margin-top: 14px;
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 14px;
  display: none;
}
.message.is-error {
  display: block;
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(179, 38, 30, .2);
}
.message.is-ok {
  display: block;
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid rgba(122, 36, 135, .2);
}

/* ------------------------------------------------------------------- trust */
.trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.trust__item {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  line-height: 1.3;
}
.trust__item svg {
  display: block;
  margin: 0 auto 6px;
  color: var(--brand-600);
}

/* ------------------------------------------------------------------ footer */
.footer {
  padding: 28px 0 40px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}
.footer a { color: var(--ink-muted); text-decoration: none; margin: 0 8px; }
.footer a:hover { color: var(--brand-700); text-decoration: underline; }

/* =================================================== pÃ¡gina de confirmaciÃ³n */
.thanks {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  background:
    radial-gradient(120% 60% at 50% 0%, var(--brand-100) 0%, var(--canvas) 60%);
}

.thanks__card {
  width: 100%;
  max-width: 560px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 20px;
  text-align: center;
}

.thanks__check {
  width: 68px; height: 68px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--brand-500);
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 10px 24px rgba(122, 36, 135, .3);
}

.thanks__title {
  font-size: clamp(24px, 6vw, 32px);
  font-weight: 800;
  color: var(--brand-900);
  letter-spacing: -.01em;
}
.thanks__lead {
  margin-top: 8px;
  color: var(--ink-soft);
  font-size: 15px;
}

.ref {
  margin: 20px 0 0;
  background: var(--brand-50);
  border: 1px dashed var(--brand-600);
  border-radius: var(--radius);
  padding: 14px;
}
.ref__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.ref__value {
  font-family: "Consolas", "SF Mono", ui-monospace, monospace;
  font-size: clamp(18px, 5vw, 24px);
  font-weight: 700;
  color: var(--brand-700);
  word-break: break-all;
  margin-top: 4px;
}

.panel {
  margin-top: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}
.panel__head {
  background: var(--brand-50);
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand-900);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.panel__body { padding: 16px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--ink-soft);
}
.steps svg { flex: 0 0 auto; color: var(--brand-600); margin-top: 2px; }

.thanks .btn { margin-top: 22px; }

.thanks__foot {
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink-muted);
}

/* ============================================================== responsive */
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .card { padding: 28px; }
  .thanks__card { padding: 40px; }
}

@media (min-width: 960px) {
  .hero { padding: 40px 0 56px; }
  .hero__grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
  }
  /* imagen + copy a la izquierda, formulario a la derecha: ambos empiezan
     arriba del todo, asÃ­ el usuario ve todo sin bajar. */
  .card { margin-top: 0; }
}

/* ---------------------------------------------- confirmación por WhatsApp */
.wa {
  margin: 22px 0 4px;
  padding: 18px;
  border: 1px solid rgba(37, 211, 102, .35);
  border-radius: 14px;
  background: rgba(37, 211, 102, .07);
  text-align: center;
}
.wa__lead {
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.wa__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  background: #25d366;
  color: #06331a;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .12s ease, filter .12s ease;
}
.wa__btn:hover { filter: brightness(1.06); }
.wa__btn:active { transform: translateY(1px); }
.wa__btn:focus-visible { outline: 3px solid #06331a; outline-offset: 2px; }

/* --------------------------------------------------- utilidades de layout
   Estas tres existen porque la CSP (public/.htaccess) bloquea los atributos
   style="" en el HTML. No metas estilos inline: no fallan de forma visible,
   simplemente el navegador los ignora y el diseño se descoloca. */
.field--full { grid-column: 1 / -1; }
.footer__line { margin-top: 6px; }
.summary--flush { margin-top: 0; }
