/* =========================
   VyaparKhoj — UI Kit (JD-style)
   Sapphire–Mint Theme (Web + Mobile)
   ========================= */

/* ===== Reset / Base ===== */
* { box-sizing: border-box }
html, body { margin: 0; padding: 0 }
img { max-width: 100%; display: block }
a { text-decoration: none; color: var(--brand) }
a:hover { color: var(--brand2) }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 30%, transparent); outline-offset: 2px }

/* ===== Theme tokens ===== */
:root{
  /* Colors (unique palette) */
  --bg:#f7f9ff; --card:#fff; --ink:#0b1324; --muted:#6b7280;
  --brand:#5b6cff; --brand2:#4f46e5; /* sapphire indigo */
  --accent:#22c55e;                 /* mint accent */

  --border:#e6e9f5; --radius:16px;
  --shadow:0 10px 26px rgba(17,24,39,.06);
  --shadow2:0 16px 38px rgba(17,24,39,.10);

  --maxw:1180px;
  --ok:#10b981; --warn:#f59e0b; --danger:#ef4444;
}

body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg); color:var(--ink); line-height:1.5;
  -webkit-font-smoothing:antialiased; -moz-osx-font-smoothing:grayscale;
  font-size: clamp(14px, 1.6vw, 16px);
  letter-spacing:.01em;
}
.container{ max-width:var(--maxw); margin:0 auto; padding:0 16px }
.link{ font-weight:800 }
.tagline{ color:var(--muted) }

/* ===== Buttons / Inputs ===== */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:10px 14px; border-radius:14px;
  border:1px solid color-mix(in srgb, var(--brand) 18%, #cfe0fb);
  background:#fff; color:#0b2a5a; font-weight:800;
  transition:transform .15s ease, box-shadow .15s ease, background .15s ease;
  cursor:pointer;
}
.btn:hover{ background:#f4f7ff; transform:translateY(-1px) }
.btn.primary{
  background:linear-gradient(180deg, var(--brand) 0%, var(--brand2) 100%);
  color:#fff; border-color:transparent; box-shadow:0 8px 18px rgba(79,70,229,.18)
}
.btn.primary:hover{ filter:saturate(1.05) brightness(1.02) }
.btn.success{
  background:linear-gradient(180deg, #22c55e, #16a34a);
  color:#fff; border-color:transparent; box-shadow:0 8px 18px rgba(34,197,94,.18)
}
.btn.secondary{
  background:linear-gradient(180deg,#fff,#f6f9ff);
  border-color:#dfe6fb; color:#0b2a5a
}
.btn.ghost{ background:#fff }
.btn.sm{ padding:8px 12px; border-radius:10px; font-weight:700 }

.input{
  width:100%; height:46px; border:1px solid var(--border); border-radius:14px;
  padding:0 12px; font-size:15px; background:#fff; color:var(--ink);
}
.input:focus{
  outline:none; box-shadow:0 0 0 3px rgba(91,108,255,.18); border-color:#c7cffd
}

/* ===== Topbar ===== */
.topbar{
  background:rgba(255,255,255,.9); border-bottom:1px solid rgba(79,70,229,.08);
  position:sticky; top:0; z-index:50; backdrop-filter:saturate(160%) blur(8px);
}
.nav{ display:flex; align-items:center; justify-content:space-between; min-height:62px; gap:10px }
.brand{ font-weight:900; color:var(--brand); font-size:20px; white-space:nowrap }
.nav-actions{ display:flex; gap:8px; flex-wrap:wrap }

/* ===== Header (list page) ===== */
.header{ background:#fff; border-bottom:1px solid var(--border); padding:12px 0 }
.header .brand{ color:var(--brand) }

/* ===== Search strip ===== */
.strip{
  background:linear-gradient(180deg,#ffffff 0%, #f2f5ff 100%);
  border-bottom:1px solid #e9edff; padding:14px 0 18px
}
.strip-row{ display:flex; align-items:center; gap:10px }
.strip-search{
  display:grid; grid-template-columns:260px 1fr 120px; gap:10px; width:100%
}
.strip-search .loc,.strip-search .q{ position:relative }
.strip-search .ic{ position:absolute; left:10px; top:50%; transform:translateY(-50%); opacity:.65 }
.strip-search input{ padding-left:34px }
.sbtn{ height:46px; border-radius:14px; border:0; background:var(--brand); color:#fff; font-weight:800; cursor:pointer }
.sbtn:hover{ background:var(--brand2) }
@media (max-width:900px){ .strip-search{ grid-template-columns:1fr } }

/* ===== Hero / Feature tiles row ===== */
.hero-grid{
  display:grid; gap:10px; margin-top:12px;
  grid-template-columns:2.1fr repeat(4,1fr);
}
@media (max-width:980px){
  .hero-grid{
    grid-template-columns:1fr 1fr;
    grid-auto-rows:160px;
  }
}

/* HERO CARD + IMAGE (updated) */
.hero-card{
  position:relative; display:block;
  height:180px; border-radius:18px; overflow:hidden;
  border:1px solid var(--border); box-shadow:0 12px 26px rgba(17,24,39,.08);
  background:#000; /* fallback */
}
@media (max-width:980px){ .hero-card{ height:160px } }

/* old gradient background OFF */
.hero-card::before{
  content:none !important;
  display:none !important;
}

/* real image from <img class="hero-card-bg"> */
.hero-card-bg{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  transform:scale(1.02);
  filter:brightness(0.9);
  transition:transform .25s ease, filter .25s ease;
}
.hero-card:hover .hero-card-bg{
  transform:scale(1.06);
  filter:brightness(1);
}

.hero-card .label{
  position:absolute; left:14px; bottom:14px; right:14px; color:#fff; z-index:2;
}
.hero-card .label b{
  font-size: clamp(16px, 2.4vw, 20px);
  text-shadow:0 2px 6px rgba(0,0,0,.55);
}
.hero-card .label small{
  display:block; opacity:.9;
  text-shadow:0 1px 4px rgba(0,0,0,.55);
}

/* ===== Mini icon categories (scrollable) ===== */
.mini-wrap{ display:flex; gap:14px; flex-wrap:wrap; margin-top:12px }
.mini-scroll{ display:flex; gap:14px; overflow:auto; padding-bottom:6px; scroll-snap-type:x mandatory }
.mini{
  width:96px; scroll-snap-align:start;
  display:flex; flex-direction:column; align-items:center; gap:8px;
  background:#fff; border:1px solid var(--border); border-radius:14px;
  padding:10px 8px; text-align:center; box-shadow:0 6px 16px rgba(2,6,23,.05);
}
.mini:hover{ border-color:#bcd8ff }
.mini .i{ font-size:26px; line-height:1 }
.mini .t{ font-size:12px; font-weight:800; color:#0b2a5a }

/* ===== Sections / Headings ===== */
.page{ padding:18px 0 26px }
.sec-head{ display:flex; align-items:center; justify-content:space-between; margin:0 0 10px }
.sec-head h2{ margin:0; font-size:18px; color:#0b2a5a }

/* ===== Slider (horizontal cards) ===== */
.slider{
  --gap:12px;
  display:grid; grid-auto-flow:column;
  grid-auto-columns:calc(100%/3 - var(--gap));
  gap:var(--gap); overflow:auto; padding-bottom:6px; scroll-snap-type:x mandatory;
}
.slider > *{ scroll-snap-align:start }
@media (max-width:900px){ .slider{ grid-auto-columns:70% } }
@media (max-width:640px){ .slider{ grid-auto-columns:86% } }

/* ===== Card ===== */
.card{
  background:var(--card); border:1px solid var(--border); border-radius:16px;
  box-shadow:var(--shadow); overflow:hidden; transition:transform .15s ease, box-shadow .15s ease;
}
.card:hover{ transform:translateY(-3px); box-shadow:var(--shadow2) }
.p{ padding:12px }
.title{ margin:0 0 6px; color:#0b2a5a; font-weight:800; letter-spacing:-.005em }
.kicker{ color:var(--muted); font-size:13px }

.badge{
  display:inline-flex; gap:6px; align-items:center;
  background:#f1f5ff; border:1px solid #e3e8ff; border-radius:999px;
  padding:4px 8px; font-size:12px; margin-right:6px; white-space:nowrap; color:#334155;
}
.badge.ok{ background:#eafff3; border-color:#c0f2d4; color:#0f7a45 }
.badge.warn{ background:#fff6ec; border-color:#ffd9b6; color:#a8610b }

.thumb{
  width:100%; aspect-ratio:16/9; object-fit:cover; background:#eef2ff;
}
.ph{ display:grid; place-items:center; width:100%; aspect-ratio:16/9;
  background:linear-gradient(135deg,#e8f1ff,#fff) }
.ph-txt{ font-weight:800; color:#0b2a5a; opacity:.8 }

/* ===== Chips / Quick shortcuts ===== */
.chips{ display:flex; gap:10px; flex-wrap:wrap }
.chip{
  display:inline-flex; align-items:center; gap:8px; padding:8px 12px;
  background:#fff; border:1px dashed #d6e2ff; border-radius:12px; font-weight:700;
}
.chip:hover{ border-style:solid; border-color:#b9c8ff; background:linear-gradient(180deg,#fff,#f6f9ff) }

/* ===== Category grid (compact cards) ===== */
.cat-grid{
  display:grid; grid-template-columns:repeat(5,minmax(0,1fr));
  gap:12px; margin-top:8px;
}
@media (max-width:1200px){ .cat-grid{grid-template-columns:repeat(4,1fr)} }
@media (max-width:900px){  .cat-grid{grid-template-columns:repeat(3,1fr)} }
@media (max-width:600px){  .cat-grid{grid-template-columns:repeat(2,1fr)} }

.cat-card{
  display:flex; flex-direction:column; align-items:center; justify-content:center;
  height:110px; text-align:center;
  background:#fff; color:var(--ink);
  border:1px solid var(--border); border-radius:14px;
  box-shadow:var(--shadow); padding:10px; text-decoration:none;
}
.cat-card .ico{ font-size:28px; line-height:1 }
.cat-card .nm{ margin-top:6px; font-weight:800; color:#0b2a5a }
.cat-card:hover{ border-color:#bcd8ff; transform:translateY(-1px) }

/* ===== CTA + footer ===== */
.cta{
  display:flex; align-items:center; justify-content:space-between;
  background:linear-gradient(135deg,#eaf2ff,#fff);
  border:1px solid var(--border); border-radius:16px; padding:16px; margin-top:18px
}
@media (max-width:760px){ .cta{ flex-direction:column; align-items:flex-start; gap:10px } }
.hl{ color:var(--brand) }
.sub{ color:#667085; margin:6px 0 0 }
.cta-actions{ display:flex; gap:8px; flex-wrap:wrap }

.footer{
  text-align:center; color:#667085; background:#fff;
  border-top:1px solid rgba(79,70,229,.12); padding:22px 16px; margin-top:18px
}
.empty{
  background:#fff; border:1px dashed #cfe0fb; border-radius:12px; padding:16px; color:#667085
}

/* ===== Utilities ===== */
.grid{ display:grid; gap:12px }
.grid-2{ grid-template-columns:repeat(2,1fr) }
.grid-3{ grid-template-columns:repeat(3,1fr) }
.grid-4{ grid-template-columns:repeat(4,1fr) }
@media (max-width:980px){ .grid-3,.grid-4{ grid-template-columns:repeat(2,1fr) } }
@media (max-width:640px){ .grid-2,.grid-3,.grid-4{ grid-template-columns:1fr } }

/* === All Listings grid (5-up desktop, responsive) === */
.grid-listings{
  display:grid; gap:12px; grid-template-columns:repeat(5, minmax(0,1fr));
}
@media (max-width:1200px){ .grid-listings{ grid-template-columns:repeat(4,1fr) } }
@media (max-width:992px){  .grid-listings{ grid-template-columns:repeat(3,1fr) } }
@media (max-width:700px){  .grid-listings{ grid-template-columns:repeat(2,1fr) } }
@media (max-width:480px){  .grid-listings{ grid-template-columns:1fr } }

/* Mobile compact tweaks */
@media (max-width:700px){
  .title{ font-size: clamp(15px, 4.6vw, 18px) }
  .kicker{ font-size:12.5px }
  .p{ padding:10px }
  .badge{ font-size:11.5px }
}

/* ===== Filters / toolbar (list page) ===== */
.toolbar{
  background:#fff; border:1px solid var(--border); border-radius:16px;
  padding:12px; box-shadow:var(--shadow); margin:14px 0;
}
.toolbar.sticky{ position:sticky; top:70px; z-index:40 }
.tools{
  display:grid; grid-template-columns:2fr 1fr 1fr auto auto auto 120px;
  gap:10px; align-items:center;
}
@media (max-width:1100px){ .tools{ grid-template-columns:1fr 1fr 1fr auto auto } }
@media (max-width:800px){  .tools{ grid-template-columns:1fr 1fr auto } }
.chk{ display:inline-flex; align-items:center; gap:6px; font-size:14px; color:#0b2a5a }

/* ===== Skeleton (optional) ===== */
.skel{ position:relative; overflow:hidden; background:#eef2ff; border-radius:12px }
.skel::after{
  content:""; position:absolute; inset:0;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.54),transparent);
  transform:translateX(-100%); animation:skel 1.2s linear infinite;
}
@keyframes skel{ to{ transform:translateX(100%) } }

/* ===== Optional: subtle dark support ===== */
@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b1220; --card:#121a2b; --ink:#e5ecff; --muted:#9aa3b2;
    --border:#1d2740;
    --shadow:0 10px 26px rgba(0,0,0,.35);
    --shadow2:0 16px 38px rgba(0,0,0,.45);
  }
  .topbar{ background:rgba(13,19,35,.85); border-bottom:1px solid rgba(91,108,255,.18) }
  .strip{ background:linear-gradient(180deg,#0f1628,#0b1220); border-bottom:1px solid #1d2740 }
  .card,.cat-card,.cta,.toolbar{ background:var(--card); border-color:var(--border) }
  .chip{ background:transparent }
  .badge{ background:#14203a; border-color:#213155; color:#c9d4ee }
  .footer{ background:#0f1628; border-top-color:#1d2740; color:#a9b3c7 }
}
