:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --primary: #16a34a;
  --primary-hover: #15803d;
  --primary-soft: #dcfce7;
  --amber-bg: #fef3c7;
  --amber-text: #92400e;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  padding-bottom: 84px;
  -webkit-font-smoothing: antialiased;
}

.top-bar {
  background-color: var(--text);
  color: #ffffff;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 9px 14px;
  letter-spacing: 0.2px;
}

.demo-banner {
  background-color: var(--amber-bg);
  color: var(--amber-text);
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 14px;
  border-bottom: 1px solid #fde68a;
}

.page-shell {
  max-width: 520px;
  margin: 0 auto;
  padding: 12px 14px 28px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 16px;
  margin-bottom: 14px;
}

.store-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.store-brand {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

.store-city {
  font-size: 12px;
  color: var(--muted);
  background: #f1f5f9;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 600;
}

/* Galeria */
.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: #f1f5f9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
}

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

.cod-badge-overlay {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--amber-bg);
  color: var(--amber-text);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #fcd34d;
}

.gallery-thumbs {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.thumb-btn {
  width: 60px;
  height: 60px;
  border-radius: 10px;
  border: 2px solid var(--border);
  overflow: hidden;
  background: #f8fafc;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}

.thumb-btn.active {
  border-color: var(--primary);
}

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

/* Producto info */
.product-cat {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--primary);
  margin-top: 14px;
  margin-bottom: 6px;
}

.product-title {
  font-size: 22px;
  line-height: 1.25;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 10px;
}

.price-row {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}

.price-current {
  font-size: 28px;
  font-weight: 800;
  color: var(--primary);
}

.price-before {
  font-size: 16px;
  color: #94a3b8;
  text-decoration: line-through;
}

.discount-pill {
  font-size: 12px;
  font-weight: 700;
  background: var(--primary-soft);
  color: #166534;
  padding: 4px 9px;
  border-radius: 999px;
}

.product-lead {
  font-size: 15px;
  color: var(--muted);
  margin-bottom: 14px;
}

.trust-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.trust-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

.trust-item span {
  display: block;
  font-size: 16px;
  margin-bottom: 2px;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 50px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
}

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

.btn-outline {
  background-color: #ffffff;
  color: var(--text);
  border: 2px solid var(--border);
}

.btn-outline:hover {
  border-color: #cbd5e1;
  background-color: #f8fafc;
}

.section-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.benefits-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 15px;
  color: #1e293b;
}

.check-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: #166534;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 2px;
}

.steps-grid {
  display: grid;
  gap: 10px;
}

.step-box {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--text);
  color: #ffffff;
  font-size: 14px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-box strong {
  display: block;
  font-size: 14px;
  margin-bottom: 2px;
}

.step-box p {
  font-size: 13px;
  color: var(--muted);
}

/* Formulario COD */
.form-badge {
  display: inline-block;
  background: var(--amber-bg);
  color: var(--amber-text);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.form-group {
  margin-bottom: 14px;
}

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

.form-hint {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

.form-control {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  font-size: 16px;
  font-family: inherit;
  color: var(--text);
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-control:focus {
  border-color: var(--primary);
}

.form-control.is-invalid {
  border-color: var(--danger);
  background-color: #fffafa;
}

textarea.form-control {
  min-height: 76px;
  resize: vertical;
}

.pill-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pill-option {
  border: 2px solid var(--border);
  background: #f8fafc;
  border-radius: 12px;
  padding: 11px 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: all 0.15s ease;
}

.pill-option strong {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.pill-option span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.pill-option.active {
  border-color: var(--primary);
  background: #f0fdf4;
}

.combo-tag {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #166534;
  background: var(--primary-soft);
  padding: 2px 7px;
  border-radius: 999px;
}

.quick-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.city-chip {
  font-size: 12px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: var(--text);
  cursor: pointer;
}

.city-chip:hover {
  background: #e2e8f0;
}

.order-summary {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  margin: 16px 0;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 6px;
}

.summary-row.total {
  border-top: 1px dashed #cbd5e1;
  padding-top: 10px;
  margin-top: 8px;
  margin-bottom: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.summary-note {
  font-size: 12px;
  color: #166534;
  font-weight: 600;
  margin-top: 8px;
}

.error-box {
  display: none;
  background: var(--danger-soft);
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 12px;
}

.error-box.visible {
  display: block;
}

.confirmation-box {
  display: none;
  margin-top: 14px;
  background: #f0fdf4;
  border: 1.5px solid #86efac;
  border-radius: 12px;
  padding: 14px;
}

.confirmation-box.visible {
  display: block;
}

.confirmation-box h3 {
  font-size: 16px;
  color: #166534;
  margin-bottom: 6px;
}

.confirmation-box p {
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 10px;
}

.confirmation-preview {
  background: #ffffff;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 10px;
  font-size: 12px;
  white-space: pre-wrap;
  margin-bottom: 10px;
  color: var(--text);
}

.confirmation-actions {
  display: grid;
  gap: 8px;
}

/* FAQ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #f8fafc;
}

.faq-item summary {
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.faq-item summary::after {
  content: "+";
  font-size: 18px;
  color: var(--muted);
}

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

.faq-answer {
  padding: 0 14px 12px;
  font-size: 14px;
  color: var(--muted);
  background: #ffffff;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}

.footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  padding: 10px 8px 18px;
}

/* Barra fija inferior en movil */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  padding: 10px 14px;
  z-index: 50;
}

.sticky-cta-inner {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sticky-price-info {
  line-height: 1.2;
}

.sticky-price-info small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.sticky-price-info strong {
  font-size: 18px;
  color: var(--primary);
}

.sticky-btn {
  width: auto;
  flex: 1;
  min-height: 46px;
  font-size: 15px;
}

.hidden {
  display: none !important;
}
