/* 
===============================================
 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.
===============================================
*/

.mt-2
 {
    margin-top: .5rem !important;
    margin-bottom: 40px;
}
.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-bottom: 48px; /* mismo valor que la altura del footer */

}




/* Reset y layout */
* { box-sizing: border-box; margin: 0; padding: 0; }
body, html { height: 100%; font-family: 'Roboto', sans-serif; }

/* Barra superior */
.top-bar {
  background: #f5f5f5;
  margin-top: 1rem;
  padding: .75rem 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  border-bottom: 2px solid #ddd;
}
.top-bar label {
  display: flex;
  align-items: center;
  font-size: .9rem;
  color: #333;
}
.top-bar label input[type="color"] {
  margin-left: .5rem;
  width: 1.5rem;
  height: 1.5rem;
  border: none;
  cursor: pointer;
}
.top-bar select,
.top-bar button,
.top-bar input[type="number"],
.top-bar input[type="file"] {
  margin-left: .4rem;
  font-size: .95rem;
  padding: .4rem .6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #333;
}
.top-bar input[type="number"] {
  width: 6ch;
  text-align: center;
}
.top-bar button {
  cursor: pointer;
  background: #2c3e50;
  color: #ecf0f1;
  border: none;
  transition: background .2s;
}
.top-bar button:hover {
  background: #34495e;
}

/* Área de dibujo */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.canvas-wrapper {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ccc;
}
canvas {
  box-shadow: 0 0 10px rgba(0,0,0,.2);
  background: transparent;
}

/* Toolbar fija */
.toolbar {
  position: absolute;
  top: 20px;
  left: 20px;
  display: grid;
  grid-template-columns: repeat(3, 36px);
  grid-auto-rows: 36px;
  gap: 4px;
  background: rgba(44,62,80,0.8);
  padding: 4px;
  border-radius: 6px;
  z-index: 1000;
}
.toolbar button {
  background: none;
  border: none;
  color: #ecf0f1;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background .2s;
  cursor: pointer;
}
.toolbar button:hover,
.toolbar button.active {
  background: #34495e;
}


/* 
===============================================
 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;
}



/* 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;
}






/* 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;
}



/* 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;
  }

