/* ═══════════════════════════════════════════
   SANARE CAPILAR — Components
   ═══════════════════════════════════════════ */

/* ── Buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green); color: var(--white); border: none;
  padding: 13px 28px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font-body);
  transition: background .2s, transform .15s, box-shadow .2s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(74,124,89,.3); }

.btn-outline {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: transparent; color: var(--green); border: 1.5px solid var(--green);
  padding: 12px 26px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font-body);
  transition: all .2s; white-space: nowrap;
}
.btn-outline:hover { background: var(--green); color: var(--white); }

.btn-whatsapp {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: var(--wa); color: var(--white); border: none;
  padding: 14px 28px; border-radius: var(--r-pill);
  font-size: 15px; font-weight: 700; cursor: pointer; font-family: var(--font-body);
  transition: background .2s, transform .15s;
  white-space: nowrap; width: 100%;
}
.btn-whatsapp:hover { background: var(--wa-dark); transform: translateY(-1px); }

/* ── Badges / Tags ── */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(74,124,89,.12); color: var(--green);
  padding: 5px 14px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
}
.tag {
  padding: 4px 12px; background: rgba(74,124,89,.1); color: var(--green);
  border-radius: 20px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .4px;
}

/* ── Section headers ── */
.section { padding: 64px var(--gutter); scroll-margin-top: 84px; }
.section--white { background: var(--white); }
.section-header { text-align: center; margin-bottom: 48px; }
.section-label {
  font-size: 11px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--green); margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(28px, 3vw, 42px);
  color: var(--text); line-height: 1.2;
}

/* ── Navigation Desktop ── */
.desktop-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter); height: 68px;
  background: var(--white); position: sticky; top: 0; z-index: 100;
  border-bottom: 1px solid rgba(74,124,89,.08);
  box-shadow: 0 2px 20px rgba(74,124,89,.06);
}
.nav-logo {
  font-family: var(--font-display); font-size: 22px; font-weight: 700;
  color: var(--green); letter-spacing: -.5px;
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  flex-shrink: 0; white-space: nowrap;
}
.nav-links { display: flex; gap: 32px; }
.nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text);
  opacity: .7; transition: opacity .2s, color .2s; cursor: pointer;
}
.nav-links a:hover { opacity: 1; color: var(--green); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.nav-icon-btn {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid rgba(74,124,89,.2); background: transparent;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 17px; color: var(--text);
  transition: border-color .2s, background .2s;
}
.nav-icon-btn:hover { background: var(--green); color: white; border-color: var(--green); }

/* ── Mobile Header ── */
.mobile-header {
  display: none; align-items: center; justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 20px 14px; background: white;
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  border-bottom: 1px solid rgba(74,124,89,.08);
  box-shadow: 0 2px 14px rgba(74,124,89,.07);
}
.mobile-logo { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: var(--green); }
.mobile-header-icons { display: flex; gap: 10px; }

/* ── Mobile Bottom Nav ── */
.mobile-bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--white); border-top: 1px solid rgba(74,124,89,.1);
  padding: 10px 0 max(20px, env(safe-area-inset-bottom)); z-index: 200;
  box-shadow: 0 -4px 20px rgba(74,124,89,.1);
}
.mobile-nav-items { display: flex; }
.mobile-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; color: rgba(27,27,27,.4); transition: color .2s;
}
.mobile-nav-item.active { color: var(--green); }
.mobile-nav-icon { font-size: 20px; line-height: 1; }
.mobile-nav-icon--fab {
  background: var(--green); color: white; width: 46px; height: 46px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 20px; margin-top: -10px; box-shadow: 0 4px 18px rgba(74,124,89,.4);
}
.mobile-nav-label { font-size: 10px; font-weight: 500; }

/* ── WhatsApp FAB ── */
.wa-fab {
  position: fixed; z-index: 300; right: 24px; bottom: 100px;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--wa); color: white; border: none;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; box-shadow: 0 4px 20px rgba(37,211,102,.45);
  transition: transform .2s, box-shadow .2s; cursor: pointer;
}
.wa-fab:hover { transform: scale(1.1); box-shadow: 0 6px 28px rgba(37,211,102,.55); }

/* ── Promo Strip ── */
.promo-strip {
  background: var(--green); color: white; text-align: center;
  padding: 9px 16px; font-size: 13px; font-weight: 500; letter-spacing: .2px;
  flex-wrap: wrap; row-gap: 2px; line-height: 1.4;
}
.promo-strip strong { font-weight: 700; }
.promo-seg { white-space: nowrap; }
.promo-sep { opacity: .5; }
@media (max-width: 768px) {
  .promo-strip { font-size: 12px; padding: 7px 14px; gap: 0 8px; row-gap: 1px; }
  .promo-strip [data-icon] { display: none; }
  .promo-sep { display: none; }
  .promo-seg--ship { display: none; }
  .promo-seg { flex: 0 0 100%; }
}

/* ── Filter Tabs ── */
.filter-tabs {
  display: flex; gap: 10px; margin-bottom: 32px;
  overflow-x: auto; scrollbar-width: none; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 9px 22px; border-radius: var(--r-pill);
  border: 1.5px solid rgba(74,124,89,.22); background: transparent;
  font-size: 13px; font-weight: 500; color: rgba(27,27,27,.6);
  cursor: pointer; white-space: nowrap; font-family: var(--font-body);
  transition: all .2s; flex-shrink: 0;
}
.filter-tab.active { background: var(--green); color: white; border-color: var(--green); }
.filter-tab:hover:not(.active) { border-color: var(--green); color: var(--green); }

/* Chip de favoritos (P1-8) */
.filter-fav { display: inline-flex; align-items: center; gap: 6px; }
.filter-fav .ic-svg { width: 15px; height: 15px; }
.fav-count {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: rgba(74,124,89,.16); color: var(--green);
  font-size: 11px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.filter-fav.active .fav-count { background: rgba(255,255,255,.28); color: #fff; }

/* ── Banda tablet intermedia (P0-1) ── */
@media (min-width: 769px) and (max-width: 1080px) {
  .nav-links { gap: 18px; }
  .nav-logo { font-size: 20px; }
}
@media (min-width: 769px) and (max-width: 960px) {
  /* El CTA de texto no cabe; quedan el enlace "Diagnóstico" y el icono de tienda */
  .nav-actions .btn-primary { display: none; }
}

/* ── Responsive helpers ── */
@media (max-width: 768px) {
  .desktop-nav { display: none; }
  .mobile-header { display: flex; }
  .mobile-bottom-nav { display: block; }
  .wa-fab { bottom: 88px; right: 16px; width: 48px; height: 48px; font-size: 22px; }
  body { padding-bottom: 80px; padding-top: calc(72px + env(safe-area-inset-top)); }
  .section { scroll-margin-top: 70px; }
}
@media (min-width: 769px) {
  .mobile-bottom-nav { display: none !important; }
}

/* ── Toast feedback ── */
.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translate(-50%, 16px);
  background: var(--text); color: #fff; padding: 12px 22px; border-radius: var(--r-pill);
  font-size: 13.5px; font-weight: 600; z-index: 700; max-width: 90vw; text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,.28); opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── Feedback táctil (app-like) ── */
.btn-primary:active, .btn-outline:active, .btn-whatsapp:active, .btn-ver:active,
.btn-diag:active, .btn-sheet-wa:active, .btn-sheet-rutina:active, .diag-cta-wa:active,
.diag-btn-next.enabled:active, .filter-tab:active, .wa-fab:active, .t-nav-btn:active,
.product-heart:active, .nav-icon-btn:active { transform: scale(.95); }
.product-card:active { transform: translateY(-2px) scale(.995); }
