/* Estilos generales */

.macs-rgb {
  font-weight: bold;
  font-size: 1.1rem;
  background: linear-gradient(90deg, #ffd700, #ff8c00, #e83cff, #40ffc3, #ffd700);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: rainbow-text-animation 4s ease infinite;
  letter-spacing: 1px;
  text-transform: uppercase;
}

@keyframes rainbow-text-animation {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}
*,
*::before,
*::after {
  box-sizing: border-box;
  text-align: center;
}

body {
  font-family: 'Poppins', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #333;
  padding-top: 90px; /* Espacio para el header fijo */
  overflow-x: hidden; /* Evita el desbordamiento horizontal en toda la página */
}

.container {
  max-width: 1200px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

header {
  background-color: #000; /* Fondo negro */
  color: #fff; /* Texto blanco */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5em 2em;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000; /* Aumentado para estar sobre todo */
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: transform 0.4s ease;
}

header.header-hidden {
  transform: translateY(-100%);
}



.header-right {
  display: flex;
  align-items: center;
  gap: 2em; /* Espacio entre el menú y el carrito */
}

.logo a {
  color: #fff; /* Logo en blanco */
  text-decoration: none;
  font-size: 1.3em;
  font-weight: bold;
}

.cart {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
  z-index: 101;
}

/* Estilos para el ícono del carrito y el contador */
.cesta-icon-container {
    position: relative;
    display: inline-block;
}

.cesta-icon-container a i {
    color: #fff; /* Icono del carrito en blanco */
    font-size: 1.2rem;
}

.cart-counter {
    position: static; /* Remove absolute positioning */
    transform: none;
    margin-left: 8px; /* Add space between icon and counter */
    background-color: red;
    color: white;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 12px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    padding: 0 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    box-sizing: border-box;
}

.cart-counter.hidden {
    display: none;
}

/* Estilos para la navegación de escritorio */
nav .menu {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav .menu > li {
  position: relative;
  margin: 0 1em;
}

nav .menu > li > a {
  font-size: 0.85em;
  position: relative; /* Necesario para la línea animada */
  color: #fff; /* Texto del menú en blanco */
  text-decoration: none;
  font-weight: 600;
  padding: 0.5em 0;
  display: inline-block;
  transition: color 0.3s;
}

nav .menu > li > a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: #fff; /* Línea animada en blanco */
  transition: width 0.4s ease;
}

nav .menu > li:hover > a {
  color: yellow;
  cursor: pointer;
}

nav .menu > li:hover > a::after {
  width: 100%;
}

/* --- Submenu Styles --- */

/* Common submenu container styles */
nav .menu .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #1c1c1c;
  list-style: none;
  padding: 0.5em 0;
  margin: 0;
  min-width: 180px;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  z-index: 100;
}

nav .menu .submenu .submenu {
  left: 100%;
  top: 0;
}

/* First-level submenu positioning */
nav .menu > li > .submenu {
  top: 100%;
  right: 0; /* Align to the right */
}

/* Set position context for submenu items that are parents */
nav .menu .submenu > li {
  position: relative;
}

/* Second-level (and deeper) submenu positioning */
nav .menu .submenu > li > .submenu {
  top: -0.5em; /* Adjust for parent padding */
  left: 100%;
}

/* Show submenu on hover */
nav .menu > li:hover > .submenu, 
nav .menu .submenu > li:hover > .submenu {
  display: block;
}

/* Submenu link styles */
nav .submenu li a {
  color: #f0f0f0;
  text-decoration: none;
  font-weight: 500;
  display: block;
  padding: 1em 1.5em; /* Increased padding */
  transition: background-color 0.2s ease;
  white-space: nowrap;
  position: relative; /* Needed for the line */
}

nav .submenu li a span {
  position: relative;
  display: inline-block;
}

/* Animated line for submenu items */
nav .submenu li a span::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: white;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

nav .submenu li:hover > a > span::after {
  transform: scaleX(1);
}

nav .submenu li:hover > a {
  background-color: #333;
}

/* Secciones */
section {
  padding: 2em 1em;
  background-color: white;
  margin: 1em 2em;
  border-radius: 10px;
}

section#productos h2 {
  text-align: center;
  margin-bottom: 2em;
}

/* Slider Nuevo - Completamente Funcional */
.slider-container {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  border-radius: 10px;
  background-color: #000;
}

.slider-track {
  display: flex;

  height: 100%;
  transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.slide {
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  transition: opacity 0.8s ease;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 20px;
  box-sizing: border-box;
  user-select: none;
}

.slider-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

#inicio {
  padding: 0;
  overflow-x: hidden; /* Evita el desbordamiento horizontal del slider */
}

.slider-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

/* Title for the new main slider */
/* Mantener efecto arcoíris para otros títulos si se usa (main-slider-title) */

/* --- Ajustes globales para no interferir con producto-detalle --- */
/* Estos estilos se definen en producto-detalle.css y no deben ser sobreescritos aquí */
/* .macs-rgb, .stock-badge, .price-box, .main-price-row, .precio-principal, .precio-tachado, .tiered-prices-container, .tiered-price-item, .tiered-price, .tiered-condition, .discount-message {} */


/* Estilos para el contenido del slider principal */
#inicio .slider-container {
  position: relative; /* Crucial for positioning children */
  width: 100%;
  max-width: 900px;
  margin: 20px auto;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  padding: 10px; /* Creates the golden frame */
  background: linear-gradient(to right, #ffaa00, #ffea00, #ffb30e, #d3c100, #ffab19);
  background-size: 200% auto;
  animation: golden-shine 4s linear infinite;
  box-sizing: border-box;
  aspect-ratio: 2 / 1; /* Sets a fixed proportion */
}

#inicio .slider-track {
  display: flex; /* THIS IS THE CRITICAL FIX */
  height: 100%;
  background-color: #fff;
  border-radius: 6px;
  overflow: hidden;
  transition: transform 0.5s ease-in-out;
}

.slider-caption {
  position: absolute;
  bottom: 15px;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex; /* These two lines center the pagination bubble */
  justify-content: center;
}

#inicio .slide {
  min-width: 100%;
  height: 100%;
  box-sizing: border-box;
}

#inicio .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Clave para que la imagen cubra el contenedor */
  display: block;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.dot.active {
  background-color: #fff;
}

@keyframes golden-shine {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.slider-text {
  padding: 20px 0 10px 0;
  text-align: center;
  font-size: 1em;
  font-weight: 700;
  text-transform: uppercase;
  background: linear-gradient(
    to right,
    #ffaa00, 
    #ffea00, 
    #B38728, 
    #d3c100, 
    #AA771C
  );
  background-size: 200% auto;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  animation: golden-shine 4s linear infinite;
}

/* Productos grid y tarjetas */
.productos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.5em;
}

/* --- Estilos para el Menú Hamburguesa --- */

.menu-toggle {
    display: none; /* Oculto en desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 2rem;
    height: 2rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1010;
}

.menu-toggle .hamburger {
    width: 2rem;
    height: 0.25rem;
    background: #fff;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* --- Media Query para vista móvil --- */
@media (max-width: 768px) {
    .main-header {
        padding: 0.5em 1em; /* Menos padding en móvil */
    }

    .menu-toggle {
        display: flex; /* Visible en móvil */
        order: 2; /* Cambia el orden para que esté después del logo */
    }

    .header-right {
        order: 3; /* Carrito al final */
    }

    .logo {
        order: 1;
    }

    nav .menu {
        display: none; /* Oculta el menú de navegación por defecto */
        flex-direction: column;
        align-items: center;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        padding: 1em 0;
        border-top: 1px solid #eee;
    }

    nav .menu.active {
        display: flex; /* Muestra el menú cuando está activo */
    }

    nav .menu li {
        margin: 1em 0;
        text-align: center;
        width: 100%;
    }

    nav .menu li a {
        color: #333; /* Texto oscuro sobre fondo blanco */
        font-size: 1.2em;
    }

    nav ul.menu > li > a::after {
        background-color: #333; /* Línea animada oscura */
    }

    /* Ocultar submenús en la navegación principal móvil */
    nav ul.menu ul.submenu {
        display: none !important;
    }

    .floating-btn {
        display: none;
    }
}

.producto {
  background-color: #fff;
  border-radius: 10px;
  padding: 1em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
}
.producto {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  margin-left: 0; /* Evita el espacio que cierra el menú */
}

.producto:hover {
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  transform: translateY(5px);
}

.producto .overlay-text {
  position: absolute;
  top: 60%; /* Empieza un poco más abajo */
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  background-color: rgba(17, 17, 17, 0.8);
  color: white;
  padding: 0.5em 1.2em;
  border-radius: 5px;
  font-weight: bold;
  opacity: 0;
  transition: 
    opacity 0.3s ease,
    transform 0.3s ease,
    top 0.3s ease;
  pointer-events: none;
  z-index: 2;
}

/* Mostrar y agrandar el texto al hover en .producto */
.producto:hover .overlay-text {
  opacity: 1;
  top: 50%; /* Sube al centro */
  transform: translate(-50%, -50%) scale(1.1); /* Se agranda un poco */
  pointer-events: auto; /* Para que detecte hover en el texto */
}

/* Efecto rebote cuando el cursor pasa por .overlay-text */
.producto .overlay-text:hover {
  animation: bounce 0.6s;
}

/* Animación bounce */
@keyframes bounce {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1.1);
  }
  50% {
    transform: translate(-50%, -60%) scale(1.2);
  }
}

.producto:hover .marca,
.producto:hover h3,
.producto:hover .precio,
.producto:hover button {
  opacity: 0.1;
  transition: opacity 0.3s ease;
}



.producto img {
  width: 100%;
  height: 140px;
  object-fit: contain;
  user-select: none;
}

.marca {
  font-weight: 700;
  color: #555;
  font-size: 0.8em;
  margin: 0.5em 0 0.2em 0;
}

@keyframes rainbow-text-animation {
  0% { background-position: 200% center; }
  100% { background-position: -200% center; }
}

.marca-macs {
  font-size: 0.9em;
  text-transform: uppercase;
  font-weight: 900; /* Hacemos la fuente más gruesa */
  /* El degradado de arcoíris */
  background: linear-gradient(
    90deg, #ff0000, #ff7f00, #ffff00, #00ff00, #0000ff, #4b0082, #9400d3);
  background-size: 200% auto; /* Hacemos que los colores se muevan más rápido */
  color: transparent !important; /* ¡CRÍTICO! Asegura que el degradado se vea */
  -webkit-background-clip: text;
  background-clip: text;
  animation: rainbow-text-animation 3s linear infinite; /* Animación más rápida */
}

.producto h3 {
  font-size: 1em;
  margin: 0.3em 0;
  color: #222;
}

.precio {
  color: #b12704;
  font-weight: 600;
  margin-bottom: 0.8em;
}

button {
  background-color: #111;
  color: white;
  border: none;
  padding: 0.6em 1em;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s, color 0.3s;
  user-select: none;
}

button:hover {
  background-color: yellow;
  color: black;
}

/* Formularios */
form#formulario {
  display: flex;
  flex-direction: column;
  max-width: 400px;
  margin: auto;
}

form#formulario input,
form#formulario textarea {
  margin-bottom: 1em;
  padding: 0.8em;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  resize: vertical;
}

form#formulario button {
  width: 100%;
}

#contacto h2 {
  text-align: center;
  font-size: 2.5rem; /* Aumenta el tamaño del título */
  margin-bottom: 1.5rem; /* Añade espacio debajo del título */
}

#contacto .location-content p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

#contacto .map-container {
  position: relative;
  padding-bottom: 56.25%; /* Proporción 16:9 */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#contacto .map-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Footer */
footer {
  text-align: center;
  padding: 1.5em 0;
  background-color: #111;
  color: white;
  margin-top: 2em;
  font-size: 0.8em;
}

/* Responsivo */
@media (max-width: 768px) {
  nav ul.menu {
    flex-direction: column;
    background-color: #111;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    display: none;
  }

  nav ul.menu.show {
    display: block;
  }

  nav ul.menu > li {
    margin: 1em 0;
  }
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.3);
  border: none;
  color: white;
  font-size: 2em;
  padding: 0.2em 0.5em;
  cursor: pointer;
  border-radius: 50%;
  transition: background-color 0.3s;
  z-index: 10;
}

.slider-btn:hover {
  background-color: rgba(255, 255, 255, 0.7);
  color: black;
}

.slider-btn.prev {
  left: 10px;
}

.slider-btn.next {
  right: 10px;
}

/* --- Estilos para la animación de aparición */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Floating Navigation Button & Modal --- */

/* === Floating Buttons Base Style === */
.floating-btn {
  position: fixed;
  bottom: 25px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  /* Default state: hidden */
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.floating-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

/* Visibility state for ANY floating button */
.floating-btn.btn-visible-por-scroll,
.floating-btn.menu-abierto /* menu-abierto specifically for nav */
{
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

/* === Specific Button Styles === */

/* Navigation Button */
#floatingNavButton {
  left: 25px;
  background-color: var(--color-primario);
  z-index: 1050;
}



/* Hide original widget close button */
#widgetCloseBtn {
  display: none;
}

/* --- CSS Icon --- */
.icon-bars {
  position: relative;
  width: 24px;
  height: 2px;
  background-color: #333;
  transition: all 0.2s ease-in-out;
}

.icon-bars::before,
.icon-bars::after {
  content: '';
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: #333;
  transition: all 0.2s ease-in-out;
}

.icon-bars::before {
  top: -8px;
}

.icon-bars::after {
  top: 8px;
}

/* Active state (X) */
#floatingNavButton.menu-abierto .icon-bars {
  background-color: transparent; /* Middle bar disappears */
}

#floatingNavButton.menu-abierto .icon-bars::before {
  top: 0;
  transform: rotate(45deg);
  background-color: red;
}

#floatingNavButton.menu-abierto .icon-bars::after {
  top: 0;
  transform: rotate(-45deg);
  background-color: red;
}

#navModal {
  position: fixed;
  bottom: 90px; /* Position above the FAB */
  left: 25px;
  width: 220px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.2);
  z-index: 1049;
  padding: 15px;
  
  /* Initial state for animation */
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom left;
  visibility: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
}

#navModal.show {
  opacity: 1;
  transform: translateY(0) scale(1);
  visibility: visible;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}

#navModal .modal-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

#navModal .modal-links li:not(:last-child) {
  margin-bottom: 1em;
}

#navModal .modal-links a {
  color: #2c2c2c;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  display: block;
  padding: 0.5em 0;
  position: relative;
  transition: color 0.3s ease;
}

#navModal .modal-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
  width: 0%;
  height: 1px;
  background-color: red;
  transition: width 0.3s ease-in-out;
}

#navModal .modal-links a:hover {
  color: red;
}

#navModal .modal-links a:hover::after {
  width: 80%;
}

@keyframes whatsapp-glow {
  0%, 100% {
    box-shadow: 0 0 12px rgba(37, 211, 102, 0.6);
  }
  50% {
    box-shadow: 0 0 24px rgba(37, 211, 102, 0.9);
  }
}

.modal-close-btn {
  align-self: flex-end;
  font-size: 2.5em;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  margin: -0.2em 0 0 0;
}

.modal-close-btn:hover {
  color: white;
}

.modal-links {
  list-style: none;
  padding: 2em 0 0 0;
  margin: 0;
}

.modal-links li {
  margin-bottom: 1.5em;
}

.modal-links a {
  color: white;
  text-decoration: none;
  font-size: 1.2em;
  transition: color 0.2s;
}

.modal-links a:hover {
color: #f0c040;
}

/* --- Floating Nav Button --- */
#floatingNavButton {
    position: fixed;
    bottom: 25px; /* Alineado con el botón de WhatsApp */
    left: 20px;
    width: 60px;
    height: 60px;
    background-color: #fff;
    border-radius: 50%;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001; /* Encima del widget de WhatsApp */
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#floatingNavButton.btn-visible-por-scroll {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

#floatingNavButton.btn-visible-por-scroll:hover {
    transform: scale(1.1);
}

/* --- WhatsApp Widget --- */

/* Ajuste para el botón de WhatsApp en móviles */
@media (max-width: 480px) {
    .floating-whatsapp-btn {
        right: 10px; /* Aún menos espacio */
        bottom: 10px;
        width: 50px; /* Aún más pequeño */
        height: 50px;
        font-size: 28px; /* Reducir el icono también */
    }
}

.whatsapp-container {
position: fixed;
bottom: 25px;
right: 25px;
z-index: 1000;
}

.floating-whatsapp-btn {
width: 60px;
height: 60px;
border-radius: 50%;
border: none;
box-shadow: 0 4px 12px rgba(0,0,0,0.3);
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
background-color: #25D366; /* Verde original */
color: white; /* Icono blanco */
font-size: 32px;
transition: background-color 0.3s ease, transform 0.3s ease;
position: relative;
overflow: hidden; /* To contain the icons */
}

.floating-whatsapp-btn:hover {
    transform: scale(1.1);
    background-color: #128C7E; /* Verde oscuro para hover */
    color: white; /* Asegurar que el icono siga blanco */
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.whatsapp-container.open .floating-whatsapp-btn {
    background-color: #e63946; /* Rojo original */
}

.whatsapp-container.open .floating-whatsapp-btn:hover {
    background-color: #c82333; /* Rojo oscuro para hover */
}

.floating-whatsapp-btn .whatsapp-icon,
.floating-whatsapp-btn .close-icon {
    position: absolute;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.floating-whatsapp-btn .whatsapp-icon {
    transform: scale(1);
    opacity: 1;
}

.floating-whatsapp-btn .close-icon {
    transform: scale(0);
    opacity: 0;
    font-size: 28px;
}

.whatsapp-container.open .floating-whatsapp-btn .whatsapp-icon {
    transform: scale(0);
    opacity: 0;
}

.whatsapp-container.open .floating-whatsapp-btn .close-icon {
    transform: scale(1);
    opacity: 1;
}

.whatsapp-widget {
    position: absolute;
    bottom: 75px; /* Above the button */
    right: 0;
    width: 340px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    
    /* Animation */
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transform-origin: bottom right;
    visibility: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
}

.whatsapp-container.open .whatsapp-widget {
    opacity: 1;
    transform: translateY(0) scale(1);
    visibility: visible;
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s;
}

.widget-header {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: #075E54; /* Dark green header */
    color: white;
}

.widget-header .widget-logo {
    width: 45px;
    height: 45px;
    border-radius: 0; /* Sin borde redondeado */
    object-fit: contain; /* Mostrar imagen completa sin recortar */
    margin-right: 12px;
    border: none; /* Sin borde blanco */
}

.widget-header .widget-info .widget-title {
    font-weight: bold;
    font-size: 1.1em;
}

.widget-body {
    background-image: url("https://i.pinimg.com/736x/8c/98/99/8c98994518b575bfd8c949e91d20548b.jpg"); /* WhatsApp background pattern */
    background-color: #E5DDD5;
    padding: 20px 16px;
    flex-grow: 1;
    min-height: 200px;
}

.message-bubble {
    background-color: #fff;
    border-radius: 8px;
    padding: 8px 12px;
    max-width: 80%;
    margin-bottom: 10px;
    box-shadow: 0 1px 1px rgba(0,0,0,0.05);
    align-self: flex-start;
}

.message-bubble p {
    margin: 0;
    color: #333;
    line-height: 1.4;
}

.widget-footer {
    padding: 16px;
    background-color: #f0f0f0;
    text-align: center;
}

.start-chat-btn {
    background-color: #25D366;
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.start-chat-btn:hover {
    background-color: #128C7E;
}

/* Responsive adjustments */
@media (max-width: 400px) {
    .whatsapp-widget {
        width: calc(100vw - 40px);
        right: -10px; /* Adjust position */
    }
    .whatsapp-container {
        right: 15px;
        bottom: 15px;
    }
}


/* Estilos para el contenedor del botón 'Ver más' */
.ver-mas-container {
    text-align: center; /* Centra el botón */
    padding: 20px 0; /* Añade espacio vertical */
}

/* SOLUCIÓN GLOBAL ANTI-OVERFLOW PARA MÓVIL */
@media (max-width: 992px) {
  html,
  body {
    width: 100%;
    overflow-x: hidden !important;
  }
}

/* Estilos para el botón 'Ver más' */
.btn-ver-mas {
    display: inline-block;
    background-color: #333; /* Color de fondo oscuro */
    color: #fff; /* Texto blanco */
    padding: 12px 25px; /* Relleno interno */
    border-radius: 5px; /* Bordes redondeados */
    text-decoration: none; /* Sin subrayado */
    font-weight: bold;
    transition: background-color 0.3s ease;
    border: 1px solid #333;
}

.btn-ver-mas:hover {
    background-color: #555; /* Color al pasar el ratón */
}

/* Ajustes para dispositivos móviles */
@media (max-width: 768px) {
    .btn-ver-mas {
        padding: 10px 20px; /* Relleno más pequeño en móviles */
        font-size: 0.9rem; /* Tamaño de fuente ligeramente más pequeño */
        width: auto; /* Ancho automático para que no ocupe toda la pantalla */
        max-width: 80%; /* Ancho máximo para evitar que sea demasiado grande */
    }
}

/* --- Footer --- */
.footer-container {
    color: #333; /* Dark text for white background */
    background-color: #f8f9fa; /* Set grey background for the whole footer */
}

.footer-main {
    background-color: #ffffff; /* White background for the top section */
}

.footer-content-wrapper {
    display: flex;
  
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px; /* Padding for the content */
    flex-wrap: wrap;
}

.footer-logo {
    flex: 1;
    min-width: 150px;
}

.footer-logo img {
    max-width: 120px; /* Adjust logo size */
}

.contact-info {
    flex: 2;
    text-align: center;
    min-width: 300px;
    padding: 0 20px;
}

.footer-container .contact-info h3 {
  font-size: 2.2em; /* Tamaño de fuente notablemente más grande */
  font-weight: 700;
  margin-bottom: 20px;
  border-bottom: 3px solid #e0a800; /* Línea inferior más gruesa */
  padding-bottom: 10px;
  display: inline-block;
  color: #333;
}

.contact-info p {
    margin: 5px 0;
    font-size: 0.9em;
}

.detalle-info {
  flex: 1;
  padding-left: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.social-media {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    min-width: 150px;
}

.footer .social-media a {
    margin: 0 10px;
    color: #fff;
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer .social-media a i {
    font-size: 1.8rem; /* Tamaño más grande */
    color: #007bff; /* Color azul */
    transition: color 0.3s ease, transform 0.3s ease;
}

.footer .social-media a:hover i {
    transform: scale(1.2);
    color: #0056b3; /* Azul más oscuro al pasar el ratón */
}

.copyright {
    padding: 20px 0;
    /* Background is now inherited from .footer-container */
}

.copyright-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.copyright p {
    margin: 0;
    font-size: 0.9em;
    color: #6c757d; /* Dark grey text */
}

.footer-content-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* Estilos para los íconos de redes sociales en el pie de página */
.footer-container .social-media a {
  margin: 0 15px; /* Espacio reducido entre íconos */
}

.footer-container .social-media a i {
  font-size: 2rem !important;
  color: #00d9ff !important;
  transition: color 0.3s ease, transform 0.3s ease;
}

.footer-container .social-media a:hover i {
  color: #e100ff !important;
  transform: scale(1.2); /* Zoom reducido */
}

/* Estilos para el ícono del carrito de compras */
.cart a .fa-shopping-cart {
  color: #fff; /* O el color que prefieras */
  font-size: 1.1rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.cart a:hover .fa-shopping-cart {
  color: red;
  transform: scale(1.2);
}

/* Contenedor del carrito para posicionamiento */
.cart a {
  display: flex;
  align-items: center;
  text-decoration: none;
}



/* =============================================================================
   Responsive Header & Navigation
   ========================================================================== */

/* Hide hamburger on desktop by default */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .main-header {
        padding: 0.5em 1em;
        justify-content: space-between;
    }

    /* Hide the main nav menu and prepare it for vertical layout */
    nav ul.menu {
        display: none; /* Hide by default */
        position: absolute;
        top: 65px; /* Position below header */
        right: 0; /* Anchor to the right */
        left: auto; /* Override previous left: 0 */
        width: 280px; /* Set a fixed width */
        background-color: #ffffff;
        box-shadow: -5px 5px 10px rgba(0, 0, 0, 0.1); /* Shadow on the left */
        flex-direction: column;
        padding: 0;
        margin: 0;
        list-style: none; /* Remove bullet points */
        z-index: 899;
        border-radius: 0 0 0 8px; /* Rounded corner on the bottom-left */
    }

    nav ul.menu.show {
        display: flex; /* Show when toggled */
    }

    nav ul.menu li {
        width: 100%;
        /* Text alignment moved to the link element for better control */
    }

    nav ul.menu li a {
        display: block;
        padding: 1.2em 2em;
        border-bottom: 1px solid #f0f0f0;
        transition: background-color 0.2s ease, color 0.2s ease;
        text-align: left; /* Corrected alignment */
    }
    
    nav ul.menu li a:hover {
        background-color: #f8f8f8;
        color: #000;
    }

    nav ul.menu li:last-child a {
        border-bottom: none;
    }

    /* Hide desktop-style submenus on mobile for simplicity */
    nav ul.menu ul.submenu {
        display: none !important;
    }

    /* --- Hamburger Menu Button --- */
    .menu-toggle {
        display: none; /* Oculto en móvil */
    }

    .hamburger {
        width: 100%;
        height: 3px;
        background-color: #333;
        border-radius: 5px;
        transition: all 0.3s ease-in-out;
        position: relative;
    }

    .hamburger::before,
    .hamburger::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 3px;
        background-color: #333;
        border-radius: 5px;
        transition: all 0.3s ease-in-out;
    }

    .hamburger::before {
        transform: translateY(-8px);
    }

    .hamburger::after {
        transform: translateY(8px);
    }

    /* --- Active (X) state for Hamburger --- */
    .menu-toggle.active .hamburger {
        background-color: transparent; /* Middle line fades out */
    }

    .menu-toggle.active .hamburger::before {
        transform: rotate(45deg);
    }

    .menu-toggle.active .hamburger::after {
        transform: rotate(-45deg);
    }

    /* --- Element Order --- */
    .cart {
        order: 3; /* Cart is the last item on the right */
    }

    nav {
        order: 1; /* Nav (which is hidden) comes before toggle */
    }
}

/* Desktop Styles */
@media (min-width: 769px) {
    .menu-toggle {
        display: none;
    }
}

/* --- Footer Responsive Styles --- */
@media (max-width: 768px) {
    .footer-content-wrapper {
        flex-direction: column; /* Stack elements vertically */
        text-align: center; /* Center-align text */
        gap: 30px; /* Add space between stacked elements */
    }

    .contact-info,
    .social-media {
        margin-top: 20px; /* Add margin to separate from logo */
    }

    .social-media a {
        margin: 0 10px; /* Adjust spacing for social icons */
    }
}

/* Estilos para la superposición de 'Ver detalle' en el slider de recomendados */
.product-card .product-card__image-container {
    position: relative;
}

.product-card__image-container .product-card__overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 55px;
    height: 55px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
    z-index: 2;
    pointer-events: none;
}

.product-card .product-card__image-container:hover .product-card__overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.product-card__overlay i {
    color: #fff;
    font-size: 22px;
}

/* Estilos para el indicador de stock en el slider de recomendados */
.stock-info-slider {
    text-align: center;
    margin-top: -5px;
    margin-bottom: 10px;
}

.stock-indicator-slider {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: #ffffff;
    background-color: #28a745;
}