
/* ----- VARIABLES ESPECÍFICAS ----- */
:root {
  --background: #f9f9f9;
  --surface-container-low: #f3f3f4;
  --black-alpha: rgba(0,0,0,0.2);
}

/* estilos helper para replicar espaciado y componentes */
.section-padding {
  padding-top: 80px;
  padding-bottom: 80px;
}

@media (max-width: 768px) {
  .section-padding {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

/* Botones personalizados */
.btn-primary-custom {
  background-color: var(--primary-container);
  color: white;
  border: none;
  padding: 0.75rem 2rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.btn-primary-custom:hover {
  background-color: var(--primary);
  color: white;
}

.btn-outline-custom {
  border: 1px solid var(--secondary);
  background: transparent;
  color: var(--secondary);
  padding: 0.75rem 2rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.btn-outline-custom:hover {
  background-color: var(--secondary);
  color: white;
}

.btn-whatsapp {
  background-color: #25D366;
  color: white;
  border: none;
  padding: 0.75rem 1.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.75rem;
  transition: opacity 0.2s;
}

.btn-whatsapp:hover {
  opacity: 0.9;
  color: white;
}

/* Categorías: círculos con imagen */
.category-circle {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #e8e6e1;
  padding: 0.5rem;
  background: white;
  box-shadow: 0 10px 25px -12px rgba(0, 0, 0, 0.05);
  transition: transform 0.4s ease;
}

.category-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.category-card:hover .category-circle img {
  transform: scale(1.08);
}

/* Product card con hover slide */
.product-card {
  position: relative;
  margin-bottom: 1.5rem;
}

.product-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background-color: white;
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .product-image-wrapper img {
  transform: scale(1.04);
}

.add-to-cart-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: var(--primary-container);
  color: white;
  text-align: center;
  padding: 0.75rem 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  border: none;
  cursor: pointer;
  z-index: 3;
}

.product-card:hover .add-to-cart-btn {
  transform: translateY(0);
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: white;
  background-color: var(--secondary);
  z-index: 2;
}

.product-badge.offer {
  background-color: var(--error);
}

/* filtros active states */
.filter-category-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--on-surface-variant);
  font-size: 0.9rem;
  cursor: pointer;
  transition: color 0.2s;
}

.filter-category-item:hover {
  color: var(--primary);
}

.material-chip {
  background-color: var(--secondary-container);
  color: #464924;
  font-size: 0.7rem;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
}

.material-chip-outline {
  background-color: #e7e5e2;
  color: #4e4a44;
}

/* Range slider personalizado */
input[type="range"] {
  width: 100%;
  accent-color: var(--primary-container);
}

/* Meet Lula border decor */
.lula-border-decor {
  position: relative;
}

.lula-border-decor::before {
  content: '';
  position: absolute;
  top: -12px;
  left: -12px;
  width: 100%;
  height: 100%;
  border: 1px solid rgba(192, 161, 107, 0.3);
  z-index: 0;
}

/* footer map placeholder */
.map-placeholder {
  background-color: #cfcbbc;
  height: 120px;
  width: 100%;
  border-radius: 4px;
  filter: grayscale(0.4);
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: #3e3a33;
}

/* navbar custom */
.navbar-custom {
  background-color: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #f0ede8;
  height: 80px;
}

.nav-link-custom {
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: #4b4b44;
  transition: color 0.2s;
  padding: 0.5rem 0;
  margin: 0 0.75rem;
}

.nav-link-custom:hover,
.nav-link-custom.active {
  color: var(--primary);
  border-bottom: 1px solid var(--primary);
}

@media (max-width: 991px) {
  .navbar-custom {
    height: auto;
    padding: 0.75rem 0;
  }
}

/* hero overlay */
.hero-overlay {
  background: linear-gradient(90deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.2) 100%);
}

/* iconos tamaño consistente */
.icon-md {
  font-size: 1.5rem;
}

footer a {
  text-decoration: none;
}

footer a:hover {
  color: var(--primary) !important;
}

/* Asegura que el contenedor del carrusel sea el ancla de posicionamiento */
/* Forzar visibilidad absoluta */
/* Estilo base funcional */
.carousel-modal .btn-nav {
  position: absolute !important;
  top: 50% !important;
  z-index: 9999 !important;
  
  /* Tu color base */
  background: rgb(5, 5, 5) !important; 
  color: white !important;
  
  /* Propiedades de visibilidad */
  opacity: 1 !important;
  visibility: visible !important;
  display: block !important;
  pointer-events: auto !important;
  
  /* Estilo adicional para que se vea bien */
  border: none;
  cursor: pointer;
  transition: filter 0.3s ease !important; /* Transición suave para el efecto */
}

/* Lógica del efecto Hover: Oscurecer el fondo */
.carousel-modal .btn-nav:hover {
  filter: brightness(0.7); /* Esto hace que el rgb(5, 5, 5) se vea más oscuro/profundo */
}

/* Tu lógica que ya funciona para ocultar */
.btn-nav.hidden {
  display: none !important;
}
/* Asegurar que el modal no corte nada */
.modal-estilizado {
  overflow: visible !important;
}

/* Posiciones */
.btn-nav.prev { left: 10px !important; }
.btn-nav.next { right: 10px !important; }

/* Asegurar que el modal no corte los elementos que sobresalen */
.modal-estilizado {
  overflow: visible !important;
}
.carousel-fade .carousel-item {
opacity: 0;
transition-duration: 0.8s; /* Ajusta la velocidad de desvanecimiento aquí */
transition-property: opacity;
}

.carousel-fade .carousel-item.active {
opacity: 1;
}

/* Limpieza del enlace de WhatsApp para que se comporte como un botón estilizado */
.boton-whatsapp {
background-color: #25D366;
color: white;
font-weight: 500;
transition: background-color 0.3s ease;
}

.boton-whatsapp:hover {
background-color: #128C7E;
color: white;
}



/* Contenedor principal del producto */
.product-card {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  background: #fff;
  transition: transform 0.3s ease;
}

/* La imagen siempre visible */
.product-card img {
  width: 100%;
  height: 400px; /* Tamaño considerable en PC */
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

/* Contenedor de los datos (oculto por defecto) */
.product-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  
  /* Estilos visuales solicitados */
  background-color: var(--primary-container);
  color: white;
  text-align: center;
  padding: 0.75rem 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  z-index: 3;

  /* Animación de deslizamiento */
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

/* Efecto al pasar el cursor sobre la tarjeta */
.product-card:hover .product-info {
  transform: translateY(0);
}

/* Ajuste para móviles (Pantallas pequeñas) */
@media (max-width: 768px) {
  .product-card img {
      height: 300px; /* Un poco más compacto en móviles */
  }
  .product-info {
      opacity: 1; /* En móviles siempre visibles para mejor UX */
      background: rgba(255, 255, 255, 0.8);
  }
}

/* Estilo del contenedor modal */#detalleModal, #historiaModal {
    margin: auto; /* Centrado absoluto */
    border: none;
    border-radius: 20px;
    padding: 0;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

#detalleModal::backdrop, #historiaModal::backdrop {
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
}

.modal-body {
    padding: 2rem;
    text-align: center;
}

.btn-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 999; /* Asegura que el botón siempre sea clicable */
}


.dropdown-menu-custom {
  border: 1px solid #e9e2d8 !important;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(116, 90, 43, 0.08);
}
.dropdown-menu-custom .dropdown-item {
  color: var(--on-surface-variant);
  font-size: 0.9rem;
  font-weight: 500;
  border-radius: 6px;
  margin: 2px 8px;
  width: calc(100% - 16px);
}
.dropdown-menu-custom .dropdown-item:hover {
  background-color: var(--secondary-container) !important;
  color: var(--primary) !important;
}
.dropdown-menu-custom .dropdown-item.text-danger:hover {
  background-color: #fff0ef !important;
  color: var(--error) !important;
}
.dropdown-menu-custom .dropdown-divider {
  border-color: #e9e2d8;
  margin: 6px 0;
}


/* Título con fondo de color primary-container */
.titulo-resaltado {
  background-color: rgba(192, 161, 107, 0.2); /* 0.2 es la opacidad */
  padding: 5px 15px;
  border-radius: 8px;
  display: inline-block;
  color: var(--primary); /* Texto en color primario para que contraste bien */
}

/* Contador con fondo de color primary-container */
/* Contador: burbuja sólida que no se comprime */
.contador-resaltado {
  background-color: var(--primary-container);
  color: white;
  padding: 4px 15px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-block !important; 
  flex-shrink: 0 !important; /* Vital: esto evita que desaparezca */
  z-index: 10;
}

/* Buscador: estilizado y flexible */
.light-table-filter {
  background-color: var(--primary-container) !important;
  color: white !important;
  padding: 8px 20px !important;
  border-radius: 20px !important;
  font-weight: 500;
  border: 2px solid transparent !important;
  transition: all 0.3s ease;
  width: 100% !important;
}

.light-table-filter::placeholder { color: rgba(255, 255, 255, 0.7); }

.light-table-filter:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 0 8px rgba(0,0,0,0.1);
}

/* Responsividad mejorada */
@media (max-width: 576px) {
  #filtros-container {
      flex-direction: column !important;
      align-items: stretch !important; /* Estira buscador al 100% en móvil */
      gap: 15px !important;
  }
  
  .light-table-filter {
      padding: 10px 20px !important;
      font-size: 1rem;
  }

  .contador-resaltado {
      text-align: center;
      width: 100%;
  }
}

/* Botón tipo "Outline" resaltado */
.btn-lula-outline {
  background: transparent;
  border: 2px solid var(--primary-container);
  color: #1f1f1f; /* Letras negras */
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-lula-outline:hover {
  background: var(--primary-container);
  color: #1f1f1f;
}

/* Botón sólido resaltado */
.btn-lula-solid {
  background-color: var(--primary-container);
  color: #1f1f1f; /* Letras negras */
  font-weight: 600;
  border: none;
  transition: all 0.3s ease;
}

.btn-lula-solid:hover {
  background-color: var(--primary-fixed-dim); /* Un tono más claro al pasar el mouse */
  color: #1f1f1f;
}

/*Botones de fotos*/

/* Botones de navegación (Ocultos por defecto) */
.btn-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  opacity: 0; /* Ocultos */
  transition: opacity 0.3s ease;
}

/* Al pasar el mouse sobre la tarjeta, las flechas aparecen */
.product-card:hover .btn-nav {
  opacity: 1;
}

.prev { left: 10px; }
.next { right: 10px; }

/* Botones con sombra para mayor relieve */
.btn-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  color: white;
  border: none;
  padding: 10px 15px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3); /* Sombra para resaltar */
}

.btn-nav:hover {
  background: rgba(0, 0, 0, 0.9);
  box-shadow: 0 6px 10px rgba(0,0,0,0.4);
}

.d-none { display: none !important; }

#contador-productos {
  min-width: 200px; /* Ajusta según el largo máximo esperado de tu texto */
  text-align: right;
}