/* ==========================================================================
   CAFÉ GRANFE - ESTILOS PRINCIPALES Y SISTEMA DE DISEÑO (HTML5 / CSS3)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. VARIABLES CSS (TEMA DE COLOR Y TIPOGRAFÍA)
   -------------------------------------------------------------------------- */
:root {
  /* Paleta de Colores Inspirada en el Café de Altura */
  --bg-dark: #120d0a;
  --bg-dark-card: #1c1510;
  --bg-light: #fbf8f3;
  --bg-cream: #f4ede2;
  --primary-gold: #c69214;
  --primary-gold-hover: #e5aa17;
  --primary-accent: #8b5a2b;
  --text-main: #2b231d;
  --text-muted: #6b5e52;
  --text-light: #ffffff;
  --text-gold: #e6b741;
  --whatsapp-green: #25d366;
  --whatsapp-green-hover: #1ebd56;

  /* Tipografías */
  --font-heading: 'Roboto Slab', serif;
  --font-body: 'Poppins', sans-serif;
  --font-accent: 'Great Vibes', cursive;

  /* Elevación y Sombras */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.25);
  --shadow-glow: 0 0 25px rgba(198, 146, 20, 0.3);

  /* Transiciones */
  --transition-fast: 0.25s ease;
  --transition-normal: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
  --transition-slow: 0.8s cubic-bezier(0.25, 1, 0.5, 1);

  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

/* --------------------------------------------------------------------------
   2. RESET Y ESTILOS BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-light);
  color: var(--text-main);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Selección de Texto */
::selection {
  background-color: var(--primary-gold);
  color: var(--text-light);
}

/* Accessibility Skip Link */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  background: var(--primary-gold);
  color: var(--bg-dark);
  padding: 0.8rem 1.5rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition-fast);
}

ul {
  list-style: none;
}

/* --------------------------------------------------------------------------
   3. CANVAS DE PARTÍCULAS DE FONDO (GRÁFICO ACTIVO)
   -------------------------------------------------------------------------- */
#bg-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}

/* Wrapper principal para mantener contenido sobre el canvas */
.content-wrapper {
  position: relative;
  z-index: 2;
}

/* --------------------------------------------------------------------------
   4. NAVEGACIÓN Y HEADER STICKY
   -------------------------------------------------------------------------- */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(18, 13, 10, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all var(--transition-normal);
  padding: 1rem 0;
}

.main-header.scrolled {
  padding: 0.6rem 0;
  background: rgba(12, 8, 6, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo img {
  height: 48px;
  width: auto;
  aspect-ratio: 180 / 50;
  transition: transform var(--transition-fast);
}

.brand-logo:hover img {
  transform: scale(1.03);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav-link {
  color: var(--text-light);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  position: relative;
  padding: 0.75rem 0.5rem; /* Min tap target height */
  display: inline-block;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--primary-gold);
  transition: width var(--transition-fast);
}

.nav-link:hover {
  color: var(--primary-gold);
}

.nav-link:hover::after {
  width: 100%;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 1.8rem;
  min-width: 48px;
  min-height: 48px;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
}

.mobile-toggle:focus-visible {
  outline: 2px solid var(--primary-gold);
}

/* --------------------------------------------------------------------------
   5. SECCIÓN HÉROE CON SLIDER DINÁMICO
   -------------------------------------------------------------------------- */
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--text-light);
  text-align: center;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.5s ease-in-out, transform 6s ease-out;
  transform: scale(1);
}

.slide.active {
  opacity: 1;
  transform: scale(1.08); /* Efecto Ken Burns */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(0,0,0,0.3) 0%, rgba(18,13,10,0.75) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 0 1.5rem;
  margin-top: 3rem;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 2rem;
  text-shadow: 0 4px 16px rgba(0, 0, 0, 0.7);
  letter-spacing: 0.5px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  background: linear-gradient(135deg, var(--primary-gold) 0%, #a2750e 100%);
  color: var(--text-light);
  padding: 1.1rem 2.8rem;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-glow);
  transition: all var(--transition-normal);
  animation: floatAnimation 3s ease-in-out infinite;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-gold-hover) 0%, var(--primary-gold) 100%);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 12px 30px rgba(229, 170, 23, 0.45);
}

@keyframes floatAnimation {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Indicadores del Slider */
.slider-dots {
  position: absolute;
  bottom: 2.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  gap: 0.8rem;
}

.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
  border: none;
  padding: 0;
}

.dot::before {
  content: '';
  position: absolute;
  top: -16px;
  left: -16px;
  right: -16px;
  bottom: -16px;
}

.dot.active, .dot:hover {
  background: var(--primary-gold);
  transform: scale(1.3);
}

/* --------------------------------------------------------------------------
   6. SECCIÓN ORIGEN
   -------------------------------------------------------------------------- */
.section-padding {
  padding: 6rem 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

.origen-section {
  background: var(--bg-cream);
  position: relative;
  border-top: 1px solid rgba(139, 90, 43, 0.1);
  border-bottom: 1px solid rgba(139, 90, 43, 0.1);
}

.origen-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 4rem;
  align-items: center;
}

.origen-seal-wrap {
  text-align: center;
  position: relative;
}

.origen-seal-wrap img {
  max-width: 340px;
  margin: 0 auto;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,0.12));
  transition: transform var(--transition-slow);
}

.origen-seal-wrap:hover img {
  transform: rotate(2deg) scale(1.04);
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  color: var(--bg-dark);
  margin-bottom: 1.5rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: var(--primary-gold);
  margin-top: 0.6rem;
  border-radius: 2px;
}

.origen-content p {
  font-size: 1.1rem;
  color: var(--text-main);
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.origen-content p.en-text {
  font-style: italic;
  color: var(--text-muted);
  border-left: 3px solid var(--primary-gold);
  padding-left: 1rem;
}

/* --------------------------------------------------------------------------
   7. SECCIÓN PRODUCTOS (TARJETAS 3D INTERACTIVAS)
   -------------------------------------------------------------------------- */
.products-section {
  background: var(--bg-light);
}

.section-header-center {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header-center .section-title::after {
  margin: 0.6rem auto 0 auto;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 3rem;
  max-width: 1050px;
  margin: 0 auto;
}

.product-card {
  background: var(--text-light);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem 2.5rem 2rem;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: var(--transition-normal);
  position: relative;
  perspective: 1000px;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-gold), var(--primary-accent));
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.product-subtitle {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--primary-accent);
  font-weight: 600;
  margin-bottom: 1rem;
}

.product-image-wrap {
  position: relative;
  height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.product-image-wrap img {
  max-height: 100%;
  object-fit: contain;
  transition: transform var(--transition-normal);
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.15));
}

.product-card:hover .product-image-wrap img {
  transform: scale(1.08) rotate(-2deg);
}

.product-name {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  color: var(--bg-dark);
  margin-bottom: 1.2rem;
}

.product-sizes-label {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.product-sizes {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 2rem;
}

.size-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-cream);
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--bg-dark);
  border: 1px solid rgba(139, 90, 43, 0.15);
}

.size-badge svg {
  width: 14px;
  height: 14px;
  fill: var(--primary-gold);
}

/* --------------------------------------------------------------------------
   8. SECCIÓN NOSOTROS
   -------------------------------------------------------------------------- */
.nosotros-section {
  background: var(--bg-dark);
  color: var(--text-light);
  position: relative;
  overflow: hidden;
}

.nosotros-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.nosotros-section .section-title {
  color: var(--text-light);
}

.nosotros-section .section-title::after {
  margin: 0.6rem auto 1.8rem auto;
}

.nosotros-text {
  font-size: 1.25rem;
  line-height: 1.8;
  font-weight: 400;
  margin-bottom: 2rem;
}

.nosotros-author {
  font-family: var(--font-accent);
  font-size: 2.2rem;
  color: var(--primary-gold);
  margin-bottom: 2rem;
}

.divider-line {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(198, 146, 20, 0.4), transparent);
  margin: 2.5rem 0;
}

.nosotros-text.en-text {
  font-size: 1.1rem;
  font-style: italic;
  color: rgba(255, 255, 255, 0.75);
}

/* --------------------------------------------------------------------------
   9. SECCIÓN BENEFICIOS / CARACTERÍSTICAS DE SALUD
   -------------------------------------------------------------------------- */
.features-section {
  background: var(--bg-light);
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 4rem;
  align-items: center;
  margin-bottom: 5rem;
}

.feature-row:last-child {
  margin-bottom: 0;
}

.feature-row.reverse {
  grid-template-columns: 1.1fr 1fr;
}

.feature-row.reverse .feature-img-wrap {
  order: 2;
}

.feature-img-wrap {
  text-align: center;
  position: relative;
}

.feature-img-wrap img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  max-width: 100%;
  transition: transform var(--transition-normal);
}

.feature-img-wrap:hover img {
  transform: scale(1.03);
}

.feature-info .section-title {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}

.feature-sub {
  font-style: italic;
  color: var(--primary-accent);
  margin-bottom: 2rem;
  font-weight: 500;
}

.info-box {
  display: flex;
  gap: 1.2rem;
  background: var(--text-light);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--primary-gold);
  transition: transform var(--transition-fast);
}

.info-box:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-md);
}

.info-icon img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.info-text p {
  font-size: 0.98rem;
  color: var(--text-main);
  line-height: 1.6;
}

/* --------------------------------------------------------------------------
   10. BANNER BOTTOM Y FOOTER
   -------------------------------------------------------------------------- */
.cta-banner {
  background: radial-gradient(circle at center, #261a14 0%, var(--bg-dark) 100%);
  color: var(--text-light);
  text-align: center;
  padding: 5rem 2rem;
  border-top: 1px solid rgba(198, 146, 20, 0.2);
}

.cta-banner img {
  max-width: 220px;
  margin: 0 auto 1.5rem auto;
}

.cta-banner p {
  font-size: 1.3rem;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.cta-banner p i {
  color: var(--primary-gold);
  display: block;
  font-size: 1.1rem;
}

.main-footer {
  background: #0a0705;
  color: var(--text-light);
  padding: 4rem 2rem 2rem 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto 3rem auto;
  align-items: center;
}

.footer-logo img {
  max-width: 180px;
}

.footer-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--primary-gold);
  margin-bottom: 1rem;
}

.footer-contact a {
  color: var(--text-light);
  font-size: 1.1rem;
}

.footer-contact a:hover {
  color: var(--primary-gold);
}

.social-links {
  display: flex;
  gap: 1rem;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  transition: var(--transition-fast);
}

.social-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.social-btn:hover {
  background: var(--primary-gold);
  color: var(--bg-dark);
  transform: translateY(-4px);
}

.footer-bottom {
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 2rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-bottom a {
  color: var(--primary-gold);
}

/* --------------------------------------------------------------------------
   11. WIDGET FLOTANTE WHATSAPP
   -------------------------------------------------------------------------- */
.whatsapp-widget {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.whatsapp-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--whatsapp-green);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
}

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.whatsapp-btn:hover {
  background: var(--whatsapp-green-hover);
  transform: scale(1.1) rotate(6deg);
}

.whatsapp-popover {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 320px;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: none;
  animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.whatsapp-popover.active {
  display: block;
}

@keyframes popIn {
  from { opacity: 0; transform: translateY(15px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.wa-header {
  background: #095e54;
  color: white;
  padding: 1.2rem;
}

.wa-header h4 {
  font-size: 1.05rem;
  margin-bottom: 0.2rem;
}

.wa-header p {
  font-size: 0.8rem;
  opacity: 0.85;
}

.wa-body {
  padding: 1.2rem;
  background: #e5ddd5;
}

.wa-card {
  background: white;
  border-radius: var(--radius-sm);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-fast);
}

.wa-card:hover {
  background: #fdfdfd;
  transform: translateY(-2px);
}

.wa-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.wa-info h5 {
  font-size: 0.95rem;
  color: #303030;
}

.wa-info span {
  font-size: 0.78rem;
  color: #25d366;
  font-weight: 500;
}

/* Animations Scroll Reveal */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   12. RESPONSIVE BREAKPOINTS
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .origen-grid, .feature-row, .feature-row.reverse {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
  .feature-row.reverse .feature-img-wrap {
    order: 0;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background: rgba(18, 13, 10, 0.98);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    clip-path: circle(0% at 100% 0%);
    transition: clip-path 0.4s ease-in-out;
  }

  .nav-menu.active {
    clip-path: circle(140% at 100% 0%);
  }

  .mobile-toggle {
    display: block;
  }

  .hero-title {
    font-size: 2rem;
  }

  .section-padding {
    padding: 4rem 1.2rem;
  }

  .section-title {
    font-size: 2.1rem;
  }
}
