/* ==============================================================================
   SOY HÉCTOR MARTÍN — NUTRIÓLOGO
   Sistema de diseño y estilos personalizados complementarios a Tailwind CSS
   ============================================================================== */

:root {
  --color-white: #FFFFFF;
  --color-light-gray: #F3F5F7;
  --color-medium-gray: #737B84;
  --color-navy: #12304A;
  --color-navy-dark: #0B1E2E;
  --color-navy-light: #1C4468;
  --color-sky-blue: #8CC9E8;
  --color-sky-blue-soft: #EBF5FB;
  --color-sky-blue-dark: #4A9DC7;
  
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --header-height: 72px;
}

/* Tipografía base y scroll suave */
html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--color-white);
  color: #2D3748;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

/* Barra de progreso de carga para SPA */
#spa-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-sky-blue), var(--color-navy));
  z-index: 9999;
  transition: width 0.25s ease, opacity 0.3s ease;
  pointer-events: none;
  opacity: 0;
}

#spa-progress-bar.is-loading {
  opacity: 1;
}

/* Transición de contenido SPA */
#app-content {
  transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#app-content.is-fading {
  opacity: 0.35;
}

/* Hero con imagen de fondo y overlay */
.hero-wrapper {
  position: relative;
  background-color: var(--color-navy);
  background-image: url('../images/hero/hero-placeholder.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  background: linear-gradient(
    135deg,
    rgba(11, 30, 46, 0.92) 0%,
    rgba(18, 48, 74, 0.85) 50%,
    rgba(18, 48, 74, 0.70) 100%
  );
}

/* Botón flotante de WhatsApp */
.whatsapp-float-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: #25D366;
  color: #FFFFFF;
  padding: 12px 18px;
  border-radius: 9999px;
  box-shadow: 0 10px 25px -5px rgba(37, 211, 102, 0.4), 0 8px 10px -6px rgba(37, 211, 102, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.whatsapp-float-btn:hover {
  background-color: #20BA5A;
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 14px 28px -5px rgba(37, 211, 102, 0.5);
}

@media (max-width: 640px) {
  .whatsapp-float-btn {
    bottom: 20px;
    right: 20px;
    padding: 14px;
    border-radius: 9999px;
  }
  .whatsapp-float-btn .btn-text {
    display: none;
  }
}

/* Notificación Flotante (Toast) */
.toast-notification {
  position: fixed;
  bottom: 90px;
  right: 24px;
  z-index: 9999;
  background-color: var(--color-navy);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  border-left: 4px solid var(--color-sky-blue);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

/* Tarjetas y micro-interacciones */
.card-hover-effect {
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card-hover-effect:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px -10px rgba(18, 48, 74, 0.12);
}

/* Galería Lightbox */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 30, 46, 0.95);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

.lightbox-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: scale(0.96);
  transition: transform 0.25s ease;
}

.lightbox-modal.is-open .lightbox-content {
  transform: scale(1);
}

/* Modal de Suplementos */
.product-modal {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 30, 46, 0.85);
  backdrop-filter: blur(4px);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  padding: 1rem;
}

.product-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.product-modal-box {
  background: #FFFFFF;
  border-radius: 1.25rem;
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-modal.is-open .product-modal-box {
  transform: scale(1);
}

/* Indicador de navegación activa */
.nav-link {
  position: relative;
  transition: color 0.2s ease;
}

.nav-link.active {
  color: var(--color-navy);
  font-weight: 700;
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--color-sky-blue);
  border-radius: 2px;
}

/* Carrusel de suplementos */
.carousel-track {
  display: flex;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.carousel-slide {
  min-width: 100%;
  box-sizing: border-box;
}

/* Estados de foco accesibles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-sky-blue);
  outline-offset: 2px;
}
