/* ============================================================
   HOESCAPE — /cerca page dedicated styles
   ============================================================

   This file contains styles required by the Hoescape /cerca page
   that were originally living in `search.css` (the InfoIschia
   legacy v2 search motor CSS). To fully decouple Hoescape from
   InfoIschia, we copied the relevant rules here, scoped to the
   Hoescape portal (`html[data-portal="offertehoescape"]`).

   Loaded ONLY when the active portal is Hoescape (see
   search_results.html `<link rel="stylesheet" ...>` block).
   Mobile rules live at the bottom in a single @media block.

   Source reference (do NOT touch search.css for Hoescape):
   - Hotel cards/horizontal:  search.css:461-466, 472, 544, 575-576
   - Filter sidebar:           search.css:315-353
   - Price display:            search.css:491-494, 759-763
   - Hotel meta/badges:        search.css:482-487
   - Hotel description clamp: search.css:479
   - Results summary:          search.css:523-525
   ============================================================ */

/* ----- Hotel result cards (horizontal layout) ----- */
html[data-portal="offertehoescape"] .hotel-card-horizontal {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    margin-bottom: 0;
}
html[data-portal="offertehoescape"] .hotel-card-horizontal:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}
html[data-portal="offertehoescape"] .hotel-card-horizontal h5:hover {
    text-decoration: underline;
}
html[data-portal="offertehoescape"] .hotel-card-horizontal .card-body {
    padding-left: 24px;
}

html[data-portal="offertehoescape"] .hotel-card-img {
    object-fit: cover;
    min-height: 220px;
    border-radius: 16px 0 0 16px;
}
html[data-portal="offertehoescape"] .hotel-card-img-wrapper {
    position: relative;
    height: 220px;
    overflow: hidden;
}
html[data-portal="offertehoescape"] .hotel-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

html[data-portal="offertehoescape"] .hotel-card-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--hoescape-primary, #1e3c72);
}

html[data-portal="offertehoescape"] .hotel-unavailable {
    opacity: 0.8;
}
html[data-portal="offertehoescape"] .hotel-unavailable:hover {
    opacity: 1;
}

html[data-portal="offertehoescape"] .hotel-description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.5;
}

/* ----- Hotel meta / badges ----- */
html[data-portal="offertehoescape"] .location-tag {
    color: var(--hoescape-accent, #a4c639);
    font-size: 13px;
    font-weight: 500;
}
html[data-portal="offertehoescape"] .rating-badge {
    background: var(--hoescape-primary, #1e3c72);
    color: white;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
}
html[data-portal="offertehoescape"] .availability-badge {
    position: absolute;
    top: 12px;
    right: 12px;
}
html[data-portal="offertehoescape"] .badge-promo {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #e74c3c;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
html[data-portal="offertehoescape"] .text-accent {
    color: var(--hoescape-accent, #a4c639);
}

/* ----- Pricing display ----- */
html[data-portal="offertehoescape"] .price-display-xl {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    color: var(--hoescape-accent, #f5a623);
}
html[data-portal="offertehoescape"] .price-display-sm {
    font-size: 1.1rem;
    font-weight: 700;
    color: #666;
}
html[data-portal="offertehoescape"] .price-dates {
    font-size: 0.95rem;
}
html[data-portal="offertehoescape"] .price-dates strong {
    font-size: 1.05rem;
}
html[data-portal="offertehoescape"] .price-per-night {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--hoescape-accent, #f5a623);
}

/* ----- Filter sidebar ----- */
html[data-portal="offertehoescape"] .filter-label {
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--hoescape-primary, #1e3c72);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    letter-spacing: 0.01em;
}
html[data-portal="offertehoescape"] .filter-group {
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f0f2f5;
}
html[data-portal="offertehoescape"] .filter-group:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
html[data-portal="offertehoescape"] .filter-icon {
    font-size: 0.9rem;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    flex-shrink: 0;
}
html[data-portal="offertehoescape"] .filter-icon-stars       { background: #fff8e1; color: #f5a623; }
html[data-portal="offertehoescape"] .filter-icon-location    { background: #e8f5e9; color: #43a047; }
html[data-portal="offertehoescape"] .filter-icon-treatment   { background: #fce4ec; color: #e91e63; }
html[data-portal="offertehoescape"] .filter-icon-price       { background: #fff3e0; color: #ef6c00; }
html[data-portal="offertehoescape"] .filter-icon-amenities   { background: #e3f2fd; color: #1976d2; }

html[data-portal="offertehoescape"] .filters-sidebar .form-check-input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin-top: 2px;
}
html[data-portal="offertehoescape"] .filters-sidebar .form-check-input:checked {
    background-color: var(--hoescape-accent, #a4c639);
    border-color: var(--hoescape-accent, #a4c639);
}
html[data-portal="offertehoescape"] .filters-sidebar .form-check-label {
    font-size: 0.92rem;
    cursor: pointer;
    user-select: none;
}

html[data-portal="offertehoescape"] .filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

/* ----- Top breathing room above first hotel card -----
   The search motor sits flush against the first result; add a margin so
   the user has visual separation between the search widget and the
   results grid. */
html[data-portal="offertehoescape"] #availableSection {
    margin-top: 24px;
}
@media (max-width: 768px) {
    html[data-portal="offertehoescape"] #availableSection {
        margin-top: 16px;
    }
}

/* ----- Results summary (mobile-only sticky bar — hidden desktop) ----- */
html[data-portal="offertehoescape"] .results-summary {
    display: none;
}
html[data-portal="offertehoescape"] .results-summary .results-count {
    font-size: 0.95rem;
    color: #555;
    font-weight: 500;
}
html[data-portal="offertehoescape"] .results-summary .results-count strong {
    color: var(--hoescape-primary, #1e3c72);
    font-size: 1.1rem;
}

/* ----- Search summary (mobile only — hide on desktop) ----- */
html[data-portal="offertehoescape"] .search-summary {
    display: none;
}

/* ----- Search sticky toolbar (mobile only — hide on desktop) ----- */
html[data-portal="offertehoescape"] .search-toolbar {
    display: none;
}

/* ----- Filters sidebar container (sticky card) ----- */
html[data-portal="offertehoescape"] .filters-sidebar {
    background: #ffffff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border: 1px solid #f0f0f0;
}

/* ----- Form check inputs (checkboxes / radios) ----- */
html[data-portal="offertehoescape"] .filters-sidebar .form-check-input {
    width: 18px;
    height: 18px;
    border: 2px solid #d0d5dd;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s;
    margin-top: 2px;
}
html[data-portal="offertehoescape"] .filters-sidebar .form-check-input:checked {
    background-color: var(--hoescape-accent, #a4c639);
    border-color: var(--hoescape-accent, #a4c639);
}
html[data-portal="offertehoescape"] .filters-sidebar .form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(164, 198, 57, 0.18);
}
html[data-portal="offertehoescape"] .filters-sidebar .form-check-label {
    cursor: pointer;
    font-size: 0.85rem;
    color: #444;
    transition: color 0.15s;
    padding-left: 2px;
    user-select: none;
}
html[data-portal="offertehoescape"] .filters-sidebar .form-check:hover .form-check-label {
    color: var(--hoescape-primary, #1e3c72);
}
html[data-portal="offertehoescape"] .filters-sidebar .form-check {
    padding-top: 3px;
    padding-bottom: 3px;
}
html[data-portal="offertehoescape"] .filters-sidebar .form-check-input[type="radio"] {
    border-radius: 50%;
}
html[data-portal="offertehoescape"] .filters-sidebar .form-check-input[type="radio"]:checked {
    background-color: var(--hoescape-accent, #a4c639);
    border-color: var(--hoescape-accent, #a4c639);
}

/* ----- Sort select + form-switch ----- */
html[data-portal="offertehoescape"] .filters-sidebar .form-select {
    border-radius: 10px;
    border: 1.5px solid #e0e4ea;
    font-size: 0.85rem;
    padding: 8px 12px;
    transition: border-color 0.2s;
}
html[data-portal="offertehoescape"] .filters-sidebar .form-select:focus {
    border-color: var(--hoescape-accent, #a4c639);
    box-shadow: 0 0 0 3px rgba(164, 198, 57, 0.12);
}
html[data-portal="offertehoescape"] .filters-sidebar .form-switch .form-check-input {
    width: 38px;
    height: 20px;
    border-radius: 12px;
}
html[data-portal="offertehoescape"] .filters-sidebar .form-switch .form-check-input:checked {
    background-color: #27ae60;
    border-color: #27ae60;
}
html[data-portal="offertehoescape"] .filters-sidebar .alert {
    border-radius: 10px;
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f9fa 100%);
    border: 1px solid #e0e8f5;
    font-size: 0.88rem;
}
html[data-portal="offertehoescape"] .filters-sidebar .alert strong {
    color: var(--hoescape-primary, #1e3c72);
    font-size: 1.1rem;
}

/* ----- Filter chips ----- */
html[data-portal="offertehoescape"] .filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e8f4fc;
    color: var(--hoescape-primary, #1e3c72);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(30, 60, 114, 0.12);
    cursor: pointer;
    transition: all 0.2s;
}
html[data-portal="offertehoescape"] .filter-chip:hover {
    background: #d0e8f7;
}
html[data-portal="offertehoescape"] .filter-chip .bi-x {
    font-size: 0.9rem;
    opacity: 0.7;
}
html[data-portal="offertehoescape"] .filter-chip .bi-x:hover {
    opacity: 1;
}
html[data-portal="offertehoescape"] .filter-active-count {
    background: var(--hoescape-accent, #a4c639);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    margin-left: 6px;
}

/* ----- Amenity pills on hotel cards ----- */
html[data-portal="offertehoescape"] .amenity-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
html[data-portal="offertehoescape"] .amenity-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #f0f4f8;
    color: #555;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
html[data-portal="offertehoescape"] .amenity-pill i {
    font-size: 0.8rem;
    color: var(--hoescape-primary, #1e3c72);
}

/* ----- Distance badges under hotel name ----- */
html[data-portal="offertehoescape"] .distance-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 0.8rem;
    color: #666;
}
html[data-portal="offertehoescape"] .distance-info span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

/* ----- Wishlist heart (overlay on hotel card image) ----- */
html[data-portal="offertehoescape"] .wishlist-heart {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}
html[data-portal="offertehoescape"] .wishlist-heart i {
    font-size: 1.15rem;
    color: #999;
    transition: all 0.3s ease;
}
html[data-portal="offertehoescape"] .wishlist-heart:hover {
    transform: scale(1.1);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
html[data-portal="offertehoescape"] .wishlist-heart:hover i {
    color: #e74c3c;
}
html[data-portal="offertehoescape"] .wishlist-heart.active {
    background: white;
    animation: hoeHeartPop 0.4s ease;
}
html[data-portal="offertehoescape"] .wishlist-heart.active i {
    color: #e74c3c;
}
@keyframes hoeHeartPop {
    0%   { transform: scale(1); }
    30%  { transform: scale(1.3); }
    60%  { transform: scale(0.9); }
    100% { transform: scale(1); }
}

/* ----- Legacy "Filtri" full-width button (Bootstrap) — Hoescape hides it.
   Hoescape mobile uses the `.cerca-actions` 3-column toolbar from
   _search_hero_mobile.html (Ordina/Filtra/Mappa); the standalone
   `<button class="btn btn-primary w-100 d-lg-none">Filtri</button>`
   rendered by the InfoIschia template is a duplicate on this portal. */
html[data-portal="offertehoescape"] button.btn.btn-primary.w-100.d-lg-none[data-bs-target*="filter"],
html[data-portal="offertehoescape"] button.btn.btn-primary.w-100.d-lg-none[data-bs-target*="Filter"],
html[data-portal="offertehoescape"] button.btn.btn-primary.w-100.d-lg-none.mb-3 {
    display: none !important;
}

/* Booking-reason chips on Hoescape cards: search.css sets the green check
   icon but on Hoescape /cerca the icon falls back to inherited body navy
   for some pages. Force green explicitly + 2-col grid layout. */
html[data-portal="offertehoescape"] .hotel-card-horizontal .booking-reasons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-bottom: 12px;
}
html[data-portal="offertehoescape"] .hotel-card-horizontal .booking-reason-item {
    font-size: 0.82rem;
    color: #333;
    display: flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1.4;
}
html[data-portal="offertehoescape"] .hotel-card-horizontal .booking-reason-item i,
html[data-portal="offertehoescape"] .hotel-card-horizontal .booking-reason-item .bi-check-circle-fill {
    color: #27ae60 !important;
    font-size: 0.85rem;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    html[data-portal="offertehoescape"] .hotel-card-horizontal .booking-reasons {
        grid-template-columns: 1fr;
        gap: 2px;
    }
}

/* Amenity pills on Hoescape cards: match the InfoIschia "booking
   reasons" look — 2-column grid, no pill background, green check
   icon — instead of the navy/grey pill chips. This unifies the AVES
   amenity_names render path with the native booking_reasons one so
   Hoescape cards read consistently regardless of data source. */
html[data-portal="offertehoescape"] .hotel-card-horizontal .amenity-pills {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
    margin-bottom: 12px;
}
html[data-portal="offertehoescape"] .hotel-card-horizontal .amenity-pill {
    background: transparent;
    color: #333;
    font-size: 0.82rem;
    padding: 0;
    border-radius: 0;
    white-space: normal;
    display: flex;
    align-items: baseline;
    gap: 5px;
    line-height: 1.4;
}
html[data-portal="offertehoescape"] .hotel-card-horizontal .amenity-pill i {
    color: #27ae60;
    font-size: 0.85rem;
    flex-shrink: 0;
}
@media (max-width: 768px) {
    html[data-portal="offertehoescape"] .hotel-card-horizontal .amenity-pills {
        grid-template-columns: 1fr;
        gap: 2px;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .amenity-pill {
        font-size: 0.78rem;
    }
}

/* Hotel description fallback: plain 2-line clamped paragraph — the
   pill chip styling we tried earlier blew up on long prose
   descriptions (Porto Conte / La Plaja) showing a giant rounded
   info-box dump, which the user did not want. */
html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-description {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    color: #555;
    font-size: 0.82rem;
    line-height: 1.4;
    margin-bottom: 8px;
    background: transparent;
    border: 0;
    padding: 0;
    border-radius: 0;
}
html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-description::before {
    content: none;
}

/* WhatsApp icon on mobile cards: the icon was inheriting the navy
   body color when nested inside the green square. Force white so
   the WhatsApp glyph is legible on the lime/green background. */
html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-wa-search,
html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-wa-search i,
html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-wa-search .bi {
    color: #ffffff !important;
}

/* Mobile filters offcanvas footer: align the "Resetta" link and the
   "Mostra X hotel" CTA so they don't overlap and the Resetta inherits
   proper button affordance. Scoped to Hoescape only. */
html[data-portal="offertehoescape"] .filters-offcanvas-mobile .offcanvas-footer-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom, 0));
    border-top: 1px solid #eee;
    background: #fff;
    position: sticky;
    bottom: 0;
}
html[data-portal="offertehoescape"] .filters-offcanvas-mobile #filtersResetMobile {
    color: #6c757d;
    font-weight: 600;
    text-decoration: underline;
    padding: 10px 6px;
    flex-shrink: 0;
}
html[data-portal="offertehoescape"] .filters-offcanvas-mobile #filtersApplyMobile {
    background: #1e3c72;
    border-color: #1e3c72;
    color: #ffffff;
    font-weight: 700;
    text-align: center;
    padding: 12px 18px;
    border-radius: 10px;
    flex: 1 1 auto;
    min-height: 44px;
}
html[data-portal="offertehoescape"] .filters-offcanvas-mobile #filtersApplyMobile:hover,
html[data-portal="offertehoescape"] .filters-offcanvas-mobile #filtersApplyMobile:active,
html[data-portal="offertehoescape"] .filters-offcanvas-mobile #filtersApplyMobile:focus {
    background: #152a4f;
    border-color: #152a4f;
    color: #ffffff;
}

/* Single canonical mobile drawer header: funnel + "Filtri" on the left,
   "Resetta" + close X on the right. The desktop header clone is skipped
   in syncMobileFilters() so there is no longer a duplicate "Filtri".
   Scoped to .filters-offcanvas-mobile (Bootstrap d-lg-none) → never
   rendered >=992px, so desktop/tablet are untouched by construction. */
html[data-portal="offertehoescape"] .filters-offcanvas-mobile .offcanvas-header.filters-drawer-head {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
}
html[data-portal="offertehoescape"] .filters-offcanvas-mobile .filters-drawer-head h5,
html[data-portal="offertehoescape"] .filters-offcanvas-mobile .filters-drawer-head h5 .bi-funnel {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e3c72;
}
html[data-portal="offertehoescape"] .filters-offcanvas-mobile .filters-head-reset {
    font-weight: 600;
    text-decoration: underline;
    padding: 10px 6px;
}
html[data-portal="offertehoescape"] .filters-offcanvas-mobile .filters-head-close {
    width: 44px;
    height: 44px;
    margin: 0;
    opacity: .9;
}

/* Sort-sheet ironclad guard: belt + braces on top of CSS rules and the
   HTML `hidden` attribute, so even if a viewport edge-case bypassed
   `display: none` the markup can never leak as visible text. */
html[data-portal="offertehoescape"] .sort-sheet:not(.active),
html[data-portal="offertehoescape"] .sort-sheet-backdrop:not(.active) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ----- CTA buttons (Vedi camere disponibili / Prenota) ----- */
/* ============================================================
 * MOBILE HOTEL CARD LAYOUT (Hoescape only) — fixes a regression
 * where `.card-price-cta-row` stayed `flex-direction: row` on
 * narrow viewports because `search.css` is not loaded on
 * Hoescape /cerca. The CTA column was eating the full width
 * (`width: 100%`) and the price-block sibling collapsed to 0px,
 * which made "7 notti in All Inclusive per 2 Adulti" wrap one
 * character per line.
 *
 * Mobile target: <=767px → row stacks vertically (price above,
 * CTA wrapper below). On <=767px both children render at 100%
 * width so the price text never gets squeezed.
 *
 * Inside the CTA wrapper the WhatsApp + CTA buttons stay on the
 * SAME ROW (44px WA fixed, CTA flex:1) — mirrors the hotel detail
 * sticky bar look.
 * ============================================================ */
@media (max-width: 767px) {
    /* Stack price and CTA vertically — the very thing search.css
       did and that Hoescape was missing. */
    html[data-portal="offertehoescape"] .card-price-cta-row {
        flex-direction: column !important;
        gap: 10px !important;
        align-items: stretch !important;
    }
    /* Both children take the full row so the price text wraps
       normally (no more 0-width sibling). */
    html[data-portal="offertehoescape"] .card-price-cta-row > div {
        width: 100%;
        min-width: 0;
    }
    /* Price meta line: belt + braces — make sure it can wrap. */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .card-summary-line {
        width: 100%;
        min-width: 0;
        word-break: normal !important;
        overflow-wrap: normal !important;
        white-space: normal;
    }
    /* WA + CTA row inside the CTA wrapper: stay HORIZONTAL even
       though the parent is now column-stacked. */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .text-end {
        align-items: stretch !important;
        text-align: left !important;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .text-end > .d-flex {
        flex-direction: row !important;
        align-items: center !important;
        width: 100%;
        gap: 8px !important;
    }
    /* WhatsApp square button: 56x56 with a properly centered ~28px
       glyph, matching the hotel detail sticky bar size on mobile. */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-wa-search {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 56px !important;
        height: 56px !important;
        min-width: 56px !important;
        flex: 0 0 56px !important;
        background: #25D366 !important;
        border-radius: 12px !important;
        padding: 0 !important;
        line-height: 1 !important;
        overflow: hidden;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-wa-search i,
    html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-wa-search .bi {
        font-size: 28px !important;
        line-height: 1 !important;
        color: #ffffff !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none !important;
        border: 0 !important;
    }
    /* Strip the white underline that Bootstrap/UA stylesheets paint
       under <a class="btn-wa-search">. Belt + braces on the link
       itself in case the icon underline came from the parent. */
    html[data-portal="offertehoescape"] .hotel-card-horizontal a.btn-wa-search,
    html[data-portal="offertehoescape"] .hotel-card-horizontal a.btn-wa-search:hover,
    html[data-portal="offertehoescape"] .hotel-card-horizontal a.btn-wa-search:focus {
        text-decoration: none !important;
        border: 0 !important;
        outline: 0 !important;
        box-shadow: none !important;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-cta-primary {
        flex: 1 1 auto;
        min-height: 56px;
        padding: 14px 18px !important;
        font-size: 1rem !important;
        font-weight: 700 !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 12px !important;
        gap: 6px;
    }
    /* Bigger, more commercial price on mobile cards. */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .price-display-xl {
        font-size: 2rem !important; /* ~32px */
        font-weight: 800 !important;
        line-height: 1.05;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .price-per-night {
        font-size: 0.95rem !important;
        font-weight: 600;
        white-space: nowrap;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .card-summary-line {
        font-size: 0.88rem !important;
        margin-top: 4px;
    }
    /* Image becomes full-width banner above the body on narrow
       screens — the Bootstrap col-md-4 already drops to col-12 on
       mobile but we make the rounded corners read correctly. */
    /* Image more compact on mobile (was 220px desktop, 180px previous
       mobile target — still too tall above the body content). */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-card-img,
    html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-card-img-wrapper,
    html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-card-img-wrapper img {
        border-radius: 16px 16px 0 0;
        min-height: 0 !important;
        height: 150px !important;
        max-height: 150px;
        object-fit: cover;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-card-img-wrapper {
        height: 150px !important;
    }
}

html[data-portal="offertehoescape"] .btn-cta-primary {
    /* Hoescape brand blue (primary navy) — was Hoescape accent lime
       which the user explicitly rejected on the search results CTA. */
    background: var(--hoescape-primary, #1e3c72);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 10px 24px;
    border-radius: 8px;
    transition: all 0.25s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
html[data-portal="offertehoescape"] .btn-cta-primary:hover {
    background: var(--hoescape-primary-dark, #152a4f);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(30, 77, 156, 0.35);
    text-decoration: none;
}

/* ============================================================
   DESKTOP (≥ 992px) — extra spacing & layout polish
   ============================================================ */
@media (min-width: 992px) {
    /* Add breathing room between the search bar and the first hotel
       result card. Without this the .container.pt-3.pb-0 wrapper put the
       results flush against the search pill, which felt cramped. Desktop
       only — mobile keeps the tighter spacing untouched. */
    html[data-portal="offertehoescape"] .hoe-cerca-form-wrap {
        margin-bottom: 56px;
    }
}

/* ============================================================
   MOBILE (< 768px)
   ============================================================ */
@media (max-width: 767px) {
    html[data-portal="offertehoescape"] .hotel-card-img {
        border-radius: 12px 12px 0 0 !important;
        min-height: 180px !important;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .card-body {
        padding-left: 16px;
    }
}
@media (max-width: 991px) {
    /* On tablet/mobile the sidebar is shown inside an offcanvas, not in
       the page flow — remove sticky/scroll so it sits naturally inside
       the drawer. */
    html[data-portal="offertehoescape"] .filters-sidebar {
        position: static;
        max-height: none;
        overflow-y: visible;
        box-shadow: none;
        border: none;
        border-radius: 0;
        padding: 0;
    }
}

/* =====================================================================
   PREMIUM TRAVEL UI — Hoescape mobile hotel card v2 (2026-05-15)
   Visual polish layer ON TOP of the existing card markup. No layout
   restructure: every selector targets the same nodes already
   rendered by `renderCards` in `search_results.html`. Scope: Hoescape
   only, <=767px (mobile-first). Goal: premium travel feel, big
   commercial price, glassmorphism heart, dominant navy CTA.
   ===================================================================== */
@media (max-width: 767px) {
    /* ----- Card container ----- */
    html[data-portal="offertehoescape"] .hotel-card-horizontal {
        background: #ffffff;
        border: 0 !important;
        border-radius: 20px !important;
        box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06), 0 8px 32px rgba(15, 23, 42, 0.06);
        overflow: hidden;
        margin-bottom: 16px;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08), 0 12px 36px rgba(15, 23, 42, 0.08);
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .card-body {
        padding: 16px 18px 18px !important;
        gap: 6px;
    }

    /* ----- Hero image: rounded top + subtle bottom-to-transparent
       gradient overlay so badges read on bright photos. ----- */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-card-img-wrapper {
        position: relative;
        height: 170px !important;
        border-radius: 20px 20px 0 0;
        overflow: hidden;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-card-img-wrapper::after {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(to bottom, rgba(0,0,0,0) 60%, rgba(0,0,0,0.12) 100%);
        pointer-events: none;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-card-img,
    html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-card-img-wrapper img {
        height: 170px !important;
        max-height: 170px;
        min-height: 0 !important;
        object-fit: cover;
        border-radius: 20px 20px 0 0;
    }

    /* ----- Wishlist heart: glassmorphism, smaller, refined ----- */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .wishlist-heart {
        position: absolute;
        top: 12px;
        right: 12px;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.78);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        border: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
        z-index: 2;
        padding: 0;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .wishlist-heart i {
        font-size: 16px;
        color: #1e3c72;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .wishlist-heart.active i,
    html[data-portal="offertehoescape"] .hotel-card-horizontal .wishlist-heart .bi-heart-fill {
        color: #e74c3c;
    }

    /* ----- Title: bold premium, tight tracking ----- */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .hotel-card-title {
        font-size: 1.18rem !important;
        font-weight: 800 !important;
        color: #0f172a;
        letter-spacing: -0.015em;
        line-height: 1.2;
        margin-bottom: 6px !important;
        text-transform: none;
    }

    /* ----- Stars + location: refined hairline row ----- */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .stars,
    html[data-portal="offertehoescape"] .hotel-card-horizontal .star {
        color: #f5a623;
        font-size: 0.78rem;
        letter-spacing: 1px;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .location-tag {
        color: #475569 !important;
        font-size: 0.82rem !important;
        font-weight: 500 !important;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .location-tag i {
        color: #94a3b8;
    }

    /* ----- Amenity / booking-reason pills: cleaner, less padding ----- */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .booking-reasons {
        gap: 6px 14px !important;
        margin: 8px 0 12px !important;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .booking-reason-item {
        font-size: 0.84rem !important;
        font-weight: 500;
        color: #1e293b;
        padding: 0;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .booking-reason-item i,
    html[data-portal="offertehoescape"] .hotel-card-horizontal .booking-reason-item .bi-check-circle-fill {
        color: #16a34a !important;
        font-weight: 700;
        font-size: 0.9rem !important;
    }

    /* ----- Soft divider between body content and price/CTA row ----- */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .card-price-divider {
        border-top: 1px solid #eef2f7 !important;
        margin: 4px 0 10px !important;
        display: block !important;
    }

    /* ----- Price block — hero of the card ----- */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .price-display-xl {
        font-size: 2.4rem !important; /* ≈38px */
        font-weight: 800 !important; /* prezzi: impatto forte ma max 800 */
        color: #f5a623 !important;
        letter-spacing: -0.02em;
        line-height: 1.0;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .price-per-night {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
        color: #f5a623 !important;
        margin-left: 2px;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .card-summary-line {
        font-size: 0.82rem !important;
        color: #64748b !important;
        font-weight: 500;
        margin-top: 2px !important;
    }

    /* ----- CTA: premium navy, full-width, deeper shadow ----- */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-cta-primary {
        height: 56px !important;
        min-height: 56px !important;
        background: #1e3c72 !important;
        color: #ffffff !important;
        font-size: 1.02rem !important;
        font-weight: 800 !important;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        border-radius: 14px !important;
        box-shadow: 0 4px 14px rgba(30, 60, 114, 0.28), 0 1px 3px rgba(30, 60, 114, 0.18);
        gap: 8px;
    }
    html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-cta-primary:hover,
    html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-cta-primary:active {
        background: #152a4f !important;
        box-shadow: 0 6px 18px rgba(30, 60, 114, 0.34), 0 2px 4px rgba(30, 60, 114, 0.22);
    }

    /* WhatsApp companion keeps the existing 56×56 lime layout from the
       previous round; raise its shadow to match the CTA's depth. */
    html[data-portal="offertehoescape"] .hotel-card-horizontal .btn-wa-search {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.26);
    }
}

/* =====================================================================
   HOESCAPE PREMIUM CARD (.hoe-card) — 2026 travel product UI
   Rendered by renderHoescapeCard() in search_results.html. Vertical
   card: media → title → stars/loc → price+nights one line → 4 amenity
   badges → [WA][VEDI CAMERE]. Compact, conversion-oriented.
   ===================================================================== */
html[data-portal="offertehoescape"] #availableCards,
html[data-portal="offertehoescape"] #alternativeCards,
html[data-portal="offertehoescape"] #avesCards,
html[data-portal="offertehoescape"] #petFriendlyCards,
html[data-portal="offertehoescape"] #noPetCards {
    --hoe-blue: #1e3c72;
    --hoe-blue-dark: #152a4f;
    --hoe-orange: #f5901e;
}
html[data-portal="offertehoescape"] .hoe-card {
    position: relative;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 28px rgba(15,23,42,.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
}
html[data-portal="offertehoescape"] .hoe-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
html[data-portal="offertehoescape"] .hoe-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
html[data-portal="offertehoescape"] .hoe-card-media::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 65%, rgba(0,0,0,.16));
    pointer-events: none;
}
html[data-portal="offertehoescape"] .hoe-card-heart {
    position: absolute; top: 12px; right: 12px;
    width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,.8);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    border: 0; display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,.1); z-index: 3; padding: 0;
}
html[data-portal="offertehoescape"] .hoe-card-heart i { font-size: 15px; color: var(--hoe-blue); }
html[data-portal="offertehoescape"] .hoe-card-heart.active i,
html[data-portal="offertehoescape"] .hoe-card-heart .bi-heart-fill { color: #e74c3c; }
html[data-portal="offertehoescape"] .hoe-card-rating {
    position: absolute; left: 12px; bottom: 12px; z-index: 3;
    background: rgba(255,255,255,.92); color: var(--hoe-blue);
    font-weight: 800; font-size: .82rem; padding: 4px 10px; border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
html[data-portal="offertehoescape"] .hoe-card-body {
    padding: 14px 16px 16px;
    display: flex; flex-direction: column; gap: 6px; flex: 1;
}
html[data-portal="offertehoescape"] .hoe-card-title {
    font-size: 1.16rem; font-weight: 800; color: #0f172a;
    line-height: 1.18; text-decoration: none; letter-spacing: -0.02em;
}
html[data-portal="offertehoescape"] .hoe-card-title:hover { color: var(--hoe-blue); }
html[data-portal="offertehoescape"] .hoe-card-sub {
    display: flex; align-items: center; gap: 8px;
    font-size: .82rem; color: #64748b;
}
html[data-portal="offertehoescape"] .hoe-card-stars { color: #f5a623; letter-spacing: 1px; font-size: .8rem; }
html[data-portal="offertehoescape"] .hoe-card-loc { display: inline-flex; align-items: center; gap: 3px; font-weight: 500; }
html[data-portal="offertehoescape"] .hoe-card-loc i { color: #94a3b8; }
html[data-portal="offertehoescape"] .hoe-card-price-row {
    display: flex; align-items: baseline; gap: 8px; margin-top: 2px;
}
html[data-portal="offertehoescape"] .hoe-card-price {
    font-size: 2.3rem; font-weight: 800; color: var(--hoe-orange);
    letter-spacing: -0.03em; line-height: 1;
}
html[data-portal="offertehoescape"] .hoe-card-price-old {
    font-size: 1rem; color: #94a3b8; text-decoration: line-through; font-weight: 600;
}
html[data-portal="offertehoescape"] .hoe-card-nights {
    font-size: .9rem; font-weight: 700; color: #475569; align-self: flex-end; padding-bottom: 4px;
}
html[data-portal="offertehoescape"] .hoe-card-micro {
    font-size: .8rem; color: #64748b; font-weight: 500; margin-top: -2px;
}
html[data-portal="offertehoescape"] .hoe-card-amenities {
    display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 4px;
}
html[data-portal="offertehoescape"] .hoe-card-amenity {
    display: inline-flex; align-items: center; gap: 5px;
    background: #f1f5f9; color: #334155;
    font-size: .76rem; font-weight: 600;
    padding: 5px 10px; border-radius: 9px; white-space: nowrap;
}
html[data-portal="offertehoescape"] .hoe-card-amenity i { font-size: .82rem; color: var(--hoe-blue); }
html[data-portal="offertehoescape"] .hoe-card-cta-row {
    display: flex; gap: 8px; align-items: stretch; margin-top: auto; padding-top: 12px;
}
html[data-portal="offertehoescape"] .hoe-card-wa {
    width: 54px; height: 54px; flex: 0 0 54px;
    background: #25D366; border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; box-shadow: 0 4px 12px rgba(37,211,102,.28);
}
html[data-portal="offertehoescape"] .hoe-card-wa i { color: #fff; font-size: 26px; }
html[data-portal="offertehoescape"] .hoe-card-cta {
    flex: 1 1 auto; height: 54px;
    background: var(--hoe-blue); color: #fff;
    border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 1rem; font-weight: 800; letter-spacing: .05em;
    text-decoration: none; text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(30,60,114,.3), 0 1px 3px rgba(30,60,114,.2);
    transition: background .2s ease, box-shadow .2s ease, transform .12s ease;
}
html[data-portal="offertehoescape"] .hoe-card-cta i { font-size: 1.05rem; }
html[data-portal="offertehoescape"] .hoe-card-cta:hover { background: var(--hoe-blue-dark); color:#fff; }
html[data-portal="offertehoescape"] .hoe-card-cta:active { transform: translateY(1px); }

/* Grid gutters between premium cards */
html[data-portal="offertehoescape"] #availableCards.row,
html[data-portal="offertehoescape"] #alternativeCards.row,
html[data-portal="offertehoescape"] #avesCards.row,
html[data-portal="offertehoescape"] #petFriendlyCards.row,
html[data-portal="offertehoescape"] #noPetCards.row {
    --bs-gutter-y: 18px;
    --bs-gutter-x: 18px;
}

/* Hide the amenities row entirely when no badges were produced —
   keeps the premium card compact instead of leaving an empty gap. */
html[data-portal="offertehoescape"] .hoe-card-amenities:empty {
    display: none !important;
    margin: 0 !important;
}

/* =====================================================================
   HOESCAPE PREMIUM HORIZONTAL CARD (.hoe-hcard) — 2026 redesign
   Rendered by renderHoescapeCard() in search_results.html for ALL
   widths on the Hoescape portal. BASE rules below = mobile/tablet
   (<992px) stacked card. The @media (min-width:992px) block at the end
   switches to the big horizontal layout (photo left ~52% / content
   right ~48%) per the approved reference. The legacy .hoe-card and
   .hotel-card-horizontal rules above are left intact (InfoIschia /
   fallback) and are simply unused by the Hoescape card path now.
   ===================================================================== */
html[data-portal="offertehoescape"] #availableCards.row,
html[data-portal="offertehoescape"] #alternativeCards.row,
html[data-portal="offertehoescape"] #avesCards.row,
html[data-portal="offertehoescape"] #petFriendlyCards.row,
html[data-portal="offertehoescape"] #noPetCards.row {
    --hoe-blue: #1e3c72;
    --hoe-blue-dark: #152a4f;
    --hoe-orange: #f5901e;
    --hoe-green: #25D366;
    --hoe-check: #22b07d;
}
html[data-portal="offertehoescape"] .hoe-hcard {
    position: relative;
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 12px 30px rgba(15,23,42,.09);
    font-family: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    letter-spacing: -0.01em;
    height: 100%;
}
html[data-portal="offertehoescape"] .hoe-hcard__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    flex: none;
}
html[data-portal="offertehoescape"] .hoe-hcard__media > a { display: block; height: 100%; }
html[data-portal="offertehoescape"] .hoe-hcard__media img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
html[data-portal="offertehoescape"] .hoe-hcard__badge {
    position: absolute; top: 14px; left: 14px; z-index: 3;
    display: inline-flex; align-items: center; gap: 7px;
    background: var(--hoe-blue); color: #fff;
    font-size: .82rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .03em;
    padding: 8px 14px; border-radius: 10px;
    box-shadow: 0 4px 12px rgba(30,60,114,.32);
    max-width: calc(100% - 90px);
}
html[data-portal="offertehoescape"] .hoe-hcard__badge i { font-size: .9rem; }
/* Badges wrapper — promo + "Consigliato" can coexist, stacked top-left. */
html[data-portal="offertehoescape"] .hoe-hcard__badges {
    position: absolute; top: 14px; left: 14px; z-index: 3;
    display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
    max-width: calc(100% - 90px);
}
html[data-portal="offertehoescape"] .hoe-hcard__badges .hoe-hcard__badge {
    position: static; top: auto; left: auto; max-width: 100%;
}
/* "Consigliato" — dedicated badge, distinct green so it never reads as
   a promo. Always rendered above the promo badge when both exist. */
html[data-portal="offertehoescape"] .hoe-hcard__badge--reco {
    background: #0f9d6b;
    box-shadow: 0 4px 12px rgba(15,157,107,.32);
}
html[data-portal="offertehoescape"] .hoe-hcard__heart {
    position: absolute; top: 14px; right: 14px; z-index: 3;
    width: 44px; height: 44px; border-radius: 50%;
    background: #fff; border: 0; padding: 0;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,.16); cursor: pointer;
}
html[data-portal="offertehoescape"] .hoe-hcard__heart i { font-size: 18px; color: var(--hoe-blue); }
html[data-portal="offertehoescape"] .hoe-hcard__heart.active i,
html[data-portal="offertehoescape"] .hoe-hcard__heart .bi-heart-fill { color: #e74c3c; }
html[data-portal="offertehoescape"] .hoe-hcard__body {
    display: flex; flex-direction: column; gap: 12px;
    padding: 20px 20px 22px; flex: 1;
}
html[data-portal="offertehoescape"] .hoe-hcard__title {
    margin: 0; font-size: 1.55rem; font-weight: 800;
    color: #14223f; line-height: 1.12; letter-spacing: -0.02em;
    text-transform: uppercase;
}
html[data-portal="offertehoescape"] .hoe-hcard__title a { color: inherit; text-decoration: none; }
html[data-portal="offertehoescape"] .hoe-hcard__title a:hover { color: var(--hoe-blue); }
html[data-portal="offertehoescape"] .hoe-hcard__sub {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    font-size: .92rem; color: #5b6678;
}
html[data-portal="offertehoescape"] .hoe-hcard__stars { color: #f5a623; letter-spacing: 2px; font-size: 1rem; }
html[data-portal="offertehoescape"] .hoe-hcard__loc { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #41506b; }
html[data-portal="offertehoescape"] .hoe-hcard__loc i { color: #9aa6bb; }
html[data-portal="offertehoescape"] .hoe-hcard__rating {
    display: inline-flex; align-items: center; gap: 8px; margin-left: auto;
}
html[data-portal="offertehoescape"] .hoe-hcard__rating-lbl { font-size: .9rem; font-weight: 700; color: var(--hoe-blue); }
html[data-portal="offertehoescape"] .hoe-hcard__rating-score {
    background: var(--hoe-blue); color: #fff;
    font-size: .95rem; font-weight: 800;
    min-width: 34px; height: 30px; padding: 0 8px;
    border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
}
html[data-portal="offertehoescape"] .hoe-hcard__dist {
    display: flex; align-items: center; flex-wrap: wrap; gap: 14px;
    font-size: .9rem; color: #5b6678; font-weight: 500;
}
html[data-portal="offertehoescape"] .hoe-hcard__dist-i { display: inline-flex; align-items: center; gap: 6px; }
html[data-portal="offertehoescape"] .hoe-hcard__dist-i i { color: #9aa6bb; font-size: 1rem; }
html[data-portal="offertehoescape"] .hoe-hcard__dist-sep {
    width: 1px; height: 16px; background: #dfe4ec; display: inline-block;
}
html[data-portal="offertehoescape"] .hoe-hcard__reasons {
    display: grid; grid-template-columns: 1fr; gap: 8px 18px;
}
html[data-portal="offertehoescape"] .hoe-hcard__reason {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: .92rem; color: #2f3a4e; line-height: 1.3;
}
html[data-portal="offertehoescape"] .hoe-hcard__reason i { color: var(--hoe-check); font-size: 1.05rem; margin-top: 1px; flex: none; }
html[data-portal="offertehoescape"] .hoe-hcard__desc {
    margin: 0; font-size: .9rem; color: #5b6678; line-height: 1.45;
}
html[data-portal="offertehoescape"] .hoe-hcard__dates {
    display: flex; align-items: center; gap: 14px;
    padding: 12px 0; border-top: 1px solid #eef1f6; border-bottom: 1px solid #eef1f6;
}
html[data-portal="offertehoescape"] .hoe-hcard__cal {
    width: 48px; height: 48px; border-radius: 50%;
    background: #eaf0ff; color: var(--hoe-blue);
    display: inline-flex; align-items: center; justify-content: center; flex: none;
    font-size: 1.2rem;
}
html[data-portal="offertehoescape"] .hoe-hcard__date { display: flex; flex-direction: column; gap: 1px; }
html[data-portal="offertehoescape"] .hoe-hcard__date-lbl { font-size: .78rem; color: #8b97aa; font-weight: 600; }
html[data-portal="offertehoescape"] .hoe-hcard__date-v { font-size: 1rem; font-weight: 800; color: var(--hoe-blue); text-transform: uppercase; }
html[data-portal="offertehoescape"] .hoe-hcard__date-dow { font-size: .82rem; color: #5b6678; }
html[data-portal="offertehoescape"] .hoe-hcard__date-arrow { color: var(--hoe-blue); font-size: 1.1rem; }
html[data-portal="offertehoescape"] .hoe-hcard__price {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-top: 2px;
}
html[data-portal="offertehoescape"] .hoe-hcard__price-main {
    font-size: 2.5rem; font-weight: 800; color: var(--hoe-orange);
    letter-spacing: -0.03em; line-height: 1;
}
html[data-portal="offertehoescape"] .hoe-hcard__price-old {
    font-size: 1rem; color: #98a2b3; text-decoration: line-through; font-weight: 600;
    order: 3; flex-basis: 100%;
}
html[data-portal="offertehoescape"] .hoe-hcard__price-meta {
    display: flex; flex-direction: column; line-height: 1.2;
}
html[data-portal="offertehoescape"] .hoe-hcard__nights { font-size: 1.05rem; font-weight: 800; color: var(--hoe-blue); }
html[data-portal="offertehoescape"] .hoe-hcard__treat { font-size: .88rem; color: #5b6678; font-weight: 600; }
html[data-portal="offertehoescape"] .hoe-hcard__saving {
    order: 4; flex-basis: 100%;
    font-size: .9rem; font-weight: 700; color: var(--hoe-check);
}
html[data-portal="offertehoescape"] .hoe-hcard__price-na { font-size: 1.05rem; font-weight: 700; color: #5b6678; }
html[data-portal="offertehoescape"] .hoe-hcard__occ { font-size: .9rem; color: #6b7689; font-weight: 500; margin-top: -4px; }
html[data-portal="offertehoescape"] .hoe-hcard__cta {
    display: flex; gap: 12px; align-items: stretch; margin-top: auto; padding-top: 8px;
}
html[data-portal="offertehoescape"] .hoe-hcard__wa {
    width: 56px; height: 56px; flex: 0 0 56px;
    background: var(--hoe-green); border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    text-decoration: none; box-shadow: 0 4px 14px rgba(37,211,102,.32);
}
html[data-portal="offertehoescape"] .hoe-hcard__wa i { color: #fff; font-size: 27px; }
html[data-portal="offertehoescape"] .hoe-hcard__see {
    flex: 1 1 auto; min-height: 56px;
    background: var(--hoe-blue); color: #fff;
    border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-size: 1.05rem; font-weight: 800; letter-spacing: .05em;
    text-decoration: none; text-transform: uppercase;
    box-shadow: 0 6px 18px rgba(30,60,114,.3), 0 1px 3px rgba(30,60,114,.2);
    transition: background .2s ease, box-shadow .2s ease, transform .12s ease;
}
html[data-portal="offertehoescape"] .hoe-hcard__see i { font-size: 1.1rem; }
html[data-portal="offertehoescape"] .hoe-hcard__see:hover { background: var(--hoe-blue-dark); color: #fff; }
html[data-portal="offertehoescape"] .hoe-hcard__see:active { transform: translateY(1px); }

/* Single-column stack of horizontal cards */
html[data-portal="offertehoescape"] #availableCards.row,
html[data-portal="offertehoescape"] #alternativeCards.row,
html[data-portal="offertehoescape"] #avesCards.row,
html[data-portal="offertehoescape"] #petFriendlyCards.row,
html[data-portal="offertehoescape"] #noPetCards.row {
    --bs-gutter-y: 20px;
    --bs-gutter-x: 0px;
}

/* ── DESKTOP ≥992px: big horizontal layout (photo left / content right).
   Mobile/tablet <992px keeps the stacked base rules above unchanged. ── */
@media (min-width: 992px) {
    /* Card grows to fit its content (never clips title/price/CTA).
       min-height keeps short cards tidy; overflow:hidden from the base
       only ever clips the image (rounded left corners) because the box
       now always matches the content height. */
    html[data-portal="offertehoescape"] .hoe-hcard {
        flex-direction: row;
        min-height: 410px;
        border-radius: 26px;
        box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 18px 44px rgba(15,23,42,.10);
        transition: transform .18s ease, box-shadow .18s ease;
    }
    html[data-portal="offertehoescape"] .hoe-hcard:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 10px rgba(15,23,42,.06), 0 26px 56px rgba(15,23,42,.14);
    }
    /* Photo 45% — content 55% (more room for content because the page
       also has the filters sidebar). The media stretches to the full
       card height (= content height): image cropped centred, never
       distorted, every photo as tall as its card. */
    html[data-portal="offertehoescape"] .hoe-hcard__media {
        flex: 0 0 45%; width: 45%; align-self: stretch; aspect-ratio: auto;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__media img {
        width: 100%; height: 100%;
        object-fit: cover; object-position: center center;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__body {
        flex: 1 1 55%; width: 55%; padding: 24px 32px;
        justify-content: flex-start; gap: 10px;
    }
    /* Long fallback descriptions must not blow up the card height — clamp
       to 3 lines on desktop (booking_reasons refinement comes later). */
    html[data-portal="offertehoescape"] .hoe-hcard__desc {
        display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
        overflow: hidden;
    }
    /* Clear vertical separation between stacked cards. */
    html[data-portal="offertehoescape"] #availableCards.row,
    html[data-portal="offertehoescape"] #alternativeCards.row,
    html[data-portal="offertehoescape"] #avesCards.row,
    html[data-portal="offertehoescape"] #petFriendlyCards.row,
html[data-portal="offertehoescape"] #noPetCards.row {
        --bs-gutter-y: 26px;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__title { font-size: 1.6rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__sub { font-size: 1.02rem; gap: 14px; }
    html[data-portal="offertehoescape"] .hoe-hcard__stars { font-size: 1.15rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__rating-lbl { font-size: 1rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__rating-score { font-size: 1.05rem; min-width: 38px; height: 34px; }
    html[data-portal="offertehoescape"] .hoe-hcard__dist { font-size: .98rem; gap: 18px; }
    html[data-portal="offertehoescape"] .hoe-hcard__reasons { grid-template-columns: 1fr 1fr; gap: 12px 28px; }
    html[data-portal="offertehoescape"] .hoe-hcard__reason { font-size: .98rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__dates { gap: 16px; padding: 12px 0; }
    html[data-portal="offertehoescape"] .hoe-hcard__cal { width: 50px; height: 50px; font-size: 1.25rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__date-v { font-size: 1.05rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__price-main { font-size: 3.4rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__nights { font-size: 1.2rem; }
    /* Big price on the left, nights+treatment right NEXT TO it (left
       grouped, same row, vertically centred). Struck price / saving keep
       their own full-width lines below (order 3/4 + flex-basis:100%). */
    html[data-portal="offertehoescape"] .hoe-hcard__price {
        align-items: center; justify-content: flex-start; column-gap: 16px;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__price-meta {
        align-items: flex-start; text-align: left;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__cta { padding-top: 4px; }
    html[data-portal="offertehoescape"] .hoe-hcard__wa { width: 64px; height: 64px; flex-basis: 64px; }
    html[data-portal="offertehoescape"] .hoe-hcard__see { min-height: 64px; font-size: 1.1rem; }
}

/* ── MOBILE <992px: autonomous premium card (photo on top, content
   below). Isolated in a max-width block — mutually exclusive with the
   desktop @media (min-width:992px) above, so the desktop layout is
   never affected. Same shared markup/data; mobile-specific layout. ── */
@media (max-width: 991.98px) {
    html[data-portal="offertehoescape"] .hoe-hcard {
        flex-direction: column;
        border-radius: 18px;
    }
    /* Photo: full width, uniform fixed height, cropped centred, never
       distorted. Rounded top corners come from the card's overflow. */
    html[data-portal="offertehoescape"] .hoe-hcard__media {
        width: 100%; height: 220px; aspect-ratio: auto; flex: none;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__media img {
        width: 100%; height: 100%;
        object-fit: cover; object-position: center center;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__badges {
        top: 12px; left: 12px; gap: 6px;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__badge {
        font-size: .76rem; padding: 7px 12px;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__heart {
        top: 12px; right: 12px; width: 40px; height: 40px;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__body {
        padding: 16px 16px 18px; gap: 11px;
    }
    /* Title readable, not huge; wraps tidily on two lines. */
    html[data-portal="offertehoescape"] .hoe-hcard__title {
        font-size: 1.35rem; line-height: 1.18;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__sub {
        gap: 8px 10px; font-size: .86rem;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__stars { font-size: .95rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__rating { gap: 6px; }
    html[data-portal="offertehoescape"] .hoe-hcard__rating-score {
        min-width: 30px; height: 27px; font-size: .88rem;
    }
    /* Distances — plain inline, no box (matches desktop). */
    html[data-portal="offertehoescape"] .hoe-hcard__dist {
        gap: 8px 14px; font-size: .84rem;
    }
    /* One column reasons on mobile. */
    html[data-portal="offertehoescape"] .hoe-hcard__reasons {
        grid-template-columns: 1fr; gap: 7px;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__reason { font-size: .88rem; }
    /* Fallback description must not stretch the card — clamp ~4 lines. */
    html[data-portal="offertehoescape"] .hoe-hcard__desc {
        display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical;
        overflow: hidden; font-size: .87rem; line-height: 1.4;
    }
    /* Dates box — bigger and more readable on mobile. */
    html[data-portal="offertehoescape"] .hoe-hcard__dates {
        gap: 14px; padding: 13px 0;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__cal {
        width: 52px; height: 52px; font-size: 1.3rem;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__date-lbl { font-size: .82rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__date-v { font-size: 1.18rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__date-dow { font-size: .88rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__date-arrow { font-size: 1.25rem; }
    /* Big orange price LEFT, nights+treatment right NEXT TO it (same row,
       vertically centred). Struck price / saving keep their own lines. */
    html[data-portal="offertehoescape"] .hoe-hcard__price {
        align-items: center; justify-content: flex-start;
        column-gap: 12px; row-gap: 4px;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__price-main { font-size: 2.2rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__price-meta {
        align-items: flex-start; text-align: left;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__nights { font-size: 1rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__treat { font-size: .82rem; }
    html[data-portal="offertehoescape"] .hoe-hcard__occ { font-size: .85rem; }
    /* CTA always fully visible. */
    html[data-portal="offertehoescape"] .hoe-hcard__cta { gap: 10px; padding-top: 6px; }
    html[data-portal="offertehoescape"] .hoe-hcard__wa {
        width: 54px; height: 54px; flex: 0 0 54px;
    }
    html[data-portal="offertehoescape"] .hoe-hcard__wa i { font-size: 24px; }
    html[data-portal="offertehoescape"] .hoe-hcard__see {
        min-height: 54px; font-size: 1rem;
    }
    /* Clear separation between stacked mobile cards. */
    html[data-portal="offertehoescape"] #availableCards.row,
    html[data-portal="offertehoescape"] #alternativeCards.row,
    html[data-portal="offertehoescape"] #avesCards.row,
    html[data-portal="offertehoescape"] #petFriendlyCards.row,
html[data-portal="offertehoescape"] #noPetCards.row {
        --bs-gutter-y: 18px;
    }
}

/* ============================================================
   SIDEBAR FILTRI — palette coerente HoEscape
   "Vedi sulla mappa" e "Resetta" devono usare il blu ufficiale
   HoEscape (#1e3c72, lo stesso del CTA "Vedi Camere"), non
   arancio/verde/rosso. Eccezione: il "Resetta" nell'header blu
   scuro del drawer mobile (.filters-head-reset) resta bianco per
   leggibilità — NON ridefinito qui.
   ============================================================ */
html[data-portal="offertehoescape"] #desktopMapTrigger.btn-outline-primary {
    color: var(--hoescape-primary, #1e3c72);
    border-color: var(--hoescape-primary, #1e3c72);
    background: transparent;
}
html[data-portal="offertehoescape"] #desktopMapTrigger.btn-outline-primary:hover,
html[data-portal="offertehoescape"] #desktopMapTrigger.btn-outline-primary:focus {
    color: #fff;
    background: var(--hoescape-primary, #1e3c72);
    border-color: var(--hoescape-primary, #1e3c72);
}
/* "Resetta" desktop (header sidebar) e footer drawer mobile.
   Il markup usa `.text-danger` di Bootstrap che applica
   `color: ... !important`: senza !important qui la regola perde
   e il bottone resta arancio/rosso. */
html[data-portal="offertehoescape"] .filters-desktop-head .btn-link,
html[data-portal="offertehoescape"] .filters-desktop-head .btn-link.text-danger,
html[data-portal="offertehoescape"] #filtersResetMobile.btn-link {
    color: var(--hoescape-primary, #1e3c72) !important;
}
html[data-portal="offertehoescape"] .filters-desktop-head .btn-link:hover,
html[data-portal="offertehoescape"] .filters-desktop-head .btn-link.text-danger:hover,
html[data-portal="offertehoescape"] #filtersResetMobile.btn-link:hover {
    color: var(--hoescape-primary-dark, #152a4f) !important;
}
/* "Vedi sulla mappa": forza testo + icona (il pin <i> eredita
   il colore del bottone) al blu ufficiale, a prova di tema. */
html[data-portal="offertehoescape"] #desktopMapTrigger,
html[data-portal="offertehoescape"] #desktopMapTrigger i,
html[data-portal="offertehoescape"] #desktopMapTrigger span {
    color: var(--hoescape-primary, #1e3c72) !important;
}
html[data-portal="offertehoescape"] #desktopMapTrigger:hover,
html[data-portal="offertehoescape"] #desktopMapTrigger:hover i,
html[data-portal="offertehoescape"] #desktopMapTrigger:hover span,
html[data-portal="offertehoescape"] #desktopMapTrigger:focus,
html[data-portal="offertehoescape"] #desktopMapTrigger:focus i,
html[data-portal="offertehoescape"] #desktopMapTrigger:focus span {
    color: #fff !important;
}

/* ============================================================
   VISTA MAPPA — palette coerente con le card landing/cerca
   Override SCOPED dei selettori definiti in
   templates/public/partials/_search_map_overlay.html (partial
   condiviso con InfoIschia: i default restano, qui solo HoEscape).
   La CTA "Scegli camera" e il prezzo non devono essere
   arancio/verde ma blu ufficiale HoEscape. Marker prezzo e
   cluster (logica/heatmap densità in JS) NON toccati.
   ============================================================ */
html[data-portal="offertehoescape"] .cm-iw-cta {
    background: var(--hoescape-primary, #1e3c72);
    color: #fff;
}
html[data-portal="offertehoescape"] .cm-iw-cta:hover,
html[data-portal="offertehoescape"] .cm-iw-cta:focus {
    background: var(--hoescape-primary-dark, #152a4f);
    color: #fff;
}
html[data-portal="offertehoescape"] .cm-iw-total {
    color: var(--hoescape-primary, #1e3c72);
}
html[data-portal="offertehoescape"] .cm-iw-price-wrap {
    background: #f0f4fa;
    border-left-color: var(--hoescape-primary, #1e3c72);
}
