/* Toursys B2C Integration — Frontend Styles */

/* Ensure HTML hidden attribute always hides elements (overrides display:flex/grid) */
.toursys-catalog [hidden] { display: none !important; }

/* ─── Catalog pages: hide WP page title (Astra + most themes) ──────── */
.toursys-catalog-page .entry-title,
.toursys-catalog-page .page-title,
.toursys-catalog-page h1.page-header,
.toursys-catalog-page .wp-block-post-title {
    display: none !important;
}

/* ─── Theme isolation: neutralize content-wrapper constraints ───────── *
 * Removes theme max-width, padding, background from the WP content area
 * on pages where our plugin is active. Our sections then own their layout.
 * Covers: Astra, GeneratePress, OceanWP, Hello/Elementor, Twenty* themes. */
.toursys-catalog-page .entry-content,
.toursys-catalog-page .page-content,
.toursys-catalog-page .post-content,
.toursys-catalog-page .entry-content > *,
.toursys-catalog-page article.page,
.toursys-catalog-page .hentry {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* ─── Our plugin sections always own their background & width ────────── */
.toursys-catalog,
.toursys-packages,
.toursys-service,
#toursys-package-detail,
.toursys-hotel,
.toursys-hotels {
    background: transparent !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* ─── CSS Variables ─────────────────────────────────────────────────── */
:root {
    --toursys-primary:      #0070c9;
    --toursys-primary-dark: #005fa3;
    --toursys-accent:       #ff6b35;
    --toursys-text:         #1a1a1a;
    --toursys-muted:        #666;
    --toursys-border:       #e0e0e0;
    --toursys-bg-card:      #ffffff;
    --toursys-radius:       10px;
    --toursys-shadow:       0 2px 12px rgba(0,0,0,.08);
    --toursys-gap:          1.5rem;
}

/* ─── Catalog grid ──────────────────────────────────────────────────── */
.toursys-catalog {
    font-family: inherit;
    color: var(--toursys-text);
}

.toursys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--toursys-gap);
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: stretch;
}

/* ─── Card ──────────────────────────────────────────────────────────── */
.toursys-card {
    background: var(--toursys-bg-card);
    border-radius: var(--toursys-radius);
    box-shadow: var(--toursys-shadow);
    overflow: hidden;
    transition: transform .2s, box-shadow .2s;
    display: flex;
    flex-direction: column;
    height: 100%;  /* all cards same height in each row */
}

.toursys-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
}

/* Fixed aspect ratio image container — every card image same height */
.toursys-card__image {
    position: relative;
    width: 100%;
    padding-top: 75%;  /* 4:3 ratio — taller card feel */
    overflow: hidden;
    background: #e8ecf0;
    flex-shrink: 0;
}

.toursys-card__image--placeholder {
    background: linear-gradient(135deg, #e8ecf0 25%, #d0d7e0 100%);
}

.toursys-card__image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .35s ease;
}

.toursys-card:hover .toursys-card__image img {
    transform: scale(1.06);
}

.toursys-card__body {
    padding: 1rem 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: .5rem;
}

.toursys-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .35rem;
    line-height: 1.3;
    font-family: inherit;
    /* Limit to 2 lines so all cards are same height */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.toursys-card__title a {
    color: inherit;
    text-decoration: none;
}

.toursys-card__title a:hover {
    color: var(--toursys-primary);
}

.toursys-card__desc {
    font-size: .875rem;
    color: var(--toursys-muted);
    margin: 0 0 1rem;
    flex: 1;
    line-height: 1.55;
    font-family: inherit;
    /* Limit to 3 lines for uniform height */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.toursys-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-bottom: .75rem;
    padding-top: .75rem;
    border-top: 1px solid var(--toursys-border);
    font-size: .875rem;
    color: var(--toursys-muted);
    font-family: inherit;
}

.toursys-card__price {
    font-size: .85rem;
    color: var(--toursys-muted);
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: .3rem;
    flex-wrap: wrap;
}

.toursys-card__price strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--toursys-accent);
    display: inline;    /* inline with "Desde" label */
    line-height: 1.2;
}

.toursys-card__price--consult {
    font-style: italic;
    color: var(--toursys-muted);
    font-size: .8rem;
}

.toursys-card__duration {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .8rem;
    color: var(--toursys-muted);
    background: #f0f3f7;
    padding: .25rem .6rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

.toursys-price-label {
    font-size: .8rem;
    color: var(--toursys-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

.toursys-price-amount {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--toursys-accent);
    margin-left: .3rem;
}

.toursys-card__actions {
    display: flex;
    gap: .5rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.toursys-btn-detail {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--toursys-primary);
    border: 2px solid var(--toursys-primary);
    padding: .5rem .875rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: background .2s, color .2s, border-color .2s;
    cursor: pointer;
}

.toursys-btn-detail:hover {
    background: var(--toursys-primary);
    border-color: var(--toursys-primary);
    color: #fff;
}

.toursys-btn-book {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--toursys-primary);
    color: #fff;
    border: 2px solid var(--toursys-primary);
    padding: .5rem .875rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
    transition: background .2s, border-color .2s;
    cursor: pointer;
}

.toursys-btn-book:hover {
    background: var(--toursys-primary-dark);
    border-color: var(--toursys-primary-dark);
    color: #fff;
}

.toursys-btn-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    background: transparent;
    color: var(--toursys-primary);
    border: 2px solid var(--toursys-primary);
    padding: .45rem 1rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, color .2s;
}

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

.toursys-service__back {
    margin-bottom: 1.25rem;
}

/* ─── Toolbar: tabs + lang/currency ────────────────────────────────── */
.toursys-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .75rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--toursys-border);
    padding-bottom: .75rem;
}

.toursys-tabs {
    display: flex;
    gap: .25rem;
}

.toursys-tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.1rem;
    border: 1px solid var(--toursys-border);
    border-radius: 6px;
    background: #fff;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--toursys-muted);
    transition: all .15s;
}

.toursys-tab:hover {
    border-color: var(--toursys-primary);
    color: var(--toursys-primary);
}

.toursys-tab.is-active {
    background: var(--toursys-primary);
    border-color: var(--toursys-primary);
    color: #fff;
}

.toursys-toolbar-right {
    display: flex;
    gap: .5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Language selector hidden until multilingual (Polylang/WPML) is configured */
.toursys-lang-wrap {
    display: none;
}

.toursys-toolbar-select {
    padding: .4rem .65rem;
    border: 1px solid var(--toursys-border);
    border-radius: 6px;
    font-size: .85rem;
    background: #fff;
    cursor: pointer;
    height: 2.2rem;
    color: var(--toursys-text);
}

.toursys-toolbar-select:focus {
    outline: 2px solid var(--toursys-primary);
    outline-offset: 1px;
}

/* Accessibility: visually hidden labels */
.toursys-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}

/* Hotel search bar */
.toursys-hotel-search-bar {
    display: flex;
    gap: .5rem;
    margin-bottom: 1.25rem;
}

.toursys-hotel-search-bar .toursys-filter-input {
    flex: 1;
}

/* Hotel badge on card */
.toursys-card__badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .8rem;
    color: var(--toursys-primary);
    background: #e8f0fb;
    padding: .25rem .6rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ─── Filter bar ────────────────────────────────────────────────────── */
.toursys-filter-bar {
    background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
    border: 1px solid var(--toursys-border);
    border-radius: var(--toursys-radius);
    box-shadow: var(--toursys-shadow);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .875rem;
}

.toursys-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
}

.toursys-filter-search-wrap {
    display: flex;
    flex: 1 1 260px;
    gap: .5rem;
    align-items: center;    /* vertically center input + icon button */
}

.toursys-filter-search-wrap .toursys-filter-input {
    flex: 1;
}

.toursys-filter-sort-wrap {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    flex: 0 0 200px;
}

.toursys-filter-label {
    font-size: .8rem;
    font-weight: 600;
    color: var(--toursys-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    display: block;
    margin-bottom: .2rem;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

/* Inside the advanced filter grid, labels can contain dynamic text — drop uppercase to avoid overflow */
.toursys-filter-grid .toursys-filter-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: .82rem;
}

.toursys-filter-input,
.toursys-filter-select {
    padding: .48rem .75rem;
    border: 1px solid var(--toursys-border);
    border-radius: 6px;
    font-size: .875rem;
    font-family: inherit;
    color: var(--toursys-text, #374151);
    background: #fff;
    width: 100%;
    height: 2.4rem;
    box-sizing: border-box;
}

/* Override Astra: input[type=search] { height:auto; padding:.75em } (specificity 0,1,1)
   beats our .toursys-filter-input (0,1,0). Use section id prefix to win. */
#toursys-catalog .toursys-filter-input,
#toursys-packages .toursys-filter-input {
    font-family: inherit !important;
    font-size: .875rem !important;
    color: #374151 !important;
    height: 2.4rem !important;
    padding: .48rem .75rem !important;
    box-sizing: border-box !important;
    line-height: 1 !important;
}

#toursys-catalog .toursys-filter-select,
#toursys-packages .toursys-filter-select {
    font-family: inherit !important;
    font-size: .875rem !important;
    color: #374151 !important;
}

/* Normalize date inputs: force WebKit pseudo-elements to use site font */
#toursys-catalog input[type="date"].toursys-filter-input,
#toursys-packages input[type="date"].toursys-filter-input {
    font-family: inherit !important;
    font-size: .875rem !important;
    color: #374151 !important;
    cursor: pointer;
}

.toursys-filter-input:focus,
.toursys-filter-select:focus {
    outline: 2px solid var(--toursys-primary);
    outline-offset: 1px;
}

/* ─── View toggle (grid / list) ─────────────────────────────────────── */
.toursys-view-toggle {
    display: flex;
    gap: .25rem;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;
}

/* Use a section id prefix to beat Astra's `button { background:… }` reset */
#toursys-catalog .toursys-view-btn,
#toursys-packages .toursys-view-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.4rem !important;
    height: 2.4rem !important;
    padding: 0 !important;
    border: 1px solid var(--toursys-border) !important;
    border-radius: 6px !important;
    background: #fff !important;
    color: var(--toursys-muted) !important;
    cursor: pointer;
    line-height: 1 !important;
    box-sizing: border-box !important;
    text-decoration: none !important;
    transition: background .15s, color .15s, border-color .15s;
    box-shadow: none !important;
}

#toursys-catalog .toursys-view-btn:hover,
#toursys-packages .toursys-view-btn:hover {
    border-color: var(--toursys-primary) !important;
    color: var(--toursys-primary) !important;
    background: #f0f6ff !important;
}

#toursys-catalog .toursys-view-btn.is-active,
#toursys-packages .toursys-view-btn.is-active {
    background: var(--toursys-primary) !important;
    border-color: var(--toursys-primary) !important;
    color: #fff !important;
}

/* ─── List view ─────────────────────────────────────────────────────── */
.toursys-grid.is-list-view {
    grid-template-columns: 1fr;
    gap: .65rem;
}

/* Card is a horizontal row */
.toursys-grid.is-list-view .toursys-card {
    flex-direction: row;
    align-items: center;    /* vertically center the fixed-square image vs body */
    height: auto;
}

/* Image: fixed 160×160 square — consistent across all cards */
.toursys-grid.is-list-view .toursys-card__image {
    flex: 0 0 160px;
    width: 160px;
    height: 160px;          /* explicit square */
    padding-top: 0;         /* disable 3:2 aspect-ratio trick */
    position: relative;     /* keep position:relative for badge absolute child */
    align-self: center;     /* center square vertically in the row */
    overflow: hidden;
}

/* Image fills the square — override position:absolute from base */
.toursys-grid.is-list-view .toursys-card__image img {
    position: absolute;     /* absolute inside position:relative container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    flex: none;
    display: block;
    transition: transform .35s ease;
}

/* Body: column layout, smaller padding, no overflow clip on title/desc */
.toursys-grid.is-list-view .toursys-card__body {
    flex: 1;
    flex-direction: column;
    padding: .75rem 1rem .75rem;
    min-width: 0;
    overflow: hidden;
    gap: 0;
}

.toursys-grid.is-list-view .toursys-card__title {
    -webkit-line-clamp: 1;
    margin-bottom: .25rem;
}

.toursys-grid.is-list-view .toursys-card__desc {
    -webkit-line-clamp: 2;
    flex: 1;
    margin-bottom: .75rem;
}

/* Meta (price + duration) */
.toursys-grid.is-list-view .toursys-card__meta {
    margin-bottom: .4rem;
    flex-wrap: wrap;
    padding-top: .6rem;
}

/* Actions: keep as row at bottom, no deformation */
.toursys-grid.is-list-view .toursys-card__actions {
    flex-wrap: nowrap;
    margin-top: 0;
}

.toursys-grid.is-list-view .toursys-card__badge {
    top: .5rem;
    left: .5rem;
}

/* Mobile: collapse back to grid cards */
@media (max-width: 600px) {
    .toursys-view-toggle { display: none; }
    .toursys-grid.is-list-view {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    .toursys-grid.is-list-view .toursys-card {
        flex-direction: column;
        align-items: stretch;
    }
    .toursys-grid.is-list-view .toursys-card__image {
        flex: none;
        width: 100%;
        height: auto;
        padding-top: 66%;   /* restore 3:2 aspect-ratio trick */
        align-self: auto;
    }
    .toursys-grid.is-list-view .toursys-card__image img {
        position: absolute;
        top: 0; left: 0;
        width: 100%; height: 100%;
        flex: none;
    }
    /* On mobile the date group resets to 1 column like every other group */
    .toursys-filter-group--dates {
        grid-column: span 1;
    }
}

/* Advanced filters (collapsible) */
.toursys-filter-advanced {
    margin-top: 1rem;
}

.toursys-filter-toggle {
    cursor: pointer;
    font-size: .9rem;
    font-weight: 600;
    color: var(--toursys-primary);
    display: flex;
    align-items: center;
    gap: .5rem;
    list-style: none;
    user-select: none;
}

.toursys-filter-toggle::-webkit-details-marker { display: none; }

.toursys-filter-toggle::before {
    content: '▶';
    font-size: .65rem;
    transition: transform .2s;
}

details[open] .toursys-filter-toggle::before {
    transform: rotate(90deg);
}

.toursys-filter-badge {
    background: var(--toursys-accent);
    color: #fff;
    border-radius: 20px;
    font-size: .7rem;
    padding: .1rem .45rem;
    font-weight: 700;
}

.toursys-filter-grid {
    display: grid;
    /* At 1200px: 6 groups → 5-col auto-fill (each ~185px) works for range/check groups.
       Availability uses span-2 so it gets ~370px — enough for two stacked date pickers. */
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
    padding: 1rem 0 .75rem;
    overflow: visible;
}

/* Availability group spans 2 columns so date inputs are never squeezed */
.toursys-filter-group--dates {
    grid-column: span 2;
}

.toursys-filter-group {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    overflow: visible;
    min-width: 0;
}

/* Date range: stacked vertically, each input on its own row */
.toursys-filter-date-range {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: .35rem .5rem;
}

.toursys-date-sublabel {
    font-size: .875rem;
    color: var(--toursys-text-muted, #6b7280);
    white-space: nowrap;
    font-weight: 400;
    font-family: inherit;
}

.toursys-date-input {
    width: 100%;
    min-width: 130px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: .875rem;
    color: var(--toursys-text, #374151);
}

/* Force the selected date value to match filter text (Chrome/Safari) */
#toursys-catalog input[type="date"].toursys-filter-input::-webkit-datetime-edit,
#toursys-catalog input[type="date"].toursys-filter-input::-webkit-datetime-edit-fields-wrapper,
#toursys-catalog input[type="date"].toursys-filter-input::-webkit-datetime-edit-text,
#toursys-catalog input[type="date"].toursys-filter-input::-webkit-datetime-edit-month-field,
#toursys-catalog input[type="date"].toursys-filter-input::-webkit-datetime-edit-day-field,
#toursys-catalog input[type="date"].toursys-filter-input::-webkit-datetime-edit-year-field {
    font-family: inherit;
    font-size: .875rem;
    font-weight: 400;
    color: #374151;
}

/* Numeric range inputs stay horizontal */
.toursys-range-inputs {
    display: flex;
    align-items: center;
    gap: .4rem;
}

/* Duration + Start hour share one grid column, stacked vertically */
.toursys-filter-group--dual {
    gap: .75rem;
}

.toursys-filter-subgroup {
    display: flex;
    flex-direction: column;
    gap: .4rem;
}

.toursys-filter-date-range .toursys-filter-input,
.toursys-range-inputs .toursys-filter-input {
    flex: 1;
    min-width: 0;
}

/* Checkbox lists */
.toursys-check-list {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    max-height: 120px;
    overflow-y: auto;
    padding: .3rem;
    border: 1px solid var(--toursys-border);
    border-radius: 6px;
    background: #fff;
}

.toursys-check-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .875rem;
    cursor: pointer;
}

.toursys-check-item input { margin: 0; cursor: pointer; }

/* Filter action buttons */
.toursys-filter-actions {
    display: flex;
    gap: .75rem;
    padding-top: .5rem;
    flex-wrap: wrap;
}

.toursys-btn-filter,
.toursys-btn-clear {
    padding: .5rem 1.1rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    align-self: flex-end;
}

.toursys-btn-filter {
    background: var(--toursys-primary);
    color: #fff;
    border: none;
    transition: background .2s;
    display: inline-flex !important;
    align-items: center;
    gap: .4rem;
    text-decoration: none;
}

/* Icon-only variant: square, same height as .toursys-filter-input (2.4rem).
   Use a section id prefix (specificity 1,1,0) to beat Astra's
   .site-content button (0,1,1) and bare button tag (0,0,1). */
#toursys-catalog .toursys-btn-filter--icon,
#toursys-packages .toursys-btn-filter--icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.4rem !important;
    height: 2.4rem !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-sizing: border-box !important;
    flex-shrink: 0;
    align-self: center !important;  /* override flex-end from base class */
    line-height: 1 !important;
    text-decoration: none !important;
}

.toursys-btn-filter:hover { background: var(--toursys-primary-dark); }

.toursys-btn-clear {
    background: transparent;
    color: var(--toursys-muted);
    border: 1px solid var(--toursys-border);
}

.toursys-btn-clear:hover { background: #eee; }

/* ─── Catalog header & loading ──────────────────────────────────────── */
.toursys-catalog-header {
    margin-bottom: 1rem;
}

.toursys-catalog-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--toursys-text);
    margin: 0 0 .5rem;
    font-family: var(--toursys-font);
}

.toursys-catalog-count {
    font-size: .9rem;
    color: var(--toursys-muted);
    margin: 0 0 .5rem;
}

.toursys-loading {
    display: none;  /* hidden by default; shown via JS .show() */
    align-items: center;
    gap: .6rem;
    padding: 1.5rem;
    font-size: .95rem;
    color: var(--toursys-muted);
}

.toursys-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--toursys-border);
    border-top-color: var(--toursys-primary);
    border-radius: 50%;
    animation: ts-spin .7s linear infinite;
}

@keyframes ts-spin { to { transform: rotate(360deg); } }

.toursys-grid.is-loading {
    opacity: .4;
    pointer-events: none;
    transition: opacity .3s;
}

/* ─── Pagination ────────────────────────────────────────────────────── */
.toursys-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem 0;
}

/* Use #toursys-catalog prefix to beat Astra's button{background:#e6e6e6} reset */
#toursys-catalog .toursys-page-btn {
    padding: .5rem 1.4rem !important;
    background: var(--toursys-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    line-height: 1.4;
    box-shadow: none !important;
}

#toursys-catalog .toursys-page-btn:disabled {
    background: #ccc !important;
    cursor: not-allowed;
}

#toursys-catalog .toursys-page-btn:not(:disabled):hover {
    background: var(--toursys-primary-dark) !important;
}

.toursys-page-info {
    font-size: .9rem;
    color: var(--toursys-muted);
    min-width: 60px;
    text-align: center;
}

/* ─── Legacy filters (keep for backward compat) ─────────────────────── */
.toursys-filters {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: flex-end;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: #f7f9fc;
    border-radius: var(--toursys-radius);
    border: 1px solid var(--toursys-border);
}

.toursys-filter-group select {
    padding: .45rem .7rem;
    border: 1px solid var(--toursys-border);
    border-radius: 6px;
    font-size: .9rem;
    background: #fff;
}


/* ─── Service detail ────────────────────────────────────────────────── */
.toursys-service {
    max-width: 960px;
    margin: 0 auto;
    color: var(--toursys-text);
}

.toursys-service__header {
    margin-bottom: 1.5rem;
}

.toursys-service__actions {
    margin-top: 1rem;
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.toursys-service__title {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 .75rem;
}

.toursys-service__price {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    font-size: 1rem;
    color: var(--toursys-muted);
}

.toursys-service__price strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--toursys-accent);
}

.toursys-price-child {
    font-size: .9rem;
}

/* ─── Gallery ───────────────────────────────────────────────────────── */
/* ─── Photo Slider ──────────────────────────────────────────────────── */
.toursys-slider {
    margin-bottom: 2rem;
    outline: none;
}

.toursys-slider__stage {
    position: relative;
    overflow: hidden;
    border-radius: var(--toursys-radius);
    background: #111;
    aspect-ratio: 16 / 9;
}

.toursys-slider__track {
    display: flex;
    height: 100%;
    transition: transform .4s cubic-bezier(.4, 0, .2, 1);
}

.toursys-slider__slide {
    min-width: 100%;
    height: 100%;
    overflow: hidden;
}

.toursys-slider__slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Arrows */
.toursys-slider__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, .45);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
    z-index: 2;
    padding: 0;
}
.toursys-slider__btn:hover { background: rgba(0, 0, 0, .75); }
.toursys-slider__btn--prev { left:  .75rem; }
.toursys-slider__btn--next { right: .75rem; }

/* Thumbnails */
.toursys-slider__thumbs {
    display: flex;
    gap: .4rem;
    margin-top: .5rem;
    overflow-x: auto;
    padding-bottom: .3rem;
    scrollbar-width: thin;
    scrollbar-color: var(--toursys-border) transparent;
}
.toursys-slider__thumbs::-webkit-scrollbar        { height: 4px; }
.toursys-slider__thumbs::-webkit-scrollbar-thumb  { background: var(--toursys-border); border-radius: 2px; }

.toursys-slider__thumb {
    flex: 0 0 auto;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: none;
    opacity: .6;
    transition: opacity .2s, border-color .2s;
}
.toursys-slider__thumb:hover   { opacity: .85; }
.toursys-slider__thumb.is-active {
    border-color: var(--toursys-primary);
    opacity: 1;
}

.toursys-slider__thumb img {
    display: block;
    width: 100px;
    height: 63px;
    object-fit: cover;
}

@media (max-width: 640px) {
    .toursys-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 1rem;
    }

    .toursys-packages .toursys-grid {
        grid-template-columns: 1fr;
    }

    .toursys-card__title {
        font-size: .9rem;
    }

    .toursys-card__desc {
        display: none;  /* hide description on very small screens */
    }

    .toursys-card__body {
        padding: .75rem;
    }

    .toursys-slider__thumb img {
        width: 72px;
        height: 45px;
    }

    .toursys-slider__btn {
        width: 36px;
        height: 36px;
        font-size: 1.5rem;
    }
}

/* ─── Content sections ──────────────────────────────────────────────── */
.toursys-service__summary,
.toursys-service__description,
.toursys-service__specs,
.toursys-service__amenities,
.toursys-service__whatyouneed,
.toursys-service__policies {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--toursys-border);
}

.toursys-service__summary {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
}

.toursys-service h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: .75rem;
    color: var(--toursys-text);
}

/* ─── Meta ──────────────────────────────────────────────────────────── */
.toursys-service__meta {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-bottom: 2rem;
    padding: .5rem 1.25rem;
    background: #f7f9fc;
    border-radius: var(--toursys-radius);
    border: 1px solid var(--toursys-border);
}

.toursys-meta-item {
    display: flex;
    align-items: baseline;
    gap: .75rem;
    padding: .55rem 0;
    font-size: .9rem;
    color: var(--toursys-text);
    border-bottom: 1px solid var(--toursys-border);
}

.toursys-meta-item:last-child {
    border-bottom: none;
}

.toursys-meta-item strong {
    flex-shrink: 0;
    min-width: 140px;
    color: #555;
    font-weight: 600;
}

.toursys-meta-item a {
    color: var(--toursys-primary);
}

/* ─── Video ─────────────────────────────────────────────────────────── */
.toursys-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--toursys-radius);
}

.toursys-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ─── Hotel inline booking iframe ───────────────────────────────────── */
.toursys-hotel-booking {
    margin: 0;
}

.toursys-hotel-booking__bar {
    display: flex;
    align-items: center;
    padding: .6rem 0 1rem;
}

.toursys-hotel-booking iframe {
    width: 100%;
    border: none;
    border-radius: var(--toursys-radius);
    display: block;
}

/* ─── Booking form ──────────────────────────────────────────────────── */
.toursys-booking-form {
    background: #fff;
    border: 2px solid var(--toursys-primary);
    border-radius: var(--toursys-radius);
    padding: 1.75rem;
    margin-top: 2.5rem;
}

/* Marketplace iframe booking container */
.toursys-marketplace-booking {
    margin-top: 2.5rem;
    width: 100%;
    overflow: hidden;
}
.toursys-marketplace-booking iframe {
    display: block;
    width: 100%;
    border: none;
    min-height: 600px;
    transition: height 0.2s ease;
}

.toursys-booking-form h2 {
    margin-top: 0;
    color: var(--toursys-primary);
}

.toursys-booking-fields {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.toursys-field {
    display: flex;
    flex-direction: column;
    gap: .3rem;
}

.toursys-field--full {
    grid-column: 1 / -1;
}

.toursys-field label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--toursys-muted);
}

.toursys-field input,
.toursys-field select,
.toursys-field textarea {
    padding: .5rem .7rem;
    border: 1px solid var(--toursys-border);
    border-radius: 6px;
    font-size: .95rem;
    background: #fafafa;
    transition: border-color .2s;
}

.toursys-field input:focus,
.toursys-field select:focus,
.toursys-field textarea:focus {
    border-color: var(--toursys-primary);
    outline: none;
    background: #fff;
}

.toursys-booking-summary {
    padding: .75rem 1rem;
    background: #f0f9ff;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.toursys-booking-summary #toursys-total-price {
    color: var(--toursys-accent);
    font-weight: 800;
    font-size: 1.3rem;
    margin-left: .5rem;
}

.toursys-booking-actions {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}

.toursys-btn-primary,
.toursys-btn-secondary {
    padding: .65rem 1.4rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all .2s;
}

.toursys-btn-primary {
    background: var(--toursys-primary);
    color: #fff;
}

.toursys-btn-primary:hover { background: var(--toursys-primary-dark); }

.toursys-btn-secondary {
    background: var(--toursys-accent);
    color: #fff;
}

.toursys-btn-secondary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.toursys-btn-secondary:not(:disabled):hover { filter: brightness(.92); }

.toursys-booking-message {
    margin-top: .75rem;
    font-size: .9rem;
    min-height: 1.2rem;
}

.toursys-booking-message.is-error   { color: #c0392b; }
.toursys-booking-message.is-success { color: #27ae60; }
.toursys-booking-message.is-loading { color: var(--toursys-muted); }

/* ─── Passenger section ─────────────────────────────────────────────── */
.toursys-passenger-fields {
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.toursys-passenger-fields h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--toursys-primary-dark);
}

.toursys-passenger-fields select {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .95rem;
    background: #fff;
    height: 2.5rem;
}

.toursys-booking-actions--calc {
    margin-top: .75rem;
}

/* ─── Utility ───────────────────────────────────────────────────────── */
.toursys-error {
    padding: 1rem;
    background: #fff3f3;
    border: 1px solid #fcc;
    border-radius: 6px;
    color: #c0392b;
}

.toursys-empty {
    padding: 2rem;
    text-align: center;
    color: var(--toursys-muted);
    font-style: italic;
}
.toursys-empty p {
    margin-bottom: .75rem;
    font-style: normal;
}
.toursys-btn-link {
    background: none;
    border: none;
    color: var(--toursys-primary, #0073aa);
    cursor: pointer;
    font-size: .95rem;
    text-decoration: underline;
    padding: 0;
}
.toursys-btn-link:hover {
    opacity: .8;
}

/* ─── Destinations panel ─────────────────────────────────────────────── */
.toursys-destinations-wrap {
    padding: 1.5rem 0;
}

.toursys-destinations-intro {
    color: var(--toursys-muted);
    margin-bottom: 1.5rem;
    font-size: .95rem;
}

.toursys-destinations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.toursys-dest-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 1.25rem;
    min-height: 200px;
    text-align: center;
    transition: transform .18s ease, box-shadow .18s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    user-select: none;
    background: #2c3e50;
}

.ts-dest-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .35s ease;
}

.toursys-dest-card:hover .ts-dest-bg {
    transform: scale(1.06);
}

.ts-dest-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.2) 60%, rgba(0,0,0,.05) 100%);
    transition: background .18s ease;
}

.toursys-dest-card:hover .ts-dest-overlay {
    background: linear-gradient(to top, rgba(0,0,0,.65) 0%, rgba(0,0,0,.15) 60%, transparent 100%);
}

.toursys-dest-card:focus-visible {
    outline: 3px solid var(--toursys-primary);
    outline-offset: 2px;
}

.ts-dest-code,
.ts-dest-name,
.ts-dest-cta {
    position: relative;
    z-index: 1;
}

.ts-dest-code {
    display: none; /* shown only as data attribute; hide the text code */
}

.ts-dest-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
    margin-bottom: .6rem;
    line-height: 1.2;
}

.ts-dest-cta {
    font-size: .78rem;
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.2);
    border: 1px solid rgba(255,255,255,.45);
    border-radius: 20px;
    padding: .22rem .75rem;
    transition: background .15s ease;
    white-space: nowrap;
}

.toursys-dest-card:hover .ts-dest-cta {
    background: rgba(255,255,255,.35);
}

.toursys-dest-empty {
    list-style: none;
    color: var(--toursys-muted);
    font-style: italic;
    padding: 2rem;
    text-align: center;
    grid-column: 1 / -1;
}

/* ─── Inline Booking View ───────────────────────────────────────────── */
/* Hide all catalog children while booking is open (preserves original display states) */
#toursys-catalog.toursys-booking-active > *:not(#ts-booking-inline) {
    display: none !important;
}

.toursys-booking-inline[hidden] { display: none !important; }

.toursys-booking-inline {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.toursys-booking-inline__back {
    display: inline-flex !important;
    align-items: center !important;
    gap: .4rem !important;
    background: transparent !important;
    color: var(--toursys-primary) !important;
    border: 2px solid var(--toursys-primary) !important;
    padding: .45rem 1rem !important;
    border-radius: 6px !important;
    font-size: .9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    margin: .75rem 0 .75rem 0 !important;
    float: none !important;
    clear: both !important;
    position: relative !important;
    left: auto !important;
    transition: background .2s, color .2s;
}
.toursys-booking-inline__back:hover {
    background: var(--toursys-primary);
    color: #fff;
}

.toursys-booking-inline__frame {
    width: 100%;
    overflow: visible;
}
.toursys-booking-inline__frame iframe {
    display: block;
    width: 100%;
    border: none;
    min-height: calc(100vh - 150px);
    height: calc(100vh - 150px);
    transition: height 0.2s ease;
}

/* ─── Policy list (hotel detail) ──────────────────────────────────────── */
.toursys-policy-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--toursys-border, #e2e8f0);
}

.toursys-policy-item {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: .5rem 1rem;
    padding: .65rem 0;
    border-bottom: 1px solid var(--toursys-border, #e2e8f0);
    align-items: baseline;
    line-height: 1.55;
    font-size: .9rem;
}

.toursys-policy-item--plain {
    grid-template-columns: 1fr;
}

.toursys-policy-item__label {
    font-weight: 600;
    color: var(--toursys-text, #1a202c);
    white-space: nowrap;
}

.toursys-policy-item__value {
    color: #444;
}

@media (max-width: 480px) {
    .toursys-policy-item {
        grid-template-columns: 1fr;
    }

    .toursys-policy-item__label {
        color: var(--toursys-primary, #e86b2e);
        font-size: .8rem;
        text-transform: uppercase;
        letter-spacing: .03em;
    }
}

/* ─── Service info sections (activity detail) ─────────────────────────── */
.toursys-service__section {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--toursys-border, #e2e8f0);
}

.toursys-service__section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.toursys-service__section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--toursys-text, #1a202c);
    margin: 0 0 1rem;
    padding: 0;
}

/* Spec list (plain-text blob rendered as labelled rows) */
.toursys-spec-list {
    font-size: .9rem;
}

.toursys-spec-row {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: .4rem 1rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--toursys-border, #e2e8f0);
    align-items: baseline;
    line-height: 1.5;
}

.toursys-spec-label {
    font-weight: 600;
    color: var(--toursys-text, #1a202c);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.toursys-spec-value {
    color: #444;
}

.toursys-spec-section {
    font-size: .95rem;
    font-weight: 700;
    color: var(--toursys-primary, #e86b2e);
    margin: 1.25rem 0 .4rem;
    padding: 0;
    border-bottom: 1px solid var(--toursys-border, #e2e8f0);
    padding-bottom: .3rem;
}

.toursys-spec-text {
    margin: .5rem 0;
    line-height: 1.6;
    color: #555;
}

/* Structured-HTML sections (amenities, itinerary, etc.) */
.toursys-service__section h1,
.toursys-service__section h2,
.toursys-service__section h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--toursys-primary, #e86b2e);
    margin: 1rem 0 .4rem;
}

.toursys-service__section h4 {
    font-size: .95rem;
    font-weight: 700;
    color: #444;
    margin: 1rem 0 .35rem;
    padding-bottom: .2rem;
    border-bottom: 1px solid var(--toursys-border, #dde3ea);
}

.toursys-service__section ul,
.toursys-service__section ol {
    padding-left: 1.4rem;
    margin: .5rem 0;
}

.toursys-service__section li {
    margin-bottom: .35rem;
    line-height: 1.55;
    color: #444;
    font-size: .9rem;
}

.toursys-service__section p {
    margin: 0 0 .75rem;
    line-height: 1.65;
    color: #444;
    font-size: .9rem;
}

@media (max-width: 480px) {
    .toursys-spec-row {
        grid-template-columns: 1fr;
    }

    .toursys-spec-label {
        color: var(--toursys-primary, #e86b2e);
        font-size: .78rem;
        text-transform: uppercase;
        letter-spacing: .03em;
        white-space: normal;
    }
}

/* ─── Packages overhaul ─────────────────────────────────────────────── */
:root {
    --toursys-font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', 'Helvetica Neue', Arial, sans-serif;
    --toursys-font-mono: 'SF Mono', 'Fira Code', monospace;
    --toursys-bg: #f7f8fa;
    --toursys-bg-muted: #f0f2f5;
    --toursys-surface: #ffffff;
    --toursys-text: #1a1a2e;
    --toursys-muted: #64748b;
    --toursys-border: #e2e8f0;
    --toursys-radius: 12px;
    --toursys-radius-sm: 6px;
    --toursys-shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
    --toursys-shadow-hover: 0 4px 12px rgba(0,0,0,.1), 0 16px 40px rgba(0,0,0,.1);
    --toursys-transition: 200ms ease;
}

.toursys-catalog,
.toursys-packages,
.toursys-package-detail,
.toursys-service,
.toursys-hotel,
.toursys-hotels {
    font-family: var(--toursys-font);
    color: var(--toursys-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    box-sizing: border-box;
}

.toursys-catalog *,
.toursys-packages *,
.toursys-package-detail *,
.toursys-service *,
.toursys-hotel *,
.toursys-hotels * {
    box-sizing: inherit;
}

.toursys-package-detail [hidden],
.toursys-packages [hidden] {
    display: none !important;
}

.toursys-btn,
.toursys-btn--primary,
.toursys-btn--secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .5rem .875rem;
    border-radius: 6px;
    font-size: .875rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s, transform .15s;
    border: 2px solid transparent;
    white-space: nowrap;
    line-height: 1.2;
}

.toursys-btn--primary {
    background: var(--toursys-primary);
    color: #fff;
    border-color: var(--toursys-primary);
}

.toursys-btn--primary:hover,
.toursys-btn--primary:focus-visible {
    background: var(--toursys-primary-dark);
    border-color: var(--toursys-primary-dark);
    color: #fff;
    transform: translateY(-1px);
}

.toursys-btn--secondary {
    background: transparent;
    color: var(--toursys-primary);
    border-color: var(--toursys-primary);
}

.toursys-btn--secondary:hover,
.toursys-btn--secondary:focus-visible {
    background: var(--toursys-primary);
    border-color: var(--toursys-primary);
    color: #fff;
}

/* Package catalog */
.toursys-packages {
    padding-top: 1rem;
}

.toursys-packages .toursys-grid {
    align-items: stretch;
}

.toursys-packages .ts-pkg-card {
    background: var(--toursys-surface);
    border: 1px solid var(--toursys-border);
    border-radius: var(--toursys-radius);
    box-shadow: var(--toursys-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform var(--toursys-transition), box-shadow var(--toursys-transition), border-color var(--toursys-transition);
}

.toursys-packages .ts-pkg-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--toursys-shadow-hover);
    border-color: color-mix(in srgb, var(--toursys-primary) 18%, var(--toursys-border));
}

.toursys-packages .toursys-card__image {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: linear-gradient(135deg, #dbe7f4 0%, #eef2f7 100%);
}

.toursys-packages .toursys-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .35s ease, filter .35s ease;
}

.toursys-packages .ts-pkg-card:hover .toursys-card__image img {
    transform: scale(1.05);
    filter: saturate(1.05);
}

.toursys-packages .toursys-pkg-badge {
    position: absolute;
    top: .85rem;
    right: .85rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .38rem .75rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, .78);
    color: #fff;
    font-size: .76rem;
    font-weight: 700;
    backdrop-filter: blur(8px);
    box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
}

.toursys-packages .toursys-card__body {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding: 1rem 1.25rem 1.4rem;
    flex: 1;
}

.toursys-packages .toursys-card__title {
    margin: 0 0 .35rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--toursys-text);
    font-family: inherit;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.toursys-packages .toursys-card__meta {
    margin: 0 0 .25rem;
    padding-top: .75rem;
    border-top: 1px solid var(--toursys-border);
    display: flex;
    align-items: center;
    gap: .45rem;
    font-size: .875rem;
    color: var(--toursys-muted);
    font-family: inherit;
}

.toursys-packages .toursys-pkg-geo {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.toursys-packages .ts-pkg-geo-icon {
    display: inline-flex;
}

.toursys-packages .toursys-card__desc {
    margin: 0;
    color: var(--toursys-muted);
    font-size: .875rem;
    line-height: 1.55;
    font-family: inherit;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.toursys-packages .toursys-pkg-includes {
    margin: 0;
    color: #1f8a4d;
    font-size: .8rem;
    font-weight: 600;
    display: flex;
    align-items: flex-start;
    gap: .35rem;
}

.toursys-packages .toursys-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .9rem;
    flex-wrap: wrap;
    padding-top: .95rem;
    border-top: 1px solid var(--toursys-border);
}

.toursys-packages .toursys-card__price-row {
    display: flex;
    flex-direction: column;
    gap: .2rem;
    min-width: 0;
}

.toursys-packages .toursys-price-prev {
    color: var(--toursys-muted);
    font-size: .78rem;
    text-decoration: line-through;
}

.toursys-packages .toursys-card__price-amount {
    color: var(--toursys-accent);
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
    font-family: inherit;
}

.toursys-packages .toursys-card__footer .toursys-btn {
    margin-left: auto;
}

.toursys-packages .toursys-grid.toursys-list-view {
    grid-template-columns: 1fr;
}

.toursys-packages .toursys-grid.toursys-list-view .ts-pkg-card {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
}

.toursys-packages .toursys-grid.toursys-list-view .toursys-card__image {
    height: 100%;
    min-height: 220px;
}

.toursys-packages .toursys-grid.toursys-list-view .toursys-card__body {
    padding: 1.1rem 1.2rem;
}

/* ═══ Package detail ═══════════════════════════════════════════════════════ */

.toursys-package-detail {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0;
}

/* Hero — stacked layout: gallery full-width on top, info below */
.ts-pkg-hero {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 0;
}

.ts-pkg-hero-gallery {
    width: 100%;
}

.ts-pkg-gallery { display: flex; flex-direction: column; gap: .5rem; }
.ts-pkg-gallery-main { border-radius: var(--toursys-radius); overflow: hidden; background: #1a1a1a; aspect-ratio: 16/7; position: relative; }
/* Higher specificity than button.ts-img-link to ensure block display fills container */
.ts-pkg-gallery-main > button.ts-pkg-main-btn { display: block; width: 100%; height: 100%; background: none; border: none; padding: 0; cursor: zoom-in; }
.ts-pkg-gallery-main img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .25s; }
.ts-pkg-gallery-thumbs { display: flex; gap: .4rem; flex-wrap: wrap; }
.ts-pkg-thumb { width: 72px; height: 52px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: .65; transition: opacity .2s, outline .15s; outline: 3px solid transparent; flex-shrink: 0; }
.ts-pkg-thumb.is-active, .ts-pkg-thumb:hover { opacity: 1; outline-color: var(--toursys-primary); }

/* Hero info */
.ts-pkg-hero-info { display: flex; flex-direction: column; gap: 1rem; }
.ts-pkg-badges { display: flex; flex-wrap: wrap; gap: .4rem; }
.ts-pkg-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .3rem .65rem; border-radius: 999px; font-size: .78rem; font-weight: 600; line-height: 1; }
.ts-badge-days { background: var(--toursys-primary); color: #fff; }
.ts-badge-type { background: #e8f0fb; color: var(--toursys-primary); }
.ts-badge-geo { background: #f0f3f7; color: var(--toursys-text); }
.ts-pkg-title { font-size: 1.75rem; font-weight: 800; margin: 0; line-height: 1.2; color: var(--toursys-text); font-family: inherit; }
.ts-pkg-description { color: #444; font-size: .95rem; line-height: 1.65; }
.ts-pkg-actions { display: flex; flex-wrap: wrap; gap: .65rem; padding-top: .5rem; }

/* ── Package bottom CTA ──────────────────────────────────────────────────── */
.ts-pkg-cta-section {
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--toursys-primary) 0%, var(--toursys-primary-dark) 100%);
    border-radius: 12px;
    overflow: hidden;
}
.ts-pkg-cta-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 2rem 2.5rem;
}
.ts-pkg-cta-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
    flex: 1 1 200px;
}
.ts-pkg-cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    flex-shrink: 0;
}
.toursys-btn--lg {
    padding: .75rem 1.75rem;
    font-size: 1rem;
    border-radius: 8px;
}
/* Secondary btn inside CTA (dark bg) */
.ts-pkg-cta-section .toursys-btn--secondary {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.6);
    color: #fff;
}
.ts-pkg-cta-section .toursys-btn--secondary:hover {
    background: rgba(255,255,255,.22);
    border-color: #fff;
    color: #fff;
}
.ts-pkg-cta-section .toursys-btn--primary {
    background: #fff;
    border-color: #fff;
    color: var(--toursys-primary);
}
.ts-pkg-cta-section .toursys-btn--primary:hover {
    background: rgba(255,255,255,.88);
    border-color: rgba(255,255,255,.88);
    color: var(--toursys-primary-dark);
    transform: translateY(-1px);
}
@media (max-width: 600px) {
    .ts-pkg-cta-inner { padding: 1.5rem; flex-direction: column; align-items: flex-start; }
    .ts-pkg-cta-actions { width: 100%; }
    .ts-pkg-cta-actions .toursys-btn--primary,
    .ts-pkg-cta-actions .toursys-btn--secondary { width: 100%; justify-content: center; }
}

/* Anchor navigation (sticky) */
.ts-pkg-anchors {
    position: sticky;
    top: var(--tt-header-h, 68px);  /* stick below the fixed site header */
    z-index: 90;
    background: #fff;
    border-bottom: 2px solid var(--toursys-border);
    display: flex;
    gap: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin: 1.5rem 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    will-change: transform;
    transform: translateZ(0);
}
.ts-pkg-anchors::-webkit-scrollbar { display: none; }
.ts-pkg-anchor-link {
    display: inline-block;
    padding: .75rem 1.1rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--toursys-muted);
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color .15s, border-color .15s;
    font-family: inherit;
}
.ts-pkg-anchor-link:hover { color: var(--toursys-primary); }
.ts-pkg-anchor-link.is-active { color: var(--toursys-primary); border-bottom-color: var(--toursys-primary); }

/* ── Mobile: 2-column chip grid, no horizontal scroll ───────────────────── */
@media (max-width: 767px) {
    .ts-pkg-anchors {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        overflow-x: visible;
        gap: .4rem;
        padding: .65rem 1rem;
        border-bottom: 1px solid var(--toursys-border);
        box-shadow: 0 1px 0 var(--toursys-border), 0 2px 8px rgba(0,0,0,.06);
    }
    .ts-pkg-anchor-link {
        padding: .5rem .75rem;
        border-radius: var(--toursys-radius, 10px);
        border: 1.5px solid var(--toursys-border) !important;
        border-bottom: 1.5px solid var(--toursys-border) !important;
        margin-bottom: 0;
        font-size: .82rem;
        background: var(--toursys-surface, #fff) !important;
        color: var(--toursys-muted) !important;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }
    .ts-pkg-anchor-link.is-active {
        background: var(--toursys-primary) !important;
        color: #fff !important;
        border-color: var(--toursys-primary) !important;
        border-bottom-color: var(--toursys-primary) !important;
    }
    .ts-pkg-anchor-link:hover:not(.is-active) {
        color: var(--toursys-primary) !important;
        border-color: var(--toursys-primary) !important;
        background: var(--toursys-surface, #fff) !important;
    }
}

/* Sections — content-visibility skips off-screen sections entirely */
.ts-pkg-section {
    padding: 2rem 0;
    border-top: 1px solid var(--toursys-border);
    scroll-margin-top: 130px; /* header 68px + tab bar ~50px + gap */
    content-visibility: auto;
    contain-intrinsic-size: auto 400px;
}
.ts-pkg-section:first-of-type { border-top: none; }
.ts-pkg-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 1.25rem;
    color: var(--toursys-text);
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: .5rem;
}
.ts-pkg-section-title::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, var(--toursys-primary) 0%, transparent 100%);
    margin-left: .75rem;
    opacity: .3;
    border-radius: 2px;
}

/* Overview day grid */
.ts-pkg-overview-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 640px) { .ts-pkg-overview-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .ts-pkg-overview-grid { grid-template-columns: repeat(3, 1fr); } }
.ts-pkg-day-card {
    background: var(--toursys-surface);
    border: 1px solid var(--toursys-border);
    border-radius: var(--toursys-radius);
    padding: 1rem 1.15rem;
    box-shadow: var(--toursys-shadow);
    text-decoration: none;
    color: inherit;
    display: block;
    transition: border-color .15s, box-shadow .15s;
}
.ts-pkg-day-card:hover { border-color: var(--toursys-primary); box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.ts-pkg-day-heading { font-size: .875rem; font-weight: 700; color: var(--toursys-primary); margin: 0 0 .6rem; text-transform: uppercase; letter-spacing: .06em; }
.ts-pkg-day-services { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .65rem; }

/* Service type group — one per type within a day card */
.ts-svc-group { display: flex; flex-direction: column; gap: .3rem; }

.ts-svc-group-header {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .18rem .6rem .18rem .4rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    white-space: nowrap;
    background: hsl(var(--svc-hue, 215), 70%, 93%);
    color: hsl(var(--svc-hue, 215), 60%, 28%);
    border: 1px solid hsl(var(--svc-hue, 215), 50%, 82%);
    width: fit-content;
}
.ts-svc-group-icon { display: flex; align-items: center; line-height: 1; flex-shrink: 0; }
.ts-svc-group-icon svg { width: 11px; height: 11px; }

.ts-svc-group-items { list-style: none; margin: 0; padding: 0 0 0 .5rem; display: flex; flex-direction: column; gap: .22rem; }

.ts-svc-item { display: flex; align-items: baseline; gap: .4rem; }
.ts-svc-item-dot { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: hsl(var(--svc-hue, 215), 55%, 60%); flex-shrink: 0; margin-top: .35em; }
.ts-svc-item-name { font-size: .8rem; color: var(--toursys-text); line-height: 1.4; }
.ts-svc-item.is-optional .ts-svc-item-name { color: var(--toursys-muted); }

.ts-opt-tag { font-size: .68rem; color: var(--toursys-muted); font-style: italic; flex-shrink: 0; }

/* Itinerary day block */
.ts-pkg-day-block { margin-bottom: 1.5rem; scroll-margin-top: 90px; }
.ts-pkg-day-divider { font-size: .85rem; font-weight: 700; color: var(--toursys-primary); text-transform: uppercase; letter-spacing: .08em; margin: 0 0 .75rem; display: flex; align-items: center; gap: .75rem; }
.ts-pkg-day-divider::after { content: ''; flex: 1; height: 1px; background: var(--toursys-border); }

/* Service line accordion */
.ts-pkg-line-acc {
    border: 1px solid var(--toursys-border);
    border-radius: var(--toursys-radius);
    margin-bottom: .6rem;
    overflow: hidden;
    background: var(--toursys-surface);
    scroll-margin-top: 90px;
}
.ts-pkg-line-acc[open] { border-color: var(--toursys-primary-light, #bcd0f7); }
.ts-pkg-line-summary {
    padding: .875rem 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: .6rem;
    background: #f8fafc;
    font-weight: 600;
    font-size: .9rem;
    list-style: none;
    transition: background .15s;
    user-select: none;
}
.ts-pkg-line-summary::-webkit-details-marker { display: none; }
.ts-pkg-line-summary::after {
    content: '›';
    font-size: 1.2rem;
    margin-left: auto;
    color: var(--toursys-muted);
    transition: transform .2s;
    line-height: 1;
}
.ts-pkg-line-acc[open] .ts-pkg-line-summary::after { transform: rotate(90deg); }
.ts-pkg-line-acc[open] .ts-pkg-line-summary { background: var(--toursys-surface); border-bottom: 1px solid var(--toursys-border); }
.ts-pkg-line-summary:hover { background: #eef2f7; }
.ts-pkg-line-name { flex: 1; }
.ts-pkg-opt-badge { font-size: .72rem; font-weight: 600; background: #fff3cd; color: #856404; padding: .2rem .5rem; border-radius: 4px; white-space: nowrap; }
.ts-pkg-dur { font-size: .78rem; color: var(--toursys-muted); white-space: nowrap; }
.is-optional .ts-pkg-line-summary { border-left: 3px solid #f0ad4e; }

/* Service line body */
.ts-pkg-line-body { padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .875rem; }

/* Photo strip — explicit dimensions prevent layout shifts when images load */
.ts-pkg-photo-strip {
    display: flex;
    gap: .4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: .2rem;
}
.ts-strip-item {
    flex-shrink: 0;
    width: 140px;
    height: 100px;
    border-radius: 6px;
    overflow: hidden;
    cursor: zoom-in;
    padding: 0;
    border: none;
    background: #e8ecf0;
    contain: strict;   /* layout + size + paint — each strip item is isolated */
}
.ts-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.ts-strip-item:hover img { transform: scale(1.05); }

/* Line description */
.ts-pkg-line-desc { font-size: .875rem; line-height: 1.6; color: #444; }

/* Detail accordions inside line */
.ts-pkg-detail-acc { border: 1px solid var(--toursys-border); border-radius: 6px; overflow: hidden; }
.ts-pkg-detail-summary {
    padding: .55rem .9rem;
    cursor: pointer;
    font-weight: 600;
    font-size: .82rem;
    background: #f8fafc;
    color: var(--toursys-text);
    list-style: none;
    user-select: none;
}
.ts-pkg-detail-summary::-webkit-details-marker { display: none; }
.ts-pkg-detail-body { padding: .75rem .9rem; font-size: .875rem; line-height: 1.6; }

/* Line brochure */
.ts-pkg-line-brochure { display: flex; }

/* Supplier info */
.ts-pkg-supplier { background: #f8fafc; border-radius: 6px; padding: .75rem 1rem; font-size: .875rem; }
.ts-pkg-supplier p { margin: .3rem 0; }

/* Destinations */
.ts-pkg-dest-acc { border: 1px solid var(--toursys-border); border-radius: var(--toursys-radius); margin-bottom: .75rem; overflow: hidden; background: var(--toursys-surface); }
.ts-pkg-dest-summary { padding: .9rem 1.25rem; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .75rem; background: var(--toursys-bg-muted, #f8fafc); font-weight: 600; list-style: none; transition: background .15s; }
.ts-pkg-dest-summary::-webkit-details-marker { display: none; }
.ts-pkg-dest-summary:hover { background: #e9edf3; }
.ts-pkg-dest-acc[open] .ts-pkg-dest-summary { background: var(--toursys-surface); border-bottom: 1px solid var(--toursys-border); }
.ts-dest-dates { font-size: .8rem; color: var(--toursys-muted); font-weight: 400; margin-left: auto; }
.ts-pkg-dest-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 1rem; }
.ts-dest-media-row { display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 640px) { .ts-dest-media-row { grid-template-columns: 1fr 2fr; } }
.ts-dest-gallery { display: flex; flex-wrap: wrap; gap: 8px; }
.ts-dest-gallery img { width: 100%; max-width: 220px; height: 150px; object-fit: cover; border-radius: 8px; }
.ts-dest-links { display: flex; gap: .5rem; flex-wrap: wrap; }
.ts-dest-services { display: flex; flex-wrap: wrap; gap: 1rem; }
.ts-dest-svc-group { display: flex; flex-direction: column; gap: .35rem; min-width: 140px; }

/* Map */
.ts-pkg-map-container { border-radius: var(--toursys-radius); overflow: hidden; border: 1px solid var(--toursys-border); min-height: 400px; box-shadow: var(--toursys-shadow); }

/* Video */
.ts-pkg-video-wrap { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: var(--toursys-radius); background: #000; }
.ts-pkg-video-wrap iframe, .ts-pkg-video-wrap video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Additional info accordions */
.ts-pkg-info-acc { border: 1px solid var(--toursys-border); border-radius: var(--toursys-radius); margin-bottom: .6rem; overflow: hidden; background: var(--toursys-surface); }
.ts-pkg-info-summary { padding: .9rem 1.25rem; cursor: pointer; font-weight: 600; background: #f8fafc; list-style: none; font-size: .9rem; display: flex; align-items: center; justify-content: space-between; }
.ts-pkg-info-summary::-webkit-details-marker { display: none; }
.ts-pkg-info-summary::after { content: '+'; font-size: 1.1rem; color: var(--toursys-muted); }
.ts-pkg-info-acc[open] .ts-pkg-info-summary::after { content: '–'; }
.ts-pkg-info-acc[open] .ts-pkg-info-summary { border-bottom: 1px solid var(--toursys-border); }
.ts-pkg-info-body { padding: 1.25rem; }

/* Mini gallery (inside additional info) */
.ts-pkg-mini-gallery { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.ts-pkg-mini-gallery button { padding: 0; border: none; background: none; cursor: zoom-in; border-radius: 6px; overflow: hidden; }
.ts-pkg-mini-gallery img { width: 110px; height: 80px; object-fit: cover; display: block; border-radius: 6px; }

/* Rich text */
.toursys-richtext { font-size: .92rem; line-height: 1.7; color: #444; }
.toursys-richtext p { margin: .5rem 0; }
.toursys-richtext img { max-width: 100%; height: auto; border-radius: 4px; }
.toursys-richtext a { color: var(--toursys-primary); }
.toursys-richtext h1 { font-size: 1.5rem; }
.toursys-richtext h2 { font-size: 1.3rem; }
.toursys-richtext h3 { font-size: 1.1rem; }
.toursys-richtext h4 { font-size: 1rem; }
.toursys-richtext h1, .toursys-richtext h2, .toursys-richtext h3, .toursys-richtext h4 { margin: 1rem 0 .45rem; line-height: 1.3; color: var(--toursys-text); }

.ts-img-link { cursor: zoom-in; }
button.ts-img-link { display: inline-flex; background: none; border: none; padding: 0; text-decoration: none; }

/* ── Lightbox ─────────────────────────────────────────────────────────────── */
.ts-pkg-lb {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 99999;
    background: rgba(0, 0, 0, .92);
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.ts-pkg-lb.is-open {
    display: flex;
    animation: ts-fadein .15s ease;
}
.ts-pkg-lb img {
    max-width: 92vw;
    max-height: 88vh;
    object-fit: contain;
    border-radius: var(--toursys-radius);
    box-shadow: 0 0 60px rgba(0, 0, 0, .6);
    cursor: default;
    pointer-events: none;
}
.ts-pkg-lb-close {
    position: absolute !important;
    top: 1rem !important;
    right: 1.25rem !important;
    background: rgba(255, 255, 255, .12) !important;
    border: none !important;
    color: #fff !important;
    line-height: 0 !important;
    width: 2.5rem !important;
    height: 2.5rem !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background .15s;
    z-index: 2 !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.ts-pkg-lb-close:hover {
    background: rgba(255, 255, 255, .25) !important;
}
.ts-pkg-lb-prev,
.ts-pkg-lb-next {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: rgba(255, 255, 255, .12) !important;
    border: none !important;
    color: #fff !important;
    line-height: 0 !important;
    width: 3rem !important;
    height: 3rem !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: background .15s;
    z-index: 2 !important;
    user-select: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
}
.ts-pkg-lb-prev { left: 1rem !important; }
.ts-pkg-lb-next { right: 1rem !important; }
.ts-pkg-lb-prev:hover,
.ts-pkg-lb-next:hover { background: rgba(255, 255, 255, .28) !important; }

/* Force SVG visibility inside lightbox buttons regardless of theme resets */
.ts-pkg-lb-close svg,
.ts-pkg-lb-prev svg,
.ts-pkg-lb-next svg {
    display: block !important;
    width: 1.25rem !important;
    height: 1.25rem !important;
    fill: none !important;
    stroke: #fff !important;
    stroke-width: 2.5 !important;
    overflow: visible !important;
    pointer-events: none !important;
}
.ts-pkg-lb-close svg line,
.ts-pkg-lb-prev svg polyline,
.ts-pkg-lb-next svg polyline {
    stroke: #fff !important;
    fill: none !important;
}
.ts-pkg-lb-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, .75);
    font-size: .875rem;
    font-family: var(--toursys-font);
    pointer-events: none;
}

/* Mobile list-view card fixes (keep from old CSS) */
@media (max-width: 767px) {
    .toursys-packages .toursys-grid.toursys-list-view .ts-pkg-card { grid-template-columns: 1fr; }
    .toursys-packages .toursys-card__footer { align-items: stretch; }
    .toursys-packages .toursys-card__footer .toursys-btn { width: 100%; margin-left: 0; }
    .ts-dest-dates { margin-left: 0; }
}

@keyframes ts-fadein {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: none; }
}

/* ── Scroll-to-top button (global) ──────────────────────────────────────────── */
.ts-scroll-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    border: none;
    background: var(--toursys-primary);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(0,0,0,.2);
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
    transition: opacity .2s, transform .2s;
    will-change: transform;
}
.ts-scroll-top.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.ts-scroll-top:hover { filter: brightness(1.1); }

/* ── Package detail: inline booking — theme-agnostic full-width ─────────── *
 * JS strips max-width/padding from all ancestor elements on open and
 * restores them on close, so this works with any theme.                      */
#toursys-package-detail.toursys-booking-active > *:not(#ts-booking-inline) {
    display: none !important;
}

#toursys-package-detail.toursys-booking-active {
    max-width: none !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
}

#ts-booking-inline {
    width: 100% !important;
    box-sizing: border-box !important;
}

.toursys-booking-inline__frame {
    width: 100% !important;
    overflow: visible;
}

#ts-booking-iframe {
    display: block !important;
    width: 100% !important;
    min-height: calc(100vh - 150px);
    height: calc(100vh - 150px);
    border: none !important;
    transition: height 0.2s ease;
}
