/* 
===============================================
 HOJA DE ESTILOS PRINCIPAL (assets/css/styles.css)
-----------------------------------------------
 Aquí se definen estilos globales y específicos
 para el layout: navbar, footer fijo, encabezados
 decorativos, menú móvil, etc.
===============================================
*/

/* 
===============================================
 1. FOOTER FIJO (footer-fixed)
-----------------------------------------------
 - Mantiene un footer pegado en la parte inferior
 - Ajustamos padding-bottom al body para evitar 
   que el contenido quede detrás del footer.
===============================================
*/


.footer-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px; /* Ajusta la altura según tus necesidades */
  background-color: #333;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

body {
  /* Creando espacio para el footer fijo */
    padding-top: var(--header-height);
    padding-bottom: 48px; /* mismo valor que la altura del footer */

}




/* 
===============================================
 2. ESTILOS PARA h1 con barra decorativa
-----------------------------------------------
 - Se añade una línea de color secundario debajo 
   del título (puede estar centrado o a la izquierda).
===============================================
*/
h1 {
  position: relative;
  text-align: left; /* Por defecto, si quieres centrar usa .text-center */
  margin: 8px 0 1.5rem; /* Margen superior de 8px e inferior de 1.5rem */
}


/* Cuando el título es centrado mediante .text-center */
h1.text-center {
  text-align: center;
}

h1.text-center::after {
  left: 50%;
  transform: translateX(-50%);
}

/* 
===============================================
 3. NAVBAR PERSONALIZADO
-----------------------------------------------
 - Barra de navegación fija en la parte superior
 - Se usan variables CSS (header-color, etc.)
 - Se adapta a escritorio y móvil con breakpoints
===============================================
*/

/* Navbar base */
.navbar-custom {
  background-color: var(--header-color) !important;
  height: var(--header-height) !important;
  color: var(--font-color) !important;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1030;    /* Que sobresalga sobre otros elementos */
  display: flex;
  align-items: center;
  padding: 0;       /* Sin padding extra */
}


    /* Ajuste para que el texto de los ítems del menú en desktop
       no se divida en dos líneas. */
    .navbar-nav .nav-link {
      white-space: nowrap; /* fuerza que todo el texto se muestre en una sola línea */
    }

/* Contenedor interno (usa display flex para alinear) */
.navbar-custom .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo (navbar-brand) */
.navbar-brand img {
  /* Reducimos la altura máxima para que sobre algo de espacio vertical */
  max-height: calc(var(--header-height) - 10px);
  /* Algo de padding para no pegarlo */
  padding: 5px 10px;
  /* Mantener aspecto */
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Hamburguesa (móvil) */
.navbar-toggler {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  width: 50px;
  height: 50px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.navbar-toggler i {
  font-size: 36px;
  color: var(--highlight-color);
  transition: transform 0.3s ease-in-out;
}
.navbar-toggler.active i {
  transform: rotate(180deg);
}
.navbar-toggler:focus {
  box-shadow: none;
}

/* Menú normal en computadora */
@media (min-width: 769px) {
  .navbar-collapse {
    display: flex !important;
    justify-content: flex-end;
    max-width: 500px;
    margin-left: auto; /* Se separa a la derecha */
  }
    .navbar-nav .nav-link {
        color: var(--font-color) !important;
        font-size: 16px;
        padding: 10px 15px;
    }
}

/* 
===============================================
 4. MENÚ DESLIZANTE EN MÓVILES (sidebar-menu)
-----------------------------------------------
 - Se desplaza desde la izquierda al activarse
 - Usa la variable header-color para fondo
 - Botones .btn-movil para acciones
===============================================
*/
.sidebar-menu {
  position: fixed;
  top: 0;
  left: -80%;
  width: 80%;
  height: 100vh;
  background-color: var(--header-color);
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
  transition: left 0.4s ease-in-out;
  z-index: 1050;
  padding-top: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--font-color);
}
.sidebar-menu.active {
  left: 0;
}

/* Logo dentro de la barra lateral */
.sidebar-logo {
 max-height: 100px;
  margin-bottom: 10px;
}

/* Botón en el menú móvil (btn-movil) */
.btn-movil {
  display: block;
  width: 90%;
  background-color: var(--highlight-color);
  border: none;
  color: white;
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-align: left;
  margin-top: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}
.btn-movil:hover {
  opacity: 0.8; /* o background-color: var(--highlight-color)CC; */
}

.sidebar-menu .btn-movil-child {
     display: block;
  width: 90%;
  background-color: var(--highlight-color);
  border: none;
  color: white;
  padding: 10px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  text-align: left;
  margin-top: 10px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}



/* Overlay para tapar fondo al abrir menú */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.4s ease-in-out, visibility 0.4s;
  z-index: 1049;
}
.overlay.active {
  visibility: visible;
  opacity: 1;
}

/* Badge para el carrito (posición y estilo) */
.cart-icon {
  position: relative;
  margin-left: 10px;
  font-size: 24px;
  color: var(--font-color);
  text-decoration: none;
}
.cart-icon .badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background-color: red;
  color: white;
  font-size: 0.75rem;
  border-radius: 50%;
  padding: 2px 6px;
}

/* Ajustar logo en móvil (ancho, alto) */
@media (max-width: 768px) {
  .navbar-brand {
    max-width: 80%;
  }

}

/* Aplica efecto hover (zoom y contraste) a la imagen cuando se pasa el mouse sobre el card completo */
.card-hover-effect:hover .article-img {
    transform: scale(1.05) !important;
    filter: contrast(1.2) !important;
}

/* También, por si se pasa el mouse directamente sobre la imagen */
.article-img:hover {
    transform: scale(1.05) !important;
    filter: contrast(1.2) !important;
}


 .card {
      transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  .card:hover {
    
      box-shadow: 0 10px 20px rgba(0,0,0,0.2);
  }
  .card-img-top {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 4px;
  }
  .btn-detalle, .btn-agregar {
      font-size: 0.9rem;
      padding: 10px;
      border: none;
      transition: background-color 0.3s ease, color 0.3s ease;
  }
  .btn-detalle {
      background-color: <?= htmlspecialchars($highlightColor) ?>;
      color: white;
      margin-right: 5px;
  }
  .btn-detalle:hover {
      background-color: white;
      color: <?= htmlspecialchars($highlightColor) ?>;
      border: 1px solid <?= htmlspecialchars($highlightColor) ?>;
  }
  .btn-agregar {
      background-color: <?= htmlspecialchars($highlightColor) ?>;
      color: white;
  }
  .btn-agregar:hover {
      background-color: <?= htmlspecialchars($highlightColor) ?>cc;
      color: white;
  }
  .swiper-container {
      margin: 0;
  }
  
  /* Estilos para los botones de compartir */
.share-buttons {
    margin-top: 20px;
    padding: 10px;
}
.share-buttons p {
    font-size: 14px;
    color: #666;
    margin-bottom: 5px;
}
.share-btn {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    border-radius: 50%;
    color: white;
    font-size: 18px;
    text-align: center;
    margin: 0 5px;
    transition: background 0.3s ease;
}

  .carousel-icon {
      font-size: 2.5rem;
      color: <?= htmlspecialchars($highlightColor) ?>;
  }
  .carousel-control-prev,
  .carousel-control-next {
      background: none;
      border: none;
  }
  #pauseIcon {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    color: <?= htmlspecialchars($highlightColor) ?>;
    cursor: pointer;
    z-index: 10;
  }

