/* #########################################################
   PAGE: Packages listing – filter sidebar (left) + results  —  html.pg-pkgs
   Loaded after common.css and inner.css (cards, tabs, hero). Script: js/packages.js
   ######################################################### */
:root:where(.pg-pkgs){
  --pk-teal: linear-gradient(150deg, #0d4c49 0%, #003738 65%, #012e30 100%);
  --pk-side: clamp(268px, 21vw, 320px);
}

/* =========================================================
   LAYOUT
   ========================================================= */
:where(.pg-pkgs) .pkx{ display: grid; grid-template-columns: var(--pk-side) minmax(0, 1fr); gap: clamp(20px, 2.2vw, 40px); align-items: start; }
:where(.pg-pkgs) .pkx__main{ min-width: 0; }
:where(.pg-pkgs) .pkx .pkx__grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
:where(.pg-pkgs) .pkx .pcard[hidden]{ display: none; }

/* =========================================================
   SIDEBAR
   ========================================================= */
:where(.pg-pkgs) .pkf{
  position: sticky; top: 20px; display: flex; flex-direction: column; max-height: calc(100vh - 40px);
  background: #fff; border: 1px solid #ece4d2; border-radius: 20px; box-shadow: 0 14px 40px rgba(18, 48, 46, .1); overflow: hidden;
}
:where(.pg-pkgs) .pkf__head{
  position: relative; display: flex; align-items: center; gap: 10px; padding: 16px 18px; background: var(--pk-teal); color: #fff; overflow: hidden; flex: none;
}
:where(.pg-pkgs) .pkf__head::after{ content: ""; position: absolute; right: -26px; top: -26px; width: 110px; height: 110px; background-image: var(--pattern); background-size: 60px; opacity: .16; pointer-events: none; }
:where(.pg-pkgs) .pkf__head h2{ flex: 1; display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 19px; font-weight: 700; }
:where(.pg-pkgs) .pkf__head h2 i{ font-size: 15px; color: var(--gold-light); }
:where(.pg-pkgs) .pkf__reset{ position: relative; z-index: 1; border: 0; background: none; font: 600 12.5px var(--sans); color: var(--gold-light); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
:where(.pg-pkgs) .pkf__reset:hover{ color: #fff; }
:where(.pg-pkgs) .pkf__close{ display: none; position: relative; z-index: 1; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-size: 16px; cursor: pointer; }
:where(.pg-pkgs) .pkf__body{ flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 16px 18px; scrollbar-width: thin; scrollbar-color: #e3d6b8 transparent; }
:where(.pg-pkgs) .pkf__foot{ display: none; }

:where(.pg-pkgs) .pkf__search{ display: flex; align-items: center; border: 1.5px solid #dfe5e4; border-radius: 12px; background: #fbfcfc; transition: border-color .25s, box-shadow .25s; margin-bottom: 6px; }
:where(.pg-pkgs) .pkf__search:focus-within{ border-color: var(--gold); box-shadow: 0 0 0 3px rgba(211, 162, 74, .18); background: #fff; }
:where(.pg-pkgs) .pkf__search i{ width: 40px; flex: none; text-align: center; color: var(--gold-2); font-size: 14px; }
:where(.pg-pkgs) .pkf__search input{ flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: 400 14px var(--sans); color: var(--text); padding: 11px 12px 11px 0; }

/* groups */
:where(.pg-pkgs) .pkf__grp{ border-bottom: 1px dashed var(--line); padding-block: 12px; }
:where(.pg-pkgs) .pkf__grp:last-of-type{ border-bottom: 0; }
:where(.pg-pkgs) .pkf__grp summary{
  list-style: none; display: flex; align-items: center; justify-content: space-between; cursor: pointer;
  font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--heading); padding-block: 2px 8px;
}
:where(.pg-pkgs) .pkf__grp summary::-webkit-details-marker{ display: none; }
:where(.pg-pkgs) .pkf__grp summary i{ font-size: 11px; color: var(--gold-2); transition: transform .25s; }
:where(.pg-pkgs) .pkf__grp:not([open]) summary{ padding-bottom: 2px; }
:where(.pg-pkgs) .pkf__grp:not([open]) summary i{ transform: rotate(-90deg); }
:where(.pg-pkgs) .pkf__list{ display: grid; gap: 2px; }

/* checkbox / radio rows */
:where(.pg-pkgs) .pkf__opt{ position: relative; display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; cursor: pointer; font-size: 14px; color: var(--text); transition: background .2s, opacity .2s; }
:where(.pg-pkgs) .pkf__opt:hover{ background: #f8f4ea; }
:where(.pg-pkgs) .pkf__opt input{ position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
:where(.pg-pkgs) .pkf__box{
  flex: none; width: 19px; height: 19px; border-radius: 6px; border: 1.8px solid #c9d6d4; background: #fff; display: grid; place-items: center;
  transition: background .2s, border-color .2s, box-shadow .2s;
}
:where(.pg-pkgs) .pkf__box::after{ content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 10px; color: var(--gold-light); transform: scale(0); transition: transform .2s; }
:where(.pg-pkgs) .pkf__opt--radio .pkf__box{ border-radius: 50%; }
:where(.pg-pkgs) .pkf__opt--radio .pkf__box::after{ content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--gold-light); }
:where(.pg-pkgs) .pkf__opt input:checked + .pkf__box{ background: var(--teal-700); border-color: var(--teal-700); }
:where(.pg-pkgs) .pkf__opt input:checked + .pkf__box::after{ transform: scale(1); }
:where(.pg-pkgs) .pkf__opt input:focus-visible + .pkf__box{ box-shadow: 0 0 0 3px rgba(211, 162, 74, .35); }
:where(.pg-pkgs) .pkf__opt:has(input:checked){ background: #f1f7f6; }
:where(.pg-pkgs) .pkf__opt:has(input:checked) .pkf__lbl{ font-weight: 600; color: var(--heading); }
:where(.pg-pkgs) .pkf__ic{ width: 16px; text-align: center; color: var(--gold-2); font-size: 13px; }
:where(.pg-pkgs) .pkf__lbl{ flex: 1; min-width: 0; line-height: 1.35; }
:where(.pg-pkgs) .pkf__n{ flex: none; min-width: 26px; height: 22px; padding: 0 7px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 11.5px; font-weight: 600; background: #f1f4f3; color: var(--teal-700); }
:where(.pg-pkgs) .pkf__opt:has(input:checked) .pkf__n{ background: var(--gold-mid); color: #1b2a2a; }
:where(.pg-pkgs) .pkf__opt.is-zero{ opacity: .42; }
:where(.pg-pkgs) .pkf__opt--sm{ font-size: 13px; margin-top: 8px; padding-inline: 2px; }

/* budget */
:where(.pg-pkgs) .pkf__vals{ display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
:where(.pg-pkgs) .pkf__vals output{ font-size: 13.5px; font-weight: 600; color: var(--heading); background: var(--cream); border: 1px solid #ecdfc2; border-radius: 8px; padding: 5px 10px; }
:where(.pg-pkgs) .pkf__vals span{ color: var(--muted); }
:where(.pg-pkgs) .pkf__slider{ position: relative; height: 34px; }
:where(.pg-pkgs) .pkf__track{ position: absolute; left: 9px; right: 9px; top: 50%; height: 6px; margin-top: -3px; border-radius: 6px; background: #ece6d9; }
:where(.pg-pkgs) .pkf__track i{ position: absolute; top: 0; bottom: 0; border-radius: 6px; background: linear-gradient(90deg, var(--gold-mid), var(--gold-2)); }
:where(.pg-pkgs) .pkf__slider input{ position: absolute; inset: 0; width: 100%; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
:where(.pg-pkgs) .pkf__slider input::-webkit-slider-runnable-track{ height: 34px; background: none; }
:where(.pg-pkgs) .pkf__slider input::-moz-range-track{ background: none; }
:where(.pg-pkgs) .pkf__slider input::-webkit-slider-thumb{
  -webkit-appearance: none; pointer-events: auto; width: 20px; height: 20px; margin-top: 7px; border-radius: 50%; cursor: grab;
  background: #fff; border: 3px solid var(--teal-700); box-shadow: 0 3px 8px rgba(1, 46, 48, .25);
}
:where(.pg-pkgs) .pkf__slider input::-moz-range-thumb{ pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; cursor: grab; background: #fff; border: 3px solid var(--teal-700); box-shadow: 0 3px 8px rgba(1, 46, 48, .25); }
:where(.pg-pkgs) .pkf__slider input:focus-visible::-webkit-slider-thumb{ box-shadow: 0 0 0 4px rgba(211, 162, 74, .4); }
:where(.pg-pkgs) .pkf__chips{ display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
:where(.pg-pkgs) .pkf__chip{ border: 1.5px solid #e3dccb; background: #fff; color: var(--heading); font: 500 12.5px var(--sans); padding: 6px 11px; border-radius: 30px; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
:where(.pg-pkgs) .pkf__chip:hover{ border-color: var(--gold); }
:where(.pg-pkgs) .pkf__chip.is-active{ background: var(--teal-700); border-color: var(--teal-700); color: #fff; }

/* months */
:where(.pg-pkgs) .pkf__months{ display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
:where(.pg-pkgs) .pkf__month{ position: relative; cursor: pointer; }
:where(.pg-pkgs) .pkf__month input{ position: absolute; opacity: 0; width: 1px; height: 1px; }
:where(.pg-pkgs) .pkf__month span{ display: grid; justify-items: center; gap: 0; padding: 8px 4px; border: 1.5px solid #ece4d2; border-radius: 12px; background: #fff; line-height: 1.2; transition: background .2s, border-color .2s, color .2s, transform .2s; }
:where(.pg-pkgs) .pkf__month b{ font-size: 14px; color: var(--heading); }
:where(.pg-pkgs) .pkf__month small{ font-size: 11px; color: var(--muted); }
:where(.pg-pkgs) .pkf__month:hover span{ border-color: var(--gold); transform: translateY(-1px); }
:where(.pg-pkgs) .pkf__month input:checked + span{ background: var(--pk-teal); border-color: var(--teal-700); }
:where(.pg-pkgs) .pkf__month input:checked + span b{ color: var(--gold-light); }
:where(.pg-pkgs) .pkf__month input:checked + span small{ color: rgba(255, 255, 255, .8); }
:where(.pg-pkgs) .pkf__month input:focus-visible + span{ box-shadow: 0 0 0 3px rgba(211, 162, 74, .35); }
:where(.pg-pkgs) .pkf__note{ font-size: 11.5px; color: var(--muted); margin-top: 8px; }
:where(.pg-pkgs) .pkf__note i{ color: var(--gold-2); margin-right: 4px; }

/* help box */
:where(.pg-pkgs) .pkf__help{ position: relative; margin-top: 14px; padding: 16px; border-radius: 16px; background: var(--cream); border: 1px solid #efe3c8; overflow: hidden; }
:where(.pg-pkgs) .pkf__help::after{ content: ""; position: absolute; right: -20px; bottom: -20px; width: 90px; height: 90px; background-image: var(--pattern); background-size: 50px; opacity: .14; }
:where(.pg-pkgs) .pkf__help > i{ width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; color: var(--gold-light); background: var(--pk-teal); }
:where(.pg-pkgs) .pkf__help p{ font-size: 13px; line-height: 1.55; color: var(--muted); margin: 10px 0 12px; }
:where(.pg-pkgs) .pkf__help b{ display: block; color: var(--heading); font-size: 14px; margin-bottom: 2px; }
:where(.pg-pkgs) .pkf__help a{ position: relative; z-index: 1; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: #fff; background: #25d366; padding: 8px 14px; border-radius: 30px; }
:where(.pg-pkgs) .pkf__help a:hover{ background: #1ebe5b; }

/* =========================================================
   RESULTS TOOLBAR + CHIPS + EMPTY
   ========================================================= */
:where(.pg-pkgs) .pkbar{
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px 10px 18px;
  background: #fbf8f2; border: 1px solid #efe6d3; border-radius: 14px;
}
:where(.pg-pkgs) .pkbar__filters{ display: none; align-items: center; gap: 8px; border: 0; cursor: pointer; font: 600 14px var(--sans); color: #fff; background: var(--teal-700); padding: 10px 16px; border-radius: 10px; }
:where(.pg-pkgs) .pkbar__filters i{ color: var(--gold-light); }
:where(.pg-pkgs) .pkbar__badge{ min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 11.5px; background: var(--gold-mid); color: #1b2a2a; }
:where(.pg-pkgs) .pkbar__badge[hidden]{ display: none; }
:where(.pg-pkgs) .pkbar__count{ flex: 1; min-width: 0; font-size: 14px; color: var(--muted); }
:where(.pg-pkgs) .pkbar__count b{ color: var(--heading); font-size: 15px; }
:where(.pg-pkgs) .pkbar__sort{ position: relative; display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
:where(.pg-pkgs) .pkbar__sort select{
  appearance: none; -webkit-appearance: none; cursor: pointer; font: 500 13.5px var(--sans); color: var(--heading);
  background: #fff; border: 1.5px solid #e3dccb; border-radius: 10px; padding: 9px 34px 9px 12px;
}
:where(.pg-pkgs) .pkbar__sort::after{ content: "\f107"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; right: 12px; font-size: 12px; color: var(--muted); pointer-events: none; }
:where(.pg-pkgs) .pkbar__sort select:focus{ outline: 0; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(211, 162, 74, .18); }

:where(.pg-pkgs) .pkchips{ display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
:where(.pg-pkgs) .pkchips[hidden]{ display: none; }
:where(.pg-pkgs) .pkchip{
  display: inline-flex; align-items: center; gap: 8px; border: 1px solid #cfe2df; background: #eef6f5; color: var(--teal-700);
  font: 500 13px var(--sans); padding: 6px 8px 6px 12px; border-radius: 30px; cursor: pointer; transition: background .2s, border-color .2s;
}
:where(.pg-pkgs) .pkchip i{ width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; background: #fff; }
:where(.pg-pkgs) .pkchip:hover{ background: #dfeeec; border-color: var(--teal-700); }
:where(.pg-pkgs) .pkchip--clear{ background: none; border-color: transparent; color: var(--gold-2); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding-inline: 6px; }
:where(.pg-pkgs) .pkchip--clear:hover{ background: none; border-color: transparent; color: var(--heading); }

:where(.pg-pkgs) .pkempty{ text-align: center; padding: clamp(30px, 4vw, 60px) 20px; border: 2px dashed #e6dcc6; border-radius: 20px; background: var(--cream); }
:where(.pg-pkgs) .pkempty[hidden]{ display: none; }
:where(.pg-pkgs) .pkempty > i{ font-size: 34px; color: var(--gold); }
:where(.pg-pkgs) .pkempty h3{ font-family: var(--serif); font-size: 22px; color: var(--heading); margin: 10px 0 6px; }
:where(.pg-pkgs) .pkempty p{ color: var(--muted); max-width: 30em; margin: 0 auto 18px; }
:where(.pg-pkgs) .pkempty__btns{ display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1280px){
  :where(.pg-pkgs) .pkx .pkx__grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* tablet + phone: the sidebar becomes a slide-in panel */
@media (max-width: 1100px){
  :where(.pg-pkgs) .pkx{ grid-template-columns: minmax(0, 1fr); }
  :where(.pg-pkgs) .pkbar__filters{ display: inline-flex; }
  :where(.pg-pkgs) .pkf{
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 270; width: min(88vw, 380px); max-height: none; border-radius: 0 22px 22px 0; border: 0;
    padding-top: var(--safe-t); transform: translateX(-104%); visibility: hidden; box-shadow: 24px 0 60px rgba(0, 0, 0, .25);
    transition: transform .36s cubic-bezier(.22, .8, .25, 1), visibility 0s .36s;
  }
  :where(.pg-pkgs) .pkx.is-open .pkf{ transform: none; visibility: visible; transition: transform .36s cubic-bezier(.22, .8, .25, 1); }
  :where(.pg-pkgs) .pkf__close{ display: grid; place-items: center; }
  :where(.pg-pkgs) .pkf__foot{ display: grid; grid-template-columns: auto 1fr; gap: 10px; flex: none; padding: 12px 16px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: #fff; }
  :where(.pg-pkgs) .pkf__foot .btn{ padding-block: 13px; }
  :where(.pg-pkgs) .pkf-overlay{ position: fixed; inset: 0; z-index: 265; background: rgba(1, 30, 30, .55); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); animation: tl-fade .3s ease; }
  :where(.pg-pkgs) .pkf-overlay[hidden]{ display: none; }
  html.pkf-lock, html.pkf-lock body{ overflow: hidden; }
}
@media (max-width: 640px){
  :where(.pg-pkgs) .pkx .pkx__grid{ grid-template-columns: minmax(0, 1fr); }
  :where(.pg-pkgs) .pkbar{ padding: 10px; gap: 10px; }
  :where(.pg-pkgs) .pkbar__count{ order: 3; flex-basis: 100%; font-size: 13px; padding-left: 4px; }
  :where(.pg-pkgs) .pkbar__sort{ flex: 1; min-width: 0; }
  :where(.pg-pkgs) .pkbar__sort select{ width: 100%; }
  :where(.pg-pkgs) .pkbar__sort span{ display: none; }
}
@media print{
  :where(.pg-pkgs) .pkf, :where(.pg-pkgs) .pkbar, :where(.pg-pkgs) .pkchips{ display: none !important; }
  :where(.pg-pkgs) .pkx{ display: block; }
}
