/*=============================================
ESTILOS ESPECÍFICOS PARA EL BUSCADOR
=============================================*/

.buscador-container {
    padding: 20px 0;
}

/* BARRA DE PRODUCTOS */
.barraProductos {
    background-color: rgb(221, 221, 221);
}

.barraProductos .organizarProductos {
    margin-left: 5px;
}

/* VITRINA DE PRODUCTOS */
.productos {
    background-color: #f0f0f0;
    padding-top: 20px;
}

/* ─────────────────────────────────────────────────────────── */
/* GRILLA DE TARJETAS                                          */
/* li.liGrid0 = columna envolvente (transparente)              */
/* .tarjeta-grid = tarjeta real idéntica a productos.css       */
/* ─────────────────────────────────────────────────────────── */

.productos ul li.liGrid0 {
    display: block;
    float: left;
    width: 22% !important;
    background-color: transparent;
    border: none;
    margin-left: 15px;
    margin-right: 15px;
    margin-top: 0;
    margin-bottom: 15px;
    padding: 0;
    position: relative;
    height: auto;
    text-align: center;
}

.tarjeta-grid {
    width: 100%;
    background-color: white;
    border: 1px solid #E2E4EB;
    border-radius: 5px;
    padding: 30px;
    position: relative;
    height: 580px;
    text-align: center;
    transition: all 0.3s ease;
    overflow: hidden;
}

.tarjeta-grid:hover {
    border: 1px solid #c5c5c5;
    box-shadow: 0px 0px 7px 1px rgba(0, 0, 0, 0.35);
    border-radius: 7px;
    z-index: 5;
}

/* Línea de clasificación */
.productos ul li p.lineaClasificacion {
    position: absolute;
    top: 1%;
    right: 1%;
    color: #777;
    font-size: x-small;
    cursor: default;
    background-color: transparent;
    z-index: 10;
}

.productos ul li p.lineaClasificacion:hover {
    right: 4%;
    transform: scale(1.3);
}

/* Figure de la imagen */
.productos ul li figure.figureGrid0 {
    overflow: hidden;
    margin: 0;
    width: auto;
    height: 272px;
    border-radius: 3px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Stickers flotantes */
.productos ul li figure.figureGrid0 img.imgCuota,
.productos ul li figure.figureGrid0 img.imgAvisoStock,
.productos ul li figure.figureGrid0 img.imgEnvioGratis {
    position: absolute;
    background-color: transparent;
}

.productos ul li figure.figureGrid0 img.imgCuota {
    top: 48%;
    right: 3%;
    width: 23%;
}

.productos ul li figure.figureGrid0 img.imgAvisoStock {
    top: 48%;
    left: 3%;
    width: 30%;
}

.productos ul li figure.figureGrid0 img.imgEnvioGratis {
    top: 1.5%;
    left: 2%;
    width: 23%;
    z-index: 999;
}

/* Bloque de información */
.productos ul li div.informacionCartilla {
    position: absolute;
    bottom: 20px;
    height: 230px;
    width: 100%;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.productos ul li div.informacionCartilla div.cadenaDescripcion {
    height: 60px;
    padding: 0 10px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.productos ul li div.informacionCartilla div.cadenaDescripcion h4 a {
    color: black;
    font-family: 'Open Sans', sans-serif;
    text-align: center;
    font-weight: 300;
}

.productos ul li div.informacionCartilla p.productos-php {
    margin-top: auto !important;
    margin-bottom: 4px !important;
    font-size: 13px;
    color: #666;
}

.productos ul li div.informacionCartilla div.ultimoParrafo {
    position: relative;
    width: 100%;
    text-align: center;
    margin: 4px 0;
}

.productos ul li div.informacionCartilla div.ultimoParrafo p.cadenaCuotas {
    color: #344488;
    font-family: 'Poppins', sans-serif;
    font-weight: 400;
    margin-top: 6px;
    line-height: 1;
}

.productos ul li div.informacionCartilla div.ultimoParrafo p.montoCuotas {
    color: #344488;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 28px;
    margin-top: 0;
}

.productos ul li div.informacionCartilla div.cadenaPrecioAlFinal {
    position: relative;
    width: 100%;
    margin-top: 4px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* ============================================================ */
/* SIDEBAR DE FILTROS PREMIUM — portado desde productos.css     */
/* ============================================================ */

/* CHECKBOXES PERSONALIZADOS */
.custom-filter-checkbox {
    display: flex;
    align-items: center;
    padding: 6px 0;
    cursor: pointer;
    font-size: 13px;
    color: #777;
    transition: all 0.2s ease;
    text-decoration: none !important;
}

.custom-filter-checkbox:hover {
    color: #333;
    padding-left: 3px;
}

.custom-filter-checkbox .checkbox-box {
    width: 16px;
    height: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    background: #fff;
    flex-shrink: 0;
}

.custom-filter-checkbox:hover .checkbox-box {
    border-color: #888;
}

.custom-filter-checkbox.active {
    color: #333;
    font-weight: bold;
}

.custom-filter-checkbox.active .checkbox-box {
    border-color: #333;
    background-color: #333;
    color: #fff;
}

.custom-filter-checkbox .checkbox-box i {
    font-size: 9px;
    display: none;
}

.custom-filter-checkbox.active .checkbox-box i {
    display: block;
}

/* ENCABEZADOS DE ACORDEÓN */
.filter-header-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 800;
    color: #555;
    margin-top: 10px;
    margin-bottom: 15px;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: color 0.2s ease;
}

.filter-header-toggle:hover,
.filter-header-toggle:focus {
    color: #111;
    text-decoration: none;
}

.filter-header-toggle i.fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 10px;
    color: #888;
}

.filter-header-toggle[aria-expanded="true"] i.fa-chevron-down {
    transform: rotate(180deg);
}

/* PÍLDORAS DE FILTROS ACTIVOS */
.active-filter-pill {
    display: inline-flex;
    align-items: center;
    background-color: #fff;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 6px;
    border: 1px solid #E2E4EB;
    transition: all 0.2s ease;
    text-decoration: none !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.active-filter-pill:hover {
    background-color: #fcfcfc;
    border-color: #c5c5c5;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.active-filter-pill i.fa-times {
    margin-left: 8px;
    font-size: 11px;
    color: #aaa;
    transition: color 0.2s ease;
}

.active-filter-pill:hover i.fa-times {
    color: #d9534f;
}

/* DRAWER MÓVIL */
@media (max-width: 767px) {
    .contenedor-filtros-responsivo {
        position: fixed;
        top: 0;
        left: 0;
        width: 310px;
        max-width: 60%;
        height: 100vh;
        z-index: 1050;
        background: #ffffff;
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.15);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
        margin: 0 !important;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .contenedor-filtros-responsivo.abierto {
        transform: translateX(0);
    }

    .contenedor-filtros-responsivo .panel {
        border: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        margin-bottom: 0 !important;
    }

    .filtro-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.55);
        z-index: 1040;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
}

/* ============================================================================== */
/* BREAKPOINT MD: 3 Columnas de Productos + 1 de Filtro (Tablet Horiz/PC min)     */
/* ============================================================================== */
@media (max-width: 1199px) and (min-width: 992px) {
    .productos ul li.liGrid0 {
        width: calc(33.333% - 30px) !important;
    }
}

/* AJUSTE DE COLUMNAS (sidebar 15% / resultados 80%) */
@media (min-width: 992px) {
    .productos .col-md-2 {
        width: 15% !important;
        padding-right: 15px;
    }

    .productos .col-md-10 {
        width: 80% !important;
        padding-left: 15px;
    }
}

/* RESPONSIVO MÓVIL Y TABLET PREMIUM */
@media (max-width: 991px) {
    .envoltura-catalogos {
        width: 95% !important;
        margin: 0 auto !important;
        padding: 0px !important;
    }

    .contenedor-alineado {
        width: 98% !important;
        padding: 0px !important;
    }

    .migasDePan {
        display: none !important;
    }

    .productos ul li.liGrid0 {
        width: 95% !important;
        float: none !important;
        margin: 20px auto !important;
        height: auto !important;
        padding: 0 !important;
        background-color: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .tarjeta-grid {
        width: 100% !important;
        height: auto !important;
        padding: 10px !important;
        background-color: #ffffff !important;
        border: 1px solid #E2E4EB !important;
        border-radius: 8px !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04) !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .productos ul li figure.figureGrid0 {
        height: auto !important;
        width: 100% !important;
        margin: 0 0 15px 0 !important;
        overflow: visible !important;
    }

    .productos ul li figure.figureGrid0 img.img-responsive {
        max-height: 220px !important;
        width: 90% !important;
        object-fit: contain !important;
        margin: 0 auto !important;
        display: block !important;
    }

    .productos ul li div.informacionCartilla {
        position: relative !important;
        bottom: auto !important;
        height: auto !important;
        width: 100% !important;
        left: auto !important;
        padding: 0 !important;
        margin-top: 10px !important;
    }

    .productos ul li div.informacionCartilla div.cadenaDescripcion {
        height: auto !important;
        margin-bottom: 10px !important;
    }

    /* Píldoras de cuotas y promos posicionadas quirúrgicamente sobre la imagen en móviles */
    .productos ul li figure.figureGrid0 img.imgCuota {
        position: absolute !important;
        top: auto !important;
        bottom: 5px !important;
        right: 5px !important;
        width: 70px !important;
        height: auto !important;
        z-index: 5 !important;
        background-color: transparent !important;
    }

    .productos ul li figure.figureGrid0 img.imgAvisoStock {
        position: absolute !important;
        top: auto !important;
        bottom: 5px !important;
        left: 5px !important;
        width: 80px !important;
        height: auto !important;
        z-index: 5 !important;
        background-color: transparent !important;
    }

    .productos ul li figure.figureGrid0 img.imgEnvioGratis {
        position: absolute !important;
        top: 5px !important;
        left: 5px !important;
        width: 65px !important;
        height: auto !important;
        z-index: 5 !important;
        background-color: transparent !important;
    }

    .productos ul li div.informacionCartilla div.cadenaPrecioAlFinal {
        position: relative !important;
        height: auto !important;
        width: 100% !important;
        left: auto !important;
        bottom: auto !important;
        top: auto !important;
        right: auto !important;
        margin-top: 5px !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .productos ul li div.informacionCartilla div.cadenaPrecioAlFinal span,
    .productos ul li div.informacionCartilla div.cadenaPrecioAlFinal p {
        margin: 0 !important;
        display: inline-block !important;
    }

    /* Categoría/Clasificación en la esquina superior */
    .productos ul li p.lineaClasificacion {
        position: absolute !important;
        top: 12px !important;
        right: 15px !important;
        margin: 0 !important;
        font-size: 10px !important;
        color: #888 !important;
        background: transparent !important;
        z-index: 10 !important;
    }
}

/* ============================================================================== */
/* BREAKPOINT MD: 3 Columnas de Productos + 1 de Filtro (Tablet Horiz/PC min)     */
/* ============================================================================== */
@media (max-width: 1199px) and (min-width: 992px) {

    .container-fluid.productos {
        /* background-color: red; */
        padding-left: 0px !important;
        padding-right: 0px !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
    }

    .container-fluid.contenedorGeneral {
        /* background-color: blue; */
        padding-right: 0px !important;
        margin-right: 0px !important;
        margin-left: 5px;
        padding-left: 25px;

    }

    .contenedor-filtros-responsivo {
        /* background-color: orange; */
        padding-left: 0px !important;
        padding-right: 0px !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
        width: 30% !important;
    }

    #productos-contenedor {
        /* background-color: yellow; */
        padding-left: 0px !important;
        padding-right: 0px !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
        width: 84% !important;
    }

    .envoltura-catalogos {
        /* background-color: black; */
        padding-left: 0px !important;
        padding-right: 0px !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
    }

    .contenedor-alineado {
        /* background-color: green; */
        padding-left: 0px !important;
        padding-right: 0px !important;
        margin-left: 0px !important;
        margin-right: 0px !important;
    }

    .productos ul li.liGrid0 {
        width: calc(33.333% - 30px) !important;
    }

    .panel-body {
        padding: 10px !important;
    }

    .panel-heading {
        padding: 10px !important;
    }


}