/* ==========================================================================
   Componentes reutilizables
   ========================================================================== */

/* ── Botones ────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease), box-shadow .2s;
}
.btn .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.btn:hover .icon-arrow-right { transform: translateX(3px); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: .875rem; }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-700); color: var(--white); box-shadow: var(--shadow); }
.btn-orange { background: var(--orange); color: var(--white); }
.btn-orange:hover { background: var(--orange-600); color: var(--white); box-shadow: 0 10px 24px rgba(244, 123, 32, .35); }
.btn-outline { background: var(--white); color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-light { background: var(--white); color: var(--navy); }
.btn-light:hover { background: var(--orange); color: var(--white); }
.btn-whatsapp { background: var(--whatsapp); color: var(--white); }
.btn-whatsapp:hover { background: #178F49; color: var(--white); }
.btn[disabled], .btn.is-loading { opacity: .7; pointer-events: none; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--navy);
  text-decoration: none;
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ── Etiquetas ──────────────────────────────────────────────────────── */
.eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--font-head);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--orange-600);
}
.eyebrow-light { color: #FFB27A; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
}
.badge-new { background: var(--orange); color: var(--white); }
.badge-soft { background: var(--gray-100); color: var(--navy); }

.check-list { list-style: none; display: grid; gap: 10px; margin: 0 0 28px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; }
.check-list .icon {
  width: 22px; height: 22px; padding: 3px;
  border-radius: 50%;
  background: var(--orange-50);
  color: var(--orange-600);
  margin-top: 1px;
}

/* ── Tarjeta de producto ────────────────────────────────────────────── */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 24px);
}
@media (max-width: 1024px) { .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px)  { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .3s;
}
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: transparent; }

.product-media {
  position: relative;
  display: block;
  aspect-ratio: 1;
  background: var(--gray-50);
  overflow: hidden;
}
.product-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.product-card:hover .product-media img { transform: scale(1.05); }
.product-media .badge { position: absolute; top: 12px; left: 12px; z-index: 1; }

.product-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.product-meta { font-size: .75rem; color: var(--muted); }
.product-title { font-size: 1rem; margin: 0; }
.product-title a { color: var(--navy); text-decoration: none; }
.product-title a:hover { color: var(--orange-600); }
.product-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--gray-200);
}
.product-price-lock {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 500;
  color: var(--muted);
}
.product-price-lock .icon { width: 15px; height: 15px; color: var(--orange-600); }
.product-link {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--gray-50);
  color: var(--navy);
  transition: background .2s, color .2s;
}
.product-link .icon { width: 16px; height: 16px; }
.product-card:hover .product-link { background: var(--orange); color: var(--white); }

@media (max-width: 480px) {
  .product-body { padding: 12px; }
  .product-title { font-size: .92rem; }
  .product-price-lock { font-size: .7rem; }
  .product-link { display: none; }
}

/* ── Encabezado de páginas internas ─────────────────────────────────── */
.page-hero {
  position: relative;
  padding-block: clamp(40px, 6vw, 72px);
  background:
    radial-gradient(circle at 88% 20%, rgba(244, 123, 32, .14), transparent 40%),
    linear-gradient(135deg, var(--navy-900), var(--navy) 60%, var(--navy-700));
  color: rgba(255, 255, 255, .82);
  overflow: hidden;
}
.page-hero::after {
  /* aro decorativo */
  content: "";
  position: absolute;
  right: -60px; top: 50%;
  width: 320px; height: 320px;
  border: 22px solid rgba(255, 255, 255, .05);
  border-radius: 50%;
  transform: translateY(-50%);
}
.page-hero h1 { color: var(--white); font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); margin-bottom: .3em; }
.page-hero p { max-width: 640px; margin: 0; font-size: 1.05rem; }
.page-hero .eyebrow { color: #FFB27A; }

.breadcrumb { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; font-size: .85rem; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; opacity: .5; }
.breadcrumb a { color: rgba(255, 255, 255, .78); text-decoration: none; }
.breadcrumb a:hover { color: var(--orange); }
.breadcrumb.on-light a { color: var(--muted); }
.breadcrumb.on-light { color: var(--navy); }

/* ── Formularios ────────────────────────────────────────────────────── */
.form { display: grid; gap: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.field { display: grid; gap: 6px; }
.field label, .field .label {
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
}
.field .req { color: var(--orange-600); }
.field .hint { font-size: .8rem; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 1rem;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(22, 58, 140, .15);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field-error { font-size: .82rem; color: var(--danger); }
.field-error:empty { display: none; }

.check-group { display: flex; flex-wrap: wrap; gap: 10px; }
.check-pill { position: relative; }
.check-pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.check-pill span {
  display: inline-flex; align-items: center;
  padding: 9px 16px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  font-size: .9rem;
  background: var(--white);
  transition: background .2s, border-color .2s, color .2s;
}
.check-pill input:checked + span { background: var(--navy); border-color: var(--navy); color: var(--white); }
.check-pill input:focus-visible + span { outline: 3px solid var(--orange); outline-offset: 2px; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); }
.consent input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--navy); flex-shrink: 0; }

/* Campo trampa anti-bots: fuera de la vista de personas */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status {
  display: none;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: .95rem;
}
.form-status.is-visible { display: flex; }
.form-status.is-success { background: #E7F6EE; color: var(--success); }
.form-status.is-error { background: #FDECEC; color: var(--danger); }
.form-note { display: flex; gap: 8px; align-items: center; font-size: .8rem; color: var(--muted); margin: 0; }
.form-note .icon { width: 16px; height: 16px; color: var(--success); }

/* ── Tarjetas genéricas ─────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
  padding: clamp(22px, 3vw, 36px);
  box-shadow: var(--shadow-sm);
}
.icon-tile {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border-radius: 14px;
  background: var(--orange-50);
  color: var(--orange-600);
  margin-bottom: 16px;
}
.icon-tile .icon { width: 28px; height: 28px; }

.notice {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--gray-50);
  color: var(--muted);
  font-size: .85rem;
}
.notice .icon { color: var(--navy); margin-top: 2px; }

/* ── Aparición al hacer scroll ──────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; }
}
