body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
}

.contenedor {
    display: flex;
    gap: 20px;
    padding:30px;
    flex-wrap: wrap; 
}

.categorias {
    display: flex;
    justify-content: center; 
    flex-wrap: wrap;
    margin-right: 20px;
   max-height: 800px;
}

/*.categorias button {
    display: block;
    margin-bottom: 10px;
    padding: 10px;
    background: #f0f0f0;
    border: 1px solid #ccc;
    cursor: pointer;
}*/

.productos {
    flex: 2;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    
    
    
}

.producto {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    background-color: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 194px;
    
}
.producto:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}
.producto img {
    position: absolute;
    top: 10px;
    right: 25px;
    height: 170px;
    min-width: 10px;
    object-fit: contain;
    border-radius: 5px;
    background-color: transparent; /* Fondo transparente */
    mix-blend-mode: multiply;
    z-index: 1;
    background-color: #f0f0f0;
}
.producto img[src=""] {
    background-color: #e0e0e0; /* Fondo cuando no hay imagen */
    content: "No Image";
    color: #777;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    font-size: 12px;
}
.producto img:not([src]) {
    background-color: #e0e0e0; /* Fondo para imágenes no cargadas */
    content: "No Image";
    display: flex;
    justify-content: center;
    align-items: center;
}
.producto h3 {
    font-size: 16px;
    font-weight: bold;
    margin: 10px 0;
    color: #333;
}
.producto p.descripcion {
    font-size: 14px;
    color: #666;
    margin: 0 0 10px;
    width:400px;
      white-space: normal; /* Permite saltos de línea */
    word-wrap: break-word; /* Rompe palabras largas */
    overflow-wrap: break-word;
}
.producto a {
    font-size: 14px;
    color: #007bff;
    text-decoration: none;
    margin-bottom: 10px;
}

.producto a:hover {
    text-decoration: underline;
}
.producto p.precio {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.producto span.precio{
    display: flex;
    justify-content: center;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    align-items: center;
    
}
.producto .boton-item {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #0d89db;
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.producto button:hover {
    background-color: #0056b3;
}


.categorias-contenedor {
    display: flex;
    flex-wrap: wrap;
    border: 1px solid #ccc; /* Borde para el cuadro */
    border-radius: 8px; /* Bordes redondeados */
    padding: 0px 30px 0px 30px; /* Espaciado interno */
    /*margin-bottom:2040px;*/ /* Separación debajo del cuadro */
    max-width: 300px; /* Ancho máximo */
    max-height: 710px;
    background-color: #f9f9f9; /* Fondo claro */
    
}

.categorias button {
    display: block; /* Botones en fila vertical */
    width: 250px; /* Ancho completo */
    padding: 60px; /* Más espacio interno */
    margin-bottom: 20px; /* Espaciado entre botones */
    font-size: 20px; /* Texto más grande */
    background-color: #0d89db; /* Color de fondo */
    color: white; /* Texto blanco */
    border: none; /* Sin bordes */
    border-radius: 5px; /* Bordes redondeados */
    cursor: pointer; /* Manito al pasar */
    transition: background-color 0.3s ease; /* Animación suave */
}
.h3-categoria{
    text-align: center;
    padding-top: 20px;
    font-size: 18px; /* Tamaño del texto */
    font-weight: bold; /* Texto en negrita */
    margin-bottom: 20px; /* Más espacio debajo del título */
}
.categorias button:hover {
    background-color: #0056b3; /* Fondo más oscuro al pasar */
}
.carrito {
    border: 1px solid #ccc; /* Borde para identificar el cuadro */
    border-radius: 8px; /* Bordes redondeados */
    padding: 10px; /* Espaciado interno */
    margin: 10px; /* Espaciado externo */
    min-height: 50px;
    max-height: 70vh; /* Limita el alto máximo */
    overflow-y: auto; /* Permite desplazarse si el contenido excede el alto máximo */
    transition: all 0.3s ease; /* Animación suave al cambiar el tamaño */
    width: 300px; /* Ancho fijo del cuadro */
     /* Altura mínima cuando está vacío */
    
}
.carrito-vacio {
    text-align: center;
    margin-top: 100px;
}

.carrito-vacio img {
    width: 100px; /* Ajusta el tamaño de la imagen */
    height: auto;
    margin-bottom: 20px;
}

.carrito-vacio h3 {
    color: #888;
    font-size: 18px;
    font-weight: bold;
}

.carrito h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}
.lista-carrito .producto {
    list-style: none !important;
    
  background-color: #fff;
  margin-top: 15px;
  height: 95px;
}
.botones-cantidad {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f5f5f5;
    border-radius: 15px;
    padding: 5px 10px;
    position: absolute;
    bottom: 10px;
    right: 10px;
    gap: 5px;
    height: 20px;
}

.botones-cantidad button {
    background-color: transparent;
    border: none;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    
}

.botones-cantidad button:hover {
    color: #000;
}

.botones-cantidad .boton-eliminar {
    color: #ff5252;
    font-size: 18px;
    padding: 5px;
    
}

.botones-cantidad .boton-eliminar:hover {
    color: #ff0000;
}

.botones-cantidad .cantidad-texto {
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    width: 20px;
}
.botones-cantidad .boton-mas {
    background-color: transparent;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
    width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.botones-cantidad .boton-mas:hover {
    color: #000;
}
.producto-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.nombre {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

#boton-continuar {
    display: block;
    width: 100%;
    padding: 1rem;
    background: #0d89db;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.2rem;
    margin-top: 15px;
}

#boton-continuar:hover {
    background: #e6006b;
}

/* Estilo del modal */
.modal {
    position: fixed;
    top: 20%;
    left: 35%;
    width: 50%;
    height: 50%;
    background-color: none;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
  }
  
  /* Contenido del modal */
  .modal-content {
    background-color: #dfdcdc;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height:450px;
    position: relative;
    overflow-y: auto; /* Activa el scroll vertical */
  }
  
  /* Botón para cerrar el modal */
  .cerrar {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 20px;
    cursor: pointer;
  }
  
  /* Lista de productos */
  .pedido-lista {
    list-style-type: none;
    padding: 0;
    margin: 20px 0;
  }
  
  .pedido-lista li {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ccc;
  }
  
  /* Nombre del producto con tamaño fijo y salto de línea */
.pedido-lista li .nombre_producto {
    flex-grow: 1;
    max-width: 220px; /* Tamaño fijo para mantener uniformidad */
    white-space: normal; /* Permite el salto de línea */
    word-wrap: break-word; /* Corta el texto si es necesario */
    overflow-wrap: break-word;
}
/* Mantener el control de cantidad y precio sin distorsión */
.pedido-lista li .cantidad-control {
    flex-shrink: 0;
    width: 90px;
    min-width: 80px;
}

.pedido-lista li .precio {
    flex-shrink: 0;
    min-width: 80px;
    text-align: right;
}
  .pedido-lista li:last-child {
    border-bottom: none;
  }
  
  /* Total y datos del cliente */
  .modal-total, .datos-cliente {
    margin: 20px 0;
  }
  
  .modal-total {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    font-size: 18px;
  }
  
  .datos-cliente label {
    display: block;
    margin-bottom: 5px;
  }
  
  .datos-cliente input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }
  
  /* Botón procesar pedido */
  #procesar-pedido {
    width: 100%;
    padding: 15px;
    background-color: #0d89db;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
  }
  
  #procesar-pedido:hover {
    background-color: #cc2953;
  }
  /*estilo de popup*/
  .cantidad-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f5f5f5;
    border-radius: 20px; /* Bordes redondeados */
    padding: 5px 10px;
    width: 90px;
    min-width: 80px;
    height:35px;
     margin-right: 15px;
}
  .btn-cant{
    background: none;
    border: none;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: #333;
  }
  
/* Media Queries para responsividad */


/* Estilos para dispositivos móviles */
/* Estilos para dispositivos móviles */
@media screen and (max-width: 452px) {
    .cantidad-control {
        width: 98; /* Reducir el tamaño en pantallas pequeñas */
        padding: 2px 3px;
        
    }
     .producto p.descripcion {
        display: block;
       /* width: 100%; Asegura que el texto no se salga del contenedor */
        max-width: 130px;
        word-wrap: break-word;
        text-align: left; /* Asegura una alineación uniforme */
    }
    .modal-content{
        width:90%;
        
        
    }
    .btn-cantidad {
        font-size: 16px; /* Ajustar tamaño */
    }
}
@media (max-width: 832px) {
    .categorias {
        display: flex;
        flex-wrap: nowrap;
       border-radius: none;
       border: none;
        gap: 10px;
        justify-content: center; /* Centra los elementos dentro del contenedor */
        margin: 0px; /* Elimina márgenes */
    }

    .categorias button {
        flex: 1; /* Hace que los botones ocupen un espacio equitativo */
        /* Ancho mínimo para cada botón */
        max-width: 100%; /* Ancho máximo para mantener legibilidad */
    }
    .categorias-contenedor{
      
        grid-template-columns: repeat(2, 1fr);
        margin: 0px;
        padding-top: 15px;
        max-width: 100%;
        overflow-x: auto ;
        border-radius: none;
        border: none;
        box-shadow: none;
        background-color: white;
      
    }
    /* Ocultar el encabezado "Categorías" */
    .categorias-contenedor h3 {
    display: none; /* Oculta el elemento */
    }
    .productos {
        display: grid;
        grid-template-columns: 1fr; /* Configuración para dos columnas en móviles */
        gap: 16px; /* Espaciado entre productos */
  
    }
    .producto img{
        max-width: 35%;
        
        height: 90%;
        right: 47px;
        object-fit: cover;
    }
    .producto{
        width: 100%;
    }
    .carrito {
        display: none; /* Oculta el carrito en dispositivos móviles */
    }
    .modal{
        top: 20%;
        left: 0%;
        min-width: 482px;
    }
    
}
