/* Amravati Mali Business Group - directory styles.
   Mobile-first. No web fonts, no external requests: the whole page is one HTML
   file plus this sheet, so Cloudflare Pages serves it as free static assets. */

:root {
  --red: #c1272d;
  --red-dark: #96131a;
  --saffron: #e8871e;
  --green: #17803d;

  --ink: #1c1614;
  --ink-soft: #5d534e;
  --ink-faint: #8b807a;
  --bg: #fbf7f2;
  --surface: #ffffff;
  --line: #e8ded3;
  --chip: #f3ebe1;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 22, 20, .06), 0 4px 14px rgba(28, 22, 20, .05);
  --shadow-lift: 0 2px 6px rgba(28, 22, 20, .09), 0 12px 28px rgba(28, 22, 20, .10);

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* Devanagari: rely on the fonts every Android/iOS/Windows device already ships.
     Downloading a Devanagari webfont would cost ~100 KB for no legibility gain. */
  --deva: "Noto Sans Devanagari", "Nirmala UI", "Mangal", "Kohinoor Devanagari",
          "Samyak Devanagari", "Lohit Devanagari", system-ui, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f2ece6;
    --ink-soft: #b9aea6;
    --ink-faint: #8d8079;
    --bg: #16110f;
    --surface: #211a17;
    --line: #372c26;
    --chip: #2c231e;
    --red: #ef4d4d;
    --red-dark: #ff6b6b;
    --green: #34c76a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3);
    --shadow-lift: 0 2px 6px rgba(0, 0, 0, .5), 0 12px 28px rgba(0, 0, 0, .45);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

:lang(mr), .mr { font-family: var(--deva); }

a { color: var(--red); }

/* ---------- header ---------- */

.masthead {
  background: linear-gradient(135deg, var(--red-dark), var(--red) 60%, var(--saffron));
  color: #fff;
  padding: 22px 16px 20px;
  text-align: center;
}
.masthead h1 {
  font-family: var(--deva);
  margin: 0;
  font-size: clamp(1.35rem, 5.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -.01em;
}
.masthead p {
  margin: 4px 0 0;
  font-size: .875rem;
  opacity: .9;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.cta-row {
  display: grid;
  gap: 10px;
  max-width: 620px;
  margin: 18px auto 0;
}
@media (min-width: 560px) { .cta-row { grid-template-columns: 1fr 1fr; } }

.cta {
  display: block;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .14);
  border: 1.5px solid rgba(255, 255, 255, .5);
  color: #fff;
  font-weight: 600;
  font-size: .9375rem;
  text-decoration: none;
  transition: background .15s, transform .15s;
}
.cta:hover { background: rgba(255, 255, 255, .26); }
.cta:active { transform: scale(.98); }
.cta--solid { background: #fff; color: var(--red-dark); border-color: #fff; }
.cta--solid:hover { background: #fff; opacity: .92; }

/* ---------- sticky filter bar ---------- */

.toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 10px 0 0;
}

.search-wrap { padding: 0 16px; max-width: 1180px; margin: 0 auto; position: relative; }

.search {
  width: 100%;
  padding: 12px 42px 12px 40px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 999px;
  outline: none;
}
.search:focus { border-color: var(--red); box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent); }
.search::placeholder { color: var(--ink-faint); }

.search-icon {
  position: absolute;
  left: 30px; top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}
.search-clear {
  position: absolute;
  right: 28px; top: 50%;
  transform: translateY(-50%);
  border: 0; background: none; cursor: pointer;
  color: var(--ink-faint);
  font-size: 1.25rem; line-height: 1;
  padding: 4px 6px;
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 16px;
  max-width: 1180px;
  margin: 0 auto;
  scrollbar-width: none;
}
.chips::-webkit-scrollbar { display: none; }

.chip {
  flex: 0 0 auto;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--line);
  background: var(--chip);
  color: var(--ink-soft);
  font-size: .8125rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  font-family: inherit;
}
.chip[aria-pressed="true"] {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
}

/* ---------- results ---------- */

main { max-width: 1180px; margin: 0 auto; padding: 18px 16px 60px; }

.count { color: var(--ink-faint); font-size: .8125rem; margin: 0 0 14px; }

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 620px)  { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow .18s, transform .18s;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); }
.card[hidden] { display: none; }

.card-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--chip);
  border: 0;
  padding: 0;
  margin: 0;
  overflow: hidden;
  cursor: zoom-in;
}
.card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Listings whose photo lives in a Drive folder we cannot read get a lettered tile
   keyed to their category, so the grid stays even instead of showing a gap. */
.card-img--blank {
  cursor: default;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg,
    hsl(var(--h) 46% 92%), hsl(calc(var(--h) + 28) 52% 84%));
}
.card-img--blank span {
  font-family: var(--deva);
  font-size: 3rem;
  font-weight: 700;
  color: hsl(var(--h) 55% 34%);
  line-height: 1;
}
@media (prefers-color-scheme: dark) {
  .card-img--blank { background: linear-gradient(140deg, hsl(var(--h) 24% 22%), hsl(calc(var(--h) + 28) 28% 17%)); }
  .card-img--blank span { color: hsl(var(--h) 45% 72%); }
}
.card-img:focus-visible { outline: 3px solid var(--red); outline-offset: -3px; }

.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }

.card h2 {
  font-family: var(--deva);
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.35;
  font-weight: 700;
}
.card h2 .en { font-family: var(--sans); }

.subtitle {
  margin: -4px 0 0;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--ink-faint);
}

.desc {
  margin: 0;
  font-size: .875rem;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.owner { margin: 0; font-size: .875rem; font-weight: 600; }
.addr  { margin: 0; font-size: .8125rem; color: var(--ink-faint); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--ink-soft);
}
.tag--city { background: color-mix(in srgb, var(--saffron) 18%, transparent); color: var(--ink); }

.actions { display: flex; gap: 8px; margin-top: auto; padding-top: 4px; }
.btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  border: 1.5px solid transparent;
}
.btn--call { background: var(--red); color: #fff; }
.btn--call:hover { background: var(--red-dark); }
.btn--wa { background: transparent; border-color: var(--green); color: var(--green); }
.btn--wa:hover { background: color-mix(in srgb, var(--green) 12%, transparent); }

.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--ink-faint);
}
.empty[hidden] { display: none; }

/* ---------- lightbox ---------- */

dialog.lightbox {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(96vw, 1000px);
  max-height: 92vh;
}
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .82); }
dialog.lightbox img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 92vh;
  object-fit: contain;
  border-radius: 10px;
}

/* ---------- footer ---------- */

footer {
  border-top: 1px solid var(--line);
  padding: 26px 16px 40px;
  text-align: center;
  color: var(--ink-faint);
  font-size: .8125rem;
}
footer a { color: var(--ink-soft); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
