/* Tour category listing — Sort & Filter sidebar + grid/list cards */
.tl {
    --tl-green: #1a3d32;
    --tl-green-dark: #12302a;
    --tl-gold: #c9a227;
    --tl-gold-soft: #f6efd9;
    --tl-cream: #faf8f4;
    --tl-border: rgba(26, 61, 50, 0.12);
    --tl-muted: #6b5d4a;
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    gap: clamp(1rem, 2.5vw, 1.75rem);
    align-items: start;
    font-family: "Outfit", sans-serif;
    color: #222;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.tl-main,
.tl-grid,
.tl-card,
.tl-topbar,
.tl-quick {
    min-width: 0;
    max-width: 100%;
}

/* ---------- Sidebar ---------- */
.tl-filter-toggle {
    display: none;
}

.tl-sidebar {
    position: sticky;
    top: 110px;
    background: #fff;
    border: 1px solid var(--tl-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(26, 61, 50, 0.06);
}

.tl-sidebar-head {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.95rem 1.1rem;
    background: linear-gradient(135deg, var(--tl-green), var(--tl-green-dark));
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
}

.tl-sidebar-head svg,
.tl-filter-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
}

.tl-reset {
    margin-left: auto;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: transparent;
    color: #fff;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font: inherit;
    font-size: 0.72rem;
    cursor: pointer;
}

.tl-reset:hover {
    background: var(--tl-gold);
    border-color: var(--tl-gold);
    color: var(--tl-green);
}

.tl-filter {
    border-top: 1px solid var(--tl-border);
    padding: 0.85rem 1.1rem 1rem;
}

.tl-filter:first-of-type {
    border-top: none;
}

.tl-filter summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--tl-green);
}

.tl-filter summary::-webkit-details-marker {
    display: none;
}

.tl-filter summary::after {
    content: "";
    width: 8px;
    height: 8px;
    border-right: 2px solid var(--tl-green);
    border-bottom: 2px solid var(--tl-green);
    transform: rotate(-135deg);
    transition: transform 0.2s ease;
}

.tl-filter:not([open]) summary::after {
    transform: rotate(45deg);
}

.tl-range {
    margin-top: 0.85rem;
}

.tl-range-values {
    display: flex;
    justify-content: space-between;
    font-size: 0.78rem;
    color: var(--tl-muted);
    margin-bottom: 0.65rem;
}

.tl-range-values b {
    color: #222;
    font-weight: 600;
}

.tl-range-track {
    position: relative;
    height: 22px;
}

.tl-range-track::before,
.tl-range-fill {
    content: "";
    position: absolute;
    top: 50%;
    height: 4px;
    border-radius: 4px;
    transform: translateY(-50%);
}

.tl-range-track::before {
    left: 0;
    right: 0;
    background: #e6e1d6;
}

.tl-range-fill {
    background: var(--tl-green);
    left: 0;
    right: 0;
}

.tl-range-track input[type="range"] {
    position: absolute;
    inset: 0;
    width: 100%;
    margin: 0;
    background: transparent;
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
}

.tl-range-track input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--tl-gold);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    pointer-events: auto;
}

.tl-range-track input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--tl-gold);
    cursor: pointer;
    pointer-events: auto;
}

.tl-range-track input[type="range"]::-moz-range-track {
    background: transparent;
}

.tl-checks {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tl-check {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.86rem;
    cursor: pointer;
}

.tl-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--tl-green);
}

.tl-check em {
    margin-left: auto;
    font-style: normal;
    font-size: 0.72rem;
    color: var(--tl-muted);
    background: var(--tl-cream);
    padding: 0.05rem 0.45rem;
    border-radius: 999px;
}

.tl-sidebar-help {
    margin: 0.5rem 1.1rem 1.1rem;
    padding: 0.9rem;
    border-radius: 12px;
    background: var(--tl-gold-soft);
    font-size: 0.82rem;
    color: var(--tl-muted);
}

.tl-sidebar-help strong {
    display: block;
    color: var(--tl-green);
    font-size: 0.92rem;
    margin-bottom: 0.25rem;
}

.tl-sidebar-help p {
    margin: 0 0 0.65rem;
    line-height: 1.45;
}

.tl-sidebar-help button {
    width: 100%;
    border: none;
    border-radius: 8px;
    padding: 0.55rem;
    background: var(--tl-green);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tl-search {
    position: relative;
    padding: 0.9rem 1.1rem 0.4rem;
}

.tl-search svg {
    position: absolute;
    left: 1.75rem;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: 0.25rem;
    transform: translateY(-50%);
    fill: none;
    stroke: var(--tl-muted);
    stroke-width: 2.2;
    stroke-linecap: round;
    pointer-events: none;
}

.tl-search input {
    width: 100%;
    padding: 0.55rem 0.75rem 0.55rem 2.1rem;
    border: 1px solid var(--tl-border);
    border-radius: 8px;
    background: var(--tl-cream);
    font: inherit;
    font-size: 0.86rem;
    color: #222;
}

.tl-search input:focus {
    outline: none;
    border-color: var(--tl-gold);
    background: #fff;
}

/* ---------- Quick type chips ---------- */
.tl-quick {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 0.35rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.tl-quick-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--tl-border);
    border-radius: 999px;
    background: #fff;
    color: var(--tl-green);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tl-quick-chip em {
    font-style: normal;
    font-size: 0.7rem;
    padding: 0.05rem 0.4rem;
    border-radius: 999px;
    background: var(--tl-cream);
    color: var(--tl-muted);
}

.tl-quick-chip:hover {
    border-color: var(--tl-gold);
}

.tl-quick-chip.is-active {
    background: var(--tl-green);
    border-color: var(--tl-green);
    color: #fff;
}

.tl-quick-chip.is-active em {
    background: var(--tl-gold);
    color: var(--tl-green-dark);
}

.tl-empty-page {
    text-align: center;
    color: #6b5d4a;
    padding: 2rem 0;
}

/* ---------- Top bar ---------- */
.tl-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1.1rem;
}

.tl-topbar-title h2 {
    margin: 0;
    font-family: "Outfit", sans-serif;
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 600;
    color: var(--tl-green);
}

.tl-topbar-title h2 span {
    font-weight: 500;
    color: #222;
}

.tl-topbar-title p {
    margin: 0.15rem 0 0;
    font-size: 0.85rem;
    color: var(--tl-muted);
}

.tl-topbar-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.tl-view {
    display: inline-flex;
    border: 1px solid var(--tl-border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.tl-view button {
    border: none;
    background: transparent;
    padding: 0.45rem 0.6rem;
    cursor: pointer;
    color: var(--tl-muted);
    display: inline-flex;
}

.tl-view button.is-active {
    background: var(--tl-green);
    color: #fff;
}

.tl-view svg,
.tl-sort svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.tl-sort {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 1px solid var(--tl-border);
    border-radius: 8px;
    padding: 0 0.6rem;
    background: #fff;
    color: var(--tl-green);
}

.tl-sort select {
    border: none;
    outline: none;
    background: transparent;
    font: inherit;
    font-size: 0.85rem;
    padding: 0.5rem 0.2rem;
    color: #222;
    cursor: pointer;
}

/* ---------- Cards ---------- */
.tl-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(0.85rem, 1.8vw, 1.25rem);
}

.tl-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--tl-border);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(26, 61, 50, 0.07);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tl-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 34px rgba(26, 61, 50, 0.13);
}

.tl-card[hidden] {
    display: none;
}

.tl-card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eee;
}

.tl-card-media a {
    display: block;
    height: 100%;
}

.tl-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.tl-card:hover .tl-card-media img {
    transform: scale(1.04);
}

.tl-badge {
    position: absolute;
    top: 0;
    left: 0;
    padding: 0.3rem 0.75rem;
    border-bottom-right-radius: 10px;
    background: linear-gradient(135deg, var(--tl-gold), #e0b84a);
    color: var(--tl-green);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.tl-duration,
.tl-cities {
    position: absolute;
    bottom: 0.6rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

.tl-duration {
    left: 0.6rem;
    background: rgba(255, 255, 255, 0.92);
    color: var(--tl-green);
}

.tl-cities {
    right: 0.6rem;
    background: rgba(18, 48, 42, 0.78);
    color: #fff;
}

.tl-duration svg,
.tl-cities svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.tl-cities svg {
    fill: currentColor;
    stroke: none;
}

.tl-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.85rem 0.95rem 0.95rem;
    flex: 1;
}

.tl-tags {
    margin: 0;
    font-size: 0.74rem;
    color: var(--tl-muted);
}

.tl-title {
    margin: 0;
    font-family: "Outfit", sans-serif;
    font-size: 1.02rem;
    font-weight: 600;
    line-height: 1.3;
}

.tl-title a {
    color: #222;
    text-decoration: none;
}

.tl-title a:hover {
    color: var(--tl-green);
}

.tl-route {
    display: flex;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.8rem;
    color: var(--tl-muted);
    line-height: 1.4;
}

.tl-route svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    margin-top: 0.1rem;
    fill: none;
    stroke: var(--tl-gold);
    stroke-width: 2;
}

.tl-highlights {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.2rem;
}

.tl-highlights li {
    position: relative;
    padding-left: 1rem;
    font-size: 0.78rem;
    color: #444;
}

.tl-highlights li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--tl-green);
    font-weight: 700;
}

.tl-price {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: auto;
    padding: 0.65rem 0.75rem;
    border-radius: 10px;
    background: var(--tl-cream);
    border: 1px dashed rgba(201, 162, 39, 0.45);
}

.tl-price small {
    display: block;
    font-size: 0.68rem;
    color: var(--tl-muted);
}

.tl-price strong {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tl-green);
    line-height: 1.2;
}

.tl-price strong sup {
    font-size: 0.7rem;
    color: var(--tl-gold);
}

.tl-price .tl-price-request {
    font-size: 1.05rem;
}

.tl-price-days {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tl-green);
    white-space: nowrap;
}

.tl-price-days svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: var(--tl-gold);
    stroke-width: 2;
}

.tl-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.tl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 0.5rem;
    border-radius: 8px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.tl-btn--outline {
    border: 1.5px solid var(--tl-green);
    color: var(--tl-green);
    background: #fff;
}

.tl-btn--outline:hover {
    background: var(--tl-green);
    color: #fff;
}

.tl-btn--solid {
    border: 1.5px solid var(--tl-green);
    background: var(--tl-green);
    color: #fff;
}

.tl-btn--solid:hover {
    background: var(--tl-gold);
    border-color: var(--tl-gold);
    color: var(--tl-green);
}

.tl-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.55rem 0.95rem;
    border-top: 1px solid var(--tl-border);
    background: #fcfbf8;
}

.tl-wa {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
}

.tl-wa svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.tl-foot-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    border: none;
    background: none;
    padding: 0;
    font: inherit;
    font-size: 0.76rem;
    color: var(--tl-green);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.tl-foot-link svg {
    width: 13px;
    height: 13px;
    fill: none;
    stroke: var(--tl-gold);
    stroke-width: 2;
}

.tl-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--tl-muted);
    background: #fff;
    border: 1px dashed var(--tl-border);
    border-radius: 14px;
}

.tl-empty button {
    margin-top: 0.75rem;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.2rem;
    background: var(--tl-green);
    color: #fff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

/* ---------- List view ---------- */
.tl-grid.is-list {
    grid-template-columns: 1fr;
}

.tl-grid.is-list .tl-card {
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    grid-template-rows: 1fr auto;
}

.tl-grid.is-list .tl-card-media {
    grid-row: 1 / span 2;
    aspect-ratio: auto;
    min-height: 220px;
}

.tl-grid.is-list .tl-card-foot {
    grid-column: 2;
}

.tl-grid.is-list .tl-actions {
    grid-template-columns: repeat(2, minmax(0, 180px));
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
    .tl {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    .tl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tl-grid.is-list .tl-card {
        grid-template-columns: 240px minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .tl {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .tl-filter-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        width: 100%;
        padding: 0.8rem 1rem;
        border: none;
        border-radius: 10px;
        background: linear-gradient(135deg, var(--tl-green), var(--tl-green-dark));
        color: #fff;
        font: inherit;
        font-weight: 600;
        cursor: pointer;
        order: -1;
    }

    .tl-sidebar {
        position: static;
        display: none;
        order: 0;
    }

    .tl.is-filter-open .tl-sidebar {
        display: block;
    }

    .tl-main {
        order: 1;
        width: 100%;
    }

    .tl-topbar {
        align-items: flex-start;
    }

    .tl-topbar-title {
        width: 100%;
    }

    .tl-topbar-title h2 {
        font-size: 1.05rem;
        line-height: 1.35;
    }

    .tl-topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .tl-sort {
        flex: 1 1 auto;
        min-width: 0;
    }

    .tl-sort select {
        width: 100%;
        max-width: 100%;
    }

    .tl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.75rem;
    }

    .tl-grid.is-list {
        grid-template-columns: 1fr;
    }

    .tl-grid.is-list .tl-card {
        grid-template-columns: 1fr;
    }

    .tl-grid.is-list .tl-card-media {
        grid-row: auto;
        aspect-ratio: 16 / 10;
        min-height: 0;
    }

    .tl-grid.is-list .tl-card-foot {
        grid-column: auto;
    }

    .tl-grid.is-list .tl-actions {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .tl-grid {
        grid-template-columns: 1fr;
    }

    .tl-card-body {
        padding: 0.8rem 0.85rem 0.9rem;
    }

    .tl-title {
        font-size: 0.98rem;
    }

    .tl-actions {
        grid-template-columns: 1fr;
        gap: 0.45rem;
    }

    .tl-grid.is-list .tl-actions {
        grid-template-columns: 1fr;
    }

    .tl-btn {
        width: 100%;
        min-height: 42px;
    }

    .tl-card-foot {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: 0.55rem 0.85rem;
        padding: 0.65rem 0.85rem;
    }

    .tl-foot-link {
        font-size: 0.74rem;
    }

    .tl-price {
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .tl-highlights {
        display: none;
    }

    .tl-quick {
        margin-left: -0.15rem;
        margin-right: -0.15rem;
        padding-left: 0.15rem;
        padding-right: 0.15rem;
    }

    .tl-quick-chip {
        font-size: 0.78rem;
        padding: 0.38rem 0.75rem;
    }

    .tl-view button {
        padding: 0.5rem 0.65rem;
    }
}

@media (max-width: 420px) {
    .tl-duration,
    .tl-cities {
        font-size: 0.68rem;
        padding: 0.2rem 0.5rem;
    }

    .tl-badge {
        font-size: 0.68rem;
        padding: 0.25rem 0.55rem;
    }

    .tl-topbar-title h2 span {
        display: inline;
    }
}
