/* =============================================================
   Business Directory — Google Material Design 3 (Material You)
   ============================================================= */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Google+Sans:wght@400;500;700&display=swap');

/* ── Color tokens: deep teal, warm cream, saffron accent ── */
:root {
  --md-primary:          #0e6b62;
  --md-primary-hover:    #0a524b;
  --md-primary-container:#d7f3ee;
  --md-on-primary:       #ffffff;
  --md-secondary:        #1b7a4e;
  --md-secondary-container: #d8f3e4;
  --md-tertiary:         #c46a12;
  --md-tertiary-container: #fde8cc;
  --md-hero-start:       #082f2c;
  --md-hero-end:         #176b4a;
  --md-accent:           #e09a2b;
  --md-error:            #c0392b;
  --md-error-container:  #fdecea;
  --md-surface:          #ffffff;
  --md-surface-variant:  #f3f1ec;
  --md-surface-container:#f7f5f0;
  --md-surface-container-high: #efece6;
  --md-outline:          #d8d3c8;
  --md-outline-variant:  #e7e3da;
  --md-on-surface:       #1c1917;
  --md-on-surface-variant: #5c564e;
  --md-scrim:            rgba(16, 36, 33, .55);
  --md-shadow-1: 0 1px 2px rgba(28, 25, 23, .06), 0 1px 3px rgba(28, 25, 23, .08);
  --md-shadow-2: 0 4px 12px rgba(14, 60, 54, .10), 0 1px 3px rgba(28, 25, 23, .06);
  --md-shadow-3: 0 16px 40px rgba(8, 40, 36, .16), 0 2px 8px rgba(28, 25, 23, .06);
  --md-radius-xs:  4px;
  --md-radius-sm:  8px;
  --md-radius-md:  12px;
  --md-radius-lg:  16px;
  --md-radius-xl:  24px;
  --md-radius-full:50px;

  --bs-primary: #0e6b62;
  --bs-primary-rgb: 14, 107, 98;
  --bs-link-color: #0b5c54;
  --bs-link-hover-color: #084640;
  --bs-body-color: #1c1917;
  --bs-body-bg: #f7f5f0;
  --bs-border-color: #e7e3da;
  --bs-secondary-color: #5c564e;
  --bs-success: #1b7a4e;
  --bs-success-rgb: 27, 122, 78;
}

/* ── Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: clip; }

body {
  font-family: 'Roboto', 'Google Sans', -apple-system, sans-serif;
  font-size: 14px;
  color: var(--md-on-surface);
  background: var(--md-surface-container);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video { max-width: 100%; }

h1,h2,h3,h4,h5,h6 {
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-weight: 500;
  color: var(--md-on-surface);
}

a { color: var(--md-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── MD3 Navbar (Top App Bar) ──────────────────────────────── */
.md-topbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--md-outline-variant);
  padding: 0 16px;
  height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--md-shadow-1);
  width: 100%;
  max-width: 100%;
}
.md-topbar .brand {
  font-family: 'Google Sans', sans-serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--md-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  white-space: nowrap;
  min-width: 0;
  flex-shrink: 1;
}
.brand-name {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.md-topbar .brand:hover { text-decoration: none; }
.md-topbar .brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(145deg, #148f84 0%, #0a524b 100%);
  border-radius: var(--md-radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 10px rgba(14, 107, 98, .28);
}

/* Search bar — MD3 Search */
.md-search-wrap {
  min-width: 0;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  position: relative;
  justify-self: center;
}
.md-search-wrap form {
  display: flex;
  align-items: center;
  background: var(--md-surface-variant);
  border-radius: var(--md-radius-full);
  padding: 0 16px;
  height: 44px;
  transition: box-shadow .2s;
}
.md-search-wrap form:focus-within {
  background: var(--md-surface);
  box-shadow: var(--md-shadow-2);
}
.md-search-wrap input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  min-width: 0;
  width: 100%;
  font-size: 14px;
  font-family: 'Roboto', sans-serif;
  color: var(--md-on-surface);
}
.md-search-wrap input::placeholder { color: var(--md-on-surface-variant); }
.md-search-wrap button {
  border: none; background: none; cursor: pointer;
  color: var(--md-on-surface-variant);
  display: flex; align-items: center;
  padding: 0; font-size: 20px;
  transition: color .15s;
}
.md-search-wrap button:hover { color: var(--md-primary); }

/* Nav actions */
.md-nav-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  justify-self: end;
  flex-wrap: nowrap;
  min-width: 0;
}
.nav-signin {
  height: 36px;
  padding: 0 12px;
  white-space: nowrap;
  flex-shrink: 0;
}
.md-btn-wa {
  background: #25d366 !important;
  color: #fff !important;
  height: 40px;
  padding: 0 16px !important;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 211, 102, .32);
}
.md-btn-wa:hover {
  background: #1ebe5d !important;
  color: #fff !important;
}
.md-btn-wa svg { flex-shrink: 0; display: block; }
.wa-short { display: none; }
.user-chip {
  font-size: 14px;
  font-weight: 500;
  gap: 6px;
  width: auto !important;
  max-width: 220px;
  padding: 0 12px !important;
  border-radius: 20px !important;
  border: 1px solid var(--md-outline);
  color: var(--md-on-surface);
}
.user-chip .user-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 120px;
}
.md-icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none; background: none; cursor: pointer;
  color: var(--md-on-surface-variant);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  transition: background .15s;
  text-decoration: none;
}
.md-icon-btn:hover { background: var(--md-surface-variant); color: var(--md-on-surface); text-decoration: none; }

/* MD3 Filled button */
.md-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 0 24px; height: 40px;
  border-radius: var(--md-radius-full);
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 14px; font-weight: 500; letter-spacing: .25px;
  border: none; cursor: pointer;
  transition: box-shadow .15s, background .15s;
  text-decoration: none;
}
.md-btn-filled {
  background: var(--md-primary); color: var(--md-on-primary);
}
.md-btn-filled:hover {
  box-shadow: var(--md-shadow-2);
  color: var(--md-on-primary); text-decoration: none;
  background: var(--md-primary-hover);
}
.md-btn-tonal {
  background: var(--md-primary-container); color: var(--md-primary);
}
.md-btn-tonal:hover { box-shadow: var(--md-shadow-1); text-decoration: none; }
.md-btn-outlined {
  background: transparent; color: var(--md-primary);
  border: 1px solid var(--md-outline);
}
.md-btn-outlined:hover { background: var(--md-primary-container); text-decoration: none; }
.md-btn-text {
  background: transparent; color: var(--md-primary);
  padding: 0 12px;
}
.md-btn-text:hover { background: var(--md-primary-container); text-decoration: none; }
.md-btn-sm { height: 32px; padding: 0 16px; font-size: 13px; }
.md-btn .material-symbols-rounded,
.md-btn i { font-size: 18px; }

/* ── MD3 Card ──────────────────────────────────────────────── */
.md-card {
  background: var(--md-surface);
  border-radius: var(--md-radius-lg);
  border: 1px solid var(--md-outline-variant);
  overflow: hidden;
  transition: box-shadow .2s, transform .2s;
}
.md-card-elevated {
  border: none;
  box-shadow: var(--md-shadow-1);
}
.md-card-elevated:hover {
  box-shadow: var(--md-shadow-3);
  transform: translateY(-2px);
}
.md-card-body { padding: 16px; }
.md-card-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--md-outline-variant);
  font-family: 'Google Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--md-on-surface-variant);
  letter-spacing: .1px;
}
.md-card-img { width: 100%; object-fit: cover; }

/* ── Business card specific ────────────────────────────────── */
.biz-card { text-decoration: none; color: inherit; display: block; }
.biz-card:hover { text-decoration: none; }
.biz-card .cat-chip {
  display: inline-block;
  background: var(--md-primary-container);
  color: var(--md-primary);
  border-radius: var(--md-radius-full);
  font-size: 11px; font-weight: 500;
  padding: 2px 10px;
  margin-bottom: 6px;
}
.biz-card h6 {
  font-family: 'Google Sans', sans-serif;
  font-size: 14px; font-weight: 500;
  color: var(--md-on-surface);
  margin-bottom: 4px;
  line-height: 1.3;
}
.biz-card .location {
  font-size: 12px; color: var(--md-on-surface-variant);
  display: flex; align-items: center; gap: 3px;
}

/* ── MD3 Chip ──────────────────────────────────────────────── */
.md-chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 16px;
  border-radius: var(--md-radius-full);
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--md-outline);
  background: var(--md-surface);
  color: var(--md-on-surface-variant);
  cursor: pointer; transition: background .15s;
  text-decoration: none;
}
.md-chip:hover { background: var(--md-surface-variant); text-decoration: none; }
.md-chip.active {
  background: var(--md-secondary-container);
  color: var(--md-secondary);
  border-color: transparent;
}

/* ── MD3 Badge ─────────────────────────────────────────────── */
.md-badge {
  display: inline-flex; align-items: center;
  padding: 2px 10px; border-radius: var(--md-radius-full);
  font-size: 11px; font-weight: 500;
}
.md-badge-primary  { background: var(--md-primary-container);   color: var(--md-primary); }
.md-badge-success  { background: var(--md-secondary-container); color: var(--md-secondary); }
.md-badge-warning  { background: var(--md-tertiary-container);  color: var(--md-tertiary); }
.md-badge-error    { background: var(--md-error-container);     color: var(--md-error); }
.md-badge-neutral  { background: var(--md-surface-variant);     color: var(--md-on-surface-variant); }

/* ── MD3 Text fields ───────────────────────────────────────── */
.md-field {
  position: relative;
  margin-bottom: 16px;
}
.md-field label {
  display: block; font-size: 12px; font-weight: 500;
  color: var(--md-on-surface-variant);
  margin-bottom: 4px; letter-spacing: .4px;
}
.md-field input,
.md-field select,
.md-field textarea {
  width: 100%;
  background: var(--md-surface-variant);
  border: 1px solid var(--md-outline);
  border-radius: var(--md-radius-xs);
  padding: 10px 14px;
  font-size: 14px; font-family: 'Roboto', sans-serif;
  color: var(--md-on-surface);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  border-top-left-radius: var(--md-radius-xs);
  border-top-right-radius: var(--md-radius-xs);
  border-bottom: 2px solid var(--md-outline);
  border-left: none; border-right: none; border-top: none;
  border-bottom-left-radius: 0; border-bottom-right-radius: 0;
}
.md-field input:focus,
.md-field select:focus,
.md-field textarea:focus {
  border-bottom-color: var(--md-primary);
  background: var(--md-surface);
}

/* Keep Bootstrap form controls working too */
.form-control:focus, .form-select:focus {
  border-color: var(--md-primary);
  box-shadow: 0 0 0 3px rgba(14, 107, 98, .18);
}
.card {
  border-radius: var(--md-radius-lg);
  border-color: var(--md-outline-variant);
  box-shadow: var(--md-shadow-1);
}
.card-footer { background: var(--md-surface); }
.btn-primary {
  --bs-btn-bg: var(--md-primary);
  --bs-btn-border-color: var(--md-primary);
  --bs-btn-hover-bg: var(--md-primary-hover);
  --bs-btn-hover-border-color: var(--md-primary-hover);
  --bs-btn-active-bg: var(--md-primary-hover);
  --bs-btn-active-border-color: var(--md-primary-hover);
}
.bg-primary { background-color: var(--md-primary) !important; }
.text-primary { color: var(--md-primary) !important; }
.badge.bg-primary-subtle {
  background: var(--md-primary-container) !important;
  color: var(--md-primary) !important;
}

/* ── MD3 Snackbar / Alert ──────────────────────────────────── */
.md-snack {
  border-radius: var(--md-radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  display: flex; align-items: center; gap: 12px;
  animation: snackIn .25s cubic-bezier(.4,0,.2,1);
}
@keyframes snackIn { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:none; } }
.md-snack-success { background: #e5f6ec; color: #1b7a4e; border-left: 4px solid #1b7a4e; }
.md-snack-error   { background: #fdecea; color: #c0392b; border-left: 4px solid #c0392b; }
.md-snack-info    { background: #e7f5f3; color: #0e6b62; border-left: 4px solid #0e6b62; }
.md-snack-warning { background: #fef6e8; color: #c46a12; border-left: 4px solid #e09a2b; }

/* ── Hero section ──────────────────────────────────────────── */
.md-hero {
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(224, 154, 43, .38), transparent 55%),
    radial-gradient(ellipse 50% 60% at 0% 100%, rgba(255, 255, 255, .12), transparent 50%),
    linear-gradient(155deg, var(--md-hero-start) 0%, var(--md-primary) 52%, var(--md-hero-end) 100%);
  padding: 72px 0 64px;
  position: relative;
  overflow: hidden;
}
.md-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.045'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.md-hero::after {
  content: '';
  position: absolute;
  width: 280px; height: 280px;
  right: -80px; bottom: -120px;
  border-radius: 50%;
  background: rgba(224, 154, 43, .16);
  filter: blur(2px);
  pointer-events: none;
}
.md-hero-title {
  font-family: 'Google Sans', sans-serif;
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.md-hero-sub {
  font-size: 16px; color: rgba(255,255,255,.85);
  margin-top: 12px;
}

/* Hero search field */
.md-hero-search {
  background: #fff;
  border-radius: var(--md-radius-full);
  padding: 6px 6px 6px 18px;
  display: flex; align-items: center;
  box-shadow: var(--md-shadow-3);
  max-width: 740px; margin: 28px auto 0;
  position: relative;
  width: 100%;
}
.md-hero-form {
  display: flex;
  flex: 1;
  align-items: center;
  min-width: 0;
  width: 100%;
  gap: 0;
}
.md-hero-search .hero-search-icon {
  color: var(--md-on-surface-variant);
  font-size: 22px;
  flex-shrink: 0;
}
.md-hero-search input {
  flex: 1; border: none; outline: none;
  font-size: 15px; font-family: 'Roboto', sans-serif;
  color: var(--md-on-surface);
  min-width: 0;
  background: transparent;
  padding: 8px 10px;
}
.md-hero-search select {
  border: none; border-left: 1px solid var(--md-outline-variant);
  outline: none; padding: 0 8px;
  font-size: 14px; color: var(--md-on-surface-variant);
  background: transparent; cursor: pointer;
  width: 130px;
  min-width: 0;
  max-width: 34%;
  flex: 0 1 130px;
  height: 40px;
}
.md-hero-search .hero-submit {
  height: 44px;
  margin: 2px;
  flex-shrink: 0;
  padding: 0 20px;
  box-shadow: 0 6px 16px rgba(14, 107, 98, .28);
}

/* ── Category grid ─────────────────────────────────────────── */
.md-cat-card {
  background: var(--md-surface);
  border: 1px solid var(--md-outline-variant);
  border-radius: var(--md-radius-lg);
  padding: 20px 12px;
  text-align: center;
  text-decoration: none;
  color: var(--md-on-surface);
  display: block;
  transition: background .15s, box-shadow .15s, transform .15s;
}
.md-cat-card:hover {
  background: var(--md-primary-container);
  box-shadow: var(--md-shadow-2);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--md-primary);
}
.md-cat-card .emoji { font-size: 32px; display: block; margin-bottom: 8px; }
.md-cat-card .cat-name { font-size: 13px; font-weight: 500; }
.md-cat-card .cat-count { font-size: 11px; color: var(--md-on-surface-variant); margin-top: 2px; }

/* ── Section heading ───────────────────────────────────────── */
.md-section-title {
  font-family: 'Google Sans', sans-serif;
  font-size: 20px; font-weight: 500;
  color: var(--md-on-surface);
  margin-bottom: 4px;
}
.md-section-sub {
  font-size: 13px; color: var(--md-on-surface-variant);
  margin-bottom: 20px;
}

/* ── Divider ───────────────────────────────────────────────── */
.md-divider {
  border: none; border-top: 1px solid var(--md-outline-variant);
  margin: 16px 0;
}

/* ── Footer ────────────────────────────────────────────────── */
.md-footer {
  background:
    radial-gradient(ellipse 40% 80% at 100% 0%, rgba(224, 154, 43, .18), transparent 50%),
    linear-gradient(180deg, #102421 0%, #0b1c1a 100%);
  color: rgba(255,255,255,.87);
  padding: 48px 0 24px;
  margin-top: 64px;
}
.md-footer h6 {
  font-family: 'Google Sans', sans-serif;
  font-size: 14px; font-weight: 500; color: #fff;
  margin-bottom: 12px;
}
.md-footer a { color: rgba(255,255,255,.6); font-size: 13px; }
.md-footer a:hover { color: #fff; }
.md-footer .copyright { font-size: 12px; color: rgba(255,255,255,.38); margin-top: 32px; }

/* ── Autocomplete dropdown ─────────────────────────────────── */
#autocomplete-box {
  position: absolute; z-index: 1000;
  background: var(--md-surface);
  border-radius: 0 0 var(--md-radius-lg) var(--md-radius-lg);
  width: 100%; max-height: 280px; overflow-y: auto;
  box-shadow: var(--md-shadow-3);
  border: 1px solid var(--md-outline-variant);
  border-top: none;
}
#autocomplete-box .ac-item {
  padding: 10px 16px; cursor: pointer; font-size: 14px;
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--md-outline-variant);
}
#autocomplete-box .ac-item:hover { background: var(--md-surface-variant); }
#autocomplete-box .ac-type {
  font-size: 11px; color: var(--md-on-surface-variant);
  background: var(--md-surface-variant);
  padding: 2px 8px; border-radius: var(--md-radius-full);
  text-transform: capitalize;
}

/* ── Star rating ───────────────────────────────────────────── */
.star-rating label { cursor: pointer; font-size: 22px; color: var(--md-outline); }
.star-rating input:checked ~ label,
.star-rating label:hover,
.star-rating label:hover ~ label { color: #f9a825; }

/* ── Admin Navigation Rail (sidebar) ──────────────────────── */
.md-nav-rail {
  width: 240px; flex-shrink: 0;
  position: sticky; top: 0; align-self: flex-start;
  height: 100vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--md-surface);
  border-right: 1px solid var(--md-outline-variant);
  display: flex; flex-direction: column;
  padding: 16px 0;
  scrollbar-width: thin;
}
.md-nav-rail .rail-brand {
  padding: 12px 20px 20px;
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
  border-bottom: 1px solid var(--md-outline-variant);
  margin-bottom: 8px;
}
.md-nav-rail .rail-brand .brand-icon {
  width: 40px; height: 40px;
  background: var(--md-primary);
  border-radius: var(--md-radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
}
.md-nav-rail .rail-brand .brand-text strong {
  font-family: 'Google Sans', sans-serif;
  font-size: 15px; color: var(--md-on-surface); display: block;
}
.md-nav-rail .rail-brand .brand-text small {
  font-size: 11px; color: var(--md-on-surface-variant);
}
.md-nav-rail .nav-section {
  font-size: 11px; font-weight: 500; letter-spacing: .8px;
  color: var(--md-on-surface-variant);
  padding: 12px 20px 4px; text-transform: uppercase;
}
.md-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; margin: 1px 8px;
  border-radius: var(--md-radius-md);
  font-size: 14px; font-weight: 400;
  color: var(--md-on-surface-variant);
  text-decoration: none;
  transition: background .15s, color .15s;
}
.md-nav-item:hover {
  background: var(--md-surface-variant);
  color: var(--md-on-surface); text-decoration: none;
}
.md-nav-item.active {
  background: var(--md-primary-container);
  color: var(--md-primary); font-weight: 500;
}
.md-nav-item i { font-size: 18px; width: 20px; text-align: center; }
.md-nav-rail .rail-bottom {
  margin-top: auto; padding: 12px 8px 8px;
  border-top: 1px solid var(--md-outline-variant);
}

/* ── Admin topbar ──────────────────────────────────────────── */
.md-admin-topbar {
  background: var(--md-surface);
  border-bottom: 1px solid var(--md-outline-variant);
  padding: 14px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.md-admin-topbar h5 {
  font-family: 'Google Sans', sans-serif;
  font-size: 18px; font-weight: 500; margin: 0;
}
.md-main-content { flex: 1; min-width: 0; background: var(--md-surface-container); }
.md-page-body { padding: 24px; }

/* ── Data table ────────────────────────────────────────────── */
.md-table {
  width: 100%; border-collapse: collapse;
  font-size: 13px;
}
.md-table thead th {
  background: var(--md-surface-variant);
  color: var(--md-on-surface-variant);
  font-weight: 500; font-size: 12px; letter-spacing: .4px;
  padding: 12px 16px;
  text-align: left; border-bottom: 1px solid var(--md-outline-variant);
}
.md-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--md-outline-variant);
  color: var(--md-on-surface);
  vertical-align: middle;
}
.md-table tbody tr:hover { background: var(--md-surface-variant); }
.md-table tbody tr:last-child td { border-bottom: none; }

/* ── Pagination ────────────────────────────────────────────── */
.md-pagination {
  display: flex; gap: 4px; flex-wrap: wrap; align-items: center;
  padding: 12px 0;
}
.md-pagination a {
  min-width: 36px; height: 36px; border-radius: var(--md-radius-full);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--md-on-surface-variant);
  text-decoration: none; transition: background .15s;
}
.md-pagination a:hover { background: var(--md-surface-variant); }
.md-pagination a.active {
  background: var(--md-primary); color: #fff; font-weight: 500;
}

/* ── Object fit ────────────────────────────────────────────── */
.obj-cover   { object-fit: cover; }
.obj-contain { object-fit: contain; }

/* ── City pill ─────────────────────────────────────────────── */
.md-city-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.15);
  color: #fff; border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--md-radius-full);
  padding: 6px 16px; font-size: 13px; font-weight: 500;
  text-decoration: none; transition: background .15s;
}
.md-city-pill:hover { background: rgba(255,255,255,.25); color: #fff; text-decoration: none; }

/* ── Interaction buttons (profile page) ────────────────────── */
.md-action-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 16px 0 8px;
  border-top: 1px solid var(--md-outline-variant);
}

/* ── Page bands, stats, sections ───────────────────────────── */
.md-band {
  background:
    radial-gradient(ellipse 60% 120% at 100% 0%, rgba(224, 154, 43, .28), transparent 50%),
    linear-gradient(135deg, #0a524b 0%, #0e6b62 100%);
  padding: 40px 0;
  color: #fff;
}
.md-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  background: var(--md-surface);
}
.md-stat {
  text-align: center;
  padding: 22px 28px;
  flex: 1;
  min-width: 140px;
  border-right: 1px solid var(--md-outline-variant);
}
.md-stat:last-child { border-right: none; }
.md-stat .stat-icon {
  width: 42px; height: 42px;
  margin: 0 auto 6px;
  border-radius: 14px;
  background: var(--md-primary-container);
  color: var(--md-primary);
  display: flex; align-items: center; justify-content: center;
}
.md-stat .stat-val {
  font-size: 22px; font-weight: 700;
  font-family: 'Google Sans', sans-serif;
  color: var(--md-on-surface);
}
.md-stat .stat-label { font-size: 12px; color: var(--md-on-surface-variant); }
.md-section-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.md-kicker {
  font-size: 12px; font-weight: 500; letter-spacing: 1px;
  text-transform: uppercase; color: var(--md-tertiary); margin-bottom: 4px;
}
.cat-filter-btn {
  padding: 7px 16px;
  border-radius: 50px;
  border: 1px solid var(--md-outline-variant);
  background: var(--md-surface);
  color: var(--md-on-surface-variant);
  font-size: 13px;
  cursor: pointer;
  font-family: 'Roboto', sans-serif;
}
.cat-filter-btn.active {
  border-color: var(--md-primary);
  background: var(--md-primary-container);
  color: var(--md-primary);
}
.cat-card-link .md-card { transition: transform .18s, box-shadow .18s, border-color .18s; }
.cat-card-link:hover .md-card {
  background: #fff;
  box-shadow: var(--md-shadow-2);
  transform: translateY(-3px);
  border-color: rgba(14, 107, 98, .35) !important;
}
.city-band {
  background:
    radial-gradient(ellipse 50% 120% at 0% 50%, rgba(224, 154, 43, .25), transparent 55%),
    linear-gradient(90deg, #0a524b, #127a62);
  padding: 36px 0;
}
.md-mobile-search {
  background: var(--md-surface);
  border-bottom: 1px solid var(--md-outline-variant);
  padding: 8px 16px;
}
.md-mobile-search form {
  display: flex;
  align-items: center;
  background: var(--md-surface-variant);
  border-radius: 24px;
  padding: 8px 14px;
  gap: 8px;
}
.md-mobile-search input {
  border: none; background: transparent; outline: none;
  flex: 1; font-size: 14px; min-width: 0; color: var(--md-on-surface);
}
.search-controls {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 110px) minmax(0, 150px) auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.search-controls .search-field,
.search-controls .search-select,
.search-controls .search-pin,
.search-controls .search-sort,
.search-controls .search-actions {
  min-width: 0;
  width: auto;
  max-width: 100%;
}
.search-controls .search-field { position: relative; }
.search-controls select,
.search-controls input[name="pincode"] {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.search-actions {
  display: flex;
  gap: 8px;
}
.search-actions .md-btn {
  height: 42px;
  white-space: nowrap;
  justify-content: center;
}
#searchWrap { min-width: 0; width: 100%; }
#searchWrap input { min-width: 0 !important; width: 100%; }
.filter-sticky { position: sticky; top: 80px; }

/* ── Partner spotlight (after hero) ───────────────────────── */
.partner-banner {
  background:
    linear-gradient(180deg, #f6efe4 0%, #f7f5f0 100%);
  padding: 18px 0 8px;
}
.partner-card {
  display: flex;
  align-items: center;
  gap: 16px 18px;
  min-width: 0;
  text-decoration: none;
  color: #fff;
  background:
    radial-gradient(ellipse 50% 140% at 100% 0%, rgba(246, 217, 138, .28), transparent 52%),
    linear-gradient(110deg, #5c1824 0%, #8b2433 58%, #a33b22 100%);
  border: 1px solid rgba(246, 217, 138, .55);
  border-radius: 20px;
  padding: 14px 16px 14px 18px;
  box-shadow: 0 12px 28px rgba(92, 24, 36, .22);
  transition: transform .18s, box-shadow .18s;
}
.partner-card:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(92, 24, 36, .28);
}
.partner-kicker {
  flex-shrink: 0;
  background: #f6d98a;
  color: #5c1824;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  border-radius: 999px;
  padding: 7px 12px;
  white-space: nowrap;
}
.partner-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 180px;
}
.partner-copy strong {
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.3;
  color: #fff;
}
.partner-copy span {
  font-size: 13px;
  line-height: 1.4;
  color: rgba(255, 255, 255, .82);
}
.partner-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border-radius: 12px;
  padding: 6px 12px;
  min-width: 0;
  max-width: min(240px, 100%);
  flex-shrink: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
}
.partner-logo img {
  display: block;
  height: auto;
  max-height: 46px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}
.partner-cta {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f6d98a;
  color: #5c1824;
  font-family: 'Google Sans', 'Roboto', sans-serif;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  padding: 10px 16px;
  white-space: nowrap;
}
.partner-cta .material-symbols-rounded { font-size: 18px; }
.auth-card { border-radius: 28px; padding: 40px 40px 32px; }
.breadcrumb { flex-wrap: wrap; }
.biz-title { overflow-wrap: anywhere; }
.biz-head > .flex-grow-1 { min-width: 0; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 992px) {
  div:has(> .md-nav-rail) { flex-direction: column !important; }
  .md-nav-rail {
    width: 100% !important;
    min-height: auto;
    height: auto;
    overflow-y: visible;
    align-self: stretch;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    border-right: none;
    border-bottom: 1px solid var(--md-outline-variant);
    padding: 8px;
    position: sticky;
    top: 0;
    z-index: 40;
    -webkit-overflow-scrolling: touch;
  }
  .md-nav-rail .rail-brand,
  .md-nav-rail .nav-section { display: none; }
  .md-nav-rail .rail-bottom {
    margin-top: 0;
    border-top: none;
    display: flex;
    padding: 0;
    flex-shrink: 0;
  }
  .md-nav-item { white-space: nowrap; flex-shrink: 0; padding: 8px 12px; }
  .md-admin-topbar { flex-wrap: wrap; gap: 8px; padding: 12px 16px; }
  .md-page-body { padding: 16px; }
  .md-page-body .md-card { overflow-x: auto; }
}
@media (max-width: 1199px) {
  .wa-full { display: none; }
  .wa-short { display: inline; }
}
@media (max-width: 1100px) {
  .search-controls {
    grid-template-columns: 1fr 1fr;
  }
  .search-controls .search-field,
  .search-controls .search-actions {
    grid-column: 1 / -1;
  }
  .search-actions .md-btn { flex: 1; }
}
@media (max-width: 640px) {
  .search-controls { grid-template-columns: 1fr; }
  .search-controls .search-field,
  .search-controls .search-actions { grid-column: auto; }
}
@media (max-width: 991px) {
  .md-topbar { grid-template-columns: minmax(0, 1fr) auto; }
  .md-search-wrap { display: none !important; }
  .filter-sticky { position: static; }
}
@media (max-width: 768px) {
  .user-chip .user-name,
  .user-chip .user-caret { display: none; }
  .user-chip { padding: 0 !important; width: 40px !important; justify-content: center; }
  .md-hero { padding: 48px 0 40px; }
  .md-hero-sub { font-size: 15px; padding: 0 8px; }
  .md-stat { padding: 16px 10px; min-width: 30%; border-right: none; }
  h1.h3, .biz-title { font-size: 1.35rem; }
}
@media (max-width: 860px) {
  .md-hero-search {
    border-radius: 22px;
    padding: 10px;
  }
  .md-hero-form { flex-wrap: wrap; gap: 6px; }
  .md-hero-search .hero-search-icon { display: none; }
  .md-hero-search input {
    flex: 1 1 100%;
    height: 40px;
    background: var(--md-surface-variant);
    border-radius: 12px;
    padding: 0 12px;
  }
  .md-hero-search select {
    flex: 1 1 100%;
    max-width: none;
    width: 100%;
    border-left: none;
    background: var(--md-surface-variant);
    border-radius: 12px;
    padding: 0 12px;
    height: 42px;
  }
  .md-hero-search .hero-submit { width: 100%; justify-content: center; }
}
@media (max-width: 768px) {
  .partner-card {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    padding: 16px;
  }
  .partner-copy { flex: 1 1 100%; align-items: center; }
  .partner-logo { order: -1; max-width: min(260px, 88vw); }
  .partner-cta { width: 100%; justify-content: center; }
}
@media (max-width: 576px) {
  .md-topbar { padding: 0 10px; height: 56px; }
  .brand-name { display: none; }
  .md-hero { padding: 36px 0 32px; }
  .md-hero-title { font-size: 28px; }
  .auth-card { padding: 28px 18px 22px !important; }
  .md-footer { padding: 36px 0 20px; margin-top: 40px; }
  .md-page-body { padding: 12px; }
  #catFilter { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
  #catFilter .cat-filter-btn { flex-shrink: 0; }
}

/* ── Print ─────────────────────────────────────────────────── */
@media print {
  .md-topbar, .md-footer, .md-nav-rail, .no-print { display: none !important; }
  body { background: #fff !important; }
}

/* ── Utility ───────────────────────────────────────────────── */
.text-muted-md { color: var(--md-on-surface-variant) !important; }
.bg-surface    { background: var(--md-surface) !important; }
.rounded-md    { border-radius: var(--md-radius-md) !important; }
.rounded-lg-md { border-radius: var(--md-radius-lg) !important; }
.shadow-md1    { box-shadow: var(--md-shadow-1) !important; }
.shadow-md2    { box-shadow: var(--md-shadow-2) !important; }
.gap-md        { gap: 12px; }

/* Keep Bootstrap utilities working */
.hover-lift { transition: transform .15s, box-shadow .15s; }
.hover-lift:hover { transform: translateY(-2px); box-shadow: var(--md-shadow-3) !important; }
.btn-xs { padding: 3px 10px; font-size: 12px; }
