/*
 * IP shared chrome: site header, search bar (+ the phone sheets), homepage hero and stats band.
 * Handoff "IP - Global Header, Search, Hero & Results Page (Responsive)", 2026-10-05, built from the approved
 * boards (canvas "IP Homepage Header + Search - Options": A5 desktop / tablet / mobile + menu + sheets).
 *
 * Replaces the old header (#header .menu-nav ..., outlined Nav Tabs, flag toggle, dark surface-inverse search band,
 * "Popularne" row on desktop, in-place phone expansion) that used to live in web.css. Tokens only - every value comes
 * from public/css/tokens.css (the 2026-10-05 block at its end holds the new ones). Loaded on every public page after
 * web.css (web.layouts.header).
 *
 * Breakpoints (CSS variables cannot be used in @media): desktop >= 1024px, tablet 700-1023px, phone < 700px.
 * The header navigation never wraps: below 1024px the links are in the Menu panel.
 */

/* ===== Header ===== */
.ipc-header {
  position: sticky;
  top: 0;
  z-index: 9999;
  background: var(--surface);
  font-family: var(--font-sans);
  color: var(--ink);
}
.ipc-header__rule { height: 4px; background: var(--brand-red); }
.ipc-header__row { position: relative; background: var(--surface); }
.ipc-header__inner {
  box-sizing: border-box;
  max-width: var(--header-max);
  margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
}
.ipc-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-height: 44px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}
/* The logo image is the site's own file, never redrawn: 259px wide, 182px on phones (the old header's widths). */
.ipc-logo__img { display: block; width: 259px; max-width: 100%; height: auto; transition: opacity 0.3s ease-in-out; }
.ipc-logo:hover .ipc-logo__img { opacity: 0.6; }
.ipc-header__right { display: flex; align-items: center; gap: 28px; }

/* PL | EN - text only, no flags, at every width */
.ipc-lang {
  flex: none;
  display: flex;
  box-sizing: border-box;
  padding: 3px;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}
.ipc-lang__seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 38px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  text-decoration: none;
}
.ipc-lang__seg:hover { background: var(--button-secondary-fill); color: var(--ink); text-decoration: none; }
.ipc-lang__seg[aria-current="true"] { background: var(--button-secondary-fill); color: var(--brand-blue); }

/* Navigation: plain bold text links, no boxes */
.ipc-nav { display: flex; align-items: center; gap: 28px; }
.ipc-nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.3;
  text-decoration: none;
}
.ipc-nav__link:hover,
.ipc-nav__link:focus-visible {
  color: var(--brand-blue);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}
.ipc-nav__link[aria-current="page"] { color: var(--brand-blue); }
.ipc-nav__link--add { color: var(--brand-blue); }
.ipc-nav__link--add:hover,
.ipc-nav__link--add:focus-visible { color: var(--brand-blue-dark); }
.ipc-nav__link i { font-size: 18px; line-height: 1; }

/* Menu button: only below 1024px */
.ipc-menu-btn {
  display: none;
  flex: none;
  box-sizing: border-box;
  width: 44px;
  height: 44px;
  padding: 0;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--ink);
  font-size: 24px;
  cursor: pointer;
}
.ipc-menu-btn:hover { background: var(--button-secondary-fill); }
.ipc-menu-btn[aria-expanded="true"] { background: var(--button-secondary-fill); }
.ipc-menu-btn i { line-height: 1; }
.ipc-menu-btn__close { display: none; }
.ipc-menu-btn[aria-expanded="true"] .ipc-menu-btn__open { display: none; }
.ipc-menu-btn[aria-expanded="true"] .ipc-menu-btn__close { display: inline-block; }

.ipc-menu-btn:focus-visible,
.ipc-lang__seg:focus-visible,
.ipc-logo:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

@media (max-width: 1023px) {
  .ipc-header__right { gap: 12px; }
  .ipc-menu-btn { display: flex; }
  /* The four links become a panel under the header row, full width. The nav is positioned against .ipc-header__row
     (nothing between them is positioned). */
  .ipc-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 6;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--elevation-menu);
  }
  .ipc-nav.is-open { display: flex; }
  .ipc-nav__link {
    min-height: 56px;
    padding: 0 var(--space-6);
    font-size: 18px;
    border-bottom: 1px solid var(--menu-separator);
  }
  .ipc-nav__link:last-child { border-bottom: 0; }
}
@media (max-width: 767px) {
  .ipc-logo__img { width: 182px; }
}
@media (max-width: 699px) {
  .ipc-header__inner { padding: 10px var(--space-4); }
  .ipc-header__right { gap: var(--space-2); }
  .ipc-lang__seg { min-width: 40px; font-size: 14px; }
  .ipc-nav__link { min-height: 52px; padding: 0 var(--space-4); font-size: 17px; }
}

/* ===== Search bar: white pill (+ AI pill outside it) =====
   One markup (web/partials/search-bar.blade.php) in two homes: the white band under the header on inner pages
   (.ipc-band) and the hero on the homepage (.ipc-hero). Sizes: desktop 64px, tablet 56px, phone 48px. */
.ip-search-band { font-family: var(--font-sans); }
.ip-search-band__inner { box-sizing: border-box; max-width: var(--container-max); margin: 0 auto; }

/* Inner pages: white band, 1px divider on top (the line under the header), border + soft shadow under */
.ip-search-band.ipc-band {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--elevation-band);
  padding: var(--space-4) var(--space-6);
}

.ip-search-row { display: flex; align-items: center; gap: var(--space-5); }
.ip-search {
  --ipc-pill-shadow: var(--elevation-search-band);
  position: relative; /* containing block for #keyList and the location panel */
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 5px 5px 5px var(--space-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: var(--ipc-pill-shadow);
}
.ipc-hero .ip-search { --ipc-pill-shadow: var(--elevation-search); }
.ip-search:focus-within {
  box-shadow: 0 0 0 2px var(--focus-ring-inner), 0 0 0 4px var(--focus-ring), var(--ipc-pill-shadow);
}
.ip-search__card { display: contents; }
.ip-search__q-wrap { flex: 2 1 0; min-width: 0; height: 100%; display: flex; align-items: center; }
.ip-search__q-icon { display: none; }
.ip-search__q {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: 400 18px/24px var(--font-sans);
  color: var(--ink);
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}
.ip-search__q::placeholder { color: var(--ink-muted); opacity: 1; }
.ip-search__q::-webkit-search-cancel-button { -webkit-appearance: none; }
.ip-search__clear {
  flex: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
  color: var(--ink-muted);
  font-size: 20px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}
/* jQuery .show() leaves display to the stylesheet; [hidden] must still win while the field is empty. */
.ip-search__clear:not([hidden]):not([style*="display: none"]) { display: inline-flex; }
.ip-search__clear[hidden] { display: none; }
.ip-search__clear:hover { color: var(--ink); }
.ip-search__divider { flex: none; width: 1px; height: 36px; margin: 0 14px; background: var(--border); }

.ip-search__loc { position: relative; flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: center; }
.ip-search__loc-btn {
  flex: 1 1 auto;
  min-width: 0;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  font: 400 18px/24px var(--font-sans);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.ip-search__loc-btn i { flex: none; font-size: 22px; color: var(--ink-muted); }
.ip-search__loc-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-muted);
}
.ip-ph-short { display: none; }
.location-picker-wrap.location-active .ip-search__loc-label { color: var(--ink); }
.ip-search__loc-clear {
  display: none;
  flex: none;
  margin-left: var(--space-1);
  border: 0;
  background: none;
  color: var(--ink-muted);
  font-size: 16px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}
.ip-search__loc-clear:hover { color: var(--ink); }
.location-picker-wrap.location-active .ip-search__loc-clear { display: inline-flex; }

/* Szukaj: success green, inside the pill */
.ip-search__submit {
  flex: none;
  height: 52px;
  min-width: 152px;
  margin-left: var(--space-2);
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--button-success-fill);
  color: var(--ink-inverse);
  font: 700 18px/1 var(--font-sans);
  cursor: pointer;
}
.ip-search__submit i { font-size: 22px; line-height: 1; }
.ip-search__submit:hover { background: var(--button-success-hover); }
.ip-search__submit:active { background: var(--button-success-active); }
.ip-search__loc-btn:focus-visible,
.ip-search__loc-clear:focus-visible,
.ip-search__clear:focus-visible,
.ip-search__submit:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

/* The phone pill, the sheet header and the Popular chips only exist on phones */
.ip-search-pill,
.ip-search-head,
.location-picker-head,
.ip-popular { display: none; }
.ip-search-modal { display: contents; }

/* AI button, outside the pill (desktop / tablet) and as the round pill button (phone) */
.ai-search-trigger--band {
  flex: none;
  height: 52px;
  min-width: 96px;
  padding: 0 var(--space-5);
  gap: 6px;
  border-radius: var(--radius-pill);
  background: var(--button-ai-fill);
  color: var(--brand-blue);
  font-size: 18px;
  line-height: 1;
  box-shadow: var(--ipc-pill-shadow, var(--elevation-search-band));
}
.ipc-hero .ai-search-trigger--band { box-shadow: var(--elevation-search); }
.ai-search-trigger--band:hover { background: var(--button-ai-hover); }
.ai-search-trigger--band i { font-size: 24px; }
.ai-search-trigger__full { display: none; }
.ai-search-trigger__short { display: inline; }

/* ===== Location dropdown (desktop / tablet): under the location field ===== */
.location-picker-panel {
  display: none;
  position: absolute;
  top: calc(100% + var(--space-2));
  right: 0;
  min-width: 320px;
  z-index: 999;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--elevation-2);
  overflow: hidden;
}
.location-picker-panel.open { display: block; }
.location-picker-search {
  width: 100% !important;
  height: 44px !important;
  padding: 0 var(--space-5) !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  font: 15px/1.3 var(--font-sans) !important;
  color: var(--ink) !important;
}
.location-picker-search:focus { outline: none !important; box-shadow: inset 0 0 0 2px var(--focus-ring) !important; }
.location-picker-locate {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  width: 100%;
  padding: 14px var(--space-5);
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface-100);
  font: 14px/1.3 var(--font-sans);
  color: var(--ink);
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.location-picker-locate:hover { background: var(--button-secondary-hover); }
.location-picker-locate i { flex: none; color: var(--ink-muted); }
.location-picker-status {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  font-size: 12px;
  font-weight: normal;
  color: var(--ink-muted);
}
.location-picker-status .ph-spinner { color: var(--ink-muted); line-height: 1; }
.location-picker-list { list-style: none; margin: 0; padding: 0; max-height: 280px; overflow-y: auto; }
.location-picker-list li {
  padding: 12px var(--space-5);
  font: 14px/1.3 var(--font-sans);
  color: var(--ink);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.location-picker-list li:last-child { border-bottom: 0; }
.location-picker-list li:hover { background: var(--surface-100); }

/* ===== Tablet 700-1023 ===== */
@media (max-width: 1023px) {
  .ip-search-band.ipc-band { padding: 14px var(--space-6); }
  .ip-search-row { gap: var(--space-4); }
  .ip-search { height: 56px; padding: 4px 4px 4px var(--space-5); }
  .ip-search__q-wrap { flex: 3 1 0; }
  .ip-search__loc { flex: 2 1 0; }
  .ip-search__q,
  .ip-search__loc-btn { font-size: 16px; }
  .ip-search__divider { height: 30px; margin: 0 12px; }
  .ip-search__loc-btn i { font-size: 20px; gap: var(--space-2); }
  .ip-search__loc-btn { gap: var(--space-2); }
  .ip-search__submit { height: 46px; min-width: 116px; padding: 0 var(--space-5); font-size: 16px; }
  .ip-search__submit i { font-size: 20px; }
  .ai-search-trigger--band { height: 46px; min-width: 84px; padding: 0 var(--space-4); font-size: 16px; }
  .ai-search-trigger--band i { font-size: 22px; }
}

/* ===== Inner pages: MEDIUM search bar (owner, 2026-10-05: "the search bar on every page except the homepage should be
   smaller, medium size buttons") =====
   The homepage hero keeps the large bar (64 / 56px, 52 / 46px buttons). Everywhere else - the white band under the
   header: category, subcategory, search results, listing, Kontakt, plans, login ... - the bar is 54px and Szukaj / AI
   are 42px (the compact sizes the owner approved earlier), on desktop and tablet alike. Phones are unchanged (48px pill
   with 40px round buttons, the same on every page). */
@media (min-width: 700px) {
  .ip-search-band.ipc-band { padding: var(--space-3) var(--space-6); }
  .ipc-band .ip-search { height: 54px; padding: 6px 6px 6px var(--space-5); }
  .ipc-band .ip-search__q,
  .ipc-band .ip-search__loc-btn { font-size: 16px; }
  .ipc-band .ip-search__divider { height: 30px; margin: 0 12px; }
  .ipc-band .ip-search__loc-btn i { font-size: 20px; }
  .ipc-band .ip-search__loc-btn { gap: var(--space-2); }
  .ipc-band .ip-search__submit { height: 42px; min-width: 0; padding: 0 var(--space-5); font-size: 16px; }
  .ipc-band .ip-search__submit i { font-size: 20px; }
  .ipc-band .ai-search-trigger--band { height: 42px; min-width: 0; padding: 0 var(--space-4); font-size: 16px; }
  .ipc-band .ai-search-trigger--band i { font-size: 20px; }
  .ipc-band .ip-search__clear { width: 36px; height: 36px; font-size: 18px; }
}

/* ===== Phone < 700: pill with three round buttons; search / AI / location open SHEETS ===== */
:root { --ip-sheet-gap: 16px; }
@media (max-width: 699px) {
  .ip-search-band.ipc-band { padding: 10px var(--space-4) 12px; }
  .ip-search-row { display: contents; }
  .ai-search-trigger--band { display: none; }

  /* collapsed pill */
  .ip-search-pill {
    --ipc-pill-shadow: var(--elevation-search-band);
    box-sizing: border-box;
    height: 48px;
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 3px 3px 3px var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--ipc-pill-shadow);
  }
  .ipc-hero .ip-search-pill { box-shadow: var(--elevation-search); }
  .ip-search-pill__open {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: left;
    font: 400 16px/24px var(--font-sans);
    color: var(--ink);
    cursor: pointer;
  }
  .ip-search-pill__open--empty { color: var(--ink-muted); }
  .ip-search-pill__text { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ip-search-pill__loc,
  .ai-search-trigger--pill,
  .ip-search-pill__go {
    flex: none;
    width: 40px;
    height: 40px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-pill);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
  }
  .ip-search-pill__loc { background: var(--surface); border: 1px solid var(--border); color: var(--ink-muted); }
  .ip-search-pill__loc:hover { background: var(--button-secondary-fill); }
  .ai-search-trigger--pill { display: inline-flex; background: var(--button-ai-fill); color: var(--brand-blue); border: 0; }
  .ai-search-trigger--pill:hover { background: var(--button-ai-hover); }
  .ip-search-pill__go { background: var(--button-success-fill); color: var(--ink-inverse); border: 0; }
  .ip-search-pill__go:hover { background: var(--button-success-hover); }
  .ip-search-pill__go:active { background: var(--button-success-active); }
  .ip-search-pill__open:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; border-radius: var(--radius-pill); }
  .ip-search-pill__loc:focus-visible,
  .ip-search-pill__go:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

  /* ---- Sheets (modal): inset 16px from every edge, radius 28, padding 24, page dimmed with the scrim ---- */
  body.ip-modal-open { overflow: hidden; }
  .ip-search-band.is-expanded::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: var(--scrim);
  }
  .ip-search-modal { display: none; }
  .ip-search-band.is-expanded .ip-search-modal {
    display: block;
    position: fixed;
    top: calc(var(--ip-sheet-gap) + env(safe-area-inset-top, 0px));
    left: var(--ip-sheet-gap);
    right: var(--ip-sheet-gap);
    z-index: 10001;
    box-sizing: border-box;
    max-height: calc(100vh - 2 * var(--ip-sheet-gap) - env(safe-area-inset-top, 0px));
    max-height: calc(100dvh - 2 * var(--ip-sheet-gap) - env(safe-area-inset-top, 0px));
    overflow-y: auto;
    padding: var(--space-5);
    background: var(--surface);
    border-radius: 28px;
    box-shadow: var(--elevation-sheet);
    color: var(--ink);
  }
  .ip-search-head,
  .location-picker-head {
    display: none;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
  }
  .ip-search-band.is-expanded .ip-search-head { display: flex; }
  .ip-search-head__title,
  .location-picker-head__title {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 26px;
    line-height: 32px;
    color: var(--ink);
  }
  .ip-search-head__title:focus,
  .location-picker-head__title:focus { outline: none; }
  .ip-search-head__collapse,
  .location-picker-head .ipflow-dialog-close {
    flex: none;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    font-size: 22px;
  }

  /* inside the Szukaj sheet the form is a card of two 44px rows + a full-width green button */
  .ip-search {
    display: none;
    height: auto;
    padding: 0;
    flex-direction: column;
    align-items: stretch;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .ip-search-band.is-expanded .ip-search { display: flex; }
  .ip-search:focus-within { box-shadow: none; }
  .ip-search__card {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--space-5);
    overflow: hidden;
  }
  .ip-search__q-wrap { flex: none; height: 44px; padding: 0 var(--space-4); gap: var(--space-2); border-bottom: 1px solid var(--border); }
  .ip-search__q-icon { display: inline-flex; flex: none; font-size: 20px; color: var(--ink-muted); }
  .ip-search__q { font-size: 16px; }
  .ip-search__clear { width: 36px; height: 36px; font-size: 18px; }
  .ip-search__divider { display: none; }
  .ip-search__loc { flex: none; height: 44px; padding: 0 var(--space-4); }
  .ip-search__loc-btn { font-size: 16px; gap: var(--space-2); }
  .ip-search__loc-btn i { font-size: 20px; }
  .ip-ph-long { display: none; }
  .ip-ph-short { display: inline; }
  .ip-search__submit {
    width: 100%;
    height: 48px;
    min-width: 0;
    margin: var(--space-4) 0 0;
    font-size: 16px;
  }
  .ip-search__submit i { font-size: 20px; }

  /* Popular chips - phone Szukaj sheet only */
  .ip-search-band.is-expanded .ip-popular {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding: 0;
  }
  .ip-popular__label { flex: none; font-size: 14px; color: var(--ink-muted); margin-right: var(--space-1); }
  .ip-popular__track { display: flex; flex-wrap: wrap; gap: var(--space-2); }
  .ip-popular a {
    display: inline-flex;
    align-items: center;
    height: 40px;
    box-sizing: border-box;
    padding: 0 18px;
    border-radius: var(--radius-pill);
    background: var(--button-secondary-fill);
    color: var(--brand-blue-dark);
    font-size: 16px;
    text-decoration: none;
    white-space: nowrap;
  }
  .ip-popular a:hover { background: var(--button-secondary-hover); }
  .ip-popular a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .ip-search-band .simple-modal-overlay { z-index: 10100; }

  /* ---- Lokalizacja sheet: stretches to the bottom gap, only the list scrolls ---- */
  .ip-search-band.is-locating .ip-search-modal { visibility: hidden; }
  .location-picker-panel,
  .ip-search__loc.location-active .location-picker-panel {
    position: fixed;
    top: calc(var(--ip-sheet-gap) + env(safe-area-inset-top, 0px));
    left: var(--ip-sheet-gap);
    right: var(--ip-sheet-gap);
    bottom: var(--ip-sheet-gap);
    z-index: 10002;
    box-sizing: border-box;
    min-width: 0;
    padding: var(--space-5);
    background: var(--surface);
    border-radius: 28px;
    box-shadow: var(--elevation-sheet);
    overflow: hidden;
    visibility: visible;
  }
  .location-picker-panel.open { display: flex; flex-direction: column; }
  .location-picker-panel.open .location-picker-head { display: flex; }
  .location-picker-search {
    flex: none;
    height: 44px !important;
    padding: 0 var(--space-4) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    font-size: 16px !important;
  }
  .location-picker-locate {
    flex: none;
    width: 100%;
    height: 44px;
    margin-top: var(--space-3);
    padding: 0 var(--space-4);
    border: 0;
    border-radius: 14px;
    background: var(--button-secondary-fill);
    color: var(--brand-blue-dark);
    font: 700 17px/1.2 var(--font-sans);
  }
  .location-picker-locate i { color: var(--brand-blue-dark); }
  .location-picker-list { flex: 1 1 auto; min-height: 0; max-height: none; margin-top: var(--space-3); -webkit-overflow-scrolling: touch; }
  .location-picker-list li { min-height: 44px; display: flex; align-items: center; font-size: 18px; }
}

/* ===== Type-ahead under the keyword field (unchanged behaviour) ===== */
.keySug { z-index: 999; }

/* ===== Homepage hero + stats band ===== */
.ipc-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  background-color: var(--surface-page);
  background-image: url('../images/hero/chicago-skyline.jpg');
  background-image: image-set(url('../images/hero/chicago-skyline.webp') type('image/webp'), url('../images/hero/chicago-skyline.jpg') type('image/jpeg'));
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center 52%;
  font-family: var(--font-sans);
  color: var(--ink);
}
/* Decorative overlay. The bottom MUST stay 0% so the photo shows its original colours. */
.ipc-hero__overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--hero-overlay-top) 0%, var(--hero-overlay-mid) 50%, var(--hero-overlay-bottom) 100%);
}
.ipc-hero__content {
  position: relative;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 40px var(--space-6) 168px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ipc-hero__title {
  margin: 0;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 40px;
  line-height: 48px;
  color: var(--ink);
}
.ipc-hero__intro { margin: var(--space-2) 0 0; font-size: 20px; line-height: 28px; color: var(--ink); }
.ipc-hero .ip-search-band { width: 100%; margin-top: var(--space-5); text-align: left; }
.ipc-hero .ip-search-band__inner { max-width: none; }

.ipc-stats { position: relative; margin-top: auto; background: var(--stats-band-bg); border-top: 1px solid var(--border); }
.ipc-stats__inner {
  box-sizing: border-box;
  max-width: var(--container-max);
  min-height: 52px;
  margin: 0 auto;
  padding: 6px var(--space-6);
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
.ipc-stats__promo {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--brand-blue-dark);
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
}
.ipc-stats__promo:hover { text-decoration: underline; text-underline-offset: 4px; }
.ipc-stats__promo i { font-size: 16px; }
.ipc-stats__sep { flex: none; width: 1px; height: 20px; background: var(--stats-divider); }
.ipc-stats__item { display: flex; align-items: baseline; gap: var(--space-2); white-space: nowrap; color: var(--ink); text-decoration: none; }
.ipc-stats__figure { font-family: var(--font-heading); font-weight: 600; font-size: 18px; line-height: 24px; }
.ipc-stats__label { font-size: 15px; line-height: 20px; }
.ipc-stats a:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

@media (max-width: 1023px) {
  .ipc-hero { background-position: center 60%; }
  .ipc-hero__content { padding: 44px var(--space-6) 80px; }
  .ipc-hero__title { font-size: 36px; line-height: 44px; max-width: 620px; }
  .ipc-hero__intro { margin-top: 10px; font-size: 19px; }
  .ipc-hero .ip-search-band { margin-top: 28px; }
  .ipc-stats__inner { min-height: 48px; padding: 4px var(--space-6); gap: var(--space-5); }
  .ipc-stats__promo { min-height: 44px; font-size: 14px; }
  .ipc-stats__sep { height: 18px; }
  .ipc-stats__item { gap: 6px; }
  .ipc-stats__figure { font-size: 16px; line-height: 20px; }
  .ipc-stats__label { font-size: 14px; line-height: 18px; }
}
@media (max-width: 699px) {
  .ipc-hero__content { padding: 28px var(--space-4) 40px; }
  .ipc-hero__title { font-size: 27px; line-height: 34px; max-width: none; }
  .ipc-hero__intro { font-size: 16px; line-height: 24px; }
  .ipc-hero .ip-search-band { margin-top: var(--space-4); }
  .ipc-hero .ip-search-band { margin-top: 20px; }
  /* phone: stats removed, only the Promocja Biznesu link stays */
  .ipc-stats__inner { min-height: 52px; padding: 4px var(--space-4); }
  .ipc-stats__promo { min-height: 44px; font-size: 16px; }
  .ipc-stats__sep,
  .ipc-stats__item { display: none; }
}
