/* =========================================
   1. IMPORTACIÓN DE FUENTES
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

/* =========================================
   2. VARIABLES CSS
   ========================================= */
:root {
  --verde-principal: #65a34e;
  --verde-oscuro:    #2d5a27;
  --verde-claro:     #65a34e;
  --fondo-body:      #fffefc;
  --fondo-card:      #ffffff;
  --texto-principal: #1a1a1a;
  --texto-secundario:#888;
  --borde-suave:     #e8e0d4;
  --radio-borde:     12px;
  --sombra-card:     0 2px 12px rgba(0,0,0,0.06);
  --sombra-hover:    0 12px 32px rgba(0,0,0,0.12);
  --transicion:      all 0.22s ease;
  --blanco:          #ffffff;
  --tierra:          #c4822a;
  --gris-claro:      #ede8de;
  --sombra:          rgba(0,0,0,0.06);
  --texto:           #1a1a1a;
  --border-radius:   10px;
  --font-display:    'Nunito', sans-serif;
  --font-body:       'Nunito', sans-serif;
  --transition:      all 0.22s ease;
  --container-max:   1200px;
  --sidebar-width:   260px;
  --crema:           #f5f0e8;
}

/* =========================================
   3. RESETEO MODERNO Y BASE
   ========================================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Nunito', sans-serif;
  background-color: #fffefc;
  color: var(--texto-principal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Quitamos los estilos por defecto de las listas y enlaces */
ul { list-style: none; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */
.header {
  background-color: #ffffff;
  color: #2d5a27;
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  font-family: 'Nunito', sans-serif;
  border-bottom: 3px solid #2d5a27;
}


.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  height: 72px;
}

.logo img,
.logo .logo-img {
  height: 60px;
  width: auto;
  display: block;
  object-fit: contain;
}

.nav {
  display: flex;
  list-style: none;
  gap: 2.5rem;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  
}

.nav a {
  color: #2d5a1b;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  position: relative;
  transition: all 0.3s ease;
  padding: 5px 0;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #f5c842;
  transition: width 0.3s ease;
}

.nav a:hover,
.nav a.active {
  color: #4a8c2a;
}

.nav a:hover::after,
.nav a.active::after {
  width: 100%;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 2;
}

.cart-icon {
  position: relative;
  background: none;
  border: none;
  color: #2d5a1b;
  font-size: 1.4rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-icon:hover {
  transform: scale(1.1);
  color: #4a8c2a;
}

.cart-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #c4822a;
  color: #fff;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.header-local-info {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.72rem;
  color: #2d5a27;
  line-height: 1.5;
  font-weight: 600;
  opacity: 0.85;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--blanco);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section con Carrusel */
.hero {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 500px;
  min-height: 350px;
  overflow: clip;
}

.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100%;
  height: 100%;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center center;
  background-attachment: scroll;
  opacity: 0;
  transition: opacity 1s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, rgba(20,46,20,0.88) 0%, rgba(20,46,20,0.6) 55%, rgba(20,46,20,0.15) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  color: var(--blanco);
}

.hero-content .container {
  text-align: left;
  padding-left: 8%;
  max-width: 100%;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  color: var(--blanco);
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.3rem);
  margin-bottom: 2rem;
  max-width: 500px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

.btn-hero {
  background: #4caf50;
  border: 2px solid #4caf50;
  color: #ffffff;
  padding: 14px 38px;
  border-radius: 6px;
  transition: all 0.22s ease;
  display: inline-block;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.btn-hero:hover {
  background: #388e3c !important;
  border-color: #388e3c !important;
  color: #ffffff !important;
  box-shadow: none !important;
  transform: translateY(-2px) !important;
}

/* Dots de navegación */
.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 12px;
}

.hero-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.hero-dot.active {
  background: white;
  width: 32px;
  border-radius: 6px;
}

.hero-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

.btn {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

.btn-primary {
  background-color: var(--tierra);
  color: var(--blanco);
}

.btn-primary:hover {
  background-color: #b8741f;
  transform: translateY(-2px);
}

.btn-secondary {
  background-color: #2d5a27;
  color: #ffffff;
  border-radius: 6px;
  font-weight: 700;
}

.btn-secondary:hover {
  background-color: #1e3d1a;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(45,90,39,0.3);
}

/* Secciones */
.section {
  padding: 4rem 0;
}

.section-productos-destacados {
  background-color: #fffefc;
}

.section-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--verde-oscuro);
}

#featured-title {
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.featured-subtitle {
  text-align: center;
  font-size: 1.1rem;
  color: var(--texto-secundario);
  margin-top: -1.5rem;
  margin-bottom: 2rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.btn-container {
  text-align: center;
  margin-top: 2rem;
}

.no-products-message {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: var(--texto-secundario);
}

/* Grid de categorías */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.category-card {
  background: var(--blanco);
  padding: 2rem;
  border-radius: var(--border-radius);
  text-align: center;
  box-shadow: 0 4px 15px var(--sombra);
  transition: var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--texto);
}

.category-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.category-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.category-name {
  font-weight: 600;
  font-size: 1.1rem;
}

/* Grid de productos */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

/* Cards verticales para el home */
.products-grid.vertical {
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 100%;
  margin: 0 auto;
}

/* Fin de cards verticales */

.product-card {
  background: var(--blanco);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
}

.product-image {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
}

/* Imagen más grande para el home */
.products-grid.vertical .product-image {
  aspect-ratio: 4 / 3;
}

.product-info {
  padding: 10px 12px 12px;
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-view-icon {
  background: #f0ece4;
  color: #2d5a27;
  border: none;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  flex-shrink: 0;
}

.product-view-icon:hover {
  background: #2d5a27;
  color: #fff;
  transform: scale(1.1);
}

.product-content {
  flex: 1;
  margin-bottom: 8px;
}

.product-badge {
  background-color: #2d5a27;
  color: #fff;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  margin-bottom: 5px;
  display: inline-block;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.product-name {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.3;
  margin-bottom: 4px;
  color: var(--texto);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-description {
  font-size: 0.8rem;
  color: var(--texto-secundario);
  margin-bottom: 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--verde-oscuro);
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px;
}

.price-old {
  text-decoration: line-through;
  color: #999;
  font-size: 0.8rem;
  font-weight: 400;
}

.price-current {
  color: #e67e22;
}

.product-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.product-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.product-stock {
  background-color: #ede8de;
  color: #888;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
}

.stock-available {
  background-color: #e4f0e0;
  color: #2d5a27;
}

.add-to-cart {
  width: auto;
  padding: 6px 14px;
  background-color: var(--verde-oscuro);
  color: var(--blanco);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.8rem;
  white-space: nowrap;
}

.add-to-cart:hover {
  background-color: #1e3d1a;
}

.add-to-cart:disabled {
  background-color: var(--gris-claro);
  color: var(--texto-secundario);
  cursor: not-allowed;
}

/* Features section */
.features {
  background-color: var(--blanco);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.feature {
  text-align: center;
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.feature h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--verde-oscuro);
}

/* Footer */
.footer {
  background-color: #1e3d1a;
  color: rgba(255,255,255,0.85);
  padding: 3rem 0 1rem;
  border-top: 3px solid #f5c842;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  font-family: var(--font-display);
  margin-bottom: 1rem;
}

.footer-nav {
  list-style: none;
}

.footer-nav a {
  color: var(--blanco);
  text-decoration: none;
  transition: var(--transition);
}

.footer-nav a:hover {
  color: var(--verde-claro);
}

/* Redes sociales en el footer */
.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link svg {
  width: 20px;
  height: 20px;
  fill: rgba(255, 255, 255, 0.85);
  transition: fill 0.3s ease;
}

.social-link:hover {
  background-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px);
}

.social-link:hover svg {
  fill: #ffffff;
}

/* Colores específicos para cada red social al hacer hover */
.social-link:nth-child(1):hover {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.social-link:nth-child(2):hover {
  background-color: #1877f2;
}

.social-link:nth-child(3):hover {
  background-color: #25D366;
}

/* Información de contacto en el footer */
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
}

.contact-icon {
  width: 18px;
  height: 18px;
  fill: #f5c842;
  flex-shrink: 0;
}

.contact-item span {
  font-size: 0.95rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* Página Tienda */
.shop-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  gap: 2rem;
  margin-top: 2rem;
}

.filters-sidebar {
  background: var(--blanco);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 15px var(--sombra);
  height: fit-content;
}

.filters-sidebar-inner {
  padding: 2rem;
}

.filter-section {
  margin-bottom: 2rem;
}

.filter-section h3 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--verde-oscuro);
}

.search-input {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid var(--gris-claro);
  border-radius: var(--border-radius);
  font-family: var(--font-body);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--verde-claro);
}

.category-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.category-filter:hover {
  background-color: var(--gris-claro);
}

.price-inputs {
  display: flex;
  gap: 1rem;
}

.price-input {
  flex: 1;
  padding: 0.5rem;
  border: 2px solid var(--gris-claro);
  border-radius: var(--border-radius);
}

/* Price Range Slider */
.mobile-filter-toggle {
  display: none;
}

.price-range-container {
  width: 100%;
}

.price-values {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  font-weight: 600;
  color: var(--verde-oscuro);
}

.price-slider-container {
  position: relative;
  height: 40px;
}

.price-slider {
  position: absolute;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: var(--gris-claro);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--verde-claro);
  cursor: pointer;
  border: 2px solid var(--blanco);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.price-slider::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--verde-claro);
  cursor: pointer;
  border: 2px solid var(--blanco);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

#price-max-slider {
  background: transparent;
}

/* Characteristics filters */
.characteristics-filters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.characteristic-filter {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.characteristic-filter:hover {
  background-color: var(--gris-claro);
}

.characteristic-filter input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--verde-claro);
}

.clear-filters {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--gris-claro);
  color: var(--texto);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
}

.clear-filters:hover {
  background-color: #e0e0e0;
}

.products-section {
  min-height: 500px;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.products-count {
  font-weight: 600;
  color: var(--texto-secundario);
}

.sort-select {
  padding: 0.5rem 1rem;
  border: 2px solid var(--gris-claro);
  border-radius: var(--border-radius);
  background: var(--blanco);
  cursor: pointer;
}

.load-more {
  display: block;
  margin: 3rem auto;
  padding: 1rem 2rem;
  background-color: var(--verde-claro);
  color: var(--blanco);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.load-more:hover {
  background-color: #6ba03d;
}

/* Página Nosotros */
/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  height: 100vh;
  background: var(--blanco);
  box-shadow: -5px 0 15px var(--sombra);
  transition: var(--transition);
  z-index: 1000;
  overflow-y: auto;
}

.cart-drawer.open {
  right: 0;
}

.cart-header {
  padding: 2rem;
  border-bottom: 1px solid var(--gris-claro);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cart-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

.cart-items {
  padding: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--gris-claro);
}

.cart-item-image {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--border-radius);
}

.cart-item-info {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.cart-item-price {
  color: var(--verde-oscuro);
  font-weight: 600;
}

.cart-footer {
  padding: 2rem;
  border-top: 1px solid var(--gris-claro);
}

.cart-total {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.cart-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.empty-cart {
  width: 100%;
  padding: 0.8rem;
  background-color: var(--gris-claro);
  color: var(--texto);
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Animaciones */
@keyframes bounce {
  0%, 20%, 60%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  80% {
    transform: translateY(-5px);
  }
}

.cart-bounce {
  animation: bounce 0.6s;
}

/* Scroll Reveal Animation */
.product-card {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease-out, transform 0.4s ease-out, box-shadow 0.22s ease;
}

.product-card.reveal {
  opacity: 1;
  transform: translateY(0);
}

.product-card.reveal:hover {
  transform: translateY(-5px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.12);
}

/* Scroll Reveal Animation para botones */
.btn-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  visibility: hidden;
}

.btn-reveal.reveal {
  opacity: 1;
  transform: translateY(0);
  visibility: visible;
}

/* Loader de productos */
.products-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  min-height: 300px;
}

.products-loader.hidden {
  display: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--gris-claro);
  border-top: 4px solid var(--verde-claro);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loader-text {
  color: var(--texto-secundario);
  font-size: 1rem;
  font-weight: 500;
}

/* Modal de producto */
.product-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.product-modal.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  background: var(--blanco);
  border-radius: var(--border-radius);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  animation: modalSlideIn 0.3s ease;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-image-container {
  position: relative;
  min-height: 400px;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.7);
  color: var(--blanco);
  border: none;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
  z-index: 10;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.9);
}

.modal-body {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.modal-info {
  flex: 1;
}

.modal-badge {
  background-color: var(--verde-claro);
  color: var(--blanco);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: inline-block;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--verde-oscuro);
  line-height: 1.3;
}

.modal-price {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--tierra);
  margin-bottom: 1.5rem;
}

.modal-description {
  line-height: 1.6;
  margin-bottom: 1.5rem;
  color: var(--texto-secundario);
}

.modal-producer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  color: var(--texto);
  font-weight: 500;
}

.modal-stock {
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.modal-stock.available {
  background-color: #e8f5e8;
  color: var(--verde-oscuro);
}

.modal-stock.unavailable {
  background-color: var(--gris-claro);
  color: var(--texto-secundario);
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: auto;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 2px solid var(--gris-claro);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.quantity-btn {
  background: var(--verde-oscuro);
  color: var(--blanco);
  border: none;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: 600;
  transition: var(--transition);
}

.quantity-btn:hover:not(:disabled) {
  background: #1e3d1a;
}

.quantity-btn:disabled {
  background: var(--gris-claro);
  color: var(--texto-secundario);
  cursor: not-allowed;
}

.quantity-display {
  width: 60px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blanco);
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--texto);
}

.modal-add-to-cart {
  flex: 1;
  padding: 1rem 1.5rem;
  background-color: var(--verde-oscuro);
  color: var(--blanco);
  border: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
}

.modal-add-to-cart:hover:not(:disabled) {
  background-color: #1e3d1a;
}

.modal-add-to-cart:disabled {
  background-color: var(--gris-claro);
  color: var(--texto-secundario);
  cursor: not-allowed;
}

/* Responsive del modal — sheet desde abajo en mobile */
@media (max-width: 768px) {
  .product-modal {
    align-items: center;
    justify-content: center;
    padding: 1rem;
  }

  .modal-content {
    grid-template-columns: 1fr;
    width: calc(100% - 1.5rem);
    max-width: 100%;
    max-height: 92dvh;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modalSlideUp 0.22s cubic-bezier(0.22,1,0.36,1);
  }

  @keyframes modalSlideUp {
    from { transform: translateY(60px); opacity: 0; }
    to   { transform: translateY(0);   opacity: 1; }
  }

  .modal-image-container {
    min-height: 0;
    height: 55vw;
    max-height: 240px;
    flex-shrink: 0;
  }

  .modal-body {
    padding: 1rem 1.25rem 1.25rem;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }

  .modal-badge {
    margin-bottom: 0.4rem;
    font-size: 0.72rem;
    padding: 0.2rem 0.6rem;
  }

  .modal-title {
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    line-height: 1.2;
  }

  .modal-price {
    font-size: 1.15rem;
    margin-bottom: 0.5rem;
  }

  .modal-description {
    font-size: 0.82rem;
    margin-bottom: 0.4rem;
    line-height: 1.4;
  }

  .modal-producer {
    margin-bottom: 0.4rem;
    font-size: 0.82rem;
  }

  .modal-stock {
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
  }

  .quantity-selector {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    padding-top: 0.5rem;
  }

  .modal-add-to-cart {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .products-grid.vertical {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    height: 60vw;
    min-height: 280px;
    max-height: 400px;
  }

  .hero-overlay {
    background: rgba(0, 0, 0, 0.45);
  }

  .hero h1 {
    font-size: clamp(1.8rem, 6vw, 2.5rem);
  }

  .hero p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .btn-hero {
    background: #4caf50;
    border: 2px solid #4caf50;
    color: #ffffff;
    border-radius: 4px;
    padding: 12px 28px;
  }

  .logo img {
    max-height: 55px;
    margin-left: -20px;
  }

  .header-content {
    height: 75px;
  }

  .header-local-info {
    display: none;
  }

  .hero-content .container {
    padding-left: 5%;
    padding-right: 5%;
  }
  
.nav {
  flex-direction: column;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  background: #ffffff;
  padding: 0;
  border-top: 1px solid #ffffff;
  gap: 1rem;
  align-items: center;
  box-shadow: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  display: flex;
}
  
  .mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    color: var(--verde-oscuro);
    font-size: 1.8rem;
    cursor: pointer;
    order: 2;
  }

  .header-actions {
    order: 1;
    gap: 1rem;
  }
  
  .shop-layout {
    grid-template-columns: 1fr;
    position: relative;
    gap: 0;
  }

  .mobile-filter-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.85rem 1.2rem;
    background-color: var(--verde-oscuro);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: var(--font-body);
    letter-spacing: 0.02em;
    grid-column: 1;
  }

  .mobile-filter-toggle .filter-arrow {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    display: inline-block;
  }

  .mobile-filter-toggle.active .filter-arrow {
    transform: rotate(180deg);
  }

  .filters-sidebar {
    grid-column: 1;
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    height: auto;
    z-index: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin-bottom: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.38s ease, margin-bottom 0.38s ease;
    border-radius: var(--border-radius);
    padding: 0;
  }

  .filters-sidebar.active {
    max-height: 2000px;
    margin-bottom: 1rem;
  }

  .products-section {
    grid-column: 1;
  }
  
  .products-header {
    flex-direction: column;
    align-items: stretch;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
  }

  .products-count {
    font-size: 0.9rem;
  }

  .sort-select {
    width: 100%;
  }
  
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }
  
  .products-grid.vertical {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  /* Compact product cards for mobile */
  .product-image {
    aspect-ratio: 1 / 1;
  }

  .product-info {
    padding: 8px;
  }

  .product-badge {
    font-size: 0.65rem;
    padding: 1px 6px;
  }

  .product-name {
    font-size: 0.8rem;
    margin-bottom: 2px;
  }

  .product-description {
    display: none; /* Hide description on mobile grid for space */
  }

  .product-price {
    font-size: 0.85rem;
    margin-bottom: 6px;
    gap: 4px;
  }

  .price-old {
    font-size: 0.7rem;
  }
  
  .product-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .product-stock {
    font-size: 0.65rem;
    padding: 1px 6px;
    text-align: center;
  }
  
  .product-buttons {
    justify-content: space-between;
    gap: 4px;
  }

  .product-view-icon {
    width: 24px;
    height: 24px;
    font-size: 0.8rem;
  }
  
  .add-to-cart {
    flex: 1;
    padding: 4px 8px;
    font-size: 0.75rem;
  }
  
  .cart-drawer {
    width: 100vw;
    right: -100vw;
  }
  
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .features-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================= */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  z-index: 999;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  transform: scale(1.08) translateY(-3px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
  background-color: #128c43;
}

.whatsapp-float svg {
  width: 35px;
  height: 35px;
  fill: white;
}

/* Animación de pulso opcional */
@keyframes pulse {
  0% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7);
  }
  100% {
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  }
}

.whatsapp-float {
  animation: pulse 2s infinite;
}

.whatsapp-float:hover {
  animation: none;
}

/* Responsive para móviles */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 55px;
    height: 55px;
    bottom: 20px;
    right: 20px;
  }
  
  .whatsapp-float svg {
    width: 30px;
    height: 30px;
  }
}
