/* ============================================================
   Hola Holidays — All Tours & Activities listing (2026)
   Premium travel-marketplace experience for tours.html.
   Loaded after cards-2026.css / ui-2026.css so it can compose
   their components (.hh-search, .hh-listing-bar, .hh-chip-btn,
   .hh-filter-*, .hh-overlay, .hh-sheet, .market-card-*).
   All colour/type/spacing comes from the shared design tokens —
   nothing here hardcodes brand colour, so the page follows the
   active theme (Airbnb re-skin) automatically.
   ============================================================ */

/* ------------------------------------------------ Page shell */
.tours-page {
  background: var(--brand-cream, #FFFFFF);
}

/* ============================================================
   1. EDITORIAL HERO  (breadcrumb + heading + integrated search)
   ============================================================ */
.tours-listing-hero {
  position: relative;
  background: linear-gradient(180deg, var(--brand-cream, #FFFFFF) 0%, var(--brand-sand, #F7F1E7) 100%);
  padding-top: calc(var(--header-height, 86px) + clamp(28px, 4vw, 48px));
  padding-bottom: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--brand-border, #E7E0D7);
}

.tours-listing-hero__inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.tours-listing-hero .hh-breadcrumbs {
  margin-bottom: 20px;
}

.tours-listing-hero__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
}

.tours-listing-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--brand-navy, #0B374D);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.tours-listing-hero__eyebrow::before {
  content: "";
  width: 30px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand-red, #D02A14);
}

.tours-listing-hero h1 {
  margin: 0 0 12px;
  max-width: 20ch;
  color: var(--brand-text, #15242B);
  font-family: 'Fraunces', 'Iowan Old Style', Palatino, Georgia, serif;
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.tours-listing-hero__lead {
  margin: 0;
  max-width: 58ch;
  color: var(--brand-muted, #65727A);
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.65;
}

/* Live catalogue stat beside the heading */
.tours-listing-hero__stat {
  flex: 0 0 auto;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding-bottom: 6px;
  text-align: right;
}
.tours-listing-hero__stat strong {
  color: var(--brand-navy, #0B374D);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  line-height: 1;
}
.tours-listing-hero__stat span {
  color: var(--brand-muted, #65727A);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Integrated experience search */
.tours-listing-hero__search {
  margin-top: clamp(1.25rem, 2.5vw, 1.9rem);
  max-width: 640px;
}
.tours-listing-hero__search .hh-search {
  min-height: var(--control-lg, 56px);
}
.tours-listing-hero__search .hh-search__input {
  font-size: 1.02rem;
}

@media (min-width: 900px) {
  .tours-listing-hero__stat { display: flex; }
}

/* ============================================================
   2. LAYOUT  (sidebar + results)
   ============================================================ */
.listing-layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.5rem, 3vw, 2.25rem) 24px clamp(3rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: 288px minmax(0, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.listing-results { min-width: 0; }

/* ============================================================
   3. CATEGORY RAIL
   The rail + chips are styled by the site-wide Airbnb re-skin
   (airbnb-2026.css §9 — stacked circular badges, coral active
   state), so the listing stays visually consistent with the
   homepage. Only the spacing above the results toolbar is tuned.
   ============================================================ */
.listing-results .hh-cat-rail { margin-bottom: 10px; }

/* ============================================================
   4. LISTING TOOLBAR  (live count + filters + sort)
   ============================================================ */
.listing-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 0 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--brand-border, #E7E0D7);
}
.listing-toolbar__count {
  color: var(--brand-muted, #65727A);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.92rem;
  font-weight: 600;
}
.listing-toolbar__count strong { color: var(--brand-text, #15242B); font-weight: 800; }
.listing-toolbar__spacer { flex: 1 1 auto; }
.listing-toolbar__group { display: flex; align-items: center; gap: 12px; }

/* Filters button (mobile + tablet) */
.listing-toolbar .hh-filter-btn { position: relative; display: none; }
.hh-filter-btn__badge {
  display: none;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: var(--radius-full, 999px);
  background: var(--brand-red, #D02A14);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}
.hh-filter-btn[data-active="true"] .hh-filter-btn__badge { display: inline-block; }

/* ============================================================
   5. ACTIVE FILTER CHIPS
   ============================================================ */
.hh-active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: -6px 0 20px;
}
.hh-active-filters[hidden] { display: none; }
.hh-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--brand-border, #E7E0D7);
  border-radius: var(--radius-full, 999px);
  background: var(--brand-sand, #F7F7F7);
  color: var(--brand-text, #15242B);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 600;
}
.hh-active-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 0;
  border-radius: var(--radius-full, 999px);
  background: rgba(11, 55, 77, 0.1);
  color: var(--brand-navy, #0B374D);
  font-size: 0.62rem;
  cursor: pointer;
  transition: background-color 160ms ease;
}
.hh-active-chip button:hover { background: rgba(11, 55, 77, 0.22); }
.hh-active-filters__clear {
  border: 0;
  background: none;
  color: var(--brand-red, #D02A14);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

/* ============================================================
   6. FILTER PANEL  (desktop sidebar)
   ============================================================ */
.listing-sidebar { position: relative; }

.hh-filter {
  position: sticky;
  top: calc(var(--header-height, 86px) + 20px);
  background: #fff;
  border: 1px solid var(--brand-border, #E7E0D7);
  border-radius: var(--radius-lg, 16px);
  padding: 6px 20px 20px;
  box-shadow: var(--shadow-xs, 0 1px 2px rgba(0,0,0,.05));
  max-height: calc(100vh - var(--header-height, 86px) - 44px);
  overflow: auto;
}

.hh-filter__heading {
  margin: 0;
  padding: 18px 0 4px;
  color: var(--brand-text, #15242B);
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
}

/* ---- Mobile / tablet filter sheet ---- */
.hh-filter-overlay__backdrop { position: absolute; inset: 0; }

@media (max-width: 860px) {
  .listing-layout { grid-template-columns: minmax(0, 1fr); }

  /* The single filter panel is portaled into the sheet on open; hide the
     inline copy while it lives in the grid. */
  .hh-filter:not(.hh-filter--in-sheet) { display: none; }

  /* Once moved into the sheet it loses the sidebar card chrome. */
  .hh-filter--in-sheet {
    position: static;
    display: block;
    max-height: none;
    padding: 4px 0 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }
  .hh-filter--in-sheet .hh-filter__heading { display: none; }
  /* The sheet footer carries Reset / Show results, so the panel's own
     "Clear filters" row would be a duplicate control. */
  .hh-filter--in-sheet .hh-filter-actions { display: none; }
}

/* ============================================================
   7. RESULTS GRID  (3 / 2 / 1 — scoped to the listing)
   ============================================================ */
.listing-results .market-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

@media (max-width: 1199px) {
  .listing-results .market-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .listing-results .market-card-grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* ============================================================
   8. LOAD MORE
   ============================================================ */
.hh-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: min(320px, 100%);
  margin: 34px auto 0;
  min-height: var(--control-lg, 56px);
  padding: 0 26px;
  border: 1px solid var(--brand-navy, #0B374D);
  border-radius: var(--radius-full, 999px);
  background: #fff;
  color: var(--brand-navy, #0B374D);
  font-family: var(--font-ui, 'Inter', sans-serif);
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.hh-load-more:hover {
  background: var(--brand-navy, #0B374D);
  color: #fff;
  transform: translateY(-1px);
}
.hh-load-more[hidden] { display: none; }
.hh-load-more:focus-visible { outline: 3px solid rgba(11, 55, 77, 0.34); outline-offset: 3px; }

/* ============================================================
   9. SKELETON  (uses .market-card--skeleton from cards-2026.css)
   ============================================================ */
.listing-results .market-card--skeleton { pointer-events: none; }

/* ============================================================
   10. RESPONSIVE  (hero)
   ============================================================ */
@media (max-width: 860px) {
  .listing-toolbar .hh-filter-btn { display: inline-flex; }
}
@media (max-width: 899px) {
  .tours-listing-hero__head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .tours-listing-hero__inner { padding: 0 18px; }
  .tours-listing-hero__search { max-width: none; }
  .listing-layout { padding-left: 18px; padding-right: 18px; }
  .listing-toolbar__group { width: 100%; }
  .listing-toolbar .hh-filter-btn { flex: 1 1 auto; justify-content: center; }
}

/* ============================================================
   11. REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  .hh-cat,
  .hh-load-more,
  .hh-active-chip button {
    transition-duration: 0.01ms !important;
  }
}
