/**
 * ULTIME FIX MOBILE - PRIORITÉ ABSOLUE
 * Annule TOUTES les hauteurs et min-height de 280px
 * Spécificité et priorité maximales
 */

/* ========================================
   ANNULATION TOTALE - TOUTES TAILLES D'ÉCRAN
   ======================================== */

/* Suppression de toutes les hauteurs 280px - SPÉCIFICITÉ ULTIME */
html body div#ps-chatbot-search-modal div.ps-chatbot-modal-content div.ps-chatbot-modal-body div.ps-chatbot-products-grid .ps-chatbot-product-card,
html body div#ps-chatbot-search-modal div.ps-chatbot-modal-content div.ps-chatbot-modal-body div.ps-chatbot-products-grid div.ps-chatbot-product-card,
html body div#ps-chatbot-search-modal.ps-chatbot-modal .ps-chatbot-modal-content .ps-chatbot-modal-body .ps-chatbot-products-grid .ps-chatbot-product-card,
html body div#ps-chatbot-search-modal.ps-chatbot-modal .ps-chatbot-modal-content .ps-chatbot-modal-body .ps-chatbot-products-grid div.ps-chatbot-product-card,
html body div.ps-chatbot-modal div#ps-chatbot-search-modal .ps-chatbot-products-grid .ps-chatbot-product-card,
html body div.ps-chatbot-modal div#ps-chatbot-search-modal .ps-chatbot-products-grid div.ps-chatbot-product-card,
html body #ps-chatbot-search-modal .ps-chatbot-modal-content .ps-chatbot-modal-body .ps-chatbot-products-grid .ps-chatbot-product-card,
html body #ps-chatbot-search-modal .ps-chatbot-modal-content .ps-chatbot-modal-body .ps-chatbot-products-grid div.ps-chatbot-product-card,
div#ps-chatbot-search-modal .ps-chatbot-products-grid .ps-chatbot-product-card,
div#ps-chatbot-search-modal .ps-chatbot-products-grid div.ps-chatbot-product-card,
#ps-chatbot-search-modal .ps-chatbot-products-grid .ps-chatbot-product-card,
#ps-chatbot-search-modal .ps-chatbot-products-grid div.ps-chatbot-product-card,
#ps-chatbot-search-modal .ps-chatbot-product-card,
#ps-chatbot-search-modal div.ps-chatbot-product-card,
.ps-chatbot-modal .ps-chatbot-product-card,
.ps-chatbot-modal div.ps-chatbot-product-card,
.ps-chatbot-skeleton-card,
div.ps-chatbot-skeleton-card,
#ps-chatbot-search-modal .ps-chatbot-skeleton-card,
div#ps-chatbot-search-modal .ps-chatbot-skeleton-card,
div#ps-chatbot-search-modal div.ps-chatbot-skeleton-card {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

/* FORCE ABSOLUE - MOBILE UNIQUEMENT */
@media screen and (max-width: 768px) {
    html body div#ps-chatbot-search-modal .ps-chatbot-product-card,
    html body div#ps-chatbot-search-modal div.ps-chatbot-product-card,
    html body #ps-chatbot-search-modal .ps-chatbot-product-card,
    html body #ps-chatbot-search-modal div.ps-chatbot-product-card,
    div#ps-chatbot-search-modal .ps-chatbot-product-card,
    div#ps-chatbot-search-modal div.ps-chatbot-product-card,
    #ps-chatbot-search-modal .ps-chatbot-product-card,
    #ps-chatbot-search-modal div.ps-chatbot-product-card,
    .ps-chatbot-modal .ps-chatbot-product-card,
    .ps-chatbot-modal div.ps-chatbot-product-card,
    .ps-chatbot-skeleton-card,
    div.ps-chatbot-skeleton-card,
    .ps-chatbot-product-card,
    div.ps-chatbot-product-card {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        background: white !important;
        border: 1px solid #e5e5e5 !important;
        border-radius: 8px !important;
    }

    /* Grille adaptative mobile */
    html body #ps-chatbot-search-modal .ps-chatbot-products-grid,
    div#ps-chatbot-search-modal .ps-chatbot-products-grid,
    #ps-chatbot-search-modal .ps-chatbot-products-grid {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
        padding: 10px !important;
    }

    /* Container d'image flexible */
    html body #ps-chatbot-search-modal .ps-chatbot-product-image-container,
    html body #ps-chatbot-search-modal .ps-chatbot-product-card > a:first-child,
    html body #ps-chatbot-search-modal .ps-chatbot-product-card > div:first-child {
        position: relative !important;
        width: 100% !important;
        padding-top: 75% !important;
        overflow: hidden !important;
        flex-shrink: 0 !important;
        height: auto !important;
    }

    /* Image absolue */
    html body #ps-chatbot-search-modal .ps-chatbot-product-image {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
    }

    /* Informations produit flexibles */
    html body #ps-chatbot-search-modal .ps-chatbot-product-info {
        flex: 1 1 auto !important;
        padding: 8px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        min-height: 50px !important;
        height: auto !important;
        box-sizing: border-box !important;
    }

    /* Nom et prix */
    #ps-chatbot-search-modal .ps-chatbot-product-name {
        font-size: 13px !important;
        line-height: 1.4 !important;
        margin-bottom: 8px !important;
        height: auto !important;
        overflow: hidden !important;
        display: -webkit-box !important;
        -webkit-line-clamp: 2 !important;
        -webkit-box-orient: vertical !important;
    }

    #ps-chatbot-search-modal .ps-chatbot-product-price {
        font-size: 14px !important;
        font-weight: bold !important;
        margin: 0 !important;
        margin-top: auto !important;
        flex-shrink: 0 !important;
    }

    /* INDICATEUR VISUEL DE FONCTIONNEMENT */
    #ps-chatbot-search-modal .ps-chatbot-product-card::after {
        content: "MOBILE" !important;
        position: absolute !important;
        top: 2px !important;
        right: 2px !important;
        background: rgba(255, 0, 0, 0.9) !important;
        color: white !important;
        font-size: 8px !important;
        padding: 2px 4px !important;
        border-radius: 2px !important;
        z-index: 9999 !important;
        pointer-events: none !important;
        font-weight: bold !important;
    }
}

/* ========================================
   DESKTOP - Assurer un fonctionnement normal
   ======================================== */
@media screen and (min-width: 769px) {
    #ps-chatbot-search-modal .ps-chatbot-products-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)) !important;
        gap: 24px !important;
    }
}