/* =========================================================
   Broven Perú — estilos mobile-first
   Base = celular (375-430px). Los @media agregan tablet/desktop.
   Tipografía: Sora (títulos) + Inter (texto) — cargadas en el
   <head> de cada página. Paleta placeholder (navy + acento
   naranja): reemplazar por los colores oficiales cuando existan.
   ========================================================= */

:root {
  /* Color */
  --navy-900: #0f1b2d;
  --navy-800: #16273f;
  --navy-700: #22395a;
  --accent: #ff7a1a;
  --accent-dark: #e0570a;
  --accent-light: #fff1e6;
  --whatsapp: #25d366;
  --whatsapp-dark: #1da851;
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1b2430;
  --text-muted: #626b78;
  --text-on-dark: #eef1f5;
  --text-on-dark-muted: rgba(238, 241, 245, 0.72);
  --border: #e6e8ec;

  /* Tipografía */
  --font-heading: "Sora", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --fs-xs: 0.8rem;
  --fs-sm: 0.9rem;
  --fs-base: 1rem;
  --fs-md: clamp(1.05rem, 1rem + 0.3vw, 1.15rem);
  --fs-lg: clamp(1.2rem, 1.1rem + 0.6vw, 1.45rem);
  --fs-xl: clamp(1.5rem, 1.3rem + 1.2vw, 1.9rem);
  --fs-2xl: clamp(1.9rem, 1.5rem + 2vw, 2.6rem);
  --fs-3xl: clamp(2.2rem, 1.7rem + 2.8vw, 3.1rem);

  /* Espaciado */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 72px;

  /* Forma / elevación */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 3px rgba(15, 27, 45, 0.06), 0 1px 2px rgba(15, 27, 45, 0.06);
  --shadow-md: 0 6px 20px rgba(15, 27, 45, 0.10);
  --shadow-lg: 0 16px 40px rgba(15, 27, 45, 0.20);

  --header-h: 64px;
  --max-w: 1180px;
  --measure: 62ch;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: var(--fs-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--header-h);
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy-900);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--navy-900);
  z-index: 50;
  display: flex;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--text-on-dark);
  letter-spacing: 0.01em;
}
.brand .brand-accent { color: var(--accent); }
.brand-icon { width: 28px; height: 28px; flex-shrink: 0; }

.nav-toggle {
  background: none;
  border: none;
  color: var(--text-on-dark);
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 26px; height: 26px; }

.main-nav {
  position: fixed;
  top: var(--header-h);
  left: 0; right: 0;
  background: var(--navy-800);
  display: flex;
  flex-direction: column;
  padding: var(--sp-2) 0;
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 49;
  box-shadow: var(--shadow-md);
}
.main-nav.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.main-nav a {
  color: var(--text-on-dark);
  padding: 14px 20px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.95rem;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.main-nav a:active,
.main-nav a:hover { background: rgba(255,255,255,0.06); }

.nav-cta { margin: var(--sp-2) 20px 4px; }

/* ---------- Botones ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 13px 24px;
  border-radius: var(--radius-pill);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  border: none;
  cursor: pointer;
  text-align: center;
  width: 100%;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.btn-whatsapp {
  background: var(--whatsapp);
  color: #fff;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.28);
}
.btn-whatsapp:active,
.btn-whatsapp:hover { background: var(--whatsapp-dark); }
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:active,
.btn-accent:hover { background: var(--accent-dark); }
.btn-outline {
  background: transparent;
  border: 2px solid rgba(238, 241, 245, 0.5);
  color: inherit;
}
.btn-block { width: 100%; }
.btn-sm { min-height: 42px; padding: 9px 14px; font-size: 0.82rem; gap: 6px; white-space: nowrap; }
.btn-sm svg { width: 17px; height: 17px; }

.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-700));
  color: var(--text-on-dark);
  padding: var(--sp-8) 0 var(--sp-7);
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(255, 122, 26, 0.12);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--sp-4);
}
.hero h1 {
  font-size: var(--fs-3xl);
  color: var(--text-on-dark);
  margin: 0 0 var(--sp-4);
}
.hero h1 span { color: var(--accent); }
.hero p {
  color: var(--text-on-dark-muted);
  font-size: var(--fs-md);
  max-width: var(--measure);
  margin: 0 0 var(--sp-6);
}
.hero-ctas {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.hero-note {
  margin-top: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--text-on-dark-muted);
}

/* ---------- Trust bar ---------- */

.trust-bar {
  background: var(--navy-800);
  padding: var(--sp-5) 0;
}
.trust-list {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}
.trust-list li {
  color: var(--text-on-dark);
  font-size: var(--fs-sm);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.trust-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 122, 26, 0.16);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* ---------- Secciones ---------- */

.section {
  padding: var(--sp-7) 0;
}
.section.alt { background: var(--card); }
.section-eyebrow {
  font-family: var(--font-heading);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-dark);
  margin: 0 0 var(--sp-2);
  display: block;
}
.section-title {
  font-size: var(--fs-xl);
  margin: 0 0 var(--sp-2);
}
.section-subtitle {
  color: var(--text-muted);
  margin: 0 0 var(--sp-6);
  font-size: var(--fs-md);
  max-width: var(--measure);
}

/* ---------- Categorías ---------- */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 160px));
  justify-content: start;
  gap: var(--sp-3);
}
.cat-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: var(--sp-5) var(--sp-3);
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 0.92rem;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.cat-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.cat-card.active {
  border-color: var(--accent);
  background: var(--accent-light);
}
@media (hover: hover) and (pointer: fine) {
  .cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--accent); }
}

/* ---------- Productos ---------- */

.prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 165px));
  justify-content: start;
  gap: var(--sp-4);
}
.prod-card {
  background: var(--card);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .prod-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
}
.prod-img-wrap {
  position: relative;
  aspect-ratio: 2 / 3;
  background: var(--bg);
}
.prod-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.prod-badge {
  position: absolute;
  top: 10px; left: 10px;
  background: var(--accent);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}
.prod-body {
  padding: var(--sp-4);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1;
}
.prod-name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy-900);
  min-height: 2.4em;
}
.prod-specs {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
}
.prod-specs li {
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--bg);
  border-radius: var(--radius-pill);
  padding: 3px 9px;
}
.prod-price-row {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  margin-top: auto;
  padding-top: var(--sp-1);
}
.prod-price { font-family: var(--font-heading); font-size: 1.2rem; font-weight: 700; color: var(--navy-900); }
.prod-price-before {
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: line-through;
}
.prod-card .btn { margin-top: var(--sp-2); }

.filter-row {
  display: flex;
  gap: var(--sp-2);
  overflow-x: auto;
  padding-bottom: var(--sp-3);
  margin-bottom: var(--sp-5);
  -webkit-overflow-scrolling: touch;
}
.filter-chip {
  flex: 0 0 auto;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--card);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  min-height: 42px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.filter-chip.active {
  background: var(--navy-900);
  color: #fff;
  border-color: var(--navy-900);
}

/* ---------- Por qué Broven / bloques de beneficio ---------- */

.why-grid, .policy-grid {
  display: grid;
  gap: var(--sp-4);
}
.why-card, .policy-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  border: 1px solid var(--border);
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.why-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--accent-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}
.why-card h3, .policy-card h3 {
  margin: 0 0 var(--sp-1);
  font-size: var(--fs-md);
  font-weight: 600;
}
.why-card p, .policy-card p {
  margin: 0;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}
.policy-card { flex-direction: column; }
.policy-card .why-icon,
.policy-card .cat-icon-wrap { margin-bottom: var(--sp-1); }

/* ---------- Testimonios ---------- */

.testi-grid {
  display: grid;
  gap: var(--sp-4);
}
.testi-card {
  background: var(--card);
  border-radius: var(--radius-md);
  padding: var(--sp-5);
  border: 1px solid var(--border);
  font-size: var(--fs-sm);
}
.testi-head {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
}
.testi-avatar {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--text-on-dark);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.testi-stars { color: var(--accent); font-size: 0.85rem; letter-spacing: 2px; }
.testi-card p.testi-text { margin: 0 0 var(--sp-3); color: var(--text); line-height: 1.6; }
.testi-name { font-family: var(--font-heading); font-weight: 600; font-size: 0.88rem; color: var(--navy-900); }
.testi-product { font-size: 0.78rem; color: var(--text-muted); }

/* ---------- Galería ---------- */

.gallery-wrap {
  margin-top: var(--sp-7);
}
.gallery-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}
.gallery-heading h3 {
  font-size: var(--fs-lg);
  font-weight: 700;
}
.gallery-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  white-space: nowrap;
}
.gallery-scroll {
  display: flex;
  gap: var(--sp-3);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: var(--sp-2);
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}
.gallery-item {
  flex: 0 0 auto;
  width: 62vw;
  max-width: 230px;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-md);
  overflow: hidden;
  scroll-snap-align: start;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-900);
  color: var(--text-on-dark);
  padding: var(--sp-7) 0 calc(var(--sp-8) + 24px);
}
.site-footer h4 {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-base);
  color: var(--text-on-dark);
  font-weight: 600;
}
.footer-logo {
  width: 150px;
  height: auto;
  margin-bottom: var(--sp-4);
}
.footer-cols {
  display: grid;
  gap: var(--sp-6);
}
.footer-cols p, .footer-cols a {
  color: var(--text-on-dark-muted);
  font-size: var(--fs-sm);
  display: block;
  margin-bottom: var(--sp-2);
}
.footer-cols a:hover { color: var(--text-on-dark); }
.footer-bottom {
  margin-top: var(--sp-6);
  padding-top: var(--sp-4);
  border-top: 1px solid rgba(238,241,245,0.12);
  font-size: var(--fs-xs);
  color: rgba(238,241,245,0.45);
  line-height: 1.7;
}
.footer-bottom a {
  color: rgba(238,241,245,0.7);
  text-decoration: underline;
}
.footer-bottom a:hover { color: var(--text-on-dark); }

/* ---------- WhatsApp flotante ---------- */

.wa-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 62;
  background: var(--whatsapp);
  color: #fff;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.15s ease;
}
.wa-float svg { width: 30px; height: 30px; }
.wa-float:active { background: var(--whatsapp-dark); }
@media (hover: hover) and (pointer: fine) {
  .wa-float:hover { transform: scale(1.06); }
}

/* ---------- Mini chatbot del botón flotante ---------- */

.wa-panel {
  position: fixed;
  right: 16px;
  bottom: 88px;
  width: min(340px, calc(100vw - 32px));
  max-height: min(70vh, 480px);
  background: var(--card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 61;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
  transform: scale(0.92) translateY(10px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.16s ease, opacity 0.16s ease;
}
.wa-panel.open {
  transform: scale(1) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.wa-panel-header {
  background: var(--whatsapp);
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.wa-panel-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  flex-shrink: 0;
}
.wa-panel-title { font-family: var(--font-heading); font-weight: 700; font-size: 0.92rem; }
.wa-panel-status {
  font-size: 0.7rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
}
.wa-panel-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #baffcf;
  flex-shrink: 0;
}
.wa-panel-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  border-radius: 50%;
}
.wa-panel-close:hover { background: rgba(255,255,255,0.15); }

.wa-panel-body {
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--bg);
}
.wa-chat-bubble {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 13px;
  font-size: 0.85rem;
  color: var(--text);
  max-width: 92%;
}
.wa-quick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wa-quick-btn {
  text-align: left;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: var(--font-body);
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--navy-900);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.wa-quick-btn:hover, .wa-quick-btn:active {
  border-color: var(--whatsapp);
  background: #f1fcf5;
}
.wa-quick-icon { flex-shrink: 0; }
.wa-answer-bubble {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px 14px 14px 4px;
  padding: 10px 13px;
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.5;
}
.wa-answer-bubble .btn { margin-top: 10px; }

.wa-panel-footer {
  padding: 10px 14px 14px;
  background: var(--bg);
  flex-shrink: 0;
  border-top: 1px solid var(--border);
}

/* =========================================================
   Desktop / tablet (≥768px) — la base ya es mobile
   ========================================================= */
@media (min-width: 768px) {
  :root { --header-h: 76px; }

  .nav-toggle { display: none; }

  .main-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    background: transparent;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 0;
    gap: var(--sp-1);
    box-shadow: none;
  }
  .main-nav a { padding: 8px 16px; min-height: auto; }
  .nav-cta { margin: 0 0 0 var(--sp-3); }
  .nav-cta .btn { width: auto; }

  .hero .container {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    align-items: center;
    gap: var(--sp-7);
  }
  .hero-ctas { flex-direction: row; }
  .hero-ctas .btn { width: auto; padding-left: 30px; padding-right: 30px; }

  .trust-list { grid-template-columns: repeat(4, 1fr); }

  .cat-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 190px)); }
  .prod-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 260px)); }

  .why-grid { grid-template-columns: repeat(3, 1fr); }
  .policy-grid { grid-template-columns: repeat(3, 1fr); }
  .testi-grid { grid-template-columns: repeat(2, 1fr); }

  .footer-cols { grid-template-columns: repeat(4, 1fr); }

  .section { padding: var(--sp-8) 0; }
}

@media (min-width: 1024px) {
  .why-card, .policy-card { padding: var(--sp-6); }
}
