/* CONTENEDOR GENERAL */
.listado-productos-categorias {
    max-width: 1800px;
    margin: 20 auto;
    padding: 0 15px;
}

/* TÍTULO DE CATEGORÍA */
.titulo-categoria {
    font-size: 1.5rem;
    margin-top: 40px;
    padding: 10px 15px;
    background-color: #ac0e25;
    color: white;
    border-radius: 5px;
}

/* SUBCATEGORÍAS */
.subcategoria {
    margin-top: 20px;
    padding-left: 15px;
    border-left: 4px solid #ac0e25;
}

/* TÍTULO DE SUBCATEGORÍA */
.titulo-subcategoria {
    font-size: 1.2rem;
    margin: 15px 0 5px;
    padding: 6px 12px;
    background-color: #f6f6f6;
    border-radius: 5px;
    color: #ac0e25;
    font-weight: bold;
}

/* GRID RESPONSIVO */
.productos-categoria {
    display: grid;
    gap: 20px;
    margin-top: 20px;
    grid-template-columns: repeat(1, 1fr); /* Por defecto: móvil */
}

/* Tablets: >= 768px */
@media (min-width: 768px) {
    .productos-categoria {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Escritorio: >= 1200px */
@media (min-width: 1200px) {
    .productos-categoria {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* CAJA DEL PRODUCTO */
.producto {
    background-color: #eeeeee;
    border: 1px solid #ddd;
    padding: 5px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

/* NOMBRE DEL PRODUCTO */
.titulo-producto {
    margin-top: 0;
    font-size: 1.2rem;
    padding: 1px 3px;
    background-color: #333333;
    color: white;
    border-radius: 5px;
    
}

/* DESCRIPCIÓN CORTADA */
.descripcion-corta {
    overflow: hidden;
    line-height: 24px; /* Usa píxeles en lugar de em para facilitar cálculo */
    margin-bottom: 10px;
    box-sizing: content-box;
    padding: 0;
    border: 0;
}

/* CONTENEDOR PRECIO + BOTÓN */
.precio-detalles {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: -15px;
    padding: 0;
    gap: 5px;
}

/* PRECIO */
.precio {
    font-weight: bold;
    color: #ac0e25;
    font-size: 1.1rem;
    white-space: nowrap;
}

/* BOTÓN DETALLES */
.btn-detalles {
    background-color: transparent;
    color: #ac0e25;
    border: 1px solid #ac0e25;
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.btn-detalles:hover {
    background-color: #ac0e25;
    color: white;
}

/* POPUP */
.popup-detalles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-contenido {
    background-color: white;
    padding: 20px;
    max-width: 600px;
    width: 90%;
    border-radius: 10px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
}

.cerrar-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}

.oculto {
    display: none;
}

/* Footer del popup */
.popup-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

/* Precio en el popup */
.precio-popup {
    font-weight: bold;
    font-size: 1.2rem;
    color: #ac0e25;
}

/* Botón "Cerrar" inferior derecho */
.cerrar-popup-interno {
    background-color: #ac0e25;
    color: white;
    border: none;
    padding: 8px 14px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.cerrar-popup-interno:hover {
    background-color: #8c0b1e;
}

/* Alérgenos */
.alergenos {
    margin-top: 15px;
    font-size: 0.95rem;
}

.alergenos ul {
    margin: 5px 0 0;
    padding-left: 20px;
}

.alergenos li {
    list-style-type: disc;
    margin-bottom: 4px;
}

/* Menú categorías */
.categorias-menu {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #000;
    padding: 10px;
    overflow: hidden;
    z-index: 1000;
}

.categorias-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Ocultar la barra de scroll en Firefox */
    -ms-overflow-style: none; /* Ocultar la barra de scroll en IE y Edge */
}

.categorias-container::-webkit-scrollbar {
    display: none; /* Ocultar la barra de scroll en Chrome y Safari */
}

.categorias-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.categorias-menu .categoria-item {
    margin-right: 0;
}

.categorias-menu .categoria-item a {
    text-decoration: none !important;
    color: #fff;
    background-color: #000;
    padding: 10px 20px;
    border-right: 1px solid #333;
    transition: background-color 0.2s ease;
    box-shadow: none !important;
    border-bottom: none !important;
    outline: none !important;
}

.categorias-menu .categoria-item a:link,
.categorias-menu .categoria-item a:visited,
.categorias-menu .categoria-item a:hover,
.categorias-menu .categoria-item a:active {
    text-decoration: none !important;
    box-shadow: none !important;
    border-bottom: none !important;
    outline: none !important;
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: #000;
    border: none;
    padding: 10px;
    cursor: pointer;
    color: #fff;
}

.prev-btn {
    left: 0;
    z-index: 1; /* Asegurarse de que el botón esté encima del contenido */
    display: none; /* Ocultar el botón de navegación anterior */
}

.next-btn {
    right: 0;
    z-index: 1; /* Asegurarse de que el botón esté encima del contenido */
}

html {
    scroll-behavior: smooth !important;
}
