/* Enclave Bazaar — Islamabad / Rawalpindi homepage rebrand (asset-pack spec).
   Loaded after bazaar.css. New homepage sections use the eb- namespace and the
   shared --be-* design tokens; listing cards reuse .bz-card from bazaar.css. */

/* ── Hero ── */
.eb-hero {
  position: relative;
  background-size: cover;
  background-position: center 40%;
  background-repeat: no-repeat;
  min-height: 440px;
  display: flex;
  align-items: center;
  /* Fallback: gradient + PNG (browsers without image-set) */
  background-image: linear-gradient(90deg, rgba(6, 30, 22, 0.62) 0%, rgba(6, 30, 22, 0.30) 45%, rgba(6, 30, 22, 0.05) 75%), url("../img/rebrand/hero-isb-rwp.png?v=2");
  /* Modern: gradient + optimized WebP (−88% vs PNG) */
  background-image: linear-gradient(90deg, rgba(6, 30, 22, 0.62) 0%, rgba(6, 30, 22, 0.30) 45%, rgba(6, 30, 22, 0.05) 75%), image-set(url("../img/rebrand/hero-isb-rwp.webp?v=2") type("image/webp"), url("../img/rebrand/hero-isb-rwp.png?v=2") type("image/png"));
}
.eb-hero-inner { width: 100%; padding: 56px 16px 84px; }
.eb-hero-copy { max-width: 560px; color: #fff; }
.eb-hero-h1 {
  font-family: var(--be-font-display);
  font-size: clamp(2rem, 4.6vw, 3rem);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-shadow: 0 2px 14px rgba(6, 30, 22, 0.45);
}
.eb-hero-h1 .eb-accent { color: var(--be-accent); }
.eb-hero-sub {
  font-size: 1.08rem;
  line-height: 1.55;
  margin: 0 0 20px;
  max-width: 480px;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 8px rgba(6, 30, 22, 0.4);
}
.eb-hero-badges { display: flex; flex-wrap: wrap; gap: 10px; }
.eb-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Search module (overlaps the hero) ── */
.eb-search {
  position: relative;
  z-index: 3;
  margin: -56px auto 0;
  background: var(--be-surface);
  border: 1px solid var(--be-border);
  border-radius: var(--be-radius-lg);
  box-shadow: var(--be-shadow-hero-search);
  padding: 14px 16px 16px;
}
.eb-search-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--be-border);
  margin-bottom: 14px;
  scrollbar-width: none;
}
.eb-search-tabs::-webkit-scrollbar { display: none; }
.eb-tab {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--be-text-muted);
  text-decoration: none;
  border-bottom: 2.5px solid transparent;
  white-space: nowrap;
}
.eb-tab:hover { color: var(--be-text); }
.eb-tab.is-active { color: var(--be-primary); border-bottom-color: var(--be-primary); }
.eb-search-row { display: flex; gap: 10px; align-items: stretch; position: relative; }
.eb-search-field {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 0 14px;
  background: var(--be-surface);
  border: 1.5px solid var(--be-border);
  border-radius: var(--be-radius-sm);
}
.eb-search-field:focus-within { border-color: var(--be-primary); box-shadow: var(--be-ring); }
.eb-search-ic { color: var(--be-text-muted); flex: 0 0 auto; }
.eb-search-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--be-text);
  font-size: 1rem;
  padding: 13px 0;
}
.eb-search-loc {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px 0 12px;
  background: var(--be-surface);
  border: 1.5px solid var(--be-border);
  border-radius: var(--be-radius-sm);
}
.eb-search-loc select {
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--be-text);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 4px;
  cursor: pointer;
  max-width: 190px;
}
.eb-search-btn { flex: 0 0 auto; padding: 0 26px; border-radius: var(--be-radius-sm); font-size: 1rem; }
.eb-search-pop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.eb-pop-lbl { font-size: 0.82rem; font-weight: 700; color: var(--be-text-muted); }

/* ── Chips (popular tags, areas, trending) ── */
.eb-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px; /* mobile tap-target standard (was ~38px) */
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--be-text-soft);
  text-decoration: none;
  background: var(--be-surface-2);
  border: 1px solid var(--be-border);
  transition: all 0.16s var(--be-ease);
}
.eb-chip:hover { color: var(--be-primary); border-color: var(--be-primary); background: var(--be-primary-soft); }
.eb-chip-more { color: var(--be-primary); }

/* ── Section scaffolding ── */
.eb-home { display: flex; flex-direction: column; gap: 48px; padding: 40px 0 8px; }
.eb-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.eb-sec-head h2 { font-family: var(--be-font-display); font-size: 1.35rem; font-weight: 700; margin: 0; color: var(--be-text); }
.eb-seeall { color: var(--be-primary); font-weight: 600; font-size: 0.92rem; text-decoration: none; white-space: nowrap; }
.eb-seeall:hover { text-decoration: underline; }

/* ── Browse by Category ── */
.eb-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.eb-cat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: var(--be-surface);
  border: 1px solid var(--be-border);
  border-radius: var(--be-radius);
  text-decoration: none;
  transition: transform 0.16s var(--be-ease), box-shadow 0.16s var(--be-ease), border-color 0.16s var(--be-ease);
}
.eb-cat:hover { transform: translateY(-3px); box-shadow: var(--be-shadow-card); border-color: var(--be-primary); }
.eb-cat-ic {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  background: var(--be-primary-soft);
  border-radius: 12px;
}
.eb-cat-tx { display: flex; flex-direction: column; min-width: 0; }
.eb-cat-tx b { font-size: 0.95rem; font-weight: 700; color: var(--be-text); line-height: 1.2; }
.eb-cat-tx small { font-size: 0.78rem; color: var(--be-text-muted); margin-top: 2px; }

/* ── Featured listings ── */
.eb-featured-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }

/* ── Popular areas + trending ── */
.eb-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.eb-panel { background: var(--be-surface); border: 1px solid var(--be-border); border-radius: var(--be-radius); padding: 18px 20px; }
.eb-panel-head { font-family: var(--be-font-display); font-weight: 700; font-size: 1.05rem; color: var(--be-text); margin-bottom: 14px; }
.eb-chips { display: flex; flex-wrap: wrap; gap: 9px; }

/* ── Seller CTA strip ── */
.eb-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(120deg, var(--be-primary-soft) 0%, var(--be-surface) 70%);
  border: 1px solid var(--be-border);
  border-radius: var(--be-radius-lg);
  padding: 26px 28px;
}
.eb-cta-lead { display: flex; align-items: flex-start; gap: 16px; max-width: 560px; }
.eb-cta-ic {
  flex: 0 0 auto;
  width: 54px; height: 54px;
  display: grid; place-items: center;
  font-size: 1.7rem;
  background: var(--be-primary); color: #fff;
  border-radius: 16px;
}
.eb-cta-lead h2 { font-family: var(--be-font-display); font-size: 1.4rem; margin: 0 0 6px; color: var(--be-text); }
.eb-cta-lead p { margin: 0 0 14px; color: var(--be-text-soft); }
.eb-cta-btn { border-radius: var(--be-radius-sm); }
.eb-cta-benefits { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; flex: 1 1 380px; }
.eb-benefit { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.eb-benefit span {
  width: 40px; height: 40px; display: grid; place-items: center;
  font-size: 1.15rem; margin-bottom: 4px;
  background: var(--be-primary-soft); border-radius: 12px;
}
.eb-benefit b { font-size: 0.9rem; color: var(--be-text); }
.eb-benefit small { font-size: 0.78rem; color: var(--be-text-muted); }

/* ── Responsive ── */
@media (max-width: 900px) {
  .eb-panels { grid-template-columns: 1fr; }
  .eb-cta-benefits { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .eb-hero {
    min-height: 360px;
    background-position: center 45%;
    background-image: linear-gradient(90deg, rgba(6, 30, 22, 0.6) 0%, rgba(6, 30, 22, 0.28) 55%, rgba(6, 30, 22, 0.08) 100%), url("../img/rebrand/hero-isb-rwp.png?v=2");
    background-image: linear-gradient(90deg, rgba(6, 30, 22, 0.6) 0%, rgba(6, 30, 22, 0.28) 55%, rgba(6, 30, 22, 0.08) 100%), image-set(url("../img/rebrand/hero-isb-rwp-mobile.webp?v=2") type("image/webp"), url("../img/rebrand/hero-isb-rwp.png?v=2") type("image/png"));
  }
  .eb-hero-inner { padding: 40px 16px 72px; }
  .eb-search { margin-top: -48px; }
  .eb-search-row { flex-wrap: wrap; }
  .eb-search-field { flex: 1 1 100%; order: 1; }
  .eb-search-loc { flex: 1 1 auto; order: 2; }
  .eb-search-loc select { max-width: none; width: 100%; }
  .eb-search-btn { flex: 0 0 auto; order: 3; padding: 12px 22px; }
  .eb-cats { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .eb-cat { flex-direction: column; align-items: flex-start; }
  .eb-featured-row { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .eb-home { gap: 36px; }
}

/* ── Nav region pill ── */
.nav-loc {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--be-text-soft);
  padding: 6px 11px;
  border: 1px solid var(--be-border);
  border-radius: 999px;
  white-space: nowrap;
}
@media (max-width: 1100px) { .nav-loc { display: none; } }

/* ── Footer app-store badges (real store assets — spec: contain, no recolour) ── */
.footer-apps { margin-top: 18px; }
.footer-apps-lbl { display: block; font-size: 0.82rem; font-weight: 700; opacity: 0.92; margin-bottom: 9px; }
.store-badges { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.store-badges--column { flex-direction: column; align-items: flex-start; }
.store-badges a { display: inline-flex; line-height: 0; transition: opacity 0.16s var(--be-ease); }
.store-badges a:hover { opacity: 0.9; }
.store-badges img { display: block; width: auto; object-fit: contain; }
.store-badges--sm img { height: 40px; }
.store-badges--md img { height: 52px; }
.store-badges--lg img { height: 60px; }
@media (max-width: 640px) {
  .store-badges--md img { height: 44px; }
  .store-badges--lg img { height: 48px; }
}
.footer-bottom-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.footer-madein { opacity: 0.9; }


/* ── Shared browse engine: active-filter chips + infinite-scroll status ── */
.bz-active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 14px; }
.bz-active-filters[hidden] { display: none; }
.bz-chip-active {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px; cursor: pointer; font: inherit;
  font-size: 0.86rem; font-weight: 600; line-height: 1;
  color: var(--z-green); background: var(--z-green-light, rgba(15,107,79,.08));
  border: 1px solid color-mix(in srgb, var(--z-green) 30%, transparent);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.bz-chip-active:hover { background: color-mix(in srgb, var(--z-green) 16%, transparent); border-color: var(--z-green); }
.bz-chip-active span { font-size: 0.92em; opacity: 0.7; }
.bz-loadstatus { text-align: center; color: var(--z-muted); font-size: 0.9rem; min-height: 1.4em; margin: 16px 0 6px; }
#bz-browse-sentinel { height: 1px; pointer-events: none; }

/* ── Typeahead panel anchors to the hero search field ── */
.bz-search[data-bz-suggest] { position: relative; }

/* ── Mobile filter sheet ──────────────────────────────────────────────
   Desktop: filter bars stay inline (button + sheet chrome hidden).
   Mobile: the bar collapses behind a "Filters" button and slides up as a
   bottom sheet; live filtering updates results behind it. */
.bz-filter-sheet-btn { display: none; }
.bz-sheet-head, .bz-sheet-x, .bz-sheet-done { display: none; }
.bz-sheet-backdrop { position: fixed; inset: 0; background: rgba(8,16,12,.5); z-index: 60; }
body.bz-sheet-lock { overflow: hidden; }

@media (max-width: 760px) {
  .bz-filter-sheet-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; margin: 2px 0 14px; padding: 12px 16px;
    border: 1px solid var(--z-border); border-radius: 12px;
    background: var(--z-card); color: var(--z-text); font-weight: 700; font-size: 0.95rem; cursor: pointer;
  }
  .bz-filters, .bz-protools { display: none; }
  .bz-filters.bz-sheet-open, .bz-protools.bz-sheet-open {
    display: flex; flex-direction: column; align-items: stretch; gap: 14px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
    max-height: 86vh; overflow-y: auto;
    background: var(--z-card); color: var(--z-text);
    border-radius: 18px 18px 0 0; padding: 6px 18px 22px;
    box-shadow: 0 -18px 50px -12px rgba(0,0,0,.4);
    animation: bzSheetUp 0.22s ease;
  }
  @keyframes bzSheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
  .bz-sheet-open .bz-sheet-head {
    display: flex; align-items: center; justify-content: space-between;
    position: sticky; top: 0; z-index: 1; background: var(--z-card);
    margin: 0 -18px 2px; padding: 8px 18px 12px;
    border-bottom: 1px solid var(--z-border); font-weight: 800; font-size: 1.05rem;
  }
  .bz-sheet-open .bz-sheet-x { display: inline-block; background: none; border: 0; font-size: 1.15rem; line-height: 1; padding: 4px; cursor: pointer; color: var(--z-muted); }
  .bz-sheet-open .bz-filter, .bz-sheet-open .bz-protool { width: 100%; }
  .bz-sheet-open .bz-filter select, .bz-sheet-open .bz-protool select, .bz-sheet-open .bz-price-range { width: 100%; }
  .bz-sheet-open .bz-protools-selects, .bz-sheet-open .bz-protools-toggles { flex-direction: column; align-items: stretch; gap: 12px; width: 100%; }
  .bz-sheet-open .bz-sheet-done {
    display: block; width: 100%; margin-top: 4px; padding: 13px; border: 0; border-radius: 12px;
    background: var(--z-green); color: #fff; font-weight: 800; font-size: 1rem; cursor: pointer;
  }
}

/* ── Light card polish (elevation + image zoom on hover) ── */
.bz-card { transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease; }
@media (hover: hover) {
  .bz-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover, 0 16px 40px rgba(16,24,40,.12)); }
  .bz-card .bz-card-media img { transition: transform 0.35s ease; }
  .bz-card:hover .bz-card-media img { transform: scale(1.045); }
}
.bz-card .bz-card-media { overflow: hidden; }

/* ── Homepage vertical content rails (horizontal scroll) ── */
.eb-rail { display: grid; grid-auto-flow: column; grid-auto-columns: 210px; gap: 16px; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; padding: 2px 2px 12px; scrollbar-width: thin; }
.eb-rail > * { scroll-snap-align: start; }
.eb-rail::-webkit-scrollbar { height: 8px; }
.eb-rail::-webkit-scrollbar-thumb { background: var(--z-border); border-radius: 8px; }
@media (max-width: 640px) { .eb-rail { grid-auto-columns: 158px; gap: 12px; } }

/* ── Rebrand header: keep the 7-item nav on ONE clean row ─────────────────────
   The default .wrap caps the header at 1200px, so 7 nav links + Post + controls
   wrapped onto a 2nd centered row. Tighten the nav and, on wide screens, widen
   the header container + stop wrapping so it reads as a single tidy row. */
@media (min-width: 769px) {
  .top-header .header-nav { gap: 0.15rem; }
  .top-header .header-nav .nav-link { padding: 0.5rem 0.7rem; font-size: 0.86rem; white-space: nowrap; }
  /* Stack the tagline UNDER the wordmark (mockup) instead of inline beside it. */
  .top-header .logo-mark > span { display: flex; flex-direction: column; line-height: 1.12; gap: 1px; }
  .top-header .logo-text { font-size: 1.05rem; }
  .top-header .logo-sub { display: block; margin-left: 0; font-size: 0.6rem; }
  .top-header .logo-img { width: 44px; height: 44px; }
}
@media (min-width: 1160px) {
  .top-header .header-row { width: min(100% - 2.5rem, 1360px); flex-wrap: nowrap; }
  .top-header .header-nav { flex-wrap: nowrap; }
}
