/* ==========================================================================
   1. CONTENEDORES Y ESTRUCTURA GENERAL (TUS ORIGINALES)
   ========================================================================== */
.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 1300px;
    margin: 40px auto;
    height: auto;
}

.tituloproductos h1 {
    width: 80%;
    margin: 40px auto;
    height: auto;
}

/* LA SECCIÓN DE PRODUCTOS (VISTA INICIAL) */
.contenedor-productos {
    display: flex;
    min-height: 550px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    gap: 20px;
    padding: 20px 80px 20px 20px;
    scrollbar-width: none;
}

.contenedor-productos::-webkit-scrollbar { display: none; }

/* CARDS DE PRODUCTO */
.item-producto {
    text-decoration: none;
    color: inherit;
    flex: 0 0 100%; 
    scroll-snap-align: center;
}

@media (min-width: 1024px) {
    .contenedor-productos > .item-producto {
        flex: 0 0 calc((100% - 80px) / 3.5); 
        scroll-snap-align: start;
    }
}

.producto-card {
    background: #f5f5f7;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.producto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.producto-imagen {
    width: 100%;
    height: 200px;
    object-fit: contain;
    margin-bottom: 15px;
}

.producto-iva {
    font-size: 0.7em;
}

.producto-lista {
    font-size: 0.8em;
}

/* ==========================================================================
   2. SISTEMA DE BÚSQUEDA Y LUPA (NUEVO + TUS ESTILOS)
   ========================================================================== */
.buscador-container {
    background: #f8f8f8;
    padding: 20px 40px 40px;
    text-align: center;
    height: auto;
}

.buscador-container h2{
    font-size: 1.8rem;
    margin: 20px auto 30px auto;
}

.barra-principal-busqueda {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

/* El input respetando tus estilos */
#buscador-texto {
    padding: 12px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 16px;
    outline: none;
    min-width: 200px;
    max-width: 400px;
    background: white;
}

/* Botón Lupa con tu estética */
.btn-lupa {
    background: #0082FF;
    color: #fff;
    border: none;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Kanit', sans-serif;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0px 5px;
}

.btn-lupa:hover {
    background: #0073e6;
    border:3px solid cyan;

}

/* PANEL OCULTO (ANIMADO) */
#panel-filtros {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease-out;
    opacity: 0;
}

#panel-filtros.abierto {
    max-height: 1000px;
    opacity: 1;
    margin-top: 20px;
}

.barra-filtros {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
    max-width: 1000px;
    margin: 0 auto;
}

/* TAGS DE FILTROS (Tus nuevos botones) */
.filtro-multi { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.label-filtro { font-weight: bold; min-width: 110px; color: #333; font-family: 'Kanit', sans-serif; }

.btn-tag {
    background-color: #fff;
    border: 1px solid #ccc;
    color: #555;
    padding: 6px 14px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.btn-tag.activo {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

/* ==========================================================================
   3. GRILLA DE RESULTADOS (TUYA)
   ========================================================================== */
#grilla-resultados {
    display: none;
    grid-template-columns: 1fr;
    gap: 25px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 1024px) {
    #grilla-resultados {
        grid-template-columns: repeat(3, 1fr); /* Corregido a 1fr para que ocupen el espacio */
    }

    #grilla-resultados a{
       height: 500px;
    }
}

@media (max-width: 1024px) {


    #grilla-resultados a{
       height: 500px;
    }
}



/* ==========================================================================
   4. NAVEGACIÓN (FLECHAS Y PUNTOS)
   ========================================================================== */

/* FLECHAS: Solo visibles en PC, desaparecen en Celu */
.flecha-btn2 {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #EDEDED !important;
    color: #505050 !important;
    border: none !important;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex; /* Se usa flex para centrar el icono */
    align-items: center;
    justify-content: center;
    font-size: 25px;
}

.flecha-btn2.visible {
    opacity: 1;
    visibility: visible;
}

/* REGLA ESTRICTA: Ocultar flechas en Celu */
@media (max-width: 768px) {
    .flecha-izq { left: 8px; }
    .flecha-der { right: 8px; }

    /* Botón Lupa con tu estética */
    .btn-lupa {
    font-size: 15px;

}


}

@media (min-width: 768px) {
.flecha-izq { left: 70px; }
.flecha-der { right: 70px; }
}

/* INDICADORES (PUNTITOS): Solo visibles en Celu, desaparecen en PC */
.indicadores {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    height: 20px;
}

/* REGLA ESTRICTA: Ocultar indicadores en PC (Desde 1024px para arriba) */

.punto {
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.punto.activo {
    background: #000;
    width: 25px;
    border-radius: 10px;
}

/* ... (Resto de estilos de botones borrar y tags) ... */