/* Reset básico */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
  font-size: clamp(16px, 1.5vw, 20px); /* Reducido para PC */
  font-family: Arial, sans-serif;
  color: #0a0a0a;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.encabezado h1 {
  font-weight: 500;
  color: #111112;
  
}

.producto h3, .precio-tag, .agregar-btn {
  font-weight: 400;

  color: #0d0d0e;
}

.encabezado {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap; /* Importante para móviles */
  gap: 10px;
  padding: 10px 20px;
  max-width: 100%;
  box-sizing: border-box;
}

.encabezado h1 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: clamp(1.6rem, 3vw, 2.4rem); /* Más razonable */
  color: #000;
  margin: 0;
}

.encabezado .logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.encabezado p {
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  margin: 0;
  color: #212529;
}

.carrito-btn {
  background-color: #28a745;
  border: none;
  color: white;
  padding: 10px 16px;
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  border-radius: 25px;
  cursor: pointer;
  transition: background-color 0.3s;
  white-space: nowrap;
}

.carrito-btn:hover {
  background-color: #218838;
}
/* Contenedor productos */
.productos-container {
    padding: 20px;
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.producto .stock,
.producto .agregar-btn {
  display: block;         /* Para que ocupen toda la línea */
  margin: 10px auto 0;    /* Centra horizontalmente con margen arriba */
  text-align: center;     /* Centra el texto dentro del stock */
  max-width: 160px;       /* Para que el botón no sea demasiado ancho */
}
.producto .stock {
  margin-bottom: 8px;
}
/* Producto individual */
.producto {
   background: #fff;
  border-radius: 32px;
  padding: 20px;
  /* Borde sutil con transparencia */
  border: 1.5px solid rgba(128, 128, 128, 0.3); /* gris claro */
box-shadow: 0 4px 12px rgba(128, 128, 128, 0.1);
  transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.producto:hover {
   border-color: rgba(128, 128, 128, 0.6);
  box-shadow: 0 8px 20px rgba(128, 128, 128, 0.25);
  transform: translateY(-6px);
}

.producto img {
    max-width: 100%;
    height: 180px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 32px;
       
}

.producto h3 {
    font-size: 1rem;
    text-align: center;
    margin: 10px 0 5px;
    max-height: 2.6em;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Contenedor de precios */
.precios {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 10px;
    width: 100%;
}

.precio-tag {
    background-color: #f1f3f5;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.9rem;
    color: #343a40;
    text-align: center;
    min-width: 80px;
    max-width: 110px;
    display: flex;
    flex-direction: column;
    align-items: center;
    user-select: none;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.05);
}

.precio-tag span {
    font-weight: bold;
    color: #212529;
    display: block;
}

.precio-tag::before {
    content: attr(data-tipo);
    font-size: 0.75rem;
    color: #6c757d;
    margin-bottom: 3px;
}

.precio-tag span::before {
    content: "L ";
    font-weight: normal;
    margin-right: 2px;
    color: #28a745;
}

/* Stock */
.stock {
    margin-top: 8px;
    font-weight: 600;
    color: #495057;
}

/* Botón agregar */
.agregar-btn {
      display: inline-block;
    width: 100%;
    max-width: 160px;
    padding: 10px 18px;
    background-color: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(1rem, 2vw, 1.4rem);
    text-align: center;
    transition: background-color 0.3s ease;
    box-sizing: border-box;
}

.agregar-btn:hover {
    background-color: #218838;
}

/* Panel carrito */
.carrito-panel {
    position: fixed;
    right: 0;
    top: 60px;
    width: 320px;
    max-height: 80vh;
    background: white;
    border-left: 1px solid #ddd;
    padding: 15px;
    box-shadow: -4px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    z-index: 200;
}

.carrito-panel.oculto {
    display: none;
}

/* Item en carrito */
.item-carrito {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
}

.img-carrito {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background-color: #f9f9f9;
    flex-shrink: 0;
    margin-right: 10px;
}

.info-carrito h4 {
    margin: 0;
    font-size: 1rem;
    color: #212529;
}
.info-carrito {
  display: flex;
  flex-direction: column;
  min-width: 140px; /* Ajusta según lo que necesites */
}

.info-carrito p {
 display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-width: 0;
  max-width: 480px; /* aumenté de 400px a 480px para más espacio */
  padding: 0 10px; /* agrega un poco de espacio interno a los lados */
}
.eliminar-btn {
    background: #dc3545;
    border: none;
    color: white;
    padding: 5px 9px;
    border-radius: 6px;
    cursor: pointer;
    margin-left: auto;
}

/* Input number estilos para modal cantidad */
#modalCantidad input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
    -webkit-appearance: textfield;
    width: 100%;
    padding: 8px;
    font-size: 1rem;
    margin: 10px 0;
}

#modalCantidad input[type="number"]::-webkit-outer-spin-button,
#modalCantidad input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Modal cantidad */
#modalCantidad {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 300;
}

#modalCantidad > div {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    width: 300px;
    max-width: 90%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-family: Arial, sans-serif;
    text-align: center;
}

#modalCantidad h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    color: #212529;
}

#modalCantidad p {
    margin-bottom: 15px;
    font-weight: 600;
    color: #495057;
}

/* Botones dentro modal */
#cancelarCantidad {
    background-color: #dc3545;
    color: white;
    margin-right: 10px;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#cancelarCantidad:hover {
    background-color: #b02a37;
}

#confirmarCantidad {
    background-color: #28a745;
    color: white;
    padding: 8px 14px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#confirmarCantidad:hover {
    background-color: #218838;
}

/* Clase para ocultar elementos */
.oculto {
    display: none !important;
}

/* Formulario finalizar pedido */
#finalizar-pedido {
    max-width: 400px;
    margin: 30px auto;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
    transition: opacity 0.3s ease, height 0.3s ease;
}

/* Inputs y textarea formulario */
#finalizar-pedido input,
#finalizar-pedido textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing: border-box;
}

/* Botones formulario */
#finalizar-pedido button {
    padding: 10px;
    margin-top: 10px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 15px;
}

#btn-finalizar-pedido {
    background-color: #28a745;
    color: white;
}

#btn-cancelar-pedido {
    background-color: #dc3545;
    color: white;
    margin-left: 10px;
}

/* Contenedor formulario vertical */
#formulario-cliente {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Mensaje de éxito */
#mensaje-pedido {
    margin-top: 15px;
    color: green;
    font-weight: bold;
    font-size: 16px;
}
.productos-container {
  display: grid;
  gap: 20px;
  padding: 20px 15px;  /* Un poco menos de padding horizontal para aprovechar espacio */
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  max-width: 95vw;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  .productos-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .productos-container {
    padding-left: 10px;
    padding-right: 10px;
    grid-template-columns: 1fr; /* Asegura solo 1 por fila */
  }
}


/* Fuente base */
body {
  font-size: clamp(16px, 1vw, 18px); /* Antes: 20px como máximo */
}

/* Título principal */
.encabezado h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem); /* Antes: 2.6rem */
}

/* Aviso de envío */
.encabezado p {
  font-size: clamp(0.9rem, 1.5vw, 1.2rem); /* Más contenido */
}

/* Nombre del producto */
.producto h3 {
  font-size: clamp(1.1rem, 2.2vw, 1.3rem);
}

/* Precio del producto */
.precio-tag {
  font-size: clamp(1rem, 2vw, 1.2rem);
}

/* Botón "Agregar al carrito" */
.agregar-btn {
  font-size: clamp(1rem, 2vw, 1.4rem);
}
.slider {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto 15px;
  overflow: hidden;
  border-radius: 0; /* o eliminarlo si quieres bordes rectos */
  background-color: transparent; /* Fondo transparente */
  box-shadow: none; /* Sin sombra */
}

.slider-imagenes {
  position: relative;
  width: 100%;
  height: 45vw;
  max-height: 320px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden; /* Esto es crucial para evitar desbordes */
    
}

.slider img {
  width: 100%; /* Aquí cambio clave */
  height: 100%;
  object-fit: contain;
  display: none;
   transition: transform 0.4s ease-in-out, opacity 0.4s ease-in-out;
 
    
}

.slider img.visible {
  display: block;
  opacity: 1;

}
.slider img.visible:hover {
  transform: scale(1.8); /* Zoom al 180% */
  cursor: zoom-in;
}
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 2rem;
  border-radius: 50%;
  user-select: none;
  transition: background-color 0.3s ease;
  z-index: 10;
}

.slider-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.slider-btn.prev {
  left: 14px;
}

.slider-btn.next {
  right: 14px;
}
.slider-dots {
  text-align: center;
  margin-top: 8px;
}

.slider-dots .dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 5px;
  background-color: #bbb;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.slider-dots .dot.active {
  background-color: #717171;
}
.carrito-flotante {
  position: fixed; /* Clave para que sea fijo */
  background-color: #28a745; /* Verde */
color: #fff; /* Color de texto blanco */
border: none;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  z-index: 2000; /* Asegura que siempre esté encima de todo */
}

.carrito-flotante img {
  width: 30px;
  height: 30px;
}

.carrito-flotante span {
  position: absolute;
  top: -5px;
  right: -5px;
  background-color: #1D3557;
  color: white;
  width: 20px;
  height: 20px;
  font-size: 0.9rem;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}