/* =========================================================
   TOUR DU LỊCH — ARCHIVE CSS v5.1 (Flatsome Compatible)
   Palette: Kem vàng #FFFAD8 · Rừng xanh #33473B · Cam cháy #EE6F18
   Font: Montserrat | Tối ưu: Flatsome theme
   FIX v5.1: Tương thích đầy đủ Flatsome theme
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400&display=swap');

:root {
    /* ── Palette chính ── */
    --tbx-cream:      #FFFAD8;
    --tbx-cream-dark: #FFF3A8;
    --tbx-forest:     #33473B;
    --tbx-forest-h:   #263728;
    --tbx-forest-l:   #4a6455;
    --tbx-forest-bg:  #f0f5f1;
    --tbx-orange:     #EE6F18;
    --tbx-orange-h:   #d45e0e;
    --tbx-orange-l:   #f58a42;
    --tbx-orange-bg:  #fff4ec;

    /* ── Neutrals ── */
    --tbx-text:       #1c2b24;
    --tbx-muted:      #6b7f74;
    --tbx-border:     rgba(51,71,59,0.10);
    --tbx-border-h:   rgba(51,71,59,0.20);
    --tbx-white:      #ffffff;

    /* ── Tokens ── */
    --tbx-font:       'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
    --tbx-radius:     14px;
    --tbx-radius-lg:  22px;
    --tbx-max:        1340px;
    --tbx-trans:      all .22s ease;
    --tbx-shadow-sm:  0 2px 10px rgba(51,71,59,0.08);
    --tbx-shadow-md:  0 8px 28px rgba(51,71,59,0.12);
    --tbx-shadow-lg:  0 16px 48px rgba(51,71,59,0.15);
}

/* ── Box-sizing scope: CHỈ trong plugin, không ảnh hưởng Flatsome ── */
.tbx-tour-archive *,
.tbx-tour-archive *::before,
.tbx-tour-archive *::after,
.tbx-shortcode-wrap *,
.tbx-shortcode-wrap *::before,
.tbx-shortcode-wrap *::after {
    box-sizing: border-box;
}

/* ── Font scope ── */
.tbx-tour-archive,
.tbx-tour-archive *,
.tbx-shortcode-wrap,
.tbx-shortcode-wrap * {
    font-family: var(--tbx-font);
}

/* ── FIX Flatsome: img max-width, p margin, a color, list styles ── */
.tbx-tour-archive img,
.tbx-shortcode-wrap img {
    max-width: 100%;
    height: auto;
}
.tbx-tour-archive a,
.tbx-shortcode-wrap a {
    color: inherit;
    text-decoration: none;
}
.tbx-tour-archive p {
    margin-bottom: 0;
}
.tbx-tour-archive ul,
.tbx-tour-archive ol {
    margin-left: 0;
    padding-left: 0;
    list-style: none;
}
.tbx-tour-archive li::before {
    display: none !important;
}

/* ════════════════════════════════════════════════════════
   ARCHIVE CONTAINER
   FIX Flatsome: KHÔNG dùng width:100vw + margin-left:-50vw
   Thay bằng full-width an toàn qua Flatsome's wrapper
════════════════════════════════════════════════════════ */
.tbx-tour-archive {
    background: var(--tbx-white);
    min-height: 60vh;
    width: 100%;
    /* FIX: Loại bỏ 100vw hack gây lệch khi có scrollbar */
}

/* ════════════════════════════════════════════════════════
   HEADER — Full-width bằng negative margin (Flatsome safe)
════════════════════════════════════════════════════════ */
.tbx-archive-header {
    background: var(--tbx-forest);
    padding: 56px 24px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
    /* FIX Flatsome: negative margin thay vì 100vw — hoạt động với sticky header */
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    /* Đảm bảo không bị clip bởi parent */
    max-width: none;
}

/* Texture nền — lưới chấm mờ */
.tbx-archive-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,250,216,0.12) 1px, transparent 1px);
    background-size: 24px 24px;
    pointer-events: none;
}

/* Accent bar vàng cream trên cùng */
.tbx-archive-header::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tbx-orange) 0%, var(--tbx-cream) 50%, var(--tbx-orange) 100%);
}

.tbx-archive-header__inner {
    max-width: var(--tbx-max);
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.tbx-archive-title {
    font-size: clamp(1.6rem, 3vw, 2.6rem);
    font-weight: 700;
    color: var(--tbx-cream);
    margin-bottom: 10px;
    margin-top: 0;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.tbx-archive-desc {
    font-size: 13.5px;
    color: rgba(255,250,216,0.70);
    line-height: 1.55;
    font-weight: 400;
    max-width: 520px;
    margin: 0 auto;
}

/* ════════════════════════════════════════════════════════
   CONTENT AREA
════════════════════════════════════════════════════════ */
.tbx-archive-content {
    max-width: var(--tbx-max);
    margin: 0 auto;
    padding: 36px 0 72px;
    background: var(--tbx-white);
    min-height: 60vh;
}

/* ════════════════════════════════════════════════════════
   FILTER BAR
════════════════════════════════════════════════════════ */
.tbx-filter-bar {
    display: flex;
    gap: 7px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.tbx-filter-btn {
    display: inline-block;
    padding: 7px 18px;
    border-radius: 0;
    border: 1.5px solid var(--tbx-border-h);
    background: var(--tbx-white);
    color: var(--tbx-muted);
    font-family: var(--tbx-font);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    transition: var(--tbx-trans);
    cursor: pointer;
    letter-spacing: 0.2px;
}

.tbx-filter-btn:hover,
.tbx-filter-btn.active {
    background: var(--tbx-forest);
    color: var(--tbx-cream) !important;
    border-color: var(--tbx-forest);
    box-shadow: 0 3px 12px rgba(51,71,59,0.22);
}

/* ════════════════════════════════════════════════════════
   GRID
════════════════════════════════════════════════════════ */
.tbx-tour-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

@media (max-width: 900px)  { .tbx-tour-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 767px)  { .tbx-tour-grid { grid-template-columns: 1fr !important; } }

/* Columns từ shortcode */
.tbx-tour-grid[data-cols="1"] { grid-template-columns: repeat(1,1fr); }
.tbx-tour-grid[data-cols="2"] { grid-template-columns: repeat(2,1fr); }
.tbx-tour-grid[data-cols="3"] { grid-template-columns: repeat(3,1fr); }
.tbx-tour-grid[data-cols="4"] { grid-template-columns: repeat(4,1fr); }
.tbx-tour-grid[data-cols="5"] { grid-template-columns: repeat(5,1fr); }
.tbx-tour-grid[data-cols="6"] { grid-template-columns: repeat(6,1fr); }

@media (max-width: 1100px) {
    .tbx-tour-grid[data-cols="5"],
    .tbx-tour-grid[data-cols="6"] { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .tbx-tour-grid[data-cols="3"],
    .tbx-tour-grid[data-cols="4"],
    .tbx-tour-grid[data-cols="5"],
    .tbx-tour-grid[data-cols="6"] { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
    .tbx-tour-grid[data-cols] { grid-template-columns: 1fr !important; }
}

/* ════════════════════════════════════════════════════════
   CARD
════════════════════════════════════════════════════════ */
.tbx-tour-card {
    background: var(--tbx-white);
    border-radius: 0;
    border: 1px solid var(--tbx-border);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .22s ease, box-shadow .22s ease;
    min-width: 0;
    width: 100%;
}

.tbx-tour-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--tbx-shadow-lg);
    border-color: rgba(51,71,59,0.18);
}

/* ── Image wrap — tỉ lệ 4:3 ── */
.tbx-tour-card__image-wrap {
    position: relative;
    display: block;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: var(--tbx-forest-bg);
    text-decoration: none !important;
    flex-shrink: 0;
}

.tbx-tour-card__image-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .45s ease;
    /* FIX Flatsome: reset max-height từ theme */
    max-height: none;
}

.tbx-tour-card:hover .tbx-tour-card__image-wrap img {
    transform: scale(1.06);
}

/* Gradient overlay nhẹ */
.tbx-tour-card__image-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(51,71,59,0.3) 0%, transparent 45%);
    pointer-events: none;
}

/* Discount badge */
.tbx-tour-card__discount {
    position: absolute;
    top: 10px; right: 10px;
    background: var(--tbx-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    padding: 5px 9px;
    border-radius: 0;
    letter-spacing: .02em;
    z-index: 3;
    box-shadow: 0 2px 8px rgba(238,111,24,.35);
    pointer-events: none;
}

/* ── Card body ── */
.tbx-tour-card__body {
    padding: 15px 16px 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 9px;
}

.tbx-tour-card__title {
    font-size: 16px;
    font-weight: 600;
    color: var(--tbx-text);
    line-height: 1.38;
    margin-bottom: 3px;
    /* FIX Flatsome: reset h3 margin-top */
    margin-top: 0;
}

.tbx-tour-card__title a {
    color: var(--tbx-text);
    text-decoration: none !important;
    transition: color .18s;
}

.tbx-tour-card__title a:hover {
    color: var(--tbx-forest);
}

/* ── Toggle (Promotion) ── */
.tbx-tour-card__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 8px 14px;
    border-radius: 0;
    border: 1.5px solid var(--tbx-border-h);
    background: transparent;
    color: var(--tbx-muted);
    font-family: var(--tbx-font);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.9px;
    text-transform: uppercase;
    cursor: pointer;
    transition: var(--tbx-trans);
    /* FIX Flatsome: reset button */
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
}

.tbx-tour-card__toggle:hover {
    border-color: var(--tbx-forest);
    color: var(--tbx-forest);
    background: var(--tbx-cream);
}

.tbx-tour-card__toggle:focus {
    outline: none;
    background: transparent;
    color: var(--tbx-muted);
    border-color: var(--tbx-border-h);
}

.tbx-tour-card__toggle:focus:hover {
    background: var(--tbx-cream);
    color: var(--tbx-forest);
    border-color: var(--tbx-forest);
}

.tbx-tour-card__toggle.open {
    background: var(--tbx-cream);
    color: var(--tbx-forest);
    border-color: var(--tbx-forest);
}

.tbx-tour-card__toggle svg {
    width: 12px;
    height: 12px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
    transition: transform .25s ease;
    flex-shrink: 0;
}

.tbx-tour-card__toggle.open svg {
    transform: rotate(180deg);
}

/* ── Excerpt / Promo dropdown ── */
.tbx-tour-card__excerpt {
    font-size: 13px;
    color: var(--tbx-text);
    line-height: 1.5;
    font-weight: 500;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .35s ease, opacity .25s ease;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tbx-tour-card__excerpt.open {
    max-height: 160px;
    opacity: 1;
}

.tbx-tour-card__promotion { padding: 0 2px; }

.tbx-tour-card__promotion p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
}

/* Danh sách promo */
.tbx-promo-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.tbx-promo-list li {
    font-size: 13px;
    line-height: 1.5;
    color: var(--tbx-text);
    padding: 5px 9px;
    background: var(--tbx-cream);
    border-left: 3px solid var(--tbx-orange);
    border-radius: 0;
    margin-bottom: 0 !important;
}

/* FIX Flatsome: ẩn list bullet pseudo */
.tbx-promo-list li::before,
.tbx-promo-list li::after {
    display: none !important;
}

/* ── Footer card ── */
.tbx-tour-card__footer {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 4px;
}

.tbx-tour-card__dur {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.tbx-tour-card__dur-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--tbx-muted);
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.tbx-tour-card__dur-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--tbx-text);
}

/* Price */
.tbx-tour-card__price {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1px;
}

.tbx-price-original {
    font-size: 11.5px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
    line-height: 1.2;
}

.tbx-price-sale {
    font-size: 18px;
    font-weight: 700;
    color: #BF292C;
    line-height: 1.2;
}

/* Fallback excerpt */
.tbx-tour-card__fallback-excerpt {
    font-size: 13px;
    line-height: 1.55;
    color: var(--tbx-muted);
    margin: 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ── CTA button ── */
.tbx-tour-card__btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    background: var(--tbx-forest);
    color: #fff !important;
    border-radius: 0;
    text-align: center;
    font-family: var(--tbx-font);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    border: none;
    cursor: pointer;
    transition: background .2s ease, transform .15s ease, box-shadow .2s ease;
    margin-top: 6px;
    letter-spacing: 0.3px;
    /* FIX Flatsome: reset button */
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
}

.tbx-tour-card__btn:hover {
    background: var(--tbx-orange);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(238,111,24,0.30);
}

/* ════════════════════════════════════════════════════════
   PAGINATION
════════════════════════════════════════════════════════ */
.tbx-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.tbx-pagination .page-numbers {
    display: inline-flex;
    gap: 6px;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.tbx-pagination .page-numbers li::before { display: none !important; }

.tbx-pagination .page-numbers li a,
.tbx-pagination .page-numbers li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    font-family: var(--tbx-font);
    font-size: 12px;
    font-weight: 500;
    text-decoration: none !important;
    color: var(--tbx-text);
    background: var(--tbx-white);
    border: 1.5px solid var(--tbx-border-h);
    transition: var(--tbx-trans);
}

.tbx-pagination .page-numbers li a:hover {
    background: var(--tbx-forest);
    color: var(--tbx-cream) !important;
    border-color: var(--tbx-forest);
}

.tbx-pagination .page-numbers li .current {
    background: var(--tbx-forest);
    color: var(--tbx-cream);
    border-color: var(--tbx-forest);
    font-weight: 700;
}

.tbx-pagination .page-numbers li a.prev,
.tbx-pagination .page-numbers li a.next {
    font-size: 16px;
    font-weight: 700;
}

/* ════════════════════════════════════════════════════════
   SHORTCODE WRAPPER
════════════════════════════════════════════════════════ */
.tbx-shortcode-wrap {
    padding: 36px 0 52px;
    max-width: var(--tbx-max);
    margin: 0 auto;
    box-sizing: border-box;
}

/* Section theo loại */
.tbx-loai-section { padding-bottom: 56px; }

.tbx-loai-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.tbx-loai-title {
    font-family: var(--tbx-font);
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 700;
    color: var(--tbx-forest);
    margin: 0;
    line-height: 1.3;
}

.tbx-loai-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: var(--tbx-font);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tbx-orange);
    text-decoration: none !important;
    white-space: nowrap;
    transition: var(--tbx-trans);
}

.tbx-loai-link:hover { color: var(--tbx-orange-h); }

.tbx-loai-link svg {
    width: 14px; height: 14px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2.5;
}

/* Mobile shortcode: scroll ngang */
@media (max-width: 767px) {
    .tbx-shortcode-wrap {
        padding-left: 0;
        padding-right: 0;
        overflow: visible;
    }
    .tbx-shortcode-wrap .tbx-loai-header {
        padding-left: 20px;
        padding-right: 20px;
    }
    .tbx-shortcode-wrap .tbx-tour-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: visible;
        gap: 12px;
        padding: 4px 20px 16px 20px;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 20px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    .tbx-shortcode-wrap .tbx-tour-grid::-webkit-scrollbar { display: none; }
    .tbx-shortcode-wrap .tbx-tour-grid .tbx-tour-card {
        flex: 0 0 78vw;
        min-width: 0;
        width: 78vw;
        scroll-snap-align: start;
    }
}

/* ════════════════════════════════════════════════════════
   SEARCH BOX — Premium
   Tone: Forest #33473B + Cream #FFFAD8 + Orange #EE6F18
════════════════════════════════════════════════════════ */

:root {
    --tbx-accent:         #33473B;
    --tbx-accent-h:       #263728;
    --tbx-accent-dark:    #1a2620;
    --tbx-accent-soft:    rgba(51,71,59,0.06);
    --tbx-accent-mid:     rgba(51,71,59,0.12);
    --tbx-accent-glow:    rgba(51,71,59,0.20);
    --tbx-field-bg:       #ffffff;
    --tbx-field-border:   rgba(51,71,59,0.14);
    --tbx-field-border-h: rgba(51,71,59,0.28);
    --tbx-label-color:    #33473B;
    --tbx-input-radius:   11px;
    --tbx-box-radius:     20px;
}

/* ── Archive search box ── */
.tbx-search-box {
    background: var(--tbx-cream);
    border: 1.5px solid rgba(51,71,59,0.18);
    border-radius: 0;
    padding: 28px 32px 26px;
    margin-bottom: 36px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(51,71,59,0.04),
        0 8px 24px rgba(51,71,59,0.08),
        inset 0 1px 0 rgba(255,255,255,0.8);
}

/* Accent bar trên */
.tbx-search-box::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--tbx-forest) 0%, var(--tbx-orange) 50%, var(--tbx-forest) 100%);
    border-radius: 0;
}

/* Decorative orb */
.tbx-search-box::after {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 260px; height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle at center,
        rgba(238,111,24,0.06) 0%,
        rgba(238,111,24,0.02) 50%,
        transparent 70%
    );
    pointer-events: none;
}

/* ── Fields Grid ── */
.tbx-search-box__fields {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.tbx-search-box__fields--archive {
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 14px;
    margin-bottom: 0;
    align-items: end;
}

@media (max-width: 1100px) {
    .tbx-search-box__fields { grid-template-columns: repeat(3, 1fr); }
    .tbx-search-box__fields--archive { grid-template-columns: 1fr 1fr; }
    .tbx-search-box__fields--archive .tbx-search-field--actions { grid-column: span 2; }
}

@media (max-width: 700px) {
    .tbx-search-box__fields { grid-template-columns: repeat(2, 1fr); }
    .tbx-search-box__fields--archive { grid-template-columns: 1fr; }
    .tbx-search-box__fields--archive .tbx-search-field--actions { grid-column: span 1; }
    .tbx-search-box { padding: 22px 18px 20px; }
}

@media (max-width: 440px) {
    .tbx-search-box__fields { grid-template-columns: 1fr; }
}

/* ── Field wrapper ── */
.tbx-search-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

/* ── Label ── */
.tbx-search-field__label {
    font-family: var(--tbx-font);
    font-size: 10px;
    font-weight: 700;
    color: var(--tbx-label-color);
    letter-spacing: 1px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0.80;
}

.tbx-search-field__label i { font-size: 11px; opacity: 0.7; }

/* ── Input & Select — FIX Flatsome: override input styles từ theme ── */
.tbx-search-input,
.tbx-search-select {
    font-family: var(--tbx-font) !important;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--tbx-text);
    background: var(--tbx-field-bg);
    border: 1.5px solid var(--tbx-field-border) !important;
    border-radius: 0;
    padding: 12px 16px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color .22s ease, box-shadow .22s ease, transform .15s ease;
    /* FIX Flatsome: reset input global styles */
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none;
    outline: none;
    height: auto;
    line-height: 1.4;
    margin: 0;
    /* FIX Flatsome dark mode */
    color-scheme: light;
}

.tbx-search-input::placeholder {
    color: rgba(51,71,59,0.35);
    font-weight: 400;
    font-size: 13px;
}

.tbx-search-input::-webkit-outer-spin-button,
.tbx-search-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.tbx-search-input:focus,
.tbx-search-select:focus {
    outline: none !important;
    border-color: var(--tbx-forest) !important;
    background: var(--tbx-cream);
    box-shadow: 0 0 0 4px rgba(51,71,59,0.10) !important;
    transform: translateY(-1px);
}

.tbx-search-input:hover:not(:focus),
.tbx-search-select:hover:not(:focus) {
    border-color: var(--tbx-field-border-h) !important;
}

/* ── Select wrapper ── */
.tbx-select-wrap {
    position: relative;
    display: block;
}

.tbx-select-wrap .tbx-search-select {
    width: 100%;
    padding-right: 40px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.tbx-select-arrow {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--tbx-forest);
    font-size: 10px;
    opacity: 0.6;
    transition: transform .2s ease, opacity .2s ease;
    line-height: 1;
}

.tbx-select-wrap:hover .tbx-select-arrow { opacity: 1; }

.tbx-select-wrap .tbx-search-select:focus ~ .tbx-select-arrow {
    opacity: 1;
    transform: translateY(-50%) rotate(180deg);
}

/* ── Actions ── */
.tbx-search-box__actions {
    display: flex;
    gap: 8px;
    flex-wrap: nowrap;
    align-items: center;
}

.tbx-search-field--actions {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.tbx-search-field--actions .tbx-search-box__actions { height: 48px; }

.tbx-search-btn--reset-icon {
    width: 48px; height: 48px; padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    flex-shrink: 0;
}

/* ════════════════════════════════════════════════════════
   HERO SEARCH (shortcode)
════════════════════════════════════════════════════════ */
.tbx-search-shortcode-wrap--hero {
    width: 100%;
    background: var(--tbx-forest);
    border-radius: 0;
    padding: 36px 36px 32px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(51,71,59,0.30),
        0 2px 8px rgba(51,71,59,0.18);
}

/* Orbs */
.tbx-sc-orb { position: absolute; border-radius: 50%; pointer-events: none; }

.tbx-sc-orb--1 {
    top: -80px; right: -80px;
    width: 340px; height: 340px;
    background: radial-gradient(circle at center,
        rgba(255,250,216,0.14) 0%,
        rgba(238,111,24,0.06) 50%,
        transparent 70%
    );
}

.tbx-sc-orb--2 {
    bottom: -60px; left: -60px;
    width: 280px; height: 280px;
    background: radial-gradient(circle at center,
        rgba(238,111,24,0.10) 0%,
        transparent 65%
    );
}

.tbx-sc-orb--3 {
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 600px; height: 200px;
    background: radial-gradient(ellipse at center,
        rgba(255,250,216,0.04) 0%,
        transparent 70%
    );
}

.tbx-sc-hero__inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

/* Eyebrow */
.tbx-sc-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--tbx-font);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--tbx-cream);
    background: rgba(255,250,216,0.12);
    border: 1px solid rgba(255,250,216,0.22);
    border-radius: 0;
    padding: 5px 14px;
    margin-bottom: 14px;
}

.tbx-sc-hero__eyebrow i { font-size: 11px; opacity: 0.85; }

/* Title */
.tbx-sc-hero__title {
    font-family: var(--tbx-font);
    font-size: clamp(1.35rem, 2.5vw, 1.9rem);
    font-weight: 700;
    color: var(--tbx-cream);
    margin: 0 0 10px;
    line-height: 1.2;
    letter-spacing: -0.4px;
}

/* Subtitle */
.tbx-sc-hero__sub {
    font-family: var(--tbx-font);
    font-size: 14px;
    font-weight: 400;
    color: rgba(255,250,216,0.50);
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Search pill */
.tbx-search-inline {
    display: flex;
    align-items: center;
    gap: 0;
    background: #fff;
    border: 1.5px solid rgba(255,255,255,0.12);
    border-radius: 0;
    padding: 7px 7px 7px 26px;
    transition: border-color .22s ease, box-shadow .22s ease, transform .15s ease;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
}

.tbx-search-inline:hover { border-color: rgba(238,111,24,0.40); }

.tbx-search-inline:focus-within {
    border-color: var(--tbx-orange);
    box-shadow: 0 0 0 4px rgba(238,111,24,0.18), 0 8px 32px rgba(238,111,24,0.14);
    transform: translateY(-1.5px);
}

.tbx-search-inline__icon {
    color: var(--tbx-orange);
    font-size: 16px;
    flex-shrink: 0;
    margin-right: 14px;
    opacity: 0.85;
    transition: opacity .2s ease;
}

.tbx-search-inline:focus-within .tbx-search-inline__icon { opacity: 1; }

/* FIX Flatsome: input inside search pill — override tất cả styles */
.tbx-search-inline__input {
    flex: 1;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    font-family: var(--tbx-font) !important;
    font-size: 15px;
    font-weight: 500;
    color: var(--tbx-text) !important;
    padding: 10px 0;
    min-width: 0;
    -webkit-text-fill-color: var(--tbx-text);
    border-radius: 0;
    height: auto !important;
    margin: 0 !important;
    transform: none !important;
}

.tbx-search-inline__input:-webkit-autofill,
.tbx-search-inline__input:-webkit-autofill:hover,
.tbx-search-inline__input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
    box-shadow: 0 0 0 1000px transparent inset !important;
    -webkit-text-fill-color: var(--tbx-text) !important;
    background-color: transparent !important;
    transition: background-color 5000s ease-in-out 0s;
}

.tbx-search-inline__input::placeholder {
    color: rgba(28,43,36,0.40);
    font-weight: 400;
}

/* Nút tìm */
.tbx-search-inline__btn {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--tbx-orange);
    color: #ffffff !important;
    border: none;
    border-radius: 0;
    padding: 13px 30px;
    font-family: var(--tbx-font);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .22s ease, box-shadow .22s ease, transform .15s ease;
    box-shadow: 0 4px 16px rgba(238,111,24,0.40), inset 0 1px 0 rgba(255,255,255,0.12);
    white-space: nowrap;
    letter-spacing: 0.3px;
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
}

.tbx-search-inline__btn:hover {
    background: var(--tbx-orange-h);
    color: #ffffff !important;
    box-shadow: 0 6px 24px rgba(238,111,24,0.50), inset 0 1px 0 rgba(255,255,255,0.12);
    transform: translateY(-2px);
}

.tbx-search-inline__btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(238,111,24,0.25);
}

/* Trust badges */
.tbx-sc-hero__badges {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.tbx-sc-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-family: var(--tbx-font);
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,250,216,0.45);
    letter-spacing: 0.1px;
    white-space: nowrap;
}

.tbx-sc-badge i { font-size: 12px; color: var(--tbx-cream); opacity: 0.7; }

.tbx-sc-hero__badges .tbx-sc-badge + .tbx-sc-badge::before {
    content: '·';
    margin-right: 24px;
    color: rgba(255,250,216,0.15);
    font-size: 16px;
    line-height: 1;
}

/* ════════════════════════════════════════════════════════
   BUTTONS — FIX Flatsome: reset global button styles
════════════════════════════════════════════════════════ */
.tbx-search-btn {
    font-family: var(--tbx-font);
    font-size: 13.5px;
    font-weight: 700;
    padding: 12px 30px;
    border-radius: 0;
    cursor: pointer;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    transition: background .22s ease, box-shadow .22s ease, transform .15s ease, color .2s ease;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    /* FIX Flatsome */
    -webkit-appearance: none;
    appearance: none;
    line-height: 1.4;
    text-decoration: none !important;
}

/* Shimmer */
.tbx-search-btn--primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(105deg,
        rgba(255,255,255,0) 30%,
        rgba(255,255,255,0.15) 50%,
        rgba(255,255,255,0) 70%
    );
    transform: translateX(-100%);
    transition: transform .5s ease;
    pointer-events: none;
}
.tbx-search-btn--primary:hover::before { transform: translateX(100%); }

/* Primary */
.tbx-search-btn--primary {
    background: linear-gradient(145deg, var(--tbx-orange) 0%, var(--tbx-orange-h) 100%);
    color: #ffffff !important;
    box-shadow:
        0 4px 14px rgba(238,111,24,0.30),
        inset 0 1px 0 rgba(255,255,255,0.15);
    height: 48px;
}
.tbx-search-btn--primary:hover {
    background: linear-gradient(145deg, var(--tbx-orange-l) 0%, var(--tbx-orange) 100%);
    color: #ffffff !important;
    box-shadow:
        0 6px 22px rgba(238,111,24,0.42),
        inset 0 1px 0 rgba(255,255,255,0.15);
    transform: translateY(-2px);
}
.tbx-search-btn--primary:active { transform: translateY(0); }
.tbx-search-btn--primary:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
    color: #999 !important;
}

/* Reset */
.tbx-search-btn--reset {
    background: rgba(51,71,59,0.06);
    color: var(--tbx-forest-l);
    border: 1.5px solid rgba(51,71,59,0.18);
    box-shadow: none;
}
.tbx-search-btn--reset:hover {
    background: #fff0ed;
    color: #c0392b !important;
    border-color: #f5c6c6;
    box-shadow: 0 2px 8px rgba(192,57,43,0.10);
    transform: translateY(-1px);
}

/* ════════════════════════════════════════════════════════
   SEARCH RESULTS
════════════════════════════════════════════════════════ */
.tbx-search-results { margin-bottom: 36px; }

.tbx-search-results__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(51,71,59,0.12);
}

.tbx-search-results__title {
    font-family: var(--tbx-font);
    font-size: 1rem;
    font-weight: 700;
    color: var(--tbx-forest);
    margin: 0;
}

.tbx-search-results__count {
    font-size: 11.5px;
    font-weight: 700;
    color: #fff;
    background: var(--tbx-orange);
    padding: 3px 11px;
    border-radius: 0;
    letter-spacing: 0.2px;
}

.tbx-search-no-results {
    text-align: center;
    padding: 64px 24px;
    color: var(--tbx-muted);
    font-family: var(--tbx-font);
    font-size: 14px;
}

/* Spinner */
@keyframes tbx-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.fa-spin { animation: tbx-spin .7s linear infinite; }

/* No-image placeholder */
.tbx-tour-card__no-img {
    width: 100%;
    aspect-ratio: 4/3;
    background: var(--tbx-forest-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #c0c8c3;
    font-size: 32px;
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */
@media (max-width: 700px) {
    .tbx-search-shortcode-wrap--hero { padding: 28px 20px 24px; border-radius: 0; }
    .tbx-sc-hero__title { font-size: 1.5rem; }
    .tbx-search-inline { padding: 6px 6px 6px 18px; }
    .tbx-search-inline__btn { padding: 12px 20px; font-size: 13px; }
    .tbx-sc-hero__badges { gap: 16px; }
    .tbx-sc-hero__badges .tbx-sc-badge + .tbx-sc-badge::before { margin-right: 16px; }
}
@media (max-width: 480px) {
    .tbx-search-shortcode-wrap--hero { padding: 22px 14px 20px; }
    .tbx-search-inline__btn .fa-arrow-right { display: none; }
    .tbx-sc-hero__badges { gap: 12px; }
    .tbx-sc-badge + .tbx-sc-badge::before { display: none; }
    /* Mobile: ẩn header archive nếu Flatsome cắt */
    .tbx-archive-header {
        margin-left: -24px;
        margin-right: -24px;
    }
}

/* ════════════════════════════════════════════════════════
   FIX FLATSOME: Specific overrides
════════════════════════════════════════════════════════ */

/* FIX: Flatsome .row nesting có thể gây layout lệch */
.tbx-tour-archive .row,
.tbx-tour-archive .large-12 {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* FIX: Flatsome UX Builder image style override */
.tbx-tour-card__image-wrap img,
.tbx-tour-card .attachment-medium_large {
    max-height: none !important;
    object-fit: cover !important;
    border-radius: 0;
}

/* FIX: Flatsome WooCommerce price color nếu bị override */
.tbx-tour-card .tbx-price-sale,
.tbx-tour-card .tbx-price-original {
    color: inherit;
}
.tbx-price-sale { color: #BF292C !important; }
.tbx-price-original { color: #9ca3af !important; }
