/* ==========================================================================
   Offer lists and landing pages (loaded after base.css + cards.css):
   /oferti · country · destination · holiday · campaign landings · favorites.
   Priceline results page: filters on the left (no box, groups split by thin lines),
   a light grey summary bar (count, chips, sort, view), results on the right.
   Landing pages: minimal header (H1 + intro + links, rounded photo on the right),
   a bordered stats strip, destination tiles, climate panel, SEO text, FAQ.
   ========================================================================== */

/* ---------- Listing layout: filters | results ---------- */
.listing { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 32px; align-items: start; }
.listing__main { min-width: 0; }

/* ---------- Filters sidebar ---------- */
.filters { min-width: 0; background: var(--white); }
.filters__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding-bottom: 6px; }
.filters__title { font-size: 1.125rem; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; color: var(--navy); }
.filters__head-actions { display: flex; align-items: center; gap: 4px; }
.filters__head .link-btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-size: 0.875rem; }

.fgroup { border-top: 1px solid var(--line); }
.filters form > details.fgroup:last-of-type { border-bottom: 1px solid var(--line); }
.fgroup > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 52px; cursor: pointer; list-style: none;
  font-size: 0.9375rem; font-weight: 600; line-height: 1.3; color: var(--navy);
  transition: color var(--t-fast);
}
.fgroup > summary::-webkit-details-marker { display: none; }
.fgroup > summary:hover { color: var(--blue); }
.fgroup > summary i { flex: none; font-size: 16px; color: var(--muted); transition: transform var(--t-med) var(--ease); }
.fgroup[open] > summary i { transform: rotate(180deg); }
.fgroup__body { display: grid; padding: 0 0 16px; }
.fgroup__sub { padding: 12px 0 2px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); }
.fgroup__sub::first-letter { text-transform: uppercase; }
.fgroup__body > .fgroup__sub:first-child { padding-top: 0; }

/* "Покажи още N": nested details; its summary is a blue text link */
.fgroup--more { border: 0; }
.fgroup--more > summary {
  justify-content: flex-start; gap: 6px; width: fit-content; min-height: 40px;
  font-size: 0.875rem; font-weight: 600; color: var(--blue);
}
.fgroup--more > summary:hover { color: var(--blue-700); text-decoration: underline; text-underline-offset: 3px; }
.fgroup--more > summary i { font-size: 14px; color: currentColor; }
.fgroup--more[open] .fgroup__show,
.fgroup--more:not([open]) .fgroup__hide { display: none; }
.fgroup__more { display: grid; }
.fgroup__more > .fgroup__sub:first-child { padding-top: 6px; }

.filters .check { min-height: 38px; }
.filters .check__label { min-width: 0; }
.filters .check__count { color: var(--muted); }
.check__icon { flex: none; font-size: 17px; color: var(--muted); }
.check__icon--sun { color: var(--star); }

/* Price range: histogram + two thumbs (app.js paints .range__fill) */
.range { padding-top: 2px; }
.range__hist { display: flex; align-items: flex-end; gap: 2px; height: 40px; padding-inline: 11px; }
.range__hist span { flex: 1; min-height: 2px; border-radius: 2px 2px 0 0; background: var(--line); }
.range__hist span.is-in { background: var(--blue); opacity: .45; }
.range__slider { position: relative; height: 28px; margin-top: -2px; }
.range__track,
.range__fill { position: absolute; top: 50%; height: 4px; border-radius: 2px; transform: translateY(-50%); }
.range__track { left: 0; right: 0; background: var(--line); }
.range__fill { background: var(--blue); }
.range__slider input[type="range"] {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  background: none; pointer-events: none; -webkit-appearance: none; appearance: none;
}
.range__slider input[type="range"]:focus-visible { outline: none; }
.range__slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; pointer-events: auto; width: 22px; height: 22px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--blue); box-shadow: 0 1px 4px rgba(11, 31, 68, .25); cursor: grab;
  transition: background-color var(--t-fast), box-shadow var(--t-fast);
}
.range__slider input[type="range"]::-moz-range-thumb {
  pointer-events: auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--white); border: 2px solid var(--blue); box-shadow: 0 1px 4px rgba(11, 31, 68, .25); cursor: grab;
}
.range__slider input[type="range"]::-moz-range-track { background: none; }
.range__slider input[type="range"]:focus-visible::-webkit-slider-thumb { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.range__slider input[type="range"]:focus-visible::-moz-range-thumb { background: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.range__slider input[type="range"]:active::-webkit-slider-thumb { cursor: grabbing; }
.range__vals { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.range__vals output {
  flex: 1; display: grid; place-items: center; min-height: 40px;
  border: 1px solid var(--line-strong); border-radius: 10px;
  font-size: 0.875rem; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums;
}
.range__dash { flex: none; width: 8px; height: 2px; border-radius: 1px; background: var(--subtle); }

/* Hotel category: four toggle buttons */
.star-toggles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.star-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-height: 40px;
  border-radius: 10px; background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 0.9375rem; font-weight: 600;
  transition: background-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast);
}
.star-toggle i { font-size: 14px; color: var(--star); }
.star-toggle:hover { color: var(--blue-700); box-shadow: inset 0 0 0 1px var(--blue); }
.star-toggle[aria-pressed="true"] { background: var(--blue); color: var(--white); box-shadow: none; }
.star-toggle[aria-pressed="true"] i { color: var(--yellow); }

.filters__apply-nojs { margin-top: 20px; }
.js .filters__apply-nojs { display: none; }

/* ---------- Summary bar: count, sort, view toggle, active filter chips ---------- */
.results-bar { display: grid; gap: 12px; margin-bottom: 20px; padding: 10px 10px 10px 18px; border-radius: var(--r-md); background: var(--soft-2); }
.results-bar__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; min-height: 44px; }
.results-bar__count { font-size: 1rem; font-weight: 500; line-height: 1.35; letter-spacing: 0; color: var(--muted); }
.results-bar__count b { font-weight: 700; color: var(--navy); }
.results-bar__tools { display: flex; align-items: center; gap: 8px; }
.results-bar__label { font-size: 0.875rem; font-weight: 500; color: var(--muted); white-space: nowrap; }
.results-bar__sort select { min-width: 200px; }

.filters-open { min-height: 44px; padding: 0 16px; }
.filters-open__n { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--blue); color: var(--white); font-size: 0.75rem; font-weight: 700; line-height: 1; }

.view-toggle { background: var(--white); box-shadow: inset 0 0 0 1px var(--line-strong); }
.view-toggle button { width: 40px; padding: 0; justify-content: center; font-size: 18px; }
.view-toggle [aria-pressed="true"] { background: var(--blue-50); color: var(--blue); box-shadow: none; }

.active-chips { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.active-chips > li { display: flex; }
.active-chip {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 10px 0 14px;
  border-radius: var(--r-pill); background: var(--white); color: var(--navy); box-shadow: inset 0 0 0 1px var(--line-strong);
  font-size: 0.875rem; font-weight: 500; line-height: 1.2;
  transition: color var(--t-fast), box-shadow var(--t-fast);
}
.active-chip::after { content: ""; position: absolute; inset: -5px 0; } /* 44px touch target */
.active-chip i { font-size: 14px; color: var(--muted); }
.active-chip:hover { color: var(--blue-700); box-shadow: inset 0 0 0 1px var(--blue); }
.active-chip:hover i { color: var(--blue); }
.active-chips__clear { display: inline-flex; align-items: center; min-height: 34px; padding: 0 6px; font-size: 0.875rem; }

/* ---------- Results (cards come from cards.css: grid view, and the row view via #results.is-list) ---------- */
.results { list-style: none; transition: opacity 120ms var(--ease); }
.results > li { display: flex; min-width: 0; }
.results > li > .ocard { flex: 1 1 auto; }
.results.is-updating { opacity: .45; pointer-events: none; }
.listing .pagination-wrap { margin-top: 32px; }
.listing .empty { padding-block: 56px; }

@media (min-width: 1081px) {
  /* Sticky sidebar with its own thin scrollbar; side padding keeps focus rings visible */
  .filters {
    position: sticky; top: calc(var(--header-h) + 16px);
    max-height: calc(100vh - var(--header-h) - 32px); overflow-y: auto; overscroll-behavior: contain;
    margin-inline: -6px -10px; padding-inline: 6px 10px;
    scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
  }
  .filters__close, .filters__apply, .filters-open, .listing > .drawer-backdrop { display: none; }
}

/* ---------- Landing header (destination, country, holiday, campaign) ---------- */
.lhead { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px 56px; align-items: center; padding-top: 8px; }
.lhead__text { min-width: 0; }
.lhead__kicker {
  display: inline-flex; align-items: center; gap: 8px; min-height: 30px; margin-bottom: 16px; padding: 0 12px;
  border-radius: var(--r-pill); background: var(--blue-50); color: var(--blue-700); font-size: 0.875rem; font-weight: 600;
}
.lhead__kicker i { font-size: 16px; color: var(--blue); }
.lhead__title { font-size: clamp(2rem, 1.35rem + 2.2vw, 3rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; text-wrap: balance; }
.lhead__intro { margin-top: 16px; max-width: 52ch; font-size: 1.0625rem; line-height: 1.6; color: var(--muted); }
.lhead__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.lhead__sun { color: var(--star); }
.lhead__jump { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.lhead__media { position: relative; aspect-ratio: 3 / 2; overflow: hidden; border-radius: var(--r-xl); background: var(--soft-2); }
.lhead__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Campaign: cheapest offer on the photo */
.lhead__note {
  position: absolute; right: 16px; bottom: 16px; z-index: 1;
  display: grid; gap: 2px; max-width: min(300px, calc(100% - 32px)); padding: 12px 14px;
  border-radius: var(--r-md); background: var(--white); box-shadow: var(--shadow-float);
  color: var(--text); font-size: 0.8125rem; line-height: 1.4;
}
.lhead__note b { font-size: 0.875rem; color: var(--navy); transition: color var(--t-fast); }
.lhead__note strong { color: var(--navy); font-weight: 700; white-space: nowrap; }
.lhead__note:hover { color: var(--text); }
.lhead__note:hover b { color: var(--blue-700); }

/* ---------- Stats strip ---------- */
.dest-stats {
  list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; margin-top: 32px;
  overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--line);
}
.dest-stats li { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 16px 20px; background: var(--white); }
.dest-stats i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); font-size: 20px; }
.dest-stats span { min-width: 0; }
.dest-stats small { display: block; font-size: 0.8125rem; line-height: 1.3; color: var(--muted); }
.dest-stats b { display: block; font-size: 1rem; font-weight: 700; line-height: 1.35; color: var(--navy); font-variant-numeric: tabular-nums; }

/* ---------- Destination tiles (x-dest-tile from cards.css) ---------- */
.subdest { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 16px; }
.subdest-section { margin-block: 40px; }
.subdest-section--first { margin-top: var(--section-gap); }
.section__link { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; white-space: nowrap; }
.section__link i { font-size: 16px; transition: transform var(--t-fast) var(--ease); }
.section__link:hover i { transform: translateX(3px); }

/* ---------- Campaign: discount ladder panel ---------- */
.ladder-panel { margin-top: 32px; padding: 24px 28px 26px; }
.ladder-panel__title { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 700; color: var(--navy); }
.ladder-panel__title i { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--blue-50); color: var(--blue); font-size: 20px; }
.ladder-panel .ladder { margin-top: 12px; }
.ladder-panel + .dest-stats { margin-top: 16px; }

/* Steps and reasons */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.step { padding: 24px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); }
.step__n { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); font-size: 1.05rem; font-weight: 800; }
.step h3 { margin-bottom: 6px; font-size: 1.125rem; }
.step p { font-size: 0.9375rem; color: var(--muted); }
.benefits { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 20px; }
.benefits li { min-width: 0; }
.benefits i { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--blue-50); color: var(--blue); font-size: 22px; }
.benefits b { display: block; margin-top: 14px; font-size: 1rem; color: var(--navy); }
.benefits p { margin-top: 4px; font-size: 0.875rem; color: var(--muted); }

/* ---------- Climate panel (chart from cards.css) ---------- */
.clim-panel .section__head { margin-bottom: 8px; }
.clim-panel .section__actions { gap: 6px; min-height: 44px; white-space: nowrap; }
.clim-panel__verdict { max-width: 80ch; color: var(--muted); }

/* ---------- Other holidays ---------- */
.lpills { list-style: none; margin-top: 16px; }
.lpills .pill { min-height: 44px; }
.lpills .pill i { color: var(--blue); }
.lpills__n { font-weight: 500; color: var(--muted); }

/* ---------- SEO text ---------- */
.seo-text .seo-text__body { margin-top: 14px; }
.seo-text__toggle { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; }

/* ---------- Favorites (app.js fills #fav-grid) ---------- */
#fav-grid { min-height: 300px; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .listing { grid-template-columns: minmax(0, 1fr); gap: 0; }

  /* Filters become an off-canvas panel from the left (#filters.is-open, #filters-backdrop.is-open) */
  .filters {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: calc(var(--z-drawer) + 1);
    width: min(400px, 100%); overflow-y: auto; overscroll-behavior: contain;
    box-shadow: var(--shadow-pop); transform: translateX(-100%); visibility: hidden;
    transition: transform 300ms var(--ease), visibility 0s linear 300ms;
  }
  .filters.is-open { transform: none; visibility: visible; transition-delay: 0s; }
  .filters form { display: flex; flex-direction: column; min-height: 100%; padding: 0 20px; }
  .filters__head {
    position: sticky; top: 0; z-index: 2; min-height: 64px; margin: 0 -20px; padding: 8px 8px 8px 20px;
    background: var(--white); border-bottom: 1px solid var(--line);
  }
  .filters form > details.fgroup:first-of-type { border-top: 0; }
  .filters form > details.fgroup:last-of-type { border-bottom: 0; }
  .filters .check, .star-toggle, .fgroup--more > summary { min-height: 44px; }
  .range__slider { height: 36px; }
  .range__slider input[type="range"]::-webkit-slider-thumb { width: 26px; height: 26px; }
  .range__slider input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; }
  .filters__apply {
    position: sticky; bottom: 0; z-index: 2; margin: auto -20px 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    background: var(--white); border-top: 1px solid var(--line);
  }
  .filters__apply .btn { min-height: 50px; }

  .subdest { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .view-toggle { display: none; }
  .lhead { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .lhead__media { aspect-ratio: 16 / 9; }
  .dest-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .results-bar { margin-bottom: 16px; padding: 12px; }
  .results-bar__tools { width: 100%; }
  .results-bar__label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .filters-open { flex: none; padding: 0 14px; }
  .results-bar__sort { flex: 1 1 auto; min-width: 0; }
  .results-bar__sort select { width: 100%; min-width: 0; padding-right: 34px; text-overflow: ellipsis; }
  .results-bar__sort::after { right: 13px; }
  .active-chip { min-height: 36px; }

  .lhead { gap: 20px; padding-top: 0; }
  .lhead__kicker { margin-bottom: 12px; }
  .lhead__intro { margin-top: 12px; font-size: 1rem; }
  .lhead__actions { margin-top: 20px; }
  .lhead__actions .btn { flex: 1 1 auto; }
  .lhead__jump { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * var(--gutter)); padding: 2px var(--gutter); }
  .lhead__jump::-webkit-scrollbar { display: none; }
  .lhead__jump li { flex: none; }
  .lhead__jump .pill { min-height: 44px; }
  .lhead__media { aspect-ratio: 16 / 10; border-radius: var(--r-lg); }
  .lhead__note { left: 10px; right: 10px; bottom: 10px; max-width: none; padding: 10px 12px; }

  .dest-stats { margin-top: 24px; }
  .dest-stats li { gap: 10px; padding: 12px; }
  .dest-stats i { width: 36px; height: 36px; font-size: 18px; }
  .dest-stats b { font-size: 0.9375rem; }

  .subdest { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; }
  .subdest-section { margin-block: 32px; }

  .ladder-panel { margin-top: 24px; padding: 18px 16px 20px; }
  .step { padding: 20px; }
  .benefits { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .benefits li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; }
  .benefits i { grid-row: span 2; }
  .benefits b { margin-top: 0; align-self: end; }
  .benefits p { grid-column: 2; }
}
@media (max-width: 480px) {
  /* Two narrow columns: the labels need the room more than the decorative icons */
  .dest-stats li { padding: 12px 14px; }
  .dest-stats i { display: none; }
}

/* ---------- Campaign per-country cards (main campaign page and the country pages) ---------- */
.eb-countries { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.eb-countries:has(> :only-child) { grid-template-columns: minmax(0, 1fr); }
.eb-country { display: grid; grid-template-columns: 220px minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--white); color: var(--text); transition: box-shadow var(--t-med) var(--ease), border-color var(--t-fast); }
.eb-country:hover { color: var(--text); border-color: var(--blue-100); box-shadow: var(--shadow-hover); }
.eb-country img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; }
.eb-country__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; }
.eb-country__name { display: flex; align-items: center; gap: 8px; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; color: var(--navy); }
.eb-country__desc { font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }
.eb-country__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; font-size: 0.9375rem; font-weight: 700; color: var(--blue); }
.eb-country:hover .eb-country__more { color: var(--blue-700); }
@media (max-width: 900px) {
  .eb-countries { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .eb-country { grid-template-columns: minmax(0, 1fr); }
  .eb-country img { aspect-ratio: 16 / 9; min-height: 0; }
}
@media (max-width: 640px) {
  .lhead__actions .btn { white-space: normal; text-align: center; }
}
