/**
 * TripManga - Universal Filter System v2.1
 * Clean, minimal filter UI for all search pages
 * Brand: #038a52 (green), #f47c04 (orange), #1a2b48 (navy)
 * Font: 'Poppins', sans-serif
 */

/* ============================================================================
   ROOT / RESET
   ============================================================================ */
.tm-filter *,
.tm-filter *::before,
.tm-filter *::after,
.tm-results *,
.tm-results *::before,
.tm-results *::after {
    box-sizing: border-box;
}

/* ============================================================================
   SIDEBAR FILTER CONTAINER
   ============================================================================ */
.tm-filter {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

/* ── Section ──────────────────────────────────────────────────────────────── */
.tm-filter__section {
    border-bottom: 1px solid #f0f0f0;
    padding: 0;
}
.tm-filter__section:last-child {
    border-bottom: none;
}

/* ── Section Header ───────────────────────────────────────────────────────── */
.tm-filter__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    cursor: pointer;
    user-select: none;
    transition: background 0.15s ease;
}
.tm-filter__header:hover {
    background: #fafafa;
}
.tm-filter__title {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    color: #1a2b48;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.3;
}
.tm-filter__toggle {
    font-size: 11px;
    color: #999;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}
.tm-filter__section.is-closed .tm-filter__toggle {
    transform: rotate(180deg);
}

/* ── Section Body ─────────────────────────────────────────────────────────── */
.tm-filter__body {
    padding: 0 20px 16px;
}
.tm-filter__section.is-closed .tm-filter__body {
    display: none;
}

/* ============================================================================
   FILTER: SEARCH INPUT (Location)
   ============================================================================ */
.tm-filter__search {
    position: relative;
}
.tm-filter__search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #038a52;
    font-size: 14px;
    z-index: 2;
}
.tm-filter__search-input {
    width: 100%;
    padding: 10px 12px 10px 34px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #555;
    background: #fff;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.tm-filter__search-input::placeholder {
    color: #bbb;
    font-weight: 400;
}

/* ============================================================================
   FILTER: SELECT DROPDOWN
   ============================================================================ */
.tm-filter__select {
    width: 100%;
    padding: 10px 36px 10px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #444;
    background: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

/* ============================================================================
   FILTER: PILL BUTTONS (for terms with counts)
   ============================================================================ */
.tm-filter__pills {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tm-filter__pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    line-height: 1.3;
    position: relative;
}
.tm-filter__pill input[type="checkbox"],
.tm-filter__pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    clip: rect(0,0,0,0);
    pointer-events: none;
}
.tm-filter__pill:hover {
    border-color: #c0c0c0;
    background: #fafafa;
}
.tm-filter__pill.active,
.tm-filter__pill--active {
    border-color: #038a52;
    background: #f0faf5;
    color: #1a2b48;
    font-weight: 600;
}
.tm-filter__pill-count {
    font-size: 12px;
    font-weight: 500;
    color: #aaa;
    flex-shrink: 0;
    min-width: 20px;
    text-align: right;
}
.tm-filter__pill.active .tm-filter__pill-count,
.tm-filter__pill--active .tm-filter__pill-count {
    color: #038a52;
}

/* ── Show More Link ───────────────────────────────────────────────────────── */
.tm-filter__show-more {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 0 0;
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #038a52;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.2s;
}
.tm-filter__show-more:hover {
    color: #026d40;
}
.tm-filter__show-more i {
    font-size: 10px;
    transition: transform 0.2s;
}
.tm-filter__show-more.is-expanded i {
    transform: rotate(180deg);
}

/* Hidden items (collapsed by default) */
.tm-filter__pills .tm-filter__pill.is-hidden {
    display: none;
}
.tm-filter__pills.is-expanded .tm-filter__pill.is-hidden {
    display: flex;
}

/* ============================================================================
   FILTER: RANGE SLIDER (Price, Year, Mileage)
   ============================================================================ */
.tm-filter__range {
    padding: 4px 0 0;
}
.tm-filter__range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fafafa;
}
.tm-filter__range-group {
    flex: 1;
    text-align: center;
}
.tm-filter__range-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    color: #038a52;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}
.tm-filter__range-value {
    font-size: 14px;
    font-weight: 700;
    color: #1a2b48;
}
.tm-filter__range-divider {
    font-size: 16px;
    color: #ccc;
    font-weight: 300;
    flex-shrink: 0;
}

/* Ion Range Slider - Brand green theme */
.tm-filter .irs--flat .irs-bar {
    background: #038a52;
    height: 4px;
    border-radius: 4px;
}
.tm-filter .irs--flat .irs-line {
    background: #e5e5e5;
    height: 4px;
    border-radius: 4px;
}
.tm-filter .irs--flat .irs-handle > i:first-child {
    width: 22px !important;
    height: 22px !important;
    border-radius: 50% !important;
    background: #038a52 !important;
    border: 3px solid #fff !important;
    box-shadow: 0 1px 6px rgba(0,0,0,0.18) !important;
}
.tm-filter .irs--flat .irs-handle {
    width: 22px;
    top: 18px;
}
.tm-filter .irs--flat .irs-from,
.tm-filter .irs--flat .irs-to,
.tm-filter .irs--flat .irs-single {
    background: #038a52 !important;
    font-family: 'Poppins', sans-serif;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    padding: 2px 8px;
    color: #fff;
}
.tm-filter .irs--flat .irs-from::before,
.tm-filter .irs--flat .irs-to::before,
.tm-filter .irs--flat .irs-single::before {
    border-top-color: #038a52 !important;
}
.tm-filter .irs--flat .irs-grid-text {
    font-size: 10px;
    color: #bbb;
    font-family: 'Poppins', sans-serif;
}
.tm-filter .irs--flat .irs-min,
.tm-filter .irs--flat .irs-max {
    font-size: 10px;
    color: #999;
    font-family: 'Poppins', sans-serif;
    background: none;
}

/* ============================================================================
   FILTER: RATING (Stars with counts)
   ============================================================================ */
.tm-filter__ratings {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tm-filter__rating {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}
.tm-filter__rating input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    clip: rect(0,0,0,0);
    pointer-events: none;
}
.tm-filter__rating:hover {
    border-color: #c0c0c0;
    background: #fafafa;
}
.tm-filter__rating.active {
    border-color: #f47c04;
    background: #fff9f0;
}
.tm-filter__rating-stars {
    display: flex;
    gap: 2px;
}
.tm-filter__rating-stars i {
    font-size: 14px;
    transition: color 0.15s;
}
.tm-filter__rating-stars .fa-star {
    color: #f47c04;
}
.tm-filter__rating-stars .fa-star.empty {
    color: #e0e0e0;
}
.tm-filter__rating-count {
    font-family: 'Poppins', sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: #aaa;
}
.tm-filter__rating.active .tm-filter__rating-count {
    color: #f47c04;
}

/* ============================================================================
   FILTER: RENTAL PERIOD BUTTONS
   ============================================================================ */
.tm-filter__period-pills {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.tm-filter__period-pill {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    position: relative;
}
.tm-filter__period-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    clip: rect(0,0,0,0);
    pointer-events: none;
}
.tm-filter__period-pill:hover {
    border-color: #c0c0c0;
    background: #fafafa;
}
.tm-filter__period-pill.active {
    border-color: #038a52;
    background: #f0faf5;
    color: #1a2b48;
    font-weight: 600;
}

/* ============================================================================
   RESULTS TOP BAR
   ============================================================================ */
.tm-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0 16px;
    gap: 12px;
    flex-wrap: wrap;
    font-family: 'Poppins', sans-serif;
}
.tm-topbar__left {
    display: flex;
    align-items: center;
    gap: 12px;
}
.tm-topbar__right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* View toggle (Grid / List) */
.tm-topbar__view-toggle {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}
.tm-topbar__view-btn {
    width: 36px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: none;
    color: #bbb;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}
.tm-topbar__view-btn + .tm-topbar__view-btn {
    border-left: 1px solid #e0e0e0;
}
.tm-topbar__view-btn.active,
.tm-topbar__view-btn:hover {
    background: #1a2b48;
    color: #fff;
}
.tm-topbar__count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}
.tm-topbar__count strong {
    font-weight: 700;
    color: #1a2b48;
}

/* Topbar selects (Show N, Sort By) */
.tm-topbar__select-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tm-topbar__select-label {
    font-size: 13px;
    color: #999;
    white-space: nowrap;
}
.tm-topbar__select {
    padding: 7px 32px 7px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #444;
    background: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}
.tm-topbar__map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #038a52;
    text-decoration: none;
    border: 1.5px solid #038a52;
    border-radius: 20px;
    padding: 5px 14px;
    transition: background 0.18s, color 0.18s;
    white-space: nowrap;
}
.tm-topbar__map-link:hover {
    background: #038a52;
    color: #fff;
    text-decoration: none;
}
.tm-topbar__map-link i {
    font-size: 13px;
}

/* ============================================================================
   CAR CARD - Vertical Layout (image top, content bottom) in 3-col grid
   ============================================================================ */
.tm-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.tm-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: border-color 0.2s ease;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
    color: inherit;
}
.tm-card:hover {
    border-color: #038a52;
    text-decoration: none;
    color: inherit;
}

/* ── Image: Top ───────────────────────────────────────────────────────────── */
.tm-card__image {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #f0f0f0;
    overflow: hidden;
    flex-shrink: 0;
}
.tm-card__image a {
    display: block;
    width: 100%;
    height: 100%;
}
.tm-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    background: #f0f0f0;
    transition: transform 0.35s ease;
}
.tm-card:hover .tm-card__image img {
    transform: scale(1.04);
}
/* Carousel dots - purely a "this listing has N photos" indicator, not
   interactive (the whole card is already one tap target). */
.tm-card__image-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 4px;
    z-index: 1;
}
.tm-card__image-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,.55);
}
.tm-card__image-dot.active {
    background: #fff;
    width: 6px;
    height: 6px;
}
.tm-card__image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
}
.tm-card__image .no-image i {
    font-size: 2.5rem;
    color: #ccc;
}

/* Badges on image */
.tm-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    z-index: 2;
}
.tm-card__badge--featured {
    background: #038a52;
    color: #fff;
}
.tm-card__badge--discount {
    background: #026d40;
    color: #fff;
    top: auto;
    bottom: 10px;
    left: 10px;
}
.tm-card__badge--category {
    background: #f47c04;
    color: #fff;
}

/* Review badge - inline in the card body, under the title (moved off the
   image; no shadow/floating-pill, flat design consistent with the rest of
   the card). */
.tm-card__review-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1a2b48;
    white-space: nowrap;
}
.tm-card__review-badge i {
    color: #f47c04;
    font-size: 13px;
}
.tm-card__review-badge span {
    color: #888;
    font-weight: 400;
    font-size: 12px;
}

/* ── Body: Bottom ─────────────────────────────────────────────────────────── */
.tm-card__body {
    flex: 1;
    min-width: 0;
    padding: 14px 14px 12px;
    display: flex;
    flex-direction: column;
}

/* Review line (text-based, used on search page) */
.tm-card__review-line {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #888;
    margin-bottom: 4px;
}
.tm-card__review-line i {
    color: #f47c04;
    font-size: 13px;
}
.tm-card__review-line strong {
    color: #1a2b48;
    font-weight: 700;
    margin-left: 1px;
}

/* Title */
.tm-card__title {
    font-size: 16px;
    font-weight: 700;
    color: #1a2b48;
    margin: 0 0 8px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tm-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.15s;
}
.tm-card__title a:hover {
    color: #f47c04;
}
/* Featured cars get orange title */
.tm-card--featured .tm-card__title a {
    color: #f47c04;
}

/* Operator (GDS service provider attribution, e.g. transfer companies) */
.tm-card__operator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #777;
    margin-bottom: 8px;
}
.tm-card__operator img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    border-radius: 3px;
    flex-shrink: 0;
}

/* Location */
.tm-card__location {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 12px;
    color: #999;
    margin-bottom: 12px;
    line-height: 1.4;
}
.tm-card__location i {
    color: #038a52;
    font-size: 12px;
    margin-top: 2px;
    flex-shrink: 0;
}
.tm-card__location span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Divider */
.tm-card__divider {
    width: 100%;
    height: 1px;
    background: #f0f0f0;
    margin: 0 0 10px;
}

/* Specs: 2-column grid */
.tm-card__specs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    margin-bottom: 14px;
}
.tm-card__spec {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #555;
    white-space: normal;
    min-width: 0;
}
.tm-card__spec i {
    font-size: 14px;
    color: #888;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* Facility / inclusion icons - hidden entirely by the template when empty */
.tm-card__facilities {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.tm-card__facility {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: 1px solid #e8e8e8;
    color: #555;
    font-size: 12px;
    flex-shrink: 0;
}

/* Cancellation policy flag */
.tm-card__cancel-flag {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    color: #038a52;
    margin-bottom: 10px;
}

/* Footer: Price + Book Button */
.tm-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    gap: 12px;
}
.tm-card__price {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px;
}
.tm-card__price-from {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.tm-card__price-amount {
    font-size: 16px;
    font-weight: 500;
    color: #1a2b48;
    white-space: nowrap;
}
.tm-card__price-original {
    flex-basis: 100%;
    font-size: 11px;
    color: #bbb;
    text-decoration: line-through;
}
.tm-card__price-unit {
    font-size: 10px;
    font-weight: 400;
    color: #999;
    white-space: nowrap;
}
.tm-card__book-btn {
    display: inline-flex;
    align-items: center;
    padding: 9px 22px;
    border: 2px solid #038a52;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #038a52;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}
.tm-card__book-btn:hover {
    background: #f47c04;
    border-color: #f47c04;
    color: #fff;
}

/* ============================================================================
   HOMEPAGE: 4-Column Grid  (.tm-grid--home)
   ============================================================================ */
.tm-grid--home {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ============================================================================
   LIST VIEW: Horizontal Cards  (.tm-grid--list)
   Image left, content right - single column layout
   ============================================================================ */
.tm-grid--list {
    grid-template-columns: 1fr !important;
    gap: 16px;
}

/* Card becomes horizontal row */
.tm-grid--list .tm-card {
    flex-direction: row;
    height: auto;
    min-height: 0;
}

/* Image: fixed width on the left */
.tm-grid--list .tm-card__image {
    flex: 0 0 300px;
    width: 300px;
    aspect-ratio: auto;
    min-height: 220px;
    border-radius: 12px 0 0 12px;
}
.tm-grid--list .tm-card__image img {
    border-radius: 12px 0 0 12px;
}

/* Badges reposition for horizontal layout */
.tm-grid--list .tm-card__badge--discount {
    bottom: 10px;
    left: 10px;
}


/* Body: fills remaining space */
.tm-grid--list .tm-card__body {
    flex: 1;
    min-width: 0;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Title gets more room in list view */
.tm-grid--list .tm-card__title {
    font-size: 18px;
    margin-bottom: 6px;
    -webkit-line-clamp: 1;
}

/* Location */
.tm-grid--list .tm-card__location {
    margin-bottom: 10px;
}

/* Specs: 3-column on list for wider space */
.tm-grid--list .tm-card__specs {
    grid-template-columns: repeat(3, 1fr);
    gap: 6px 20px;
    margin-bottom: 16px;
}
.tm-grid--list .tm-card__spec {
    font-size: 13px;
}

/* Footer: price and button spread out */
.tm-grid--list .tm-card__footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}
.tm-grid--list .tm-card__price-amount {
    font-size: 17px;
}
.tm-grid--list .tm-card__book-btn {
    padding: 10px 28px;
    font-size: 14px;
}

/* ============================================================================
   RESULTS: PAGINATION / LOAD MORE
   ============================================================================ */
.tm-pagination {
    text-align: center;
    padding: 32px 0 16px;
}
.tm-pagination__info {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #999;
    margin-top: 12px;
}
.tm-infinite-sentinel {
    height: 1px;
}

/* ============================================================================
   RESULTS: EMPTY STATE
   ============================================================================ */
.tm-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
}
.tm-empty__icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}
.tm-empty__icon i {
    font-size: 1.8rem;
    color: #ccc;
}
.tm-empty__title {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 6px;
}
.tm-empty__text {
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    color: #999;
    margin: 0;
}

/* ============================================================================
   MOBILE FILTER TOGGLE
   ============================================================================ */
.tm-filter-mobile-btn {
    display: none;
}

/* ============================================================================
   LAYOUT: Sidebar + Results
   ============================================================================ */
.tm-search-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}
.tm-search-layout__sidebar {
    flex: 0 0 270px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    height: auto;
    max-height: none;
    overflow: visible;
}
.tm-search-layout__content {
    flex: 1;
    min-width: 0;
}

/* Mobile filter overlay */
.tm-filter-overlay {
    display: none;
}

/* ============================================================================
   LIVEWIRE LOADING INDICATOR – Full overlay with blur + branded spinner
   ============================================================================ */

/* ── Results area loading state ── */
.ajax-search-result.is-loading,
.ajax-search-result:has(.tm-grid.is-loading) {
    position: relative;
    min-height: 200px;
}
.ajax-search-result.is-loading .tm-grid,
.tm-grid.is-loading {
    position: relative;
    opacity: 0.35;
    pointer-events: none;
    filter: blur(1px);
    transition: opacity 0.25s ease, filter 0.25s ease;
}

/* Full overlay backdrop */
.ajax-search-result.is-loading::before,
.tm-grid.is-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 50;
    border-radius: 8px;
}

/* Spinner + text container */
.ajax-search-result.is-loading::after,
.tm-grid.is-loading::after {
    content: 'Updating results…';
    position: absolute;
    top: max(50%, 120px);
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 51;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    padding: 12px 24px;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.12);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    white-space: nowrap;
}

/* Use the ::after pseudo for text, and a real spinner via background-image */
.ajax-search-result.is-loading::after,
.tm-grid.is-loading::after {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24'%3E%3Cstyle%3E%40keyframes s%7Bto%7Btransform:rotate(360deg)%7D%7D%3C/style%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='%23e2e8f0' stroke-width='3'/%3E%3Cpath d='M12 2a10 10 0 0 1 10 10' fill='none' stroke='%23038a52' stroke-width='3' stroke-linecap='round' style='animation:s .7s linear infinite;transform-origin:center'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 16px center;
    background-size: 20px 20px;
    padding-left: 44px;
}

/* ── Floating banner above results ── */
.tm-loading-banner {
    display: none;
}
.tm-loading-banner[wire-loading] {
    display: flex;
}
.tm-loading-banner--active {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #038a52 0%, #026b3f 100%);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    border-radius: 8px;
    animation: tmBannerSlide 0.3s ease-out;
}
.tm-loading-banner--active i {
    font-size: 14px;
    animation: tmSpin 0.7s linear infinite;
}
@keyframes tmBannerSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes tmSpin {
    to { transform: rotate(360deg); }
}

/* ── Filter pill active feedback ── */
.tm-filter__pill input:checked + span,
.tm-filter__period-pill input:checked + span {
    position: relative;
}

/* ── Mobile: close overlay after filter ── */
@media (max-width: 991px) {
    .tm-loading-banner--active {
        font-size: 12px;
        padding: 8px 16px;
    }
}

/* ============================================================================
   RESPONSIVE: Tablet (768-1199px)
   ============================================================================ */
@media (max-width: 1199px) {
    .tm-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    .tm-search-layout__sidebar {
        flex: 0 0 250px;
    }
    .tm-card__body {
        padding: 16px 16px;
    }
    .tm-card__title {
        font-size: 15px;
    }
    .tm-card__specs {
        gap: 5px 12px;
    }
    .tm-card__spec {
        font-size: 12px;
    }
    .tm-card__price-amount {
        font-size: 15px;
    }
    /* Homepage grid: 2 columns on tablet */
    .tm-grid--home {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* List view: shrink image on tablet */
    .tm-grid--list .tm-card__image {
        flex: 0 0 240px;
        width: 240px;
        min-height: 190px;
    }
    .tm-grid--list .tm-card__title {
        font-size: 16px;
    }
    .tm-grid--list .tm-card__specs {
        grid-template-columns: repeat(2, 1fr);
        gap: 5px 14px;
    }
    .tm-grid--list .tm-card__body {
        padding: 16px 20px;
    }
    .tm-grid--list .tm-card__price-amount {
        font-size: 15px;
    }
    .tm-grid--list .tm-card__book-btn {
        padding: 8px 20px;
        font-size: 13px;
    }
}

/* ============================================================================
   RESPONSIVE: Mobile (< 992px)
   ============================================================================ */
@media (max-width: 991px) {
    .tm-search-layout {
        flex-direction: column;
    }
    .tm-search-layout__sidebar {
        display: none;
    }
    .tm-search-layout__content {
        width: 100%;
        max-width: 100%;
    }

    /* Mobile filter button */
    .tm-filter-mobile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        padding: 12px 20px;
        margin-bottom: 16px;
        background: #fff;
        border: 2px solid #1a2b48;
        border-radius: 8px;
        font-family: 'Poppins', sans-serif;
        font-size: 14px;
        font-weight: 600;
        color: #1a2b48;
        cursor: pointer;
        transition: all 0.2s ease;
    }
    .tm-filter-mobile-btn:hover {
        background: #1a2b48;
        color: #fff;
    }

    /* Mobile filter overlay */
    .tm-filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1050;
        display: none;
    }
    .tm-filter-overlay.is-open {
        display: block;
    }
    .tm-filter-overlay__backdrop {
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 1;
    }
    .tm-filter-overlay__panel {
        position: absolute;
        top: 0;
        left: 0;
        width: 88%;
        max-width: 340px;
        height: 100%;
        background: #fff;
        z-index: 2;
        overflow-y: auto;
        padding: 0;
        box-shadow: 4px 0 24px rgba(0,0,0,0.12);
        animation: tmSlideIn 0.3s ease;
    }
    .tm-filter-overlay__close {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 20px;
        border-bottom: 1px solid #eee;
    }
    .tm-filter-overlay__close-title {
        font-family: 'Poppins', sans-serif;
        font-size: 16px;
        font-weight: 700;
        color: #1a2b48;
    }
    .tm-filter-overlay__close-btn {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        border: 1px solid #eee;
        background: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        font-size: 16px;
        color: #999;
        transition: all 0.2s;
    }
    .tm-filter-overlay__close-btn:hover {
        background: #f5f5f5;
        color: #333;
    }

    .tm-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .tm-topbar__left,
    .tm-topbar__right {
        justify-content: space-between;
    }
}

/* ============================================================================
   RESPONSIVE: Medium Mobile (576-767px) - 2-column vertical cards
   ============================================================================ */
@media (min-width: 576px) and (max-width: 767px) {
    .tm-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
    .tm-card__image {
        aspect-ratio: 16 / 10;
    }
    .tm-card__body {
        padding: 12px 12px 10px;
    }
    .tm-card__title {
        font-size: 14px;
        font-weight: 700;
        margin: 0 0 6px;
        -webkit-line-clamp: 2;
    }
    .tm-card__location {
        font-size: 11px;
        margin-bottom: 8px;
    }
    .tm-card__divider {
        margin: 0 0 8px;
    }
    .tm-card__specs {
        grid-template-columns: 1fr 1fr;
        gap: 4px 10px;
        margin-bottom: 10px;
    }
    .tm-card__spec {
        font-size: 11px;
    }
    .tm-card__footer {
        gap: 8px;
    }
    .tm-card__price-amount {
        font-size: 14px;
    }
    .tm-card__price-unit {
        font-size: 9px;
    }
    .tm-card__book-btn {
        padding: 7px 14px;
        font-size: 11px;
        border-radius: 5px;
    }
    /* Review badge compact */
    .tm-card__review-badge {
        font-size: 11px;
    }
    .tm-card__review-badge span {
        font-size: 10px;
    }
    .tm-card__badge {
        padding: 2px 7px;
        font-size: 10px;
    }
    /* Homepage: 2 col */
    .tm-grid--home {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

@keyframes tmSlideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

/* ============================================================================
   RESPONSIVE: Small Mobile (< 576px) - Vertical Cards (same as desktop)
   ============================================================================ */
@media (max-width: 575px) {
    .tm-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    /* ── Vertical card: image top, content bottom (same as desktop) ── */
    .tm-card {
        flex-direction: column;
        border-radius: 12px;
        min-height: 0;
    }
    .tm-card__image {
        flex: none;
        width: 100%;
        aspect-ratio: 16 / 10;
        min-height: 0;
        border-radius: 12px 12px 0 0;
    }
    .tm-card__image img {
        border-radius: 12px 12px 0 0;
        object-fit: cover;
    }
    .tm-card__image .no-image {
        border-radius: 12px 12px 0 0;
    }
    .tm-card__image .no-image i {
        font-size: 2.5rem;
    }
    /* Badges */
    .tm-card__badge {
        top: 8px;
        left: 8px;
        padding: 3px 8px;
        font-size: 10px;
        border-radius: 6px;
    }
    .tm-card__badge--discount {
        bottom: auto;
        top: 30px;
        left: 8px;
    }
    .tm-card__review-badge {
        font-size: 13px;
    }
    .tm-card__review-badge span {
        font-size: 12px;
    }

    /* ── Body: same structure as desktop ── */
    .tm-card__body {
        padding: 14px 14px 12px;
        flex: 1;
        min-width: 0;
    }
    .tm-card__title {
        font-size: 15px;
        font-weight: 700;
        margin: 0 0 6px;
        -webkit-line-clamp: 2;
        line-height: 1.35;
    }
    .tm-card__location {
        margin-bottom: 10px;
        font-size: 12px;
        gap: 5px;
    }
    .tm-card__location i {
        font-size: 12px;
        margin-top: 2px;
    }
    .tm-card__divider {
        display: block;
        margin: 0 0 8px;
    }
    /* Show specs on mobile - same as desktop */
    .tm-card__specs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
        margin-bottom: 12px;
    }
    .tm-card__spec {
        font-size: 12px;
    }
    /* Footer: price left, button right */
    .tm-card__footer {
        gap: 10px;
        align-items: flex-end;
    }
    .tm-card__price-amount {
        font-size: 14px;
        font-weight: 500;
    }
    .tm-card__price-original {
        font-size: 10px;
    }
    .tm-card__price-unit {
        font-size: 9px;
    }
    .tm-card__book-btn {
        padding: 8px 18px;
        font-size: 12px;
        border-radius: 6px;
        border-width: 2px;
    }
    .tm-filter__header {
        padding: 14px 16px;
    }
    .tm-filter__body {
        padding: 0 16px 14px;
    }

    /* List view: same vertical layout */
    .tm-grid--list .tm-card {
        flex-direction: column;
    }
    .tm-grid--list .tm-card__image {
        flex: none;
        width: 100%;
        aspect-ratio: 16 / 10;
        min-height: 0;
        border-radius: 12px 12px 0 0;
    }
    .tm-grid--list .tm-card__image img {
        border-radius: 12px 12px 0 0;
    }
    .tm-grid--list .tm-card__body {
        padding: 14px 14px 12px;
    }
    .tm-grid--list .tm-card__title {
        font-size: 15px;
        -webkit-line-clamp: 2;
    }
    .tm-grid--list .tm-card__specs {
        display: grid;
    }
    .tm-grid--list .tm-card__price-amount {
        font-size: 14px;
    }
    .tm-grid--list .tm-card__book-btn {
        padding: 8px 18px;
        font-size: 12px;
    }
    .tm-grid--list .tm-card__footer {
        border-top: none;
        padding-top: 0;
    }

    /* Homepage grid: 1 column vertical cards */
    .tm-grid--home {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* ============================================================================
   HOMEPAGE: 2-Row Horizontal Scroll on Mobile (≤ 767px)
   Hotel (.bc-list-hotel), Tour (.bc-list-tour), Car (.bc-list-car)
   ============================================================================ */
@media (max-width: 767px) {
    /* Override overflow:hidden from app.css that clips horizontal scroll */
    .bc-list-hotel,
    .bc-list-tour,
    .bc-list-car {
        overflow: visible !important;
    }
    .bc-list-hotel .list-item,
    .bc-list-tour .list-item,
    .bc-list-car .list-item {
        overflow: visible;
    }

    /* --- Common horizontal-scroll grid for all homepage listing blocks --- */
    .bc-list-hotel .list-item .row,
    .bc-list-tour .list-item .row,
    .bc-list-car .list-item .tm-grid--home {
        display: grid !important;
        grid-auto-flow: column;
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 10px;
        margin: 0;
        padding-bottom: 4px;
    }
    .bc-list-hotel .list-item .row::-webkit-scrollbar,
    .bc-list-tour .list-item .row::-webkit-scrollbar,
    .bc-list-car .list-item .tm-grid--home::-webkit-scrollbar {
        display: none;
    }

    /* Bootstrap col items - override col-md-6 flex:50% for horizontal scroll */
    .bc-list-hotel .list-item .row > [class*="col-"],
    .bc-list-tour .list-item .row > [class*="col-"] {
        flex: none !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* tm-grid--home items - fixed width for horizontal scroll */
    .bc-list-car .list-item .tm-grid--home > .tm-card {
        width: 100%;
        min-width: 0;
    }

    /* Force VERTICAL card layout on homepage (override small-mobile horizontal) */
    .bc-list-hotel .tm-card,
    .bc-list-tour .tm-card,
    .bc-list-car .tm-card {
        flex-direction: column !important;
        border-radius: 12px;
        min-height: 0;
    }
    .bc-list-hotel .tm-card__image,
    .bc-list-tour .tm-card__image,
    .bc-list-car .tm-card__image {
        flex: none !important;
        width: 100% !important;
        aspect-ratio: 16 / 10;
        min-height: 0 !important;
        border-radius: 12px 12px 0 0;
    }
    .bc-list-hotel .tm-card__image img,
    .bc-list-tour .tm-card__image img,
    .bc-list-car .tm-card__image img {
        border-radius: 12px 12px 0 0;
    }
    .bc-list-hotel .tm-card__image .no-image,
    .bc-list-tour .tm-card__image .no-image,
    .bc-list-car .tm-card__image .no-image {
        border-radius: 12px 12px 0 0;
    }
    .bc-list-hotel .tm-card__body,
    .bc-list-tour .tm-card__body,
    .bc-list-car .tm-card__body {
        padding: 14px 14px 12px;
    }
    .bc-list-hotel .tm-card__title,
    .bc-list-tour .tm-card__title,
    .bc-list-car .tm-card__title {
        font-size: 15px;
        font-weight: 700;
        margin: 0 0 6px;
        line-height: 1.35;
    }
    .bc-list-hotel .tm-card__badge,
    .bc-list-tour .tm-card__badge,
    .bc-list-car .tm-card__badge {
        top: 8px;
        left: 8px;
        padding: 3px 8px;
        font-size: 10px;
    }
    .bc-list-hotel .tm-card__badge--discount,
    .bc-list-tour .tm-card__badge--discount,
    .bc-list-car .tm-card__badge--discount {
        bottom: auto;
        top: 28px;
    }
    .bc-list-hotel .tm-card__review-badge,
    .bc-list-tour .tm-card__review-badge,
    .bc-list-car .tm-card__review-badge {
        font-size: 12px;
    }
    .bc-list-hotel .tm-card__divider,
    .bc-list-tour .tm-card__divider,
    .bc-list-car .tm-card__divider {
        display: block;
    }
    .bc-list-hotel .tm-card__specs,
    .bc-list-tour .tm-card__specs,
    .bc-list-car .tm-card__specs {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 12px;
        margin-bottom: 12px;
    }
    .bc-list-hotel .tm-card__spec,
    .bc-list-tour .tm-card__spec,
    .bc-list-car .tm-card__spec {
        font-size: 12px;
    }
    .bc-list-hotel .tm-card__location,
    .bc-list-tour .tm-card__location,
    .bc-list-car .tm-card__location {
        font-size: 12px;
        margin-bottom: 10px;
    }
    .bc-list-hotel .tm-card__footer,
    .bc-list-tour .tm-card__footer,
    .bc-list-car .tm-card__footer {
        gap: 10px;
        align-items: flex-end;
    }
    .bc-list-hotel .tm-card__price-amount,
    .bc-list-tour .tm-card__price-amount,
    .bc-list-car .tm-card__price-amount {
        font-size: 14px;
    }
    .bc-list-hotel .tm-card__price-unit,
    .bc-list-tour .tm-card__price-unit,
    .bc-list-car .tm-card__price-unit {
        font-size: 9px;
    }
    .bc-list-hotel .tm-card__book-btn,
    .bc-list-tour .tm-card__book-btn,
    .bc-list-car .tm-card__book-btn {
        padding: 8px 18px;
        font-size: 12px;
        border-width: 2px;
    }
}

/* ============================================================================
   RESPONSIVE: Very Small Mobile (< 400px) - Slightly tighter vertical cards
   ============================================================================ */
@media (max-width: 399px) {
    .tm-card__body {
        padding: 12px 12px 10px;
    }
    .tm-card__title {
        font-size: 14px;
    }
    .tm-card__location {
        font-size: 11px;
    }
    .tm-card__spec {
        font-size: 11px;
    }
    .tm-card__price-amount {
        font-size: 13px;
    }
    .tm-card__book-btn {
        padding: 7px 14px;
        font-size: 11px;
    }
}

/* ============================================================================
   PORTAL RESPONSIVE FIXES - Overflow, Touch Targets, Spacing
   ============================================================================ */

/* Prevent horizontal overflow on grid/content containers. Keep the layout
   wrapper overflow visible so the desktop filter sidebar can stay sticky. */
.tm-grid { overflow: hidden; }
.tm-search-layout { max-width: 100%; }
.tm-search-layout__content { min-width: 0; overflow-x: hidden; }
.tm-card__title, .tm-card__location { overflow: hidden; text-overflow: ellipsis; }

/* Fix touch targets - minimum 44px per WCAG */
@media (max-width: 767px) {
    .tm-card__book-btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* List view: intermediate breakpoint for image width */
@media (min-width: 576px) and (max-width: 991px) {
    .tm-grid--list .tm-card__image {
        flex: 0 0 200px;
        width: 200px;
        min-height: 160px;
    }
}

/* Topbar: prevent cramped selects on mid-tablet */
@media (min-width: 576px) and (max-width: 767px) {
    .tm-topbar {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
    .tm-topbar__left,
    .tm-topbar__right {
        justify-content: space-between;
    }
}

/* ============================================================================
   MOBILE: Single-row swipeable card carousel (Booking.com-style)
   Sized so ~1.5 cards are visible (one full card, the next peeking at the
   edge as a swipe affordance). Cards keep the same full field set as
   desktop - image, specs grid, facility icons, operator line, cancellation
   flag, price - nothing is stripped out for mobile.
   Applies to the homepage Popular Hotels/Tours/Cars widgets and the
   search-page map view's side list only - NOT the main search-results grid,
   which stacks vertically instead (see the block right after this one).
   ============================================================================ */
@media (max-width: 767px) {
    .bc-list-hotel .list-item .row,
    .bc-list-tour .list-item .row,
    .bc-list-car .list-item .tm-grid--home {
        display: flex !important;
        flex-wrap: nowrap !important;
        grid-auto-flow: unset;
        grid-template-rows: none;
        grid-template-columns: none;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 12px;
        margin: 0;
        padding: 2px 4px 12px;
    }
    .bc-list-hotel .list-item .row::-webkit-scrollbar,
    .bc-list-tour .list-item .row::-webkit-scrollbar,
    .bc-list-car .list-item .tm-grid--home::-webkit-scrollbar {
        display: none;
    }

    /* ~68% card width = one full card + roughly half of the next peeking */
    .bc-list-car .list-item .tm-grid--home > .tm-card {
        scroll-snap-align: start;
        flex: 0 0 65% !important;
        width: auto !important;
        min-width: 250px;
    }
    .bc-list-hotel .list-item .row > [class*="col-"],
    .bc-list-tour .list-item .row > [class*="col-"] {
        flex: 0 0 65% !important;
        width: auto !important;
        max-width: none !important;
        min-width: 250px;
        padding: 0 !important;
        scroll-snap-align: start;
    }

    .bc-list-hotel .tm-card__image,
    .bc-list-tour .tm-card__image,
    .bc-list-car .tm-card__image {
        aspect-ratio: 16 / 10;
    }
    .bc-list-hotel .tm-card__title,
    .bc-list-tour .tm-card__title,
    .bc-list-car .tm-card__title {
        font-size: 15px;
    }
}

/* ============================================================================
   MOBILE: Search-results grid (Hotel/Tour/Car) - vertical stacked cards.
   Was previously a horizontal swipe carousel; changed to a plain single-
   column stack so every result is visible by scrolling down rather than
   sideways. Also hides the "Showing X of Y" result-count text (redundant
   with the Load More button below it) and strips the Load More button's
   border/background so it reads as a plain text link.
   ============================================================================ */
@media (max-width: 767px) {
    .tm-grid:not(.tm-grid--list):not(.tm-grid--home) {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .tm-grid:not(.tm-grid--list):not(.tm-grid--home) .tm-card__image {
        aspect-ratio: 16 / 10;
    }

    .tm-pagination__info {
        display: none;
    }
}
