:root {
  --bg: #fdf8f3;
  --card: #ffffff;
  --ink: #2b2118;
  --muted: #7a6a58;
  --accent: #b03a5b;
  --accent-dark: #8f2c49;
  --gold: #c9962e;
  --line: #f0e4d6;
  --shadow: 0 2px 10px rgba(90, 60, 30, 0.08);
  --radius: 14px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", "Hind Siliguri", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

.container { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.site-header {
  background: linear-gradient(135deg, #3d1d2e 0%, #6b2b4a 55%, #8f3d5c 100%);
  color: #fff;
  padding: 18px 0;
  border-bottom: 4px solid var(--gold);
}
.header-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark { font-size: 2rem; }
.brand h1 { font-size: 1.25rem; line-height: 1.2; }
.tagline { font-size: 0.85rem; opacity: 0.85; }
.topnav { display: flex; gap: 10px; align-items: center; }
.lang-toggle, .stats-link {
  background: rgba(255,255,255,0.14);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.35);
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  text-decoration: none;
}
.lang-toggle:hover, .stats-link:hover { background: rgba(255,255,255,0.28); }

.search-row { margin: 20px 0 14px; }
.search-box {
  width: 100%;
  padding: 13px 18px;
  font-size: 1rem;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.search-box:focus { outline: none; border-color: var(--gold); }

.filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.filter-group { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-label { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1.5px solid var(--line);
  background: var(--card);
  color: var(--ink);
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s;
}
.chip:hover { border-color: var(--gold); }
.chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.area-select {
  padding: 7px 12px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  background: var(--card);
}

.results-count { color: var(--muted); font-size: 0.85rem; margin: 10px 0 6px; }

.vendor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  padding-bottom: 30px;
}

.vendor-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.vendor-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(90,60,30,0.14); }

.vendor-card h3 { font-size: 1.02rem; }
.vendor-card h3 .bn-name { color: var(--muted); font-weight: 400; font-size: 0.88rem; }

.badge-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.badge {
  font-size: 0.72rem;
  padding: 3px 9px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-cat { background: #fbeef2; color: var(--accent-dark); }
.badge-area { background: #f4efe6; color: #7a5c22; }
.badge-ok { background: #e7f5ea; color: #1e7a3c; }
.badge-unverified { background: #fdeeee; color: #b02a2a; }
.badge-source { background: #eef2fb; color: #3a5ba8; text-decoration: none; }

.vendor-card .meta { font-size: 0.82rem; color: var(--muted); }
.contact-preview { font-size: 0.82rem; color: var(--accent-dark); font-weight: 600; }

.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(30, 15, 25, 0.55);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 24px 14px;
  z-index: 50;
  overflow-y: auto;
}
.modal-backdrop[hidden] { display: none; }
.modal {
  background: var(--card);
  border-radius: 16px;
  max-width: 560px;
  width: 100%;
  padding: 22px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.3);
  animation: pop 0.18s ease;
}
@keyframes pop { from { transform: scale(0.96); opacity: 0.5; } to { transform: scale(1); opacity: 1; } }

.modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.modal h2 { font-size: 1.3rem; }
.modal .close-btn {
  border: none; background: #f3e9de; color: var(--ink);
  width: 32px; height: 32px; border-radius: 50%;
  font-size: 1rem; cursor: pointer; flex-shrink: 0;
}
.detail-section { margin-top: 14px; }
.detail-row { display: flex; gap: 8px; padding: 5px 0; font-size: 0.92rem; border-bottom: 1px dashed var(--line); }
.detail-row .k { color: var(--muted); min-width: 86px; flex-shrink: 0; }
.detail-row a { color: var(--accent-dark); word-break: break-all; }
.source-link { display: inline-block; margin-top: 10px; font-size: 0.8rem; color: #3a5ba8; }

.contact-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.btn {
  display: block;
  text-align: center;
  padding: 13px 16px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.98rem;
}
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; }
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary { background: #fff; border: 2px solid var(--accent); color: var(--accent-dark); }
.btn-ghost { background: #f3efe8; color: var(--ink); font-weight: 600; }

.note { margin-top: 12px; font-size: 0.8rem; color: var(--muted); background: #faf5ee; padding: 9px 12px; border-radius: 10px; }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 10px;
  padding: 20px 0 30px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 640px) {
  .brand h1 { font-size: 1.05rem; }
  .vendor-grid { grid-template-columns: 1fr; }
}
