/* ═══════════════════════════════════════════════════════════════
   mobile-fixes.css — corecții mobil DoctorTrotineta (2026-11-18)
   Încărcat din header.php după celelalte foi de stil.
   Selectoarele au „html body” în față ca să bată regulile vechi
   (unele cu !important) din dist.min.css și din <style>-ul widget-urilor.
   Rollback: ștergi linia <link> din header.php.
   ═══════════════════════════════════════════════════════════════ */

/* ── 6. Buton WhatsApp flotant: se poate trage sus/jos ─────────── */
html body .whatsapp-float {
    touch-action: none;            /* tragerea nu mai derulează pagina */
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
html body .whatsapp-float.wa-dragging {
    transition: none !important;
    animation: none !important;
    transform: scale(1.08) !important;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .45), 0 0 0 4px rgba(37, 211, 102, .25) !important;
    cursor: grabbing;
}

@media (max-width: 767px) {

    /* ── 1. Categorii (carduri cu imagine): text pe mijloc ────────── */
    html body .cbn-card .cbn-name {
        text-align: center !important;
        left: 8px !important;
        right: 8px !important;
    }

    /* ── 2. FAQ: text mai mic, carduri mai compacte ──────────────── */
    html body .hp-widget-faq .faq-card-header {
        padding: 12px 12px !important;
        gap: 10px !important;
    }
    html body .hp-section .hp-widget-faq h3.faq-q-title,
    html body .hp-widget-faq h3.faq-q-title {
        font-size: 15px !important;
        line-height: 1.35 !important;
        font-weight: 600 !important;
        margin: 0 !important;
        text-align: left !important;
    }
    html body .hp-widget-faq .faq-num {
        font-size: 11px !important;
        min-width: 0 !important;
        padding: 2px 7px !important;
    }
    html body .hp-widget-faq .faq-icon-svg {
        width: 30px !important;
        height: 30px !important;
        flex: 0 0 30px !important;
    }
    html body .hp-widget-faq .faq-icon-svg svg { width: 16px !important; height: 16px !important; }
    html body .hp-widget-faq .faq-toggle {
        width: 26px !important;
        height: 26px !important;
        flex: 0 0 26px !important;
    }
    html body .hp-widget-faq .faq-card-body,
    html body .hp-widget-faq .faq-card-body p {
        font-size: 14px !important;
        line-height: 1.5 !important;
    }
    html body .hp-widget-faq .faq-grid { gap: 10px !important; }

    /* ── 5. Banner „Încă ai întrebări?” — încape în ecran, fără gol ── */
    /* O regulă veche (div[class*="banner"] → width:100vw; padding:0 !important)
       îl lățea peste ecran și tăia textul; o anulăm aici. */
    html body .hp-widget-faq .faq-wa-banner {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 24px 18px 20px !important;
        gap: 18px !important;
        flex-direction: column !important;
        align-items: stretch !important;
        min-height: 0 !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    html body .hp-widget-faq .wa-banner-left,
    html body .hp-widget-faq .wa-banner-right,
    html body .hp-widget-faq .wa-banner-text {
        width: 100% !important;
        min-width: 0 !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    html body .hp-widget-faq .wa-banner-left {
        flex: 0 0 auto !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 12px !important;
    }
    html body .hp-widget-faq .wa-banner-right {
        flex: 0 0 auto !important;     /* era 1 1 320px → 320px de gol sub buton */
        align-items: stretch !important;
        gap: 10px !important;
    }
    html body .hp-widget-faq .wa-glow-icon {
        width: 56px !important;
        height: 56px !important;
        flex: 0 0 auto !important;
    }
    html body .hp-widget-faq .wa-banner-text h3,
    html body .hp-section .hp-widget-faq .wa-banner-text h3 {
        font-size: 20px !important;
        line-height: 1.25 !important;
        margin: 0 0 8px !important;
        text-align: center !important;
    }
    html body .hp-widget-faq .wa-banner-text p,
    html body .hp-section .hp-widget-faq .wa-banner-text p {
        font-size: 14px !important;
        line-height: 1.5 !important;
        margin: 0 auto 14px !important;
        text-align: center !important;
    }
    html body .hp-widget-faq .wa-features {
        justify-content: center !important;
        gap: 8px !important;
    }
    html body .hp-widget-faq .wa-feature {
        font-size: 12px !important;
        padding: 6px 10px !important;
        white-space: nowrap;
    }
    html body .hp-widget-faq .btn-wa-neon {
        width: 100% !important;
        justify-content: center !important;
        padding: 14px 18px !important;
        font-size: 15px !important;
        box-sizing: border-box !important;
    }
    html body .hp-widget-faq .wa-status .dot { display: none !important; } /* dublura lângă emoji 🟢 */
    html body .hp-widget-faq .wa-status {
        justify-content: center !important;
        text-align: center !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    /* ── 3 + 4. Footer: Date comerciale + Suport clienți ─────────── */
    /* coloanele 3 și 4 pe toată lățimea, una sub alta */
    html body .site-footer .ff-section:first-child .ff-column:nth-child(n+3) {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-top: 6px;
    }
    html body .site-footer .hp-widget-text .container,
    html body .site-footer .hp-widget-custom-html .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    html body .site-footer .hp-widget-text-title {
        margin: 0 0 10px !important;
        text-align: left !important;
    }
    html body .site-footer .footer-submenu {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 0 8px !important;
        display: flex;
        flex-wrap: wrap;
        gap: 4px 14px;
        color: #aab1bd;
        font-size: 13px;
    }
    html body .site-footer .footer-submenu li { padding: 0 !important; margin: 0 !important; }
    html body .site-footer .footer-submenu li:first-child { flex-basis: 100%; color: #fff; }

    html body .site-footer .custom-html-widget-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important;
        margin: 0 !important;
        min-height: 0 !important;
    }
    html body .site-footer .custom-html-widget-container > br,
    html body .site-footer .custom-html-widget-container > span:empty,
    html body .site-footer .custom-html-widget-container > p:empty { display: none !important; }

    html body .site-footer .support-contact {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        padding: 12px 14px !important;
        margin: 0 !important;
        background: rgba(255, 255, 255, .04) !important;
        border: 1px solid rgba(255, 255, 255, .09) !important;
        border-radius: 12px !important;
        color: #e8ebf0 !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        line-height: 1.3 !important;
        text-decoration: none !important;
        text-align: left !important;
        overflow-wrap: anywhere;       /* emailul lung nu mai iese din ecran */
    }
    html body .site-footer .support-contact > i { display: none !important; } /* iconițe FA4 inexistente */
    html body .site-footer .support-contact::before {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        font-size: 15px;
        background: rgba(255, 210, 0, .12);
        color: #ffd200;
    }
    html body .site-footer .support-contact[href^="tel:"]::before { content: "\f095"; }
    html body .site-footer .support-contact[href^="mailto:"]::before { content: "\f0e0"; }
    html body .site-footer .support-contact[href*="wa.me"]::before {
        content: "\f232";
        font-family: "Font Awesome 5 Brands";
        font-weight: 400;
        font-size: 18px;
        background: rgba(37, 211, 102, .14);
        color: #25d366;
    }
}

/* ── 7. Filtre pe mobil: compacte, pe secțiuni pliabile, ca „chips” ── */
@media (max-width: 991.98px) {
    html body .filter-sidebar.card { margin-bottom: 14px !important; }
    html body .filter-sidebar .card-header {
        padding: 10px 14px !important;
        min-height: 0 !important;
    }
    html body .filter-sidebar .card-header h5 { font-size: 15px !important; }
    html body .filter-sidebar .card-header .btn {
        min-height: 0 !important;
        height: auto !important;
        min-width: 0 !important;
        padding: 4px 10px !important;
        font-size: 12px !important;
        line-height: 1.4 !important;
        border-radius: 999px !important;
        margin-left: auto;
        margin-right: 10px;
    }
    /* corpul filtrelor: cel mult ~60% din ecran, derulează în interior */
    html body .filter-sidebar .card-body {
        max-height: 60vh !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
    html body .filter-sidebar .filter-group {
        margin: 0 !important;
        padding: 10px 14px !important;
        border-bottom: 1px solid rgba(255, 255, 255, .06);
    }
    html body .filter-sidebar .filter-group:last-child { border-bottom: 0; }
    html body .filter-sidebar .filter-group-title {
        margin: 0 !important;
        padding: 4px 0 !important;
        font-size: 12.5px !important;
        display: flex !important;
        align-items: center;
        gap: 8px;
    }
    html body .filter-sidebar .fg-acc > .filter-group-title { cursor: pointer; }
    html body .filter-sidebar .fg-acc > .filter-group-title::after {
        content: "\f078";
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        font-size: 11px;
        margin-left: auto;
        opacity: .7;
        transition: transform .2s;
    }
    html body .filter-sidebar .fg-acc.fg-open > .filter-group-title::after { transform: rotate(180deg); }
    html body .filter-sidebar .fg-acc:not(.fg-open) > :not(.filter-group-title) { display: none !important; }
    html body .filter-sidebar .fg-badge {
        background: #ffd200;
        color: #111;
        border-radius: 999px;
        font-size: 10.5px;
        padding: 1px 7px;
        font-weight: 800;
    }

    /* opțiunile ca „chips”, pe mai multe pe rând */
    html body .filter-sidebar .filter-checkbox-list,
    html body .filter-sidebar .category-tree-list {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        max-height: 190px !important;
        overflow-y: auto !important;
        padding: 8px 0 2px !important;
    }
    html body .filter-sidebar .category-tree-item { margin: 0 !important; padding: 0 !important; }
    html body .filter-sidebar .custom-control.filter-checkbox {
        padding-left: 0 !important;
        min-height: 0 !important;
        margin: 0 !important;
    }
    html body .filter-sidebar .filter-checkbox .custom-control-label {
        display: inline-flex !important;
        align-items: center !important;
        gap: 5px !important;
        min-height: 0 !important;
        padding: 6px 11px !important;
        border-radius: 999px !important;
        background: rgba(255, 255, 255, .05) !important;
        border: 1px solid rgba(255, 255, 255, .12) !important;
        font-size: 13px !important;
        font-weight: 500 !important;
        line-height: 1.3 !important;
        cursor: pointer;
        width: auto !important;
    }
    /* inputul real rămâne funcțional, dar ascuns (eticheta e „chip”-ul) */
    html body .filter-sidebar .filter-checkbox input.custom-control-input[type="checkbox"] {
        position: absolute !important;
        width: 1px !important;
        height: 1px !important;
        margin: 0 !important;
        opacity: 0 !important;
        pointer-events: none;
    }
    html body .filter-sidebar .filter-checkbox .custom-control-label::before,
    html body .filter-sidebar .filter-checkbox .custom-control-label::after { display: none !important; }
    html body .filter-sidebar .filter-checkbox .custom-control-label .category-tree-name { font-size: 13px !important; font-weight: 500 !important; }
    html body .filter-sidebar .filter-checkbox .filter-count,
    html body .filter-sidebar .filter-checkbox .category-tree-count {
        font-size: 11px !important;
        opacity: .6;
        margin: 0 !important;
    }
    html body .filter-sidebar .filter-checkbox .custom-control-input:checked ~ .custom-control-label {
        background: rgba(255, 210, 0, .14) !important;
        border-color: #ffd200 !important;
        color: #ffd200 !important;
    }
    html body .filter-sidebar .filter-checkbox .custom-control-input:checked ~ .custom-control-label span { color: inherit !important; }
    html body .filter-sidebar .filter-checkbox .custom-control-input:focus-visible ~ .custom-control-label {
        outline: 2px solid #ffd200;
        outline-offset: 2px;
    }
    html body .filter-sidebar .filter-group-stock { padding-top: 12px !important; padding-bottom: 12px !important; }
    html body .filter-sidebar .filter-group-stock .custom-control,
    html body .filter-sidebar .filter-group-stock .custom-control-label { margin-left: 0 !important; left: 0 !important; }
}
