/* ==========================================================================
           GLOBAL & UTILITIES
           ========================================================================== */
        .bhh-unified-form .bhh-field-group.bhh-hidden, .bhh-unified-form .bhh-rent-only.bhh-hidden, .bhh-unified-form .bhh-sale-only.bhh-hidden { display: none !important; }
        .desktop-only-label { display: none !important; }
        .bhh-unified-wrapper { max-width: 1200px; margin: 0 auto; position: relative; z-index: 999; padding: 0; }
        .bhh-filter-modal, .bhh-modal-body, .bhh-unified-form, .bhh-filter-section { box-sizing: border-box !important; }

        /* TABS */
        .bhh-tabs-nav { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 12px; padding-left: 0 !important; position: relative; z-index: 101; width: 100%; max-width: 900px; margin-left: auto; margin-right: auto; }
        .bhh-tab-btn { background: #172957 !important; border: 1px solid #172957 !important; padding: 10px 24px; font-weight: 600; color: #fff !important; cursor: pointer; border-radius: 30px !important; font-size: 15px; box-shadow: 0 4px 6px rgba(0,0,0,0.15); transition: all 0.3s ease; opacity: 0.9; }
        .bhh-tab-btn:hover { background: #283b62 !important; border-color: #283b62 !important; opacity: 1; transform: translateY(-1px); }
        .bhh-tab-btn.active { background: #172957 !important; color: #fff !important; font-weight: 700; opacity: 1; box-shadow: 0 6px 12px rgba(23, 41, 87, 0.3); border: 1px solid #fff !important; }
        .bhh-tab-btn.active::after { content: none; }

        /* ==========================================================================
           SEARCH BAR (DESKTOP)
           ========================================================================== */
        .bhh-unified-form { display: flex !important; flex-direction: row !important; align-items: center !important; background: #fff; border: 1px solid #b0b0b0 !important; border-radius: 40px !important; box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important; height: 66px !important; width: 100%; max-width: 900px !important; margin: 0 auto !important; padding: 5px !important; position: relative; }
        .bhh-field-group { display: flex !important; flex-direction: column !important; justify-content: center !important; height: 100%; padding: 0 20px !important; position: relative; cursor: pointer; border: 1px solid transparent !important; margin: 0 !important; transition: background 0.2s ease; z-index: 10; border-radius: 32px !important; outline: none !important; -webkit-tap-highlight-color: transparent; }
        .bhh-field-group:hover, .bhh-field-group:focus-within { background-color: #ebebeb !important; }
        .bhh-vert-divider { position: absolute; right: 0; top: 20%; height: 60%; width: 1px; background: #ddd; display: block !important; }
        .bhh-field-group:hover .bhh-vert-divider, .bhh-field-group:focus-within .bhh-vert-divider { display: none !important; }
        
        .bhh-col-location { flex: 1.4 !important; } .bhh-col-dates { flex: 1.5 !important; } .bhh-col-guests { flex: 1.0 !important; }
        .bhh-col-type { flex: 1.1 !important; } .bhh-col-beds { flex: 0.8 !important; } .bhh-col-price { flex: 1.0 !important; } .bhh-col-filter { flex: 0 0 85px !important; text-align: center; }

        .bhh-input-wrapper { width: 100%; position: relative; text-align: center !important; pointer-events: none; }
        .bhh-input-wrapper input, .bhh-input-wrapper select, .bhh-input-wrapper .visual-checkin { border: none !important; background: transparent !important; padding: 0 !important; margin: 0 !important; width: 100% !important; height: auto !important; font-size: 16px !important; font-weight: 500 !important; color: #444 !important; outline: none !important; box-shadow: none !important; text-align: center !important; justify-content: center !important; pointer-events: auto !important; cursor: pointer; touch-action: manipulation; }

        .bhh-submit-wrapper { flex: 0 0 auto !important; padding: 0 5px !important; height: 100% !important; display: flex !important; align-items: center !important; justify-content: center !important; }
        .bhh-submit-wrapper button { width: 48px !important; height: 48px !important; min-width: 48px !important; background: #FF6600 !important; color: #fff !important; border: none !important; border-radius: 50% !important; cursor: pointer; font-size: 18px !important; display: flex !important; align-items: center !important; justify-content: center !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; }
        .filter-text-wrap { display: flex; align-items: center; gap: 6px; font-weight: 600; justify-content: center !important; color: #172957; font-size: 14px; pointer-events: none; }

        /* LOCATION AUTOCOMPLETE */
        .bhh-autocomplete-results { position: absolute !important; top: 110% !important; left: 0 !important; width: 300px !important; background: #ffffff !important; border: 1px solid #ebebeb !important; z-index: 10000 !important; max-height: 300px; overflow-y: auto; display: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important; border-radius: 16px !important; padding: 10px 0 !important; pointer-events: auto !important; }
        .bhh-autocomplete-item { padding: 12px 24px; cursor: pointer; font-size: 15px; color: #222; display: block !important; text-align: left; background: #fff; transition: background 0.2s; }
        .bhh-autocomplete-item:hover { background-color: #f7f7f7 !important; }
        .bhh-autocomplete-item.is-parent { font-weight: 800 !important; background-color: #fcfcfc !important; border-bottom: 1px solid #ebebeb !important; display: flex !important; align-items: center !important; gap: 12px !important; }
        .bhh-autocomplete-item.is-parent::before { content: "\f3c5"; font-family: "Font Awesome 6 Free"; font-weight: 900; background: #f3f4f6 !important; min-width: 32px !important; height: 32px !important; border-radius: 8px !important; display: flex !important; align-items: center !important; justify-content: center !important; color: #172957 !important; font-size: 14px !important; }
        .bhh-autocomplete-item.is-child { padding-left: 68px !important; font-weight: 500 !important; color: #444 !important; position: relative; }
        .bhh-autocomplete-item.is-child::before { content: "\f1ad"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; left: 28px; top: 50%; transform: translateY(-50%); color: #a0a0a0 !important; font-size: 14px !important; }

        /* ==========================================================================
           ADVANCED DATE PICKER (DESKTOP & TABS)
           ========================================================================== */
        .bhh-unified-form .bhh-advanced-date-modal { position: absolute !important; top: 100% !important; left: 0 !important; width: 700px !important; background: #fff !important; border-radius: 20px !important; box-shadow: 0 10px 40px rgba(0,0,0,0.15) !important; padding: 0 !important; z-index: 999999 !important; margin-top: 15px !important; border: 1px solid #ebebeb !important; display: none; opacity: 0; transition: opacity 0.2s !important; cursor: default !important; overflow: hidden !important; }
        .bhh-unified-form .bhh-advanced-date-modal.visible { display: block !important; opacity: 1 !important; }

        /* CRITICAL: Hides the inactive tab contents */
        .bhh-unified-form .bhh-d-content { display: none !important; }
        .bhh-unified-form .bhh-d-content.active { display: block !important; }

        .bhh-unified-form .bhh-modal-scroll-area { padding: 0 35px 20px 35px !important; max-height: 380px !important; overflow-y: auto !important; }

        .bhh-unified-form .bhh-date-tabs-wrapper { display: flex !important; justify-content: center !important; padding: 15px 0 !important; }
        .bhh-unified-form .bhh-date-tabs { display: flex !important; flex-direction: row !important; background: #f3f4f6 !important; border-radius: 40px !important; padding: 5px !important; gap: 5px !important; margin: 0 auto !important; width: fit-content !important; }
        .bhh-unified-form button.bhh-d-tab { background: transparent !important; border: none !important; font-size: 14px !important; font-weight: 600 !important; color: #555 !important; padding: 8px 25px !important; border-radius: 30px !important; cursor: pointer !important; transition: 0.2s !important; display: inline-block !important; width: auto !important; margin: 0 !important; line-height: 1 !important; text-transform: none !important; letter-spacing: normal !important; box-shadow: none !important; }
        .bhh-unified-form button.bhh-d-tab.active { background: #fff !important; color: #222 !important; box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important; }

        /* CALENDAR SPACING FIXES */
        .bhh-unified-form .bhh-inline-calendar { display: flex !important; justify-content: center !important; width: 100% !important; }
        .bhh-unified-form .flatpickr-calendar.inline { box-shadow: none !important; border: none !important; margin: 0 auto !important; width: 100% !important; padding: 0 !important; z-index: 2147483647 !important; background: transparent !important; }
        .bhh-unified-form .bhh-inline-calendar .flatpickr-month { margin: 0 15px !important; }
        .bhh-unified-form .bhh-inline-calendar .flatpickr-innerContainer { justify-content: center !important; }
        .bhh-unified-form .bhh-inline-calendar .dayContainer { padding: 0 15px !important; }

        /* BRANDED LUXURY PILLS */
        .bhh-unified-form .bhh-flex-pills-row { display: flex !important; flex-direction: row !important; justify-content: center !important; gap: 10px !important; flex-wrap: wrap !important; margin-top: 15px !important; padding-top: 20px !important; border-top: 1px solid #ebebeb !important; }
        .bhh-unified-form .bhh-durations-row { display: flex !important; flex-direction: row !important; justify-content: center !important; gap: 10px !important; flex-wrap: wrap !important; }

        .bhh-unified-form button.bhh-flex-pill, .bhh-unified-form button.bhh-dur-pill { background: #fff !important; border: 1px solid #d1d5db !important; color: #222 !important; padding: 10px 20px !important; border-radius: 30px !important; font-size: 14px !important; font-weight: 500 !important; cursor: pointer !important; transition: all 0.2s ease !important; display: inline-block !important; width: auto !important; margin: 0 !important; line-height: 1 !important; box-shadow: none !important; text-transform: none !important; letter-spacing: normal !important; }
        .bhh-unified-form button.bhh-flex-pill:hover, .bhh-unified-form button.bhh-dur-pill:hover { background: #283b62 !important; border-color: #283b62 !important; color: #fff !important; }
        .bhh-unified-form button.bhh-flex-pill.active, .bhh-unified-form button.bhh-dur-pill.active { background: #172957 !important; border-color: #172957 !important; color: #fff !important; font-weight: 600 !important; box-shadow: 0 4px 10px rgba(23, 41, 87, 0.2) !important; }

        .bhh-unified-form .bhh-flex-h4 { text-align: center !important; font-size: 16px !important; color: #222 !important; font-weight: 600 !important; margin-bottom: 20px !important; font-family: "Inter", sans-serif !important; }
        .bhh-unified-form .bhh-months-grid { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important; gap: 15px !important; }
        .bhh-unified-form .bhh-month-box { background: #fff !important; border: 1px solid #d1d5db !important; border-radius: 12px !important; padding: 15px 10px !important; text-align: center !important; cursor: pointer !important; transition: 0.2s !important; user-select: none !important; }
        .bhh-unified-form .bhh-month-box:hover { border-color: #172957 !important; }
        .bhh-unified-form .bhh-month-box.active { border-color: #172957 !important; background: #f9f9f9 !important; box-shadow: inset 0 0 0 1px #172957 !important; }
        .bhh-unified-form .bhh-month-box i { font-size: 24px !important; color: #717171 !important; margin-bottom: 10px !important; display: block !important; }
        .bhh-unified-form .bhh-month-box span { font-size: 14px !important; font-weight: 600 !important; color: #222 !important; display: block !important;}
        .bhh-unified-form .bhh-month-box small { display: block !important; font-size: 12px !important; color: #717171 !important; margin-top: 2px !important; }

        /* FOOTER BUTTONS */
        .bhh-unified-form .bhh-date-modal-footer { display: flex !important; flex-direction: row !important; justify-content: space-between !important; align-items: center !important; padding: 15px 35px !important; border-top: 1px solid #ebebeb !important; background: #fff !important; width: 100% !important; box-sizing: border-box !important;}
        .bhh-unified-form .bhh-fp-left { display: flex !important; flex-direction: row !important; gap: 20px !important; }
        .bhh-unified-form button.bhh-date-action-btn { background: transparent !important; border: none !important; font-size: 15px !important; font-weight: 600 !important; cursor: pointer !important; color: #222 !important; padding: 0 !important; width: auto !important; display: inline-block !important; box-shadow: none !important; margin: 0 !important; }
        .bhh-unified-form button.bhh-date-action-btn.cancel { color: #717171 !important; text-decoration: underline !important; }
        .bhh-unified-form button.bhh-date-action-btn.clear { text-decoration: underline !important; }
        .bhh-unified-form button.bhh-date-action-btn.confirm { background: #172957 !important; color: #fff !important; padding: 12px 28px !important; border-radius: 8px !important; text-decoration: none !important; font-weight: 700 !important; transition: background 0.2s !important; }
        .bhh-unified-form button.bhh-date-action-btn.confirm:hover { background: #283b62 !important; }

        /* ==========================================================================
           GUEST PICKER (DESKTOP)
           ========================================================================== */
        .bhh-guest-picker-wrapper { position: relative; width: 100%; }
        .bhh-guest-dropdown { display: none; position: absolute; top: 75px; right: -20px; width: 350px; background: #fff; border-radius: 24px; box-shadow: 0 10px 40px rgba(0,0,0,0.15); padding: 20px 30px; z-index: 999999 !important; border: 1px solid #ebebeb; }
        .bhh-guest-dropdown.active { display: block; animation: bhhFadeIn 0.2s ease-out; }
        .bhh-guest-row { display: flex; justify-content: space-between; align-items: center; padding: 24px 0; border-bottom: 1px solid #ebebeb; }
        .bhh-guest-row:last-child { border-bottom: none; }
        .bhh-guest-info { display: flex; flex-direction: column; text-align: left; }
        .bhh-g-title { font-weight: 600; font-size: 16px; color: #222; margin-bottom: 4px; }
        .bhh-g-desc { font-size: 14px; color: #717171; }
        .bhh-guest-stepper { display: flex; align-items: center; gap: 15px; }
        .bhh-step-btn { width: 44px !important; height: 44px !important; min-width: 44px !important; border-radius: 50% !important; border: 1px solid #b0b0b0 !important; display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer; background: #fff; color: #717171; font-size: 20px; padding: 0 !important; transition: all 0.2s ease; touch-action: manipulation; }
        .bhh-step-btn:hover { border-color: #222 !important; color: #222 !important; }
        .bhh-step-val { width: 25px; text-align: center; font-weight: 500; font-size: 16px; color: #222; }
        .bhh-guest-close-row { text-align: right; margin-top: 10px; padding-top: 10px; }
        .bhh-close-dropdown { font-size: 14px; text-decoration: underline; cursor: pointer; color: #222; font-weight: 600; }
        .bhh-dropdown-header { display: none; }
        .bhh-guest-footer { display: none; }
        .bhh-guest-rows-wrap { }

        /* ==========================================================================
           MODAL FILTERS (LUXURY UI)
           ========================================================================== */
        .bhh-pill-group { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 25px; }
        .bhh-pill { cursor: pointer; position: relative; margin: 0 !important; padding: 0 !important; }
        .bhh-pill input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
        .bhh-pill span { display: inline-flex; align-items: center; justify-content: center; min-width: 54px; height: 44px; padding: 0 18px; border: 1px solid #ddd; border-radius: 30px; font-size: 15px; font-weight: 500; color: #444; transition: all 0.2s ease; background: #fff; }
        .bhh-pill:hover span { border-color: #222; color: #222; }
        .bhh-pill input[type="radio"]:checked + span { background: #172957; color: #fff; border-color: #172957; font-weight: 600; box-shadow: 0 4px 10px rgba(23, 41, 87, 0.2); }

        .bhh-filter-modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(0,0,0,0.6); z-index: 9999999; display: none; align-items: center; justify-content: center; backdrop-filter: blur(2px); }
        .bhh-filter-modal-overlay.is-active { display: flex !important; -webkit-animation: bhhModalFadeIn 0.3s ease-out; animation: bhhModalFadeIn 0.3s ease-out; }
        .bhh-filter-modal { background: #fff; width: 100%; max-width: 780px; max-height: 85vh; border-radius: 16px; display: flex; flex-direction: column; overflow: hidden; margin: 20px; box-shadow: 0 20px 60px rgba(0,0,0,0.2); transform: translateY(0); }
        .bhh-modal-header { padding: 20px 24px; border-bottom: 1px solid #ebebeb; display: flex; justify-content: space-between; align-items: center; }
        .bhh-modal-header h3 { margin: 0; font-size: 20px; font-weight: 800; color: #222; }
        .bhh-modal-close { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; background: #f0f0f0; transition: 0.2s; font-size: 18px; color: #222; }
        .bhh-modal-close:hover { background: #e0e0e0; }
        .bhh-modal-body { padding: 24px 32px; overflow-y: auto; flex: 1; }
        .bhh-filter-section { margin-bottom: 35px; }
        .bhh-f-title { font-size: 18px; font-weight: 700; color: #172957; margin-bottom: 20px; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
        .bhh-filter-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
        .bhh-filter-grid label { font-size: 16px !important; color: #222 !important; cursor: pointer; display: flex; align-items: center; gap: 14px; font-weight: 500; padding: 8px 0; -webkit-tap-highlight-color: transparent; }
        .bhh-filter-grid input[type="checkbox"] { appearance: none !important; -webkit-appearance: none !important; width: 26px !important; height: 26px !important; min-width: 26px !important; background-color: #fff !important; border: 2px solid #ccc !important; border-radius: 6px !important; cursor: pointer; display: grid !important; place-content: center !important; transition: all 0.2s ease-in-out !important; margin: 0 !important; }
        .bhh-filter-grid label:hover input[type="checkbox"] { border-color: #172957 !important; }
        .bhh-filter-grid input[type="checkbox"]:checked { background-color: #172957 !important; border-color: #172957 !important; }
        .bhh-filter-grid input[type="checkbox"]::before { content: "" !important; width: 6px !important; height: 11px !important; border: solid white !important; border-width: 0 2px 2px 0 !important; transform: rotate(45deg) scale(0) !important; transition: 120ms transform ease-in-out !important; margin-bottom: 3px !important; }
        .bhh-filter-grid input[type="checkbox"]:checked::before { transform: rotate(45deg) scale(1) !important; }

        /* PRICE RANGE DROPDOWNS & SORT */
        .bhh-price-range-wrapper { display: flex; align-items: center; gap: 15px; margin-top: 15px; box-sizing: border-box; }
        .bhh-input-wrapper .bhh-select-price { width: 100%; height: 50px !important; padding: 0 15px 0 35px !important; border: 1px solid #b0b0b0 !important; border-radius: 8px !important; font-size: 16px !important; font-weight: 500 !important; color: #222 !important; background: #fff !important; cursor: pointer; outline: none; appearance: auto !important; -webkit-appearance: auto !important; text-align: left !important; }
        .bhh-sort-wrapper select { width: 100%; height: 50px !important; box-sizing: border-box !important; padding: 0 15px !important; border: 1px solid #b0b0b0 !important; border-radius: 8px !important; font-size: 16px !important; font-weight: 500 !important; color: #222 !important; background: #fff !important; cursor: pointer; outline: none; appearance: auto !important; -webkit-appearance: auto !important; }
        .bhh-modal-footer { padding: 16px 32px calc(16px + env(safe-area-inset-bottom)) 32px !important; border-top: 1px solid #ebebeb !important; display: flex !important; justify-content: space-between !important; align-items: center !important; background: #fff !important; position: sticky !important; bottom: 0 !important; z-index: 9999 !important; box-shadow: 0 -4px 12px rgba(0,0,0,0.05) !important; }
        .bhh-clear-btn { text-decoration: underline; color: #222; font-weight: 600; cursor: pointer; background: none; border: none; font-size: 16px; padding: 0; }
        .bhh-show-results-btn { background: #172957; color: #fff; padding: 14px 32px; border-radius: 8px; font-weight: 700; border: none; cursor: pointer; font-size: 16px; transition: 0.2s; }
        .bhh-show-results-btn:hover { background: #283b62; transform: translateY(-1px); }

        /* ==========================================================================
           SPLIT MAP & MARKERS
           ========================================================================== */
        .bhh-split-map { display: none; } .bhh-mobile-map-trigger { display: none; } .bhh-results-top-bar { display: none; }
        @media (min-width: 992px) {
            .bhh-split-container { display: flex; flex-wrap: wrap; height: calc(100vh - 180px); min-height: 600px; width: 100%; border-top: 1px solid #eee; }
            .bhh-split-list { width: 55%; height: 100%; overflow-y: auto; padding: 20px; box-sizing: border-box; }
            .bhh-split-map { display: block !important; width: 45%; height: 100%; position: relative; }
            #bhh-map { width: 100%; height: 100%; z-index: 1; position: absolute; top: 0; left: 0; }
        }
        .bhh-price-marker-wrapper { background: none !important; border: none !important; margin: 0 !important; }
        .bhh-map-price-tag { background-color: #fff; color: #172957; font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 8px; border: 1px solid #172957; box-shadow: 0 4px 10px rgba(0,0,0,0.2); white-space: nowrap; position: relative; display: inline-block; transition: all 0.2s; z-index: 500; }
        .bhh-map-price-tag:hover { background: #172957; color: #fff; z-index: 9999; transform: scale(1.05); cursor: pointer; }
        .bhh-map-price-tag::after { content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%); border-width: 6px 6px 0; border-style: solid; border-color: #172957 transparent transparent transparent; }
        .bhh-map-price-tag:hover::after { border-color: #172957 transparent transparent transparent; }
        .leaflet-popup-content-wrapper { border-radius: 12px !important; overflow: hidden !important; padding: 0 !important; border: 1px solid #ebebeb; }
        .leaflet-popup-content { margin: 0 !important; width: 200px !important; }
        .leaflet-popup-content a { color: inherit !important; }
        .leaflet-container a.leaflet-popup-close-button { color: #fff; font-weight: bold; text-shadow: 0 1px 3px rgba(0,0,0,0.5); padding: 4px; }

        /* ==========================================================================
           PROPERTY CARDS
           ========================================================================== */
        .bhh-grid-results { padding-bottom: 40px !important; }
        .bhh-search-card-horizontal { display: flex !important; flex-direction: row !important; background: #ffffff; border: none !important; border-radius: 16px; overflow: hidden; margin-bottom: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.06); transition: transform 0.3s ease, box-shadow 0.3s ease; text-decoration: none !important; color: inherit !important; min-height: 260px; height: auto; position: relative; }
        .bhh-search-card-horizontal:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.12); }
        .bhh-h-img-wrapper { position: relative; flex: 0 0 38% !important; min-width: 300px; overflow: hidden; }
        .bhh-h-img { width: 100%; height: 100%; background-size: cover; background-position: center; background-repeat: no-repeat; transition: transform 0.5s ease; }
        .bhh-search-card-horizontal:hover .bhh-h-img { transform: scale(1.05); }
        .bhh-h-badge-overlay { position: absolute; top: 15px; left: 15px; background: #172957; color: #fff; padding: 6px 12px; border-radius: 6px; font-size: 11px; font-weight: 800; z-index: 10; box-shadow: 0 4px 10px rgba(0,0,0,0.2); text-transform: uppercase; letter-spacing: 0.5px; }
        .bhh-h-content { flex: 1; padding: 25px 30px 20px 30px; display: flex; flex-direction: column; justify-content: space-between; width: 100%; box-sizing: border-box; min-width: 0; }
        .bhh-h-header { width: 100%; min-width: 0; box-sizing: border-box; display: block; }
        .bhh-h-info-row { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 10px; font-size: 13px; color: #717171; font-weight: 600; box-sizing: border-box; }
        .bhh-h-info-row i { color: #172957; margin-right: 5px; }
        .bhh-h-loc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .bhh-h-rating { margin-left: 8px; color: #e8a023; font-size: 12px; font-weight: 600; white-space: nowrap; }
        .bhh-h-rating i { color: #e8a023; font-size: 11px; margin-right: 2px; }
        .bhh-h-ref { font-weight: 500; color: #888; flex-shrink: 0; margin-left: 8px; }
        .bhh-h-title { display: block !important; font-size: 20px !important; font-weight: 800 !important; color: #172957 !important; margin-bottom: 5px !important; line-height: 1.3 !important; width: 100% !important; max-width: 100% !important; box-sizing: border-box !important; }
        .bhh-h-amenities { display: flex !important; flex-wrap: nowrap !important; align-items: center !important; gap: 6px !important; margin-top: 12px !important; margin-bottom: 12px !important; padding-top: 12px; width: 100% !important; box-sizing: border-box !important; font-size: 13px !important; color: #717171 !important; }
        .bhh-h-am-item { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #555; font-weight: 500; flex-shrink: 0; white-space: nowrap; }
        .bhh-h-am-item:not(:last-child)::after { content: "·"; margin-left: 6px; color: #b0b0b0; font-weight: 700; font-size: 16px; }
        .bhh-h-am-item i { color: #172957 !important; font-size: 14px !important; font-family: "Font Awesome 6 Free", "Font Awesome 6 Pro", "FontAwesome" !important; font-weight: 900 !important; font-style: normal !important; display: inline-block !important; flex-shrink: 0 !important; width: 14px; text-align: center; }
        .bhh-h-footer { display: flex !important; justify-content: space-between !important; align-items: center !important; padding-top: 15px !important; width: 100% !important; box-sizing: border-box !important; }
        .bhh-h-current-price { font-size: 22px; font-weight: 800; color: #172957; display: flex; align-items: baseline; gap: 5px; }
        .bhh-h-current-price small { font-size: 14px; font-weight: 500; color: #717171; }
        .bhh-h-btn { background-color: #172957 !important; color: #fff !important; padding: 12px 30px !important; border-radius: 8px !important; text-decoration: none !important; font-weight: 700 !important; font-size: 15px !important; z-index: 5; transition: 0.2s ease; }
        .bhh-h-btn::before { content: ""; position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 1; cursor: pointer; }

        /* 3-COLUMN VERTICAL GRID */
        .standard-view { max-width: 1200px; margin: 0 auto; padding: 40px 20px; }
        .standard-view .bhh-grid-results { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
        .standard-view .bhh-search-card-horizontal { flex-direction: column !important; height: 100%; min-height: 420px; }
        .standard-view .bhh-h-img-wrapper { flex: 0 0 250px !important; width: 100% !important; min-width: 100%; border-radius: 16px 16px 0 0 !important; }
        .standard-view .bhh-h-img { border-radius: 16px 16px 0 0 !important; }
        .standard-view .bhh-h-content { flex: 1; padding: 25px !important; }
        .standard-view .bhh-h-footer { padding-top: 15px !important; margin-top: auto; border-top: 1px solid #f0f0f0; }
        @media (max-width: 1024px) { .standard-view .bhh-grid-results { grid-template-columns: repeat(2, 1fr); } }
        @media (max-width: 768px) { .standard-view .bhh-grid-results { grid-template-columns: 1fr; } .standard-view .bhh-h-img-wrapper { flex: 0 0 240px !important; } }

        /* ==========================================================================
           MOBILE OVERRIDES (MEDIA QUERY)
           ========================================================================== */
        @media (max-width: 768px) {
            .bhh-mobile-top-bar.bhh-is-sticky { position: fixed !important; top: 0 !important; left: 0 !important; width: 100% !important; max-width: 100% !important; margin: 0 !important; padding: 15px 4% !important; background: #ffffff !important; z-index: 9999999 !important; box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important; border-radius: 0 !important; transition: background 0.2s ease-in-out, box-shadow 0.2s ease-in-out !important; }
            .bhh-mobile-top-bar { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 12px !important; margin: 5px auto 10px auto !important; width: 92% !important; max-width: 100% !important; }
            .bhh-top-icon-btn { flex: 0 0 42px !important; height: 42px !important; border-radius: 50% !important; border: 1px solid #ebebeb !important; background: #fff !important; display: flex !important; align-items: center !important; justify-content: center !important; cursor: pointer !important; color: #222 !important; box-shadow: 0 2px 6px rgba(0,0,0,0.05) !important; padding: 0 !important; }
            .bhh-mobile-top-bar .bhh-compact-search-pill { flex: 1 !important; margin: 0 !important; width: auto !important; display: flex !important; align-items: center !important; justify-content: center !important; background: #fff !important; border-radius: 40px !important; box-shadow: 0 4px 15px rgba(0,0,0,0.08) !important; border: 1px solid #ebebeb !important; padding: 10px 16px !important; cursor: pointer !important; }

            .bhh-unified-container:not(.bhh-mobile-modal-active) .bhh-unified-form,
            .bhh-unified-container:not(.bhh-mobile-modal-active) .bhh-mobile-modal-header { display: none !important; }

            .bhh-code-back-arrow { position: absolute !important; top: 132px !important; left: 34px !important; background-color: #ffffff !important; color: #172957 !important; width: 40px !important; height: 40px !important; border-radius: 50% !important; font-size: 17px !important; z-index: 9 !important; text-decoration: none !important; display: flex !important; align-items: center !important; justify-content: center !important; box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important; }

            .bhh-compact-search-pill { box-shadow: 0 8px 24px rgba(0,0,0,0.18) !important; border: 1px solid #d1d5db !important; padding: 14px 24px !important; transition: all 0.2s ease !important; }
            .bhh-compact-search-pill i.fa-magnifying-glass { color: #FF6600 !important; font-size: 17px !important; margin-right: 10px !important; }
            .bhh-compact-search-pill span { color: #172957 !important; font-size: 16px !important; font-weight: 800 !important; }   

            .bhh-split-map.is-mobile-active { display: block !important; position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; z-index: 999999 !important; background: #e5e3df !important; }
            .bhh-split-map.is-mobile-active #bhh-map { width: 100% !important; height: 100% !important; }
            .bhh-close-map-float { display: none; position: fixed !important; bottom: 40px !important; left: 50% !important; transform: translateX(-50%) !important; background: #222 !important; color: #fff !important; padding: 14px 28px !important; border-radius: 40px !important; font-weight: 700 !important; font-size: 16px !important; z-index: 9999999 !important; cursor: pointer !important; box-shadow: 0 6px 20px rgba(0,0,0,0.3) !important; align-items: center !important; gap: 10px !important; }
            .bhh-close-map-float.is-active { display: flex !important; -webkit-animation: bhhSlideUp 0.3s ease-out; animation: bhhSlideUp 0.3s ease-out; }

            .bhh-unified-container.bhh-mobile-modal-active { display: flex !important; flex-direction: column; position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; height: 100dvh; background-color: #f7f7f9 !important; z-index: 9999999; overflow-y: auto; -webkit-overflow-scrolling: touch; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-mobile-modal-header { display: flex; align-items: center; gap: 15px; background-color: #172957 !important; color: #ffffff !important; padding: 20px 24px !important; border: none !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-mobile-modal-header span { color: #ffffff !important; font-weight: 800; font-size: 18px; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-close-search { width: 34px; height: 34px; border-radius: 50%; background: transparent !important; border: none !important; box-shadow: none !important; display: flex; align-items: center; justify-content: center; cursor: pointer; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-close-search i { color: #ffffff !important; font-size: 22px !important; }

            .bhh-unified-container.bhh-mobile-modal-active .bhh-unified-form { background: #ffffff !important; margin: 20px auto !important; width: 90% !important; max-width: 450px !important; padding: 24px 20px !important; border-radius: 12px !important; box-shadow: 0 4px 25px rgba(0,0,0,0.08) !important; border: 1px solid #ebebeb !important; display: flex !important; flex-direction: column !important; gap: 16px !important; height: auto !important; justify-content: flex-start !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-unified-form .bhh-hidden { display: none !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-field-group { width: 100% !important; background: #ffffff !important; border: 1px solid #dddddd !important; border-radius: 8px !important; margin: 0 !important; padding: 0 16px !important; height: 54px !important; min-height: 54px !important; box-shadow: none !important; display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: flex-start !important; }
            
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-location { z-index: 105 !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-dates { z-index: 104 !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-type { z-index: 103 !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-guests { z-index: 102 !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-beds { z-index: 101 !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-price { z-index: 100 !important; }

            .bhh-unified-container.bhh-mobile-modal-active .bhh-input-wrapper input, .bhh-unified-container.bhh-mobile-modal-active .bhh-input-wrapper select, .bhh-unified-container.bhh-mobile-modal-active .bhh-input-wrapper .visual-checkin { text-align: left !important; font-size: 16px !important; font-weight: 600 !important; color: #222 !important; padding: 0 !important; height: auto !important; }

            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-location.is-fullscreen { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; background: #ffffff !important; z-index: 2147483647 !important; border-radius: 0 !important; border: none !important; padding: 0 !important; margin: 0 !important; display: flex !important; flex-direction: column !important; justify-content: flex-start !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-location.is-fullscreen .bhh-input-wrapper { display: flex !important; align-items: center !important; background: #ffffff !important; padding: 15px 20px !important; border-bottom: 1px solid #ebebeb !important; box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important; height: 70px !important; flex-shrink: 0 !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-location.is-fullscreen input[name="search_keyword"] { font-size: 16px !important; padding-left: 10px !important; flex: 1 !important; height: 100% !important; border: none !important; box-shadow: none !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-location.is-fullscreen .bhh-autocomplete-results { position: absolute !important; top: 70px !important; left: 0 !important; width: 100% !important; height: calc(100dvh - 70px) !important; max-height: none !important; border: none !important; border-radius: 0 !important; box-shadow: none !important; margin-top: 0 !important; padding: 10px 0 30px 0 !important; display: none; overflow-y: auto !important; -webkit-overflow-scrolling: touch; background: #fff !important; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-col-location.is-fullscreen .bhh-autocomplete-item { padding: 16px 24px !important; font-size: 16px !important; display: flex !important; align-items: center !important; gap: 15px !important; cursor: pointer !important; border-bottom: 1px solid #f9f9f9 !important; color: #222 !important; }
            
            /* FIX: Hide these utility buttons by default */
.bhh-location-back-btn, .bhh-location-clear-btn { display: none !important; }

/* FIX: Only show them when the location column has the .is-fullscreen class activated */
.bhh-unified-container.bhh-mobile-modal-active .bhh-col-location.is-fullscreen .bhh-location-back-btn { display: flex !important; align-items: center !important; justify-content: center !important; width: 40px !important; height: 40px !important; background: transparent !important; border: none !important; font-size: 20px !important; color: #222 !important; cursor: pointer !important; margin-right: 5px !important; }
.bhh-unified-container.bhh-mobile-modal-active .bhh-col-location.is-fullscreen .bhh-location-clear-btn.show-clear { display: flex !important; align-items: center !important; justify-content: center !important; width: 24px !important; height: 24px !important; background: #e5e7eb !important; border-radius: 50% !important; font-size: 12px !important; color: #4b5563 !important; cursor: pointer !important; }

            .bhh-unified-container.bhh-mobile-modal-active .bhh-mobile-actions-wrapper { width: 100%; display: flex; flex-direction: column; gap: 16px; margin-top: 5px; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-mobile-actions-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-mobile-filter-btn { border: 1px solid #ddd; padding: 12px 20px; border-radius: 8px; font-weight: 600; color: #222; font-size: 15px; display: flex; align-items: center; gap: 8px; cursor: pointer; background: #fff;}
            .bhh-unified-container.bhh-mobile-modal-active .bhh-mobile-clear-btn { text-decoration: underline; color: #717171; font-weight: 600; font-size: 15px; cursor: pointer; margin: 0; padding: 0; display: block;}
            .bhh-unified-container.bhh-mobile-modal-active .bhh-mobile-search-btn { background: #FF6600 !important; color: #fff !important; width: 100% !important; border: none !important; border-radius: 8px !important; height: 54px !important; font-size: 18px !important; font-weight: bold !important; cursor: pointer; display: flex; justify-content: center; align-items: center; }
            .bhh-unified-container.bhh-mobile-modal-active .bhh-vert-divider { display: none !important; }
            .bhh-unified-container.bhh-mobile-modal-active .desktop-only-label { display: none !important; }

            .bhh-filter-modal-overlay { height: 100vh !important; height: 100dvh !important; padding: 0 !important; }
            .bhh-filter-modal { border-radius: 0 !important; margin: 0 !important; width: 100% !important; max-width: 100% !important; height: 100% !important; max-height: 100vh !important; max-height: 100dvh !important; display: flex !important; flex-direction: column !important; }

            /* MOBILE FILTER CARD IMPROVEMENTS */
            .bhh-modal-body { padding: 20px 20px !important; }
            .bhh-filter-section { margin-bottom: 28px !important; }
            .bhh-f-title { font-size: 16px !important; margin-bottom: 16px !important; padding-bottom: 8px !important; }
            .bhh-pill-group.bhh-compact-pills { flex-wrap: nowrap !important; gap: 6px !important; margin-bottom: 18px !important; }
            .bhh-pill-group.bhh-compact-pills .bhh-pill span { min-width: 40px !important; height: 38px !important; padding: 0 12px !important; font-size: 14px !important; border-radius: 24px !important; }
            .bhh-filter-grid { grid-template-columns: 1fr 1fr !important; gap: 6px 12px !important; }
            .bhh-filter-grid label { font-size: 14px !important; padding: 8px 0 !important; gap: 10px !important; }
            .bhh-filter-grid input[type="checkbox"] { width: 22px !important; height: 22px !important; min-width: 22px !important; }
            .bhh-price-range-wrapper { gap: 10px !important; margin-top: 10px !important; }
            .bhh-modal-footer { padding: 14px 20px calc(14px + env(safe-area-inset-bottom)) 20px !important; }

            /* GUEST PICKER FULLSCREEN (MOBILE) */
            .bhh-guest-dropdown.active { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; border-radius: 0 !important; margin: 0 !important; z-index: 9999999 !important; box-shadow: none !important; border: none !important; display: flex !important; flex-direction: column !important; padding: 0 !important; box-sizing: border-box !important; }
            .bhh-guest-dropdown .bhh-dropdown-header { display: flex !important; align-items: center; padding: 18px 20px; font-size: 18px; font-weight: 700; color: #fff; background: #172957; border-bottom: 1px solid #ebebeb; flex-shrink: 0; }
            .bhh-guest-dropdown .bhh-guest-rows-wrap { flex: 1; overflow-y: auto; padding: 10px 24px; -webkit-overflow-scrolling: touch; }
            .bhh-guest-dropdown .bhh-guest-row { padding: 20px 0; }
            .bhh-guest-dropdown .bhh-guest-close-row { display: none !important; }
            .bhh-guest-dropdown .bhh-guest-footer { display: flex !important; justify-content: center; align-items: center; padding: 16px 20px calc(16px + env(safe-area-inset-bottom)) 20px; border-top: 1px solid #ebebeb; background: #fff; flex-shrink: 0; }
            .bhh-guest-dropdown .bhh-guest-done-btn { background: #172957; color: #fff; border: none; border-radius: 8px; padding: 14px 48px; font-size: 16px; font-weight: 700; cursor: pointer; width: 100%; }

            /* ADVANCED DATE PICKER (MOBILE OVERRIDES) */
            .bhh-unified-form .bhh-advanced-date-modal { position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; height: 100dvh !important; border-radius: 0 !important; margin: 0 !important; display: none; flex-direction: column; z-index: 999999 !important; background: #fff !important; }
            .bhh-unified-form .bhh-advanced-date-modal.visible { display: flex !important; opacity: 1 !important; }
            .bhh-unified-form .bhh-modal-scroll-area { flex-grow: 0 !important; flex-shrink: 1 !important; max-height: none !important; padding: 0 15px 10px 15px !important; overflow-y: auto !important; }
            .bhh-unified-form .bhh-flex-pills-row, .bhh-unified-form .bhh-durations-row { flex-wrap: nowrap !important; overflow-x: auto !important; justify-content: flex-start !important; padding-bottom: 15px !important; padding-top: 15px !important; margin-top: 25px !important; -webkit-overflow-scrolling: touch; scrollbar-width: none; border-top: none !important; }
            .bhh-unified-form .bhh-flex-pills-row::-webkit-scrollbar, .bhh-unified-form .bhh-durations-row::-webkit-scrollbar { display: none; }
            .bhh-unified-form button.bhh-flex-pill, .bhh-unified-form button.bhh-dur-pill { flex-shrink: 0 !important; white-space: nowrap !important; }
            .bhh-unified-form .bhh-date-modal-footer { padding: 5px 15px 25px 15px !important; border-top: none !important; margin-top: -5px !important; }
            .bhh-unified-form .bhh-fp-left { gap: 18px !important; align-items: center !important; }
            .bhh-unified-form button.bhh-date-action-btn.cancel, .bhh-unified-form button.bhh-date-action-btn.clear { font-size: 14px !important; font-weight: 500 !important; color: #717171 !important; }
            .bhh-unified-form button.bhh-date-action-btn.confirm { font-size: 14px !important; padding: 12px 22px !important; border-radius: 8px !important; }

            /* PROPERTY CARDS (MOBILE) */
            .bhh-grid-results { background: transparent !important; padding: 0 !important; border-radius: 0 !important; }
            .bhh-search-card-horizontal { flex-direction: column !important; height: auto !important; min-height: auto !important; border-radius: 16px !important; margin-bottom: 28px !important; border: none !important; box-shadow: 0 2px 12px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.04) !important; background: #ffffff !important; overflow: hidden !important; }
            .bhh-search-card-horizontal:last-child { margin-bottom: 0 !important; }
            .bhh-search-card-horizontal:active { transform: scale(0.98); box-shadow: 0 2px 8px rgba(0,0,0,0.07) !important; }
            .bhh-h-img-wrapper { flex: 0 0 220px !important; width: 100% !important; min-width: 100% !important; border-radius: 16px 16px 0 0 !important; }
            .bhh-h-img { border-radius: 16px 16px 0 0 !important; }
            .bhh-h-content { flex: 1 !important; padding: 14px 16px 16px 16px !important; }
            .bhh-h-title { font-size: 18px !important; line-height: 1.35 !important; color: #172957 !important; }
            .bhh-h-amenities { gap: 14px !important; padding-top: 10px !important; margin-top: 8px !important; margin-bottom: 8px !important; }
            .bhh-h-footer { padding-top: 12px !important; margin-top: auto; }
            .bhh-h-current-price { font-size: 20px !important; color: #172957 !important; }
            .bhh-h-btn { padding: 11px 22px !important; box-shadow: 0 4px 10px rgba(23, 41, 87, 0.2) !important; border-radius: 8px !important; }
            body:has(.bhh-mobile-modal-active) .bhh-h-badge-overlay { opacity: 0 !important; visibility: hidden !important; transition: opacity 0.2s ease !important; }
            .bhh-results-count { display: none !important; }
            .bhh-sort-wrapper { width: 100% !important; justify-content: flex-end !important; }
            .bhh-results-sort-bar { padding: 0 4px 8px 4px !important; margin-bottom: 12px !important; border-bottom: none !important; }
        }


        /* Amenity labels */
        .bhh-am-label { font-weight: 400; }



        /* ==========================================================================
           KEYFRAMES & Z-INDEX FIXES
           ========================================================================== */
        @-webkit-keyframes bhhFadeIn { from { opacity: 0; -webkit-transform: translateY(-10px); transform: translateY(-10px); } to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); } }
        @keyframes bhhFadeIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
        @-webkit-keyframes bhhModalFadeIn { from { opacity: 0; -webkit-transform: translateY(20px); transform: translateY(20px); } to { opacity: 1; -webkit-transform: translateY(0); transform: translateY(0); } }
        @keyframes bhhModalFadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
        @-webkit-keyframes bhhSlideUp { from { -webkit-transform: translateY(100%); transform: translateY(100%); opacity: 0; } to { -webkit-transform: translateY(0); transform: translateY(0); opacity: 1; } }
        @keyframes bhhSlideUp { from { transform: translateY(100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

        .flatpickr-calendar.bhh-search-theme { z-index: 2147483647 !important; }
        .bhh-autocomplete-results { z-index: 2147483647 !important; }
        .bhh-unified-container.bhh-mobile-modal-active .bhh-field-group,
        .bhh-unified-container.bhh-mobile-modal-active .bhh-input-wrapper { pointer-events: auto !important; cursor: text !important; }

        /* ==========================================================================
           PROPERTY AMENITIES SECTION
           ========================================================================== */
        .bhh-amenities-container { margin: 40px 0; padding-top: 40px; border-top: 1px solid #ebebeb; }
        .bhh-section-title { font-size: 24px; font-weight: 800; color: #222; margin-bottom: 30px; }
        .bhh-amenities-grid { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 40px; row-gap: 30px; }
        .bhh-amenity-cat-title { font-size: 16px; font-weight: 700; color: #172957; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; }
        .bhh-amenity-list { display: flex; flex-direction: column; gap: 15px; }
        .bhh-amenity-item { display: flex; align-items: center; gap: 16px; font-size: 16px; color: #444; font-weight: 400; }
        .bhh-amenity-item i { font-size: 20px; color: #222; width: 24px; text-align: center; opacity: 0.8; }
        @media (max-width: 768px) { .bhh-amenities-grid { grid-template-columns: 1fr; gap: 35px; } }

        /* ==========================================================================
           UNIFIED PREFERENCES POPUP
           ========================================================================== */

        /* --- Wrapper & Trigger pill --- */
        .bhh-prefs-wrapper {
            position: relative;
            display: inline-block;
            font-family: "Lato", sans-serif;
            z-index: 99999;
        }
        .bhh-prefs-trigger {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 7px 16px;
            background: #fff;
            border: 1px solid #e0e0e0;
            border-radius: 50px;
            font-weight: 700;
            font-size: 13px;
            color: #333;
            cursor: pointer;
            transition: all 0.2s ease;
            white-space: nowrap;
            line-height: 1;
        }
        .bhh-prefs-trigger:hover,
        .bhh-prefs-trigger[aria-expanded="true"] {
            background: #f9f9f9;
            border-color: #172957;
            color: #172957;
        }
        .bhh-prefs-lang-icon { font-size: 14px; }
        .bhh-prefs-sep { color: #bbb; font-weight: 400; }
        .bhh-prefs-chevron {
            transition: transform 0.25s ease;
            flex-shrink: 0;
        }
        .bhh-prefs-trigger[aria-expanded="true"] .bhh-prefs-chevron {
            transform: rotate(180deg);
        }

        /* --- Popup panel --- */
        .bhh-prefs-popup {
            display: none;
            position: absolute;
            top: calc(100% + 12px);
            right: 0;
            background: #fff;
            border-radius: 16px;
            box-shadow: 0 16px 48px rgba(0,0,0,0.16);
            border: 1px solid #ebebeb;
            width: 300px;
            padding: 20px;
            z-index: 99999;
            animation: bhhPrefsSlide 0.2s ease-out;
        }
        .bhh-prefs-popup.is-open { display: block; }

        @keyframes bhhPrefsSlide {
            from { opacity: 0; transform: translateY(-8px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        /* bridge so mouse-over gap doesn't close it */
        .bhh-prefs-popup::before {
            content: "";
            position: absolute;
            top: -14px;
            left: 0;
            width: 100%;
            height: 14px;
            background: transparent;
        }

        /* --- Sections --- */
        .bhh-prefs-section { margin-bottom: 4px; }
        .bhh-prefs-section-label {
            font-size: 11px;
            font-weight: 700;
            color: #888;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 10px;
        }
        .bhh-prefs-divider {
            border: none;
            border-top: 1px solid #f0f0f0;
            margin: 14px 0;
        }

        /* --- Chip grid --- */
        .bhh-prefs-grid { display: grid; gap: 6px; }
        .bhh-prefs-grid-4 { grid-template-columns: repeat(4, 1fr); }

        .bhh-prefs-chip {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            padding: 8px 4px;
            border-radius: 8px;
            cursor: pointer;
            border: 1px solid transparent;
            transition: all 0.15s ease;
            background: #f7f7f7;
        }
        .bhh-prefs-chip:hover { background: #efefef; border-color: #ddd; }
        .bhh-prefs-chip.active {
            background: #172957;
            border-color: #172957;
        }
        .bhh-prefs-chip.active .bhh-chip-flag,
        .bhh-prefs-chip.active .bhh-chip-label { color: #fff; }

        .bhh-chip-flag { font-size: 18px; line-height: 1; }
        .bhh-chip-label {
            font-size: 11px;
            font-weight: 700;
            color: #444;
            letter-spacing: 0.3px;
        }

        /* --- Measurement toggle --- */
        .bhh-prefs-measure-toggle {
            display: flex;
            gap: 8px;
        }
        .bhh-measure-btn {
            flex: 1;
            padding: 10px 0;
            border: 1px solid #ddd;
            border-radius: 8px;
            background: #f7f7f7;
            font-size: 14px;
            font-weight: 700;
            color: #555;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .bhh-measure-btn:hover { border-color: #172957; color: #172957; }
        .bhh-measure-btn.active {
            background: #172957;
            border-color: #172957;
            color: #fff;
        }

        /* --- Mobile: center popup so it doesn't overflow --- */
        @media (max-width: 768px) {
            .bhh-prefs-popup {
                right: auto;
                left: 50%;
                transform: translateX(-50%);
                width: 290px;
            }
            .bhh-prefs-popup.is-open { display: block; transform: translateX(-50%); }
        }