/* ============================================================
   BIOSOPORTE ORTOPÉDICO — sistema de diseño
   Paleta (tomada directamente del logo oficial):
     --azul-marca     #2C5F8A  (color principal del logo, texto, header)
     --azul-oscuro    #1B3E5C  (variante oscura, fondos de contraste)
     --verde-marca    #5F8D5A  (verde del logo, acentos, botones, foco)
     --verde-oscuro   #47703F  (hover de verde)
     --arena          #F6F4EE  (fondo cálido, no clínico)
     --carbon         #24302D  (texto principal)
   Tipografía:
     Display: "Fraunces" (serif con carácter, cálido, confiable)
     Cuerpo:  "Public Sans" (muy legible, pensado para accesibilidad)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Public+Sans:wght@400;500;600;700&display=swap');

:root {
  --azul-marca: #2C5F8A;
  --azul-oscuro: #1B3E5C;
  --verde-marca: #5F8D5A;
  --verde-marca-suave: #E7EFE4;
  --arena: #F6F4EE;
  --arena-oscuro: #EDE9DF;
  --verde-oscuro: #47703F;
  --carbon: #24302D;
  --blanco: #FFFFFF;
  --borde: #DBD5C7;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Public Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --radio: 14px;
  --sombra: 0 8px 24px rgba(27, 62, 92, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background: var(--arena);
  color: var(--carbon);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--azul-marca);
  line-height: 1.15;
  font-weight: 600;
}

h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: clamp(20px, 2.5vw, 24px); }

p { color: var(--carbon); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--verde-oscuro);
}

/* Foco visible para accesibilidad (clave con público adulto mayor) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--verde-marca);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ============ BOTONES ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  padding: 14px 28px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--verde-marca);
  color: var(--blanco);
  box-shadow: 0 6px 16px rgba(201, 138, 52, 0.35);
}
.btn-primary:hover { background: var(--verde-oscuro); }

.btn-secondary {
  background: transparent;
  border-color: var(--azul-marca);
  color: var(--azul-marca);
}
.btn-secondary:hover { background: var(--azul-marca); color: var(--blanco); }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 244, 238, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--borde);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}
.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-img {
  height: 42px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 16px;
  color: var(--azul-marca);
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease;
}
.nav-links a:hover { border-color: var(--verde-marca); }

.nav-cta { display: none; }
@media (min-width: 860px) { .nav-cta { display: inline-flex; } }

.menu-toggle {
  display: none;
  background: none;
  border: 2px solid var(--azul-marca);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}
@media (max-width: 859px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--arena);
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--borde);
  }
}

/* ============ HERO ============ */
.hero {
  padding: 72px 0 96px;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  gap: 48px;
  align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 920px) {
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
}
.hero h1 {
  font-size: clamp(34px, 5vw, 56px);
  margin: 14px 0 20px;
}
.hero p.lead {
  font-size: 20px;
  color: #3C4A46;
  max-width: 46ch;
  margin-bottom: 32px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}
.hero-trust {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 15px;
  color: var(--azul-marca);
  font-weight: 600;
}
.hero-trust span { display: flex; align-items: center; gap: 8px; }

.hero-art {
  position: relative;
}
.hero-art-circle {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: var(--verde-marca-suave);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}
.hero-foot-icon {
  width: 100%;
  max-width: 300px;
  height: auto;
}

/* ============ CAMINO DE PASOS (elemento firma) ============ */
.step-path {
  padding: 56px 0 8px;
}
.step-path svg { width: 100%; height: auto; display: block; }

/* ============ BENEFICIOS ============ */
.section { padding: 88px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head h2 { margin-top: 10px; }
.section-head p { color: #4A5751; font-size: 18px; margin-top: 12px; }

.benefits-grid {
  display: grid;
  gap: 28px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.benefit-card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 32px 26px;
}
.benefit-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: var(--verde-marca-suave);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.benefit-icon svg { width: 26px; height: 26px; stroke: var(--azul-marca); }
.benefit-card h3 { margin-bottom: 8px; }
.benefit-card p { color: #4A5751; font-size: 16px; }

/* ============ CATÁLOGO ============ */
.catalog { background: var(--arena-oscuro); }
.catalog-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}
.filter-btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 2px solid var(--azul-marca);
  background: transparent;
  color: var(--azul-marca);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-btn.active,
.filter-btn:hover {
  background: var(--azul-marca);
  color: var(--blanco);
}

.product-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.product-card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--sombra);
}
.product-media {
  aspect-ratio: 4 / 3;
  background: var(--verde-marca-suave);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-media img.product-placeholder-icon {
  width: 68px;
  height: auto;
  object-fit: contain;
  opacity: 0.85;
}
.badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--verde-marca);
  color: var(--blanco);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  z-index: 2;
}

/* ---- Carrusel de fotos por producto (hasta 3 fotos) ---- */
.product-carousel {
  position: relative;
  width: 100%;
  height: 100%;
}
.carousel-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.carousel-slide.active {
  opacity: 1;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--azul-marca);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(27, 62, 92, 0.2);
}
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-btn:hover { background: var(--blanco); }
.carousel-prev { left: 10px; }
.carousel-next { right: 10px; }
.carousel-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 6px;
  z-index: 2;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  padding: 0;
}
.carousel-dot.active {
  background: var(--blanco);
  box-shadow: 0 0 0 2px var(--azul-marca);
}
.product-body {
  padding: 20px 20px 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-category {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--verde-marca);
  margin-bottom: 6px;
}
.product-body h3 { font-size: 19px; margin-bottom: 6px; }
.product-body p.desc {
  font-size: 15px;
  color: #4A5751;
  flex: 1;
  margin-bottom: 18px;
}
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--azul-marca);
}
.price small { font-size: 14px; font-weight: 500; }

.btn-add {
  background: var(--azul-marca);
  color: var(--blanco);
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.btn-add:hover { background: #16302B; }
.whatsapp-icon { width: 16px; height: 16px; flex-shrink: 0; }

.empty-state {
  text-align: center;
  padding: 48px 0;
  color: #4A5751;
}

/* ============ TESTIMONIOS ============ */
.testimonials-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.testimonial-card {
  background: var(--blanco);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 30px;
}
.stars { color: var(--verde-marca); font-size: 17px; margin-bottom: 14px; letter-spacing: 2px; }
.testimonial-card p.quote {
  font-size: 17px;
  color: var(--carbon);
  margin-bottom: 20px;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.author-initial {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--verde-marca-suave);
  color: var(--azul-marca);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-family: var(--font-display);
}
.author-name { font-weight: 700; font-size: 15px; }
.author-role { font-size: 14px; color: #6B786F; }

/* ============ FAQ ============ */
.faq-list { max-width: 760px; }
.faq-item {
  border-bottom: 1px solid var(--borde);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 22px 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  cursor: pointer;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 17px;
  color: var(--azul-marca);
}
.faq-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-item.open .faq-answer { max-height: 240px; }
.faq-answer p {
  padding: 0 4px 22px;
  color: #4A5751;
  font-size: 16px;
}

/* ============ CTA FINAL ============ */
.cta-final {
  background: var(--azul-oscuro);
  border-radius: 24px;
  padding: 64px 40px;
  text-align: center;
  margin: 0 24px;
  max-width: 1132px;
  margin-inline: auto;
}
.cta-final h2 { color: var(--blanco); }
.cta-final p {
  color: #C9D6D0;
  max-width: 50ch;
  margin: 14px auto 32px;
  font-size: 18px;
}
.cta-final .btn-secondary {
  border-color: var(--blanco);
  color: var(--blanco);
}
.cta-final .btn-secondary:hover { background: var(--blanco); color: var(--azul-marca); }

/* ============ FOOTER ============ */
.site-footer {
  background: var(--carbon);
  color: #C9D2CE;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  gap: 40px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: 40px;
}
.footer-logo {
  font-family: var(--font-display);
  color: var(--blanco);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.footer-col h4 {
  color: var(--blanco);
  font-size: 15px;
  margin-bottom: 14px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { text-decoration: none; font-size: 15px; color: #A9B6B1; }
.footer-col a:hover { color: var(--blanco); }
.footer-bottom {
  border-top: 1px solid #384540;
  padding-top: 22px;
  font-size: 14px;
  color: #8B978F;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ LIGHTBOX (foto ampliada) ============ */
.product-media.has-photo { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(20, 26, 24, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease;
  padding: 24px;
  overflow: hidden;
}
.lightbox.open {
  opacity: 1;
  visibility: visible;
}
.lightbox-img {
  max-width: min(900px, 92vw);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  cursor: zoom-in;
  touch-action: none;
  transition: transform 0.12s ease-out;
}
.lightbox-img.zoomed {
  cursor: zoom-out;
  transform: scale(2.4);
  transition: transform 0.08s ease-out;
}
.lightbox-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
  font-weight: 600;
  pointer-events: none;
}
.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-close svg { width: 20px; height: 20px; }

.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: var(--blanco);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.lightbox-btn:hover { background: rgba(255, 255, 255, 0.22); }
.lightbox-btn svg { width: 26px; height: 26px; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }
@media (min-width: 640px) {
  .lightbox-prev { left: 32px; }
  .lightbox-next { right: 32px; }
}

.lightbox-counter {
  position: absolute;
  bottom: 46px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  font-weight: 600;
}

/* Respeta preferencia de reducir movimiento */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
