/* ============================================================
   Tour Filter System — Astra Child Theme
   Refreshed styling: earthy tones, clean layout, mobile-ready
   ============================================================ */

:root {
    --tfs-primary:    #6cb33d;      /* brand green — buttons */
    --tfs-primary-dk: #57922f;
    --tfs-price:      #111111;      /* price colour — black */
    --tfs-accent:     #2c5f2e;      /* deep forest green */
    --tfs-text:       #1e2d2f;
    --tfs-muted:      #6b7c7e;
    --tfs-border:     #dde3e4;
    --tfs-bg:         #f5f3ef;
    --tfs-white:      #ffffff;
    --tfs-radius:     6px;
}

/* ── Reset inside wrapper ───────────────────────────────────── */
.ete-tour-filter-wrapper *,
.tours-simple-wrapper * {
    box-sizing: border-box;
}

/* ── Outer wrapper ──────────────────────────────────────────── */
.ete-tour-filter-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    display: flex;
    gap: 0;
    position: relative;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.filter-sidebar {
    width: 290px;
    flex-shrink: 0;
    background: var(--tfs-white);
    border-right: 1px solid var(--tfs-border);
    position: sticky;
    top: 90px;
    height: fit-content;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--tfs-primary) #ede9e3;
}

.filter-sidebar::-webkit-scrollbar      { width: 5px; }
.filter-sidebar::-webkit-scrollbar-track { background: #ede9e3; }
.filter-sidebar::-webkit-scrollbar-thumb { background: var(--tfs-primary); border-radius: 4px; }

.filter-container { background: var(--tfs-white); }

/* Header */
.filter-header {
    padding: 22px 20px 18px;
    background: var(--tfs-accent);
    color: var(--tfs-white);
}

.filter-title {
    font-size: 19px;
    font-weight: 700;
    margin: 0 0 5px;
    color: var(--tfs-white);
    letter-spacing: 0.3px;
}

.filter-subtitle {
    font-size: 12px;
    margin: 0;
    color: rgba(255,255,255,0.75);
}

/* ── Mobile nav (hidden on desktop) ─────────────────────────── */
.mobile-filter-nav { display: none; }

.filter-nav-item {
    padding: 15px 20px;
    border-bottom: 1px solid var(--tfs-border);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 14px;
    color: var(--tfs-text);
    background: var(--tfs-white);
    transition: background 0.2s;
}

.filter-nav-item:hover         { background: #faf7f3; }
.filter-nav-item.active        { background: #fdf4e8; color: var(--tfs-primary); }
.filter-nav-arrow              { font-size: 22px; color: var(--tfs-muted); transition: transform 0.2s; }
.filter-nav-item.active .filter-nav-arrow { transform: rotate(90deg); color: var(--tfs-primary); }

/* ── Filter grid (stacked) ───────────────────────────────────── */
.filter-grid {
    display: flex;
    flex-direction: column;
}

/* ── Slider sections ─────────────────────────────────────────── */
.filter-slider-group {
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--tfs-border);
}

.filter-slider-group h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--tfs-text);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.filter-slider-group h4 small {
    font-size: 11px;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: var(--tfs-muted);
}

.slider-subtitle {
    font-size: 12px;
    color: var(--tfs-muted);
    margin: 0 0 18px;
}

.slider-container { padding: 16px 4px 8px; }

/* jQuery UI overrides */
.slider-range {
    height: 5px !important;
    background: #d8d0c6 !important;
    border: none !important;
    border-radius: 3px !important;
}

.ui-slider-range {
    background: var(--tfs-primary) !important;
    border-radius: 3px !important;
}

.ui-slider-handle {
    width: 18px !important;
    height: 18px !important;
    background: var(--tfs-white) !important;
    border: 3px solid var(--tfs-primary) !important;
    border-radius: 50% !important;
    cursor: grab !important;
    outline: none !important;
    top: -7px !important;
    margin-left: -9px !important;
    transition: background 0.15s;
}

.ui-slider-handle:hover,
.ui-slider-handle:active {
    background: var(--tfs-primary) !important;
    cursor: grabbing !important;
}

.slider-values {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--tfs-primary);
}

/* ── Checkbox filter groups ──────────────────────────────────── */
.filter-group { border-bottom: 1px solid var(--tfs-border); }

.filter-group h4 {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin: 0;
    padding: 14px 20px;
    color: var(--tfs-text);
    display: flex;
    align-items: center;
    gap: 7px;
}

.filter-group h4 svg { color: var(--tfs-primary); flex-shrink: 0; }

.filter-options {
    padding: 4px 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-options.scrollable {
    max-height: 220px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--tfs-primary) #ede9e3;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 4px 0;
    cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--tfs-primary);
    flex-shrink: 0;
}

.filter-checkbox span {
    font-size: 13px;
    color: #4a5568;
    line-height: 1.3;
}

.filter-checkbox:hover span { color: var(--tfs-primary); }

.filter-empty-note {
    font-size: 12px;
    color: var(--tfs-muted);
    font-style: italic;
    margin: 0;
}

/* ── Bottom actions ──────────────────────────────────────────── */
.filter-actions {
    padding: 18px 20px;
    background: var(--tfs-bg);
    border-top: 1px solid var(--tfs-border);
}

.btn-reset {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 100%;
    padding: 11px 16px;
    background: var(--tfs-primary);
    color: var(--tfs-white);
    border: none;
    border-radius: var(--tfs-radius);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-reset:hover { background: var(--tfs-primary-dk); }
.btn-reset svg   { width: 14px; height: 14px; }

.tour-count {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--tfs-muted);
    margin-top: 10px;
}

.tour-count strong { color: var(--tfs-accent); font-size: 15px; }

/* ============================================================
   CONTENT AREA + GRID
   ============================================================ */
.tours-content-area {
    flex: 1;
    padding: 28px 24px;
    background: var(--tfs-bg);
    min-width: 0;
}

/* Main results grid */
.tours-grid,
#tours-results {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 22px !important;
    width: 100%;
}

/* Simple display grid */
.tours-simple-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

.tours-simple-grid {
    display: grid !important;
    gap: 22px !important;
}

.tours-simple-grid.tours-masonry-1 { grid-template-columns: 1fr !important; }
.tours-simple-grid.tours-masonry-2 { grid-template-columns: repeat(2, 1fr) !important; }
.tours-simple-grid.tours-masonry-3 { grid-template-columns: repeat(3, 1fr) !important; }
.tours-simple-grid.tours-masonry-4 { grid-template-columns: repeat(4, 1fr) !important; }

/* ============================================================
   TOUR CARD — Professional redesign
   ============================================================ */
.tour-card {
    background: var(--tfs-white);
    border: none;
    border-radius: 10px;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    float: none !important;
    position: static !important;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    height: 100%;
}

.tour-card:hover {
    box-shadow: 0 12px 32px rgba(0,0,0,0.14);
    transform: translateY(-4px);
}

/* Tour image */
.tour-image {
    height: 210px;
    overflow: hidden;
    position: relative;
    background: #ccc;
}

.tour-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.tour-card:hover .tour-image img { transform: scale(1.06); }

.tour-image a { display: block; height: 100%; }

/* Dark gradient overlay at bottom of image */
.tour-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,0.52) 0%, transparent 100%);
    pointer-events: none;
}

/* Card body */
.tour-content {
    padding: 12px 14px 0;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0;
}

/* Price block */
.tour-price-display {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 9px;
    padding-bottom: 9px;
    border-bottom: 1px solid #f0ebe3;
    line-height: 1;
}

.tour-card .tour-content .tour-price-display .price-label {
    font-size: 14px !important;
    text-transform: none !important;
    font-style: normal !important;
    letter-spacing: 0.3px;
    color: var(--tfs-muted);
    font-weight: 600 !important;
    margin-right: 4px;
    display: inline !important;
}

.price-from,
.price-to {
    font-size: 26px !important;
    font-weight: 800 !important;
    color: var(--tfs-price);
    line-height: 1 !important;
}

.price-separator {
    font-size: 16px !important;
    color: var(--tfs-muted);
    margin: 0 3px;
}

.price-unit {
    font-size: 14px !important;
    color: var(--tfs-muted);
    font-weight: 500 !important;
    margin-left: 3px;
    align-self: flex-end;
    padding-bottom: 1px;
}

/* Title */
.tour-card .tour-content .tour-title,
.tour-card .tour-content h3.tour-title {
    font-size: 14px !important;
    font-weight: 700 !important;
    margin: 0 0 5px !important;
    line-height: 1.35 !important;
    color: var(--tfs-text) !important;
    flex: 1;
}

/* Smaller title on 4-column layout */
.tours-simple-grid.tours-masonry-4 .tour-card .tour-content .tour-title,
.tours-simple-grid.tours-masonry-4 .tour-card .tour-content h3.tour-title {
    font-size: 13px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    margin: 0 0 4px !important;
}

.tour-title a { color: inherit; text-decoration: none; }
.tour-title a:hover { color: var(--tfs-primary); }

/* Destinations / route line */
.tour-destinations-list {
    font-size: 11px;
    color: var(--tfs-muted);
    padding: 5px 0;
    border-top: 1px solid #f0ebe3;
    margin-bottom: 8px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 6px;
}

.tour-destinations-list .dest-icon {
    flex-shrink: 0;
    margin-top: 1px;
    color: #111111;
}

.tour-destinations-list .dest-icon svg {
    display: block;
    width: 13px;
    height: 13px;
}

.tour-destinations-list strong { color: var(--tfs-text); font-weight: 600; }
.tour-destinations-list em     { font-style: normal; color: var(--tfs-primary); }

/* CTA Button */
.tour-view-button {
    display: block;
    width: 100%;
    padding: 9px 14px;
    background: transparent;
    border: 1px solid #bbac96;
    border-radius: var(--tfs-radius);
    color: #111111;
    text-align: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    transition: all 0.25s;
    margin-top: 0;
    margin-bottom: 12px;
    box-sizing: border-box;
}

.tour-view-button:hover {
    background: var(--tfs-primary);
    border-color: var(--tfs-primary);
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(108, 179, 61, 0.4);
    transform: translateY(-1px);
}

/* ── No results ─────────────────────────────────────────────── */
.no-tours-found {
    text-align: center;
    padding: 60px 30px;
    background: var(--tfs-white);
    border: 2px dashed var(--tfs-border);
    border-radius: var(--tfs-radius);
    grid-column: 1 / -1;
    color: var(--tfs-muted);
}

.no-tours-found h3 { font-size: 18px; margin-bottom: 8px; color: var(--tfs-text); }

/* ── Loading spinner ─────────────────────────────────────────── */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.spinner {
    border: 4px solid #e8e3db;
    border-top-color: var(--tfs-primary);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    animation: tfs-spin 0.9s linear infinite;
    margin: 0 auto 16px;
}

@keyframes tfs-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ── Mobile toggle (hidden on desktop) ───────────────────────── */
.mobile-filter-toggle { display: none; }
.filter-overlay       { display: none; }

/* ── Single-column widget mode ───────────────────────────────── */
.tours-simple-grid.tours-masonry-1 .tour-image  { height: 160px; }
.tours-simple-grid.tours-masonry-1 .tour-content { padding: 12px; }
.tours-simple-grid.tours-masonry-1 .tour-title  { font-size: 14px; }
.tours-simple-grid.tours-masonry-1 .price-from,
.tours-simple-grid.tours-masonry-1 .price-to    { font-size: 18px; }
.tours-simple-grid.tours-masonry-1 .tour-view-button { padding: 8px; font-size: 11px; }

.tours-widget-layout   { max-width: 100%; padding: 0; }
.widget .tours-simple-wrapper,
aside .tours-simple-wrapper  { max-width: 100%; padding: 0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1200px) {
    .tours-grid,
    #tours-results {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .tours-simple-grid.tours-masonry-3,
    .tours-simple-grid.tours-masonry-4 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Mobile */
@media (max-width: 768px) {

    /* Sticky filter button */
    .mobile-filter-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
        position: fixed;
        bottom: 18px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1100;
        background: var(--tfs-primary);
        color: var(--tfs-white);
        border: none;
        padding: 14px 28px;
        border-radius: 50px;
        font-size: 15px;
        font-weight: 700;
        box-shadow: 0 4px 16px rgba(200, 133, 42, 0.45);
        cursor: pointer;
        white-space: nowrap;
    }

    .mobile-filter-toggle:hover { background: var(--tfs-primary-dk); }
    .mobile-filter-toggle svg   { width: 18px; height: 18px; }

    /* Show mobile nav */
    .mobile-filter-nav {
        display: block;
        border-bottom: 2px solid var(--tfs-border);
    }

    /* Hide sections by default */
    .filter-slider-group,
    .filter-group { display: none !important; }

    /* Show when active */
    .filter-slider-group.mobile-active,
    .filter-group.mobile-active { display: block !important; }

    /* Slide-in sidebar */
    .filter-sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        width: 310px;
        max-width: 85vw;
        height: 100vh;
        max-height: 100vh;
        z-index: 1050;
        transition: left 0.28s ease;
        border-right: none;
        box-shadow: 4px 0 20px rgba(0,0,0,0.18);
    }

    .filter-sidebar.active { left: 0; }

    /* Overlay */
    .filter-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.45);
        z-index: 1040;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.28s;
    }

    .filter-overlay.active {
        display: block;
        opacity: 1;
        pointer-events: all;
    }

    /* Layout */
    .ete-tour-filter-wrapper { flex-direction: column; }

    .tours-content-area {
        padding: 16px 12px 80px; /* bottom padding for sticky button */
    }

    /* Single column results */
    .tours-grid,
    #tours-results {
        grid-template-columns: 1fr !important;
    }

    .tours-simple-grid,
    .tours-simple-grid.tours-masonry-2,
    .tours-simple-grid.tours-masonry-3,
    .tours-simple-grid.tours-masonry-4 {
        grid-template-columns: 1fr !important;
    }

    .tour-image { height: 195px; }

    .tours-simple-wrapper { padding: 16px 12px; }
}

/* ============================================================
   TOURS SLIDER — [tours_slider] shortcode
   ============================================================ */

.tfs-slider-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 40px;
}

/* ── Tab buttons ─────────────────────────────────────────── */
.tfs-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 28px;
    flex-wrap: wrap;
    justify-content: center;
}

.tfs-tab-btn {
    padding: 11px 28px;
    border: 1px solid var(--tfs-primary);
    background: transparent;
    color: var(--tfs-primary);
    font-size: 14px;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    letter-spacing: 0.4px;
    transition: all 0.22s ease;
    text-transform: uppercase;
}

.tfs-tab-btn:hover {
    background: var(--tfs-primary);
    color: #fff;
}

.tfs-tab-btn.active {
    background: var(--tfs-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(108, 179, 61, 0.35);
}

/* ── Swiper overrides ────────────────────────────────────── */
.tfs-swiper {
    padding-bottom: 36px !important;
    padding-left: 44px !important;
    padding-right: 44px !important;
    overflow: hidden !important;
    position: relative;
}

/* Nav arrows — left and right sides, always clickable */
.tfs-swiper .swiper-button-prev,
.tfs-swiper .swiper-button-next {
    color: #111111 !important;
    background: #fff;
    border: 1px solid #bbac96;
    border-radius: 50%;
    width: 36px !important;
    height: 36px !important;
    top: 40% !important;
    bottom: auto !important;
    left: 0 !important;
    right: auto !important;
    z-index: 10;
    transition: background 0.2s;
}

.tfs-swiper .swiper-button-next {
    left: auto !important;
    right: 0 !important;
}

.tfs-swiper .swiper-button-prev::after,
.tfs-swiper .swiper-button-next::after {
    font-size: 13px !important;
    font-weight: 900;
    color: #111111 !important;
}

.tfs-swiper .swiper-button-prev:hover,
.tfs-swiper .swiper-button-next:hover {
    background: var(--tfs-primary);
    border-color: var(--tfs-primary);
    color: #fff !important;
}

.tfs-swiper .swiper-button-prev:hover::after,
.tfs-swiper .swiper-button-next:hover::after {
    color: #fff !important;
}

/* Disabled state */
.tfs-swiper .swiper-button-disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
}

/* Pagination dots */
.tfs-swiper .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}

.tfs-swiper .swiper-pagination-bullet-active {
    background: var(--tfs-primary);
}

/* Keep slide cards full height */
.tfs-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.tfs-swiper .swiper-slide .tour-card {
    flex: 1;
}

/* Clean slider slides full height */
.tfs-clean-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.tfs-clean-swiper .swiper-slide .tour-card {
    flex: 1;
}

/* No tours message */
.tfs-no-tours {
    text-align: center;
    color: var(--tfs-muted);
    padding: 30px;
}

/* ── Responsive tabs ─────────────────────────────────────── */
@media (max-width: 600px) {
    .tfs-tab-btn {
        padding: 9px 18px;
        font-size: 13px;
    }
    .tfs-swiper .swiper-button-prev,
    .tfs-swiper .swiper-button-next {
        display: none !important;
    }
}

/* ============================================================
   CLEAN SLIDER — [tours_slider_clean] shortcode
   No tabs — pagination arrows sit below the cards
   ============================================================ */

.tfs-clean-slider-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 0 44px;
    position: relative;
    overflow: hidden;
}

/* Swiper — full width, strict overflow hidden, no peek */
.tfs-clean-swiper {
    overflow: hidden !important;
    padding-bottom: 40px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Pagination dots — centred below cards */
.tfs-clean-pagination {
    bottom: 0 !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: auto !important;
    position: absolute;
}

.tfs-clean-pagination .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
    width: 8px;
    height: 8px;
}

.tfs-clean-pagination .swiper-pagination-bullet-active {
    background: var(--tfs-primary);
    width: 22px;
    border-radius: 4px;
    transition: width 0.25s ease;
}

/* Prev / Next — float OVER cards on left and right edges */
.tfs-clean-prev,
.tfs-clean-next {
    position: absolute !important;
    top: 38% !important;
    transform: translateY(-50%) !important;
    left: 8px !important;
    right: auto !important;
    width: 36px !important;
    height: 36px !important;
    background: #fff !important;
    border: 1px solid #bbac96 !important;
    border-radius: 50% !important;
    margin: 0 !important;
    z-index: 20;
    cursor: pointer;
    transition: all 0.22s ease !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.tfs-clean-next {
    left: auto !important;
    right: 8px !important;
}

.tfs-clean-prev::after,
.tfs-clean-next::after {
    font-size: 13px !important;
    font-weight: 900 !important;
    color: #111111 !important;
}

.tfs-clean-prev:hover,
.tfs-clean-next:hover {
    background: var(--tfs-primary) !important;
    border-color: var(--tfs-primary) !important;
    box-shadow: 0 4px 12px rgba(108,179,61,0.35) !important;
}

.tfs-clean-prev:hover::after,
.tfs-clean-next:hover::after {
    color: #fff !important;
}

.tfs-clean-prev.swiper-button-disabled,
.tfs-clean-next.swiper-button-disabled {
    opacity: 0.3 !important;
    cursor: not-allowed !important;
}

/* Slide cards full height */
.tfs-clean-swiper .swiper-slide {
    height: auto;
    display: flex;
}

.tfs-clean-swiper .swiper-slide .tour-card {
    flex: 1;
}

/* Mobile */
@media (max-width: 600px) {
    .tfs-clean-slider-section {
        padding: 0 0 36px;
    }
    .tfs-clean-prev,
    .tfs-clean-next {
        display: none !important;
    }
}