/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@300;400;600&display=swap');

/* ===== VARIABLES ===== */
:root {
  --bg-color: #FFFFFF;
  --text-main: #333333;
  --text-muted: #666666;
  --primary-green: #1B5E20;
  --primary-green-hover: #144918;
  --detail-brown: #795548;
  --font-title: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', sans-serif;
  --transition: all 0.3s ease-in-out;
}

/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--text-main);
}

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

ul {
  list-style: none;
}

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

/* ===== UTILITIES ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5%;
}

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background-color: var(--detail-brown);
  margin: 1rem auto 0;
}

.btn {
  display: inline-block;
  background-color: var(--primary-green);
  color: #FFFFFF;
  padding: 12px 30px;
  font-family: var(--font-title);
  font-weight: 600;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
  text-align: center;
}

.btn:hover {
  background-color: var(--primary-green-hover);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(27, 94, 32, 0.2);
}

/* EFECTO FADE IN (Carga Suave) */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== HEADER ===== */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 10px 0;
  background-color: transparent;
  z-index: 1000;
  transition: var(--transition);
}

header.scrolled {
  background-color: rgba(255, 255, 255, 0.95);
  padding: 5px 0;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  backdrop-filter: blur(5px);
}

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

.internal-page {
  background-color: #f7f9f8; 
  position: relative;
  overflow-x: hidden;
  background-image: 
    radial-gradient(at 0% 0%, rgba(27, 94, 32, 0.07) 0, transparent 50%), 
    radial-gradient(at 50% 0%, rgba(121, 85, 72, 0.05) 0, transparent 50%), 
    radial-gradient(at 100% 0%, rgba(27, 94, 32, 0.07) 0, transparent 50%);
  background-attachment: fixed;
  animation: airFlow 10s ease infinite alternate;
}

@keyframes airFlow {
  from { background-position: 0% 0%; }
  to { background-position: 100% 20%; }
}

/* Efecto de olas/viento flotante más visible */
.internal-page::before,
.internal-page::after,
.central-wave {
  content: "";
  position: fixed;
  width: 200%;
  height: 100%;
  top: 0;
  left: -50%;
  background-repeat: repeat-x;
  background-position: bottom;
  background-size: 50% 200px;
  z-index: -1;
  opacity: 0.8;
  animation: moveWave 15s linear infinite;
  pointer-events: none;
}

.internal-page::before {
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5,73.84-4.36,147.54,16.88,218.4,38.5,100.75,30.77,204.09,51.24,309.4,43.5,102.77-7.55,200.75-47.5,307.4-43.5V0Z" fill="rgba(27, 94, 32, 0.06)"/></svg>');
}

/* OLA CENTRAL - Basada en tu dibujo */
.central-wave {
  top: 35%; /* Ubicada según tu línea roja */
  height: 300px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5,73.84-4.36,147.54,16.88,218.4,38.5,100.75,30.77,204.09,51.24,309.4,43.5,102.77-7.55,200.75-47.5,307.4-43.5V0Z" fill="rgba(27, 94, 32, 0.04)"/></svg>');
  background-size: 100% 150px;
  animation: moveWave 20s linear infinite;
  opacity: 0.5;
}

.internal-page::after {
  top: auto;
  bottom: 0;
  height: 150px;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5,73.84-4.36,147.54,16.88,218.4,38.5,100.75,30.77,204.09,51.24,309.4,43.5,102.77-7.55,200.75-47.5,307.4-43.5V0Z" fill="rgba(121, 85, 72, 0.05)"/></svg>');
  background-size: 50% 120px;
  animation: moveWave 25s linear infinite reverse;
  opacity: 0.6;
}

@keyframes moveWave {
  0% { transform: translateX(0); }
  100% { transform: translateX(50%); }
}

/* Forzar visibilidad del menú en páginas internas desde el inicio */
.internal-page header:not(.scrolled) {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.internal-page nav.main-nav a,
.internal-page .menu-toggle {
  color: var(--text-main) !important;
}

.internal-page .logo-container img {
  filter: none !important;
  mix-blend-mode: multiply !important;
}

.main-content {
  padding-top: 130px;
  position: relative;
  z-index: 1;
}

.logo-container a {
  display: flex;
  align-items: center;
  transition: var(--transition);
}

/* El logo ya no se invierte para evitar el fondo negro. 
   Usamos mix-blend-mode: multiply para que el fondo blanco del logo 
   sea transparente cuando la cabecera es blanca (scrolled) */
header.scrolled .logo-container img {
  mix-blend-mode: multiply;
}

nav.main-nav ul {
  display: flex;
  gap: 2rem;
}

/* Textos blancos cuando la cabecera es transparente */
nav.main-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  color: #FFFFFF; 
}

header.scrolled nav.main-nav a {
  color: var(--text-main);
}

nav.main-nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  background-color: var(--primary-green);
  bottom: -5px;
  left: 0;
  transition: var(--transition);
}

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

/* Hamburger Menu (Mobile) */
.menu-toggle {
  display: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #FFFFFF;
}

header.scrolled .menu-toggle {
  color: var(--text-main);
}

/* ===== HERO SECTION ===== */
.hero {
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/IMG_2944.JPEG');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: #FFF;
  position: relative;
}

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

.hero-content h1 {
  font-size: 4rem;
  margin-bottom: 0.5rem;
  color: #FFFFFF;
  text-shadow: 2px 2px 10px rgba(0,0,0,0.5);
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  font-weight: 300;
  text-shadow: 1px 1px 5px rgba(0,0,0,0.5);
  font-style: italic;
}

/* ===== NUESTRA ESENCIA ===== */
.esencia {
  padding: 6rem 0;
  background-color: #FAFAFA;
}

.esencia-story {
  max-width: 850px;
  margin: 0 auto 4rem;
  text-align: center;
}

.story-subtitle {
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.8rem;
  color: var(--primary-green);
  margin-bottom: 1.5rem;
  position: relative;
}

.story-text {
  font-size: 1.15rem;
  color: var(--text-main);
  line-height: 1.8;
  margin-bottom: 2rem;
}

.story-highlight {
  font-weight: 600;
  color: var(--detail-brown);
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.esencia-grid {
  display: flex;
  gap: 3rem;
  text-align: center;
  margin-bottom: 4rem;
}

.esencia-footer {
  text-align: center;
  padding: 2rem;
  background: #FFFFFF;
  border-left: 4px solid var(--primary-green);
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  max-width: 800px;
  margin: 4rem auto 0;
}

.esencia-footer p {
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text-main);
  line-height: 1.6;
}

.esencia-item {
  flex: 1;
  padding: 2rem;
  background: var(--bg-color);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  transition: var(--transition);
}

.esencia-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.06);
}

.esencia-icon {
  width: 220px;
  height: 220px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #FFFFFF;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #EEE;
}

.esencia-icon i {
  font-size: 3rem;
  color: var(--primary-green);
}

.esencia-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.esencia-item:hover .esencia-icon img {
  transform: scale(1.1);
}

.esencia-item h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

.esencia-item p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ===== GALERÍA (E-Commerce) ===== */
.galeria {
  padding: 6rem 0;
}

.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
}

.producto-card {
  background: var(--bg-color);
  text-align: center;
  border-radius: 8px;
  overflow: hidden;
  transition: var(--transition);
}

.producto-card:hover {
  transform: translateY(-5px);
}

.producto-img-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #F5F5F5;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.producto-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.producto-card:hover .producto-img-container img {
  transform: scale(1.05);
}

.producto-info {
  padding: 1.5rem 0;
}

.producto-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}

.producto-precio {
  font-weight: 600;
  font-family: var(--font-title);
  color: var(--primary-green);
  font-size: 1.1rem;
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--text-main);
  color: #FFFFFF;
  padding: 4rem 0 2rem;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
  margin-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 2rem;
}

.footer-logo {
  font-family: var(--font-title);
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-logo span {
  color: #4CAF50; /* A slightly lighter green for dark bg */
}

.footer-social, .footer-payments {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  font-size: 1.5rem;
}

.footer-payments img {
  height: 30px;
  filter: grayscale(100%) brightness(200%);
  transition: var(--transition);
}

.footer-payments img:hover {
  filter: none;
}

.copyright {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
}

/* ===== WHATSAPP FLOTANTE ===== */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 40px;
  right: 40px;
  background-color: #25d366;
  color: #FFF;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 0px 4px 15px rgba(0,0,0,0.15);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0px 6px 20px rgba(0,0,0,0.2);
}

.whatsapp-float .tooltip {
  position: absolute;
  right: 80px;
  background-color: var(--bg-color);
  color: var(--text-main);
  padding: 8px 15px;
  border-radius: 5px;
  font-size: 0.9rem;
  font-family: var(--font-body);
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  white-space: nowrap;
}

.whatsapp-float:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
  .hero-content h1 {
    font-size: 3rem;
  }
  .esencia-grid {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  header {
    background-color: var(--bg-color);
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  }
  
  header.scrolled {
    padding: 15px 0;
  }

  .menu-toggle {
    display: block;
  }

  nav.main-nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--bg-color);
    padding: 20px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    text-align: center;
    gap: 1.5rem;
  }

  nav.main-nav ul.active {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
  
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 25px;
  }
  .whatsapp-float .tooltip {
    display: none;
  }
}

/* ===== TIENDA LAYOUT (NUEVO) ===== */
.shop-section {
  padding: 1rem 0 6rem; /* Reducido de 3rem a 1rem para pegar el título al header */
}

.shop-layout {
  display: flex;
  gap: 3rem;
  margin-bottom: 5rem;
}

/* Sidebar Filtros */
.shop-sidebar {
  flex: 0 0 250px;
}

.filter-group {
  margin-bottom: 2.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  padding-bottom: 1.5rem;
}

.filter-group h4 {
  font-size: 1.1rem;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-family: var(--font-title);
  color: var(--text-main);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.filter-list label {
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.filter-list label:hover {
  color: var(--primary-green);
}

.filter-list input[type="checkbox"] {
  accent-color: var(--primary-green);
}

/* Catalogo & Toolbar */
.shop-main {
  flex: 1;
}

.shop-toolbar {
  display: flex;
  justify-content: flex-end; /* Alineado a la derecha para ser menos intrusivo */
  align-items: center;
  margin-bottom: 2rem;
  padding: 0.5rem 1rem; /* Padding reducido */
  background: transparent; /* Fondo transparente para menos peso visual */
  box-shadow: none; /* Sin sombra */
  border-bottom: 1px solid rgba(0,0,0,0.05); /* línea divisoria sutil */
  border-radius: 0;
  flex-wrap: nowrap;
  gap: 1.5rem;
}

.search-box {
  display: flex;
  border: 1px solid #EEE;
  border-radius: 4px;
  overflow: hidden;
  max-width: 250px; /* Mucho más estrecho */
  width: 100%;
  background: #FFF;
}

.search-box input {
  border: none;
  padding: 6px 12px; /* Padding reducido */
  width: 100%;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.8rem; /* Fuente más chica */
}

.search-box .btn-search {
  background: var(--text-main);
  color: #FFF;
  border: none;
  padding: 0 15px;
  cursor: pointer;
  transition: var(--transition);
}

.search-box .btn-search:hover {
  background: var(--primary-green);
}

.toolbar-selectors {
  display: flex;
  gap: 1rem;
}

.toolbar-selectors select {
  padding: 8px 12px;
  border: 1px solid #DDD;
  border-radius: 4px;
  background: #FFF;
  font-family: var(--font-body);
  font-size: 0.9rem;
  outline: none;
  cursor: pointer;
}

/* Tarjetas de Producto en Tienda */
.shop-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Forzado a 3 productos por línea */
  gap: 2.5rem;
}

.shop-card {
  background: #FFF;
  border-radius: 12px; /* Más redondeado para verse más moderno */
  overflow: hidden;
  transition: var(--transition);
  box-shadow: 0 8px 30px rgba(0,0,0,0.05); /* Sombra más profunda para ser el "actor principal" */
  border: 1px solid rgba(0,0,0,0.02);
}

.shop-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.shop-card .producto-info {
  padding: 1.5rem;
  text-align: left;
}

.shop-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  height: 2.8rem; /* Para alinear alturas */
  overflow: hidden;
}

.category-tag {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  letter-spacing: 1px;
}

.shop-card .btn-add {
  margin-top: 1.5rem;
  width: 100%;
  border-radius: 4px;
}

.shop-card .producto-precio {
  font-size: 1.2rem;
  color: var(--primary-green);
}

@media (max-width: 1200px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .shop-layout {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .shop-grid {
    grid-template-columns: 1fr;
  }
  .shop-toolbar {
    flex-direction: column;
    align-items: flex-start;
    flex-wrap: wrap; 
    gap: 1rem;
  }
}

/* ===== GALERÍA & VIDEOS (NUEVO) ===== */
.gallery-container {
  padding: 4rem 0 8rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
  margin-bottom: 6rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  aspect-ratio: 4 / 5;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  cursor: pointer;
  background-color: #EEE;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.video-section {
  background: rgba(255, 255, 255, 0.4);
  padding: 4rem 2rem;
  border-radius: 20px;
  margin-bottom: 2rem;
}

.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 3rem;
}

.video-card {
  background: #FFF;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-info {
  padding: 1.5rem;
}

.video-info h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-family: var(--font-title);
}

.video-info p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

@media (max-width: 576px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}
