/* 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);
    display: flex;
    align-items: baseline;
    gap: .3rem;
    flex-wrap: wrap;
}

.toursys-card__price-col {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    flex: 1;
    min-width: 0;
}

.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__taxes-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .72rem;
    font-weight: 600;
    color: #15803d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: .2rem .55rem;
    border-radius: 999px;
    white-space: nowrap;
    flex-shrink: 0;
}

.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-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) !important;
    border-color: var(--toursys-primary) !important;
    color: #fff !important;
}

.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) !important;
    border-color: var(--toursys-primary-dark) !important;
    color: #fff !important;
}

/* Large Book Now CTA — service detail page */
.toursys-service-cta {
    margin: 2.5rem 0 1.5rem;
    text-align: center;
}

.toursys-btn-book--large {
    flex: none;
    font-size: 1.1rem;
    padding: .875rem 2.5rem;
    border-radius: 8px;
    letter-spacing: .02em;
    box-shadow: 0 4px 14px rgba(0,0,0,.15);
}

.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) !important;
    color: #fff !important;
}

.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) !important;
    color: var(--toursys-primary) !important;
    background: #fff !important;
}

.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 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;
}

/* Hide labels in the basic filter bar (sort, geo, month) — keep them in advanced filters */
.toursys-filter-sort-wrap > .toursys-filter-label,
.toursys-filter-row .toursys-filter-group > .toursys-filter-label {
    display: none;
}

/* 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;
    align-items: flex-end;
    margin-left: auto;
    flex-shrink: 0;
}

.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-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;
}

/* ─── Share Button ──────────────────────────────────────────────────── */
.toursys-service__title-row {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
}

.toursys-service__title-row .toursys-service__title {
    flex: 1;
    min-width: 0;
}

.toursys-share-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .3rem;
    flex-shrink: 0;
    padding-top: .25em;
}

.toursys-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    background: transparent;
    color: inherit;
    opacity: .55;
    cursor: pointer;
    transition: opacity .18s, background .18s;
    padding: 0;
    line-height: 1;
}

.toursys-share-btn:hover,
.toursys-share-btn:focus-visible {
    opacity: 1;
    background: rgba(0,0,0,.06);
    outline: none;
}

.toursys-share-btn svg {
    display: block;
    flex-shrink: 0;
}

.ts-share-feedback {
    font-size: .72rem;
    color: #16a34a;
    font-weight: 600;
    opacity: 0;
    white-space: nowrap;
    transform: translateY(4px);
    transition: opacity .25s, transform .25s;
    pointer-events: none;
}

.ts-share-feedback--visible {
    opacity: 1;
    transform: translateY(0);
}


/* ─── 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__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 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;
}

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

.toursys-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--toursys-muted);
    background: var(--toursys-bg-card);
    border: 1.5px dashed var(--toursys-border);
    border-radius: var(--toursys-radius);
}

.toursys-empty__icon {
    opacity: .35;
    line-height: 0;
}

.toursys-empty__msg {
    font-size: 1rem;
    font-weight: 600;
    color: var(--toursys-text);
    margin: 0;
    font-style: normal;
}

.toursys-empty__reset {
    margin-top: .25rem;
}

.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;
}

/* Mobile: 1 col | Tablet ≥640px: 2 col | Desktop ≥960px: 3 col — matches iframe xl:col-4 layout */
.toursys-destinations-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

@media (min-width: 640px) {
    .toursys-destinations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 960px) {
    .toursys-destinations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.toursys-dest-card {
    position: relative !important;
    width: 100% !important;
    height: 300px !important;
    background-size: cover !important;
    background-position: center !important;
    background-color: #2c3e50;
    border-radius: 15px;
    cursor: pointer;
    overflow: hidden !important;
    user-select: none;
    display: block !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
}

/* Dark overlay on hover — z-index:2 to sit above ::after gradient */
.toursys-dest-card.has-desc:hover::before,
.toursys-dest-card.has-desc:focus-visible::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,.62);
    border-radius: 15px;
    z-index: 2;
}

/* Always-on gradient at bottom for name legibility */
.toursys-dest-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 55%;
    background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 100%);
    border-radius: 0 0 15px 15px;
    pointer-events: none;
    z-index: 1;
}

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

/* Icons (video / website) — top-right corner */
.ts-dest-icons {
    position: absolute;
    top: 0; right: 0;
    padding: .6rem;
    z-index: 3;
    display: flex;
    gap: .35rem;
}

.ts-dest-icon-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    width: 1.9rem; height: 1.9rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease;
    padding: 0; line-height: 1;
}

.ts-dest-icon-btn:hover {
    background: rgba(255,255,255,.25);
}

/* Name: always at bottom — use !important to override theme h2 styles */
.toursys-dest-card .ts-dest-name {
    margin: 0 !important;
    padding: 1rem !important;
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    color: #fff !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-shadow: 0 1px 3px rgba(0,0,0,.7);
    z-index: 3;
    transition: opacity .3s ease;
}

.toursys-dest-card.has-desc:hover .ts-dest-name,
.toursys-dest-card.has-desc:focus-visible .ts-dest-name {
    opacity: 0 !important;
}

/* Description: hidden by default, revealed on hover.
   z-index:3 = above overlay(2) and gradient(1). */
.ts-dest-description {
    opacity: 0;
    position: absolute;
    top: 1rem; left: 1rem; right: 1rem; bottom: 1rem;
    transition: opacity .4s ease;
    z-index: 3;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.4) transparent;
    pointer-events: none;
}

.toursys-dest-card.has-desc:hover .ts-dest-description,
.toursys-dest-card.has-desc:focus-visible .ts-dest-description {
    opacity: 1;
    pointer-events: auto;
}

.ts-dest-desc-inner {
    font-size: .875rem;
    color: #fff;
    line-height: 1.65;
}

.ts-dest-desc-inner > * {
    font-size: .875rem !important;
    color: #fff !important;
    margin-top: .6rem !important;
    margin-bottom: 0 !important;
}

.ts-dest-desc-inner > *:first-child {
    margin-top: 0 !important;
}

.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/service children while booking is open */
#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);
    scroll-margin-top: var(--ts-nav-h, 140px);
}

.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) !important;
    border-color: var(--toursys-primary-dark) !important;
    color: #fff !important;
    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) !important;
    border-color: var(--toursys-primary) !important;
    color: #fff !important;
}

/* 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;
}

/* ─── Availability strip ──────────────────────────────────────────── */
.ts-pkg-availability {
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .85rem;
    background: #f0f6ff;
    border-top: 1px solid #dbeafe;
    font-size: .78rem;
    color: #1e40af;
    flex-wrap: wrap;
}

.ts-pkg-avail-label {
    font-weight: 700;
    white-space: nowrap;
}

.ts-pkg-avail-dates {
    color: #374151;
    white-space: nowrap;
}

.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 .7rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1;
    background: #e8f0fb;
    color: var(--toursys-primary);
}
.ts-pkg-badge svg { flex-shrink: 0; }
.ts-badge-days { background: var(--toursys-primary); color: #fff; }
.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 (wrapping underline tabs — pinned via JS) ─────────── */
.ts-pkg-anchors {
    position: relative;         /* JS takes over sticky behaviour (cross-theme safe) */
    z-index: 90;
    background: #fff;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0 .5rem;
    margin: 1.5rem 0 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.08), inset 0 -2px 0 var(--toursys-border, #e5e7eb);
}
/* When JS pins the nav it adds this class */
.ts-pkg-anchors--pinned {
    position: fixed !important;
    margin: 0 !important;
    /* left / top / width are set inline by JS */
}
.ts-pkg-anchor-link {
    display: inline-flex;
    align-items: center;
    padding: .65rem .9rem;
    font-size: .84rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none !important;
    color: var(--toursys-muted, #6b7280);
    border-bottom: 3px solid transparent;
    transition: color .15s, border-color .15s;
    font-family: inherit;
    position: relative;
    z-index: 1;
}
.ts-pkg-anchor-link:hover {
    color: var(--toursys-primary, #0070c9);
    border-bottom-color: var(--toursys-primary, #0070c9);
}
.ts-pkg-anchor-link.is-active {
    color: var(--toursys-primary, #0070c9);
    border-bottom-color: var(--toursys-primary, #0070c9);
}

/* ── Mobile: compact ─────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .ts-pkg-anchors { padding: 0 .25rem; }
    .ts-pkg-anchor-link {
        padding: .55rem .65rem;
        font-size: .78rem;
    }
}

/* Sections — content-visibility skips off-screen sections entirely */
.ts-pkg-section {
    padding: 0 0 0.75rem;
    border-top: 1px solid var(--toursys-border);
    /* scroll-margin-top = header + nav + gap (--ts-nav-h set by JS to the full total) */
    scroll-margin-top: var(--ts-nav-h, 140px);
}
/* WP admin bar adds 32px (desktop) or 46px (mobile) — already reflected in tsGetHeaderH() */
body.admin-bar .ts-pkg-section {
    scroll-margin-top: var(--ts-nav-h, 140px);
}
@media screen and (max-width: 782px) {
    body.admin-bar .ts-pkg-section {
        scroll-margin-top: var(--ts-nav-h, 140px);
    }
}
.ts-pkg-section:first-of-type { border-top: none; }
.ts-pkg-section:first-of-type .ts-pkg-section-title { margin-top: 1.15rem; }
.ts-pkg-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 1.15rem 0 1.5rem;
    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: flex;
    align-items: center;
    gap: .4rem;
    padding: .3rem .85rem .3rem .6rem;
    border-radius: 999px;
    font-size: .8rem;
    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;
    align-self: flex-start;
}
.ts-svc-group-icon { display: flex; align-items: center; line-height: 1; flex-shrink: 0; }
.ts-svc-group-icon svg { width: 14px; height: 14px; }

.ts-svc-group-items { list-style: none; margin: 0; padding: 0; 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 1.5rem; margin-top: .75rem; }
.ts-dest-svc-group { display: flex; flex-direction: column; gap: .4rem; flex: 1 1 180px; min-width: 160px; align-items: stretch; }
/* Force header and cards to share the same left edge */
.ts-dest-svc-group > .ts-svc-group-header {
    display: flex;
    align-self: stretch;
    width: auto;
}
/* Service cards (new design) */
.ts-dest-svc-group ul.ts-svc-cards { list-style: none; margin: 0; padding: 0 !important; display: flex; flex-direction: column; gap: .4rem; }
.ts-dest-svc-group ul.ts-svc-cards li { list-style: none; }
.ts-svc-card { border-radius: 8px; overflow: hidden; }
.ts-svc-card-inner {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .5rem .75rem;
    background: #f0f4fb;
    border: 1px solid #dce6f5;
    border-radius: 8px;
    text-decoration: none;
    color: var(--toursys-text);
    font-size: .85rem;
    font-weight: 500;
    transition: background .15s, border-color .15s;
    width: 100%;
    box-sizing: border-box;
}
a.ts-svc-card-inner:hover { background: #e2eaf8; border-color: var(--toursys-primary); color: var(--toursys-primary); }
a.ts-svc-card-inner:hover .ts-svc-card-arrow { color: var(--toursys-primary); }
.ts-svc-card-name { flex: 1; line-height: 1.3; }
.ts-svc-card-arrow { flex-shrink: 0; opacity: .45; transition: opacity .15s; }
a.ts-svc-card-inner:hover .ts-svc-card-arrow { opacity: 1; }
.ts-svc-card.is-optional .ts-svc-card-inner { background: #fafafa; border-style: dashed; }

/* 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); isolation: isolate; position: relative; z-index: 0; }

/* 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); }

/* ── Activity section: Operation Hours ───────────────────────────────────── */
.ts-svc-hours-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .75rem;
}
.ts-svc-hours-slot {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .9rem;
    font-weight: 600;
    color: var(--toursys-text);
    background: #f0f3f7;
    padding: .35rem .75rem;
    border-radius: 20px;
}
.ts-svc-hours-slot svg { color: var(--toursys-primary); flex-shrink: 0; }

/* ── Activity section: Pickup Locations ─────────────────────────────────── */
.ts-svc-pickups-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}
.ts-svc-pickup-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .9rem;
    color: var(--toursys-text);
}
.ts-svc-pickup-item svg { color: var(--toursys-primary); flex-shrink: 0; }

/* ── Activity section: Map ───────────────────────────────────────────────── */
.ts-svc-map-container {
    border-radius: var(--toursys-radius);
    overflow: hidden;
}

.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 !important;
    bottom: 1.5rem !important;
    right: 1.5rem !important;
    z-index: 9999 !important;
    width: 2.75rem !important;
    height: 2.75rem !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    border-radius: 50% !important;
    border: none !important;
    background: var(--toursys-primary) !important;
    color: #fff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-shadow: 0 4px 14px rgba(0,0,0,.2) !important;
    opacity: 0 !important;
    transform: translateY(12px) !important;
    pointer-events: none !important;
    transition: opacity .2s, transform .2s !important;
    will-change: transform;
    line-height: 1 !important;
    font-size: 0 !important;
}
.ts-scroll-top.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}
.ts-scroll-top:hover { filter: brightness(1.1); }
.ts-scroll-top svg { display: block !important; flex-shrink: 0 !important; }

/* ── 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;
}

/* ── Shopping cart iframe ──────────────────────────────────────────────────── */
.toursys-shopping-cart-wrap {
    width: 100%;
    box-sizing: border-box;
}

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


/* ── Share button copy feedback ─────────────────────────────────── */
.ts-pkg-share-btn {
    position: relative;
}
.ts-pkg-share-btn.ts-copied::after {
    content: attr(data-copied-text);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    font-size: .75rem;
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
    pointer-events: none;
}

/* ── API font families ───────────────────────────────────────────── */
.toursys-catalog,
.toursys-service,
.toursys-packages,
#toursys-package-detail,
.toursys-hotel,
.toursys-hotels {
    font-family: var(--toursys-font-family, inherit);
}
.toursys-catalog h1,.toursys-catalog h2,.toursys-catalog h3,
.toursys-service h1,.toursys-service h2,.toursys-service h3,
.toursys-packages h1,.toursys-packages h2,.toursys-packages h3,
#toursys-package-detail h1,#toursys-package-detail h2,#toursys-package-detail h3,
.toursys-hotel h1,.toursys-hotel h2,.toursys-hotel h3 {
    font-family: var(--toursys-header-font-family, var(--toursys-font-family, inherit));
}
