/* 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;
}
/* ======================================
   CUADRO PRINCIPAL GOMITAS
   ====================================== */
#cuadroGomitas {
    background: #ffffff;
    border-radius: 14px;
    padding: 20px;
    border: 2px solid #e3e3e3;
    box-shadow: 0 5px 18px rgba(0,0,0,0.08);
    animation: fadeInG 0.3s ease-out;
}

@keyframes fadeInG {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}

#cuadroGomitas h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

/* ======================================
   TITULOS DE PASOS
   ====================================== */
#cuadroGomitas h3 {
    margin-top: 20px;
    font-size: 1.2rem;
    color: #222;
}

#cuadroGomitas h9 {
    display: block;
    margin-bottom: 10px;
    color: #555;
    font-size: 0.9rem;
}

/* ======================================
   GRID DE PRODUCTOS
   ====================================== */
.productos-gomitas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 14px;
    margin-top: 10px;
}

/* ======================================
   TARJETA DE PRODUCTO
   ====================================== */
.producto-gomita {
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.producto-gomita:hover {
    transform: translateY(-4px);
    border-color: #ffb300;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.producto-gomita img {
    width: 85px;
    height: 85px;
    object-fit: contain;
    margin-bottom: 6px;
}

/* PRODUCTO SELECCIONADO */
.producto-gomita.seleccionada {
    border-color: #ff9800;
    background: #fff7e0;
    box-shadow: 0 4px 15px rgba(255,152,0,0.35);
}

/* ======================================
   INPUT DE CANTIDAD
   ====================================== */
.cantidad-base {
    margin-top: 6px;
    padding: 4px;
    font-size: 0.9rem;
    width: 50px;
    border: 2px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.25s;
}

.cantidad-base:focus {
    border-color: #ff9800;
    outline: none;
}

/* ======================================
   PORCIONES DISPONIBLES
   ====================================== */
#infoPorciones {
    margin-top: 15px;
    padding: 10px;
    background: #fff0cc;
    border-left: 5px solid #ff9800;
    border-radius: 6px;
    text-align: center;
    font-weight: bold;
    color: #6a4600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

/* ======================================
   BOTONES DEL CUADRO
   ====================================== */
#btnAgregarGomitaCarrito,
#btnCerrarGomitas {
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: all 0.25s ease;
}

#btnAgregarGomitaCarrito {
    background: #28a745;
    color: white;
}

#btnAgregarGomitaCarrito:disabled {
    background: #b4b4b4;
    cursor: not-allowed;
}

#btnAgregarGomitaCarrito:hover:enabled {
    background: #1e8d39;
}

#btnCerrarGomitas {
    background: #d9534f;
    color: white;
    margin-left: 10px;
}

#btnCerrarGomitas:hover {
    background: #c12e2a;
}

/* SUBTOTAL */
#subtotalGomita {
    font-weight: bold;
    font-size: 1.1rem;
}
#btnCrearProducto {
  margin: 15px;
  padding: 18px 40px;
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #ff4da6, #ff7bd5);
  border: none;
  border-radius: 18px;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(255, 50, 150, 0.4);
  animation: pulse 1.8s infinite;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

#btnCrearProducto:hover {
  animation: none;
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(255, 50, 150, 0.6);
}
/* Contenedor de cantidad */
.cantidad-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 5px;
}

/* Botones + y − estilo gomita */
.btn-cantidad {
  background: #ff6f61;        /* Color dulce rojo/naranja */
  color: white;
  border: none;
  border-radius: 50%;         /* Forma redonda */
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 3px #d65a50;  /* Sombra para efecto botón real */
  transition: all 0.1s ease-in-out;
}

.btn-cantidad:hover {
  background: #ff847c;
  transform: translateY(-2px);
}

.btn-cantidad:active {
  transform: translateY(1px);
  box-shadow: 0 1px #d65a50;
}

/* Input de cantidad */
.cantidad-base {
  width: 50px;
  text-align: center;
  border-radius: 12px;
  border: 2px solid #ff6f61;
  font-size: 1rem;
  padding: 4px 0;
  box-shadow: inset 0 2px #ffd6d0;
  outline: none;
  transition: 0.2s;
}

.cantidad-base:focus {
  border-color: #ff847c;
  box-shadow: inset 0 2px #ffc1b6;
}

.barra-categorias {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 10px 0;
  margin-bottom: 20px;
  scrollbar-width: none; /* Firefox */
}
.barra-categorias::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.barra-categorias button {
  flex: 0 0 auto;
  border: none;
  border-radius: 25px;
  padding: 8px 18px;
  background-color: #f0f0f0;
  cursor: pointer;
  white-space: nowrap;
  font-weight: 500;
  transition: 0.3s;
}
.barra-categorias button:hover {
  background-color: #007bff;
  color: white;
}
.barra-categorias button.active {
  background-color: #007bff;
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}