body { 
  font-family: Arial, sans-serif; 
  background: #f4f4f4; 
  margin: 0; 
  padding: 20px; 
  padding-top: 100px; 
}
h1 { 
  text-align: center; 
}
form { 
  display: flex; 
  flex-direction: column; 
  max-width: 400px; 
  margin: 20px auto; 
  gap: 10px; 
}
.productos { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); 
  gap: 20px; 
  margin-top: 20px; 
}
.card { 
  background: white; 
  padding: 10px; 
  border-radius: 8px; 
  box-shadow: 0 0 5px rgba(0,0,0,0.2); 
  text-align: center; 
  transition: transform 0.2s ease;
  cursor:pointer;
}
#imagenCard{
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  object-position:center;
  border-radius: 6px;
}
.card:hover { 
  transform: scale(1.03); 
}


/* La X dentro del input, por encima del botón buscar */
#btn-limpiar {
  position: absolute;
  top: 50%;
  right: 50px;     /* <-- ANTES del botón buscar */
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: #aaa;
  font-size: 18px;
  z-index: 5;     /* <-- IMPORTANTE */
  cursor: pointer;
  padding: 0;
}

#btn-limpiar:hover {
  color: white;
}

.input-buscar {
  padding-right: 1.2rem !important;
}

.resultados-busqueda {
  position: absolute;
  top: 110%;        /* pegado al input */
  left: 5px;
  width: 83%;      /* igual al input */
  max-height: 300px;
  overflow-y: auto;
  background: #ffffff; /*fondo oscuro como en la imagen */
  border: 1px solid #333;
  border-top: none;
  border-radius: 0 0 6px 6px;
  z-index: 2000;
  display: none;
  box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

/* Cada resultado como tarjeta */
.resultado-item {
  display: flex;
  gap: 12px;
  padding: 8px 12px;
  align-items: flex-start;
  cursor: pointer;
  border-bottom: 1px solid #333;
  transition: background 0.2s;
}

.resultado-item:hover {
  background: #6d6363;
}

.resultado-item img {
  width: 50px;
  height: 50px;
  padding-right: 10px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
}

.resultado-detalles {
  display: flex;
  flex-direction: column;
  color: #e0e0e0;
  font-size: 0.85rem;
}

.resultado-detalles .nombre {
  font-weight: 500;
  margin-bottom: 4px;
  color: #000000;
  font-weight: bold;
}

.resultado-detalles .precio {
  color: #31b335;
  font-weight: bold;
  margin-top: auto;
}


.footer {
  display: none;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.footer.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.footer a:hover {
  color: #dc3545; /* rojo Bootstrap */
}

.carrusel{
  margin-top: 44px;
  margin-bottom: 10px;
}
.imagenCorrusel{
  display: block;
  width: 100%;
}
.carousel-item img {
   max-height:210px;
}
.carousel-indicators{
  display: none;
}
#carouselPanel {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
}

#modalProducto .modal-body {
  display: flex;
  flex-direction: column;
  align-items: center; /* centra horizontalmente */
}
#modalProducto img {
 max-width: 100%;
  max-height: 250px;
  object-fit: contain;
  margin-bottom: 1rem;
}
#descripcionProducto {
  width: 100%; /* mantiene el texto alineado a la izquierda */
}

.toast {
  opacity: 0;
  transition: opacity .3s ease-in-out;
}
.toast.show {
  opacity: 1;
}

.navbar-brand img {
  height: 40px;
  max-height: 8vh;
  width: auto;
  object-fit: contain;
}

/* === Botón de subir === */
.btn-subir {
  position: fixed;
  bottom: 20px; /* justo debajo del ícono de WhatsApp */
  right: 20px;
  background-color: #dc3545; /* rojo estilo Bootstrap danger */
  color: white;
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  font-size: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  cursor: pointer;
  display: none; /* oculto por defecto */
  transition: all 0.3s ease;
}

.btn-subir:hover {
  background-color: #bb2d3b;
  transform: scale(1.1);
}

#btn-buscar {
  height: 100%;
  border: 1px solid #fff !important;
  background-color: #fff !important;
  transition: all 0.2s ease;
  border-radius: 0px 6px 6px 0px;
  align-items: center;
  justify-content: center;
}

#btn-buscar i {
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Cabecera fija */
.cabecera {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1000; /* sobre el contenido */
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

#carrito, #carrito-container, #miCarrito {
  position: fixed;
  top: 70px; /* debajo del navbar */
  right: 20px;
  z-index: 2000; /* encima del navbar */
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
  max-height: 80vh;
  overflow-y: auto;
}

/* Botón WhatsApp */
#whatsapp-btn {
  position: fixed;
  bottom: 75px;
  right: 20px;
  background: #25D366;
  border-radius: 50%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: transform 0.2s ease;
  z-index: 3000;
}
#whatsapp-btn img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}
#whatsapp-btn img:hover {
    transform: scale(1.1);
}
  
  /* Carrito */
#carrito-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 350px;
    height: 100%;
    max-width: 90%;
    background: #fff;
    color: #000;
    box-shadow: -3px 0 10px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    justify-content: space-between;
    z-index: 2000;
}

#carrito-panel.abierto { 
  right: 0; 
}
#carrito-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #dc3545;
    color: white;
    padding: 10px;
}
#carrito-items {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}
#carrito-footer {
    border-top: 1px solid #ccc;
    padding: 10px;
    background: #f8f9fa;
}

#abrir-carrito {
    position: fixed;
    bottom: 130px;
    right: 20px;
    color: white;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fuente{
  font-size: 12px;
}

#abrir-carrito-cabecera{
    top: 2px;
    right: 20px;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
}
#contador-carrito-cabecera {
    position: absolute;
    top: 10px;
    right: 4px;
    background: yellow;
    color: black;
    font-size: 12px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

#contador-carrito {
    position: absolute;
    top: -4px;
    right: 0px;
    background: yellow;
    color: black;
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    padding: 2px 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}
  /* Contador del carrito */
#contador-carrito {
    font-size: 0.7rem;
    padding: 4px 6px;
}

#enviar-whatsapp {
    background-color: #25D366 !important;
    border: none;
    font-weight: bold;
}

/* Navbar */
.navbar {
  padding-top: 0.1rem;
  padding-bottom: 0.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Buscador */
.navbar input.form-control {
  border-radius: 8px;
  border: none;
  outline: none;
  width: 50%;
  max-width: 650px;
}

.navbar input.form-control:focus {
  box-shadow: 0 0 5px rgba(255,255,255,0.6);
}

/* Responsivo: Navbar y filtro */
.navbar .container, #barra-filtros {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#imagenLogo{
  height:40px; 
  width:auto; 
  border-radius:6px;
}
.container-navi{
  padding: 5px;
}
/* Filtros debajo del nav */
#barra-filtros {
  background: #212529;
  padding: 6px 12px;

  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0;
}
#barra-filtros select {
  background: transparent;
  color: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 0.9rem;
  width: 220px;
  background-color: transparent;
  font-weight: 500;
}
#barra-filtros select option {
  color: #000;
}
#barra-filtros select:focus {
  outline: none;
  border-color: #dc3545; /* color rojo Bootstrap */
  box-shadow: 0 0 4px #dc3545;
}

/* Botón carrito en el nav */
#abrir-carrito2 {
  background: none;
  border: none;
  color: white;
  font-size: 1.4rem;
  position: relative;
}
#contador-carrito2 {
  background: #fff;
  color: red;
  font-weight: bold;
  border-radius: 50%;
  padding: 2px 6px;
  font-size: 0.8rem;
  position: absolute;
  top: -8px;
  right: -10px;
}
.estado-producto {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 6px 10px;
  font-size: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 0 6px rgba(0,0,0,0.2);
  z-index: 2;
}

/* ====== Footer Pagopar fijo abajo ====== */
/* .footerPagopar {
  position: fixed !important;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #ffffff;
  z-index: 99999;
  border-top: 1px solid #ddd;
  padding: 5px 0;
} */

/* Asegura que el contenido no quede oculto detrás del footer */
/* body {
  padding-bottom: 90px !important;  o más si el footer es más alto 
} */

/* Adaptación para pantallas chicas */
/* @media (max-width: 768px) {
  .footerPagopar .pagopar-methods ul.list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    padding: 0;
    margin: 0;
  }

  .footerPagopar img {
    width: 40px;
    height: auto;
  }
} */


/* Responsivo 768*/
@media (max-width: 768px) {
 .buscador {
    flex: 1 1 auto; /* el input ocupa el resto del ancho */
    padding-right: 10px;
  }
  .navbar .container {
    flex-direction: column;
    align-items: flex-start;
    padding: 5px;
  }
  .container-navi{
    align-items: flex-start;
    padding: 5px;
  }
  .navbar-brand img {
    height: 40px;
    width: auto;
  }
  .navbar .input-group {
    flex: 1;
    display: flex;
    max-width: 800px;
  }
  .navbar input.form-control {
    flex: 1;
    min-width: 0;
  }
  #carrito-panel {
    width: 100%;
    max-width: 100%;
  }
  #abrir-carrito-cabecera{
    display: none;
  }
  .container-fluid {
    display: none !important;
  }
  .carrusel{
    margin-top: -2px;
  }
}

/* Responsivo 576*/
@media (max-width: 576px) {
  .buscador {
    flex: 1 1 auto; /* el input ocupa el resto del ancho */
    padding-right: 10px;
  }
  .card img {
    height: 160px;
  }
  .card-body h5 {
    font-size: 1rem;
  }
  #whatsapp-btn img {
    width: 45px;
    height: 45px;
  }
  .navbar input.form-control {
    flex-grow: 1;
    min-width: 0;
  }
  .imagenCorrusel{
    height: 300px;
  }
  .carrusel{
    margin-top: 16px;
  }
}