/* ============================================================
   BizDir — main.css
   Design system + layout + all pages
   Font: Sora (headings) + DM Sans (body)
   ============================================================ */

/* ─────────────────────────────────────────
   DESIGN TOKENS
───────────────────────────────────────── */
:root {
  /* Colors */
  --color-primary:        #1a56db;
  --color-primary-dark:   #1245b4;
  --color-primary-light:  #ebf1fd;
  --color-secondary:      #0e9f6e;
  --color-whatsapp:       #25d366;
  --color-accent:         #f59e0b;
  --color-danger:         #e02424;
  --color-text:           #111827;
  --color-text-muted:     #6b7280;
  --color-border:         #e5e7eb;
  --color-bg:             #f9fafb;
  --color-bg-card:        #ffffff;
  --color-featured-bg:    #fffbeb;
  --color-featured-border:#f59e0b;
  --color-verified:       #0e9f6e;
  --color-star:           #f59e0b;

  /* Typography */
  --font-heading: 'Sora', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --text-xs:   0.75rem;
  --text-sm:   0.875rem;
  --text-base: 1rem;
  --text-lg:   1.125rem;
  --text-xl:   1.25rem;
  --text-2xl:  1.5rem;
  --text-3xl:  1.875rem;
  --text-4xl:  2.25rem;
  --text-5xl:  3rem;

  /* Spacing */
  --space-1:  0.25rem;
  --space-2:  0.5rem;
  --space-3:  0.75rem;
  --space-4:  1rem;
  --space-5:  1.25rem;
  --space-6:  1.5rem;
  --space-8:  2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Borders */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-2xl:  24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:  0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:  0 10px 30px rgba(0,0,0,.12);
  --shadow-xl:  0 20px 60px rgba(0,0,0,.15);

  /* Transitions */
  --transition: 200ms ease;
  --transition-slow: 350ms ease;

  /* Layout */
  --container-max:    1280px;
  --header-height:    64px;
  --cat-nav-height:   44px;
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, video { max-width: 100%; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }
input, textarea, select { font-family: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ─────────────────────────────────────────
   LAYOUT
───────────────────────────────────────── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}
@media (min-width: 640px)  { .container { padding-inline: var(--space-6); } }
@media (min-width: 1024px) { .container { padding-inline: var(--space-8); } }

.section { padding-block: var(--space-12); }
.section--sm { padding-block: var(--space-8); }
.section--lg { padding-block: var(--space-16); }

/* ─────────────────────────────────────────
   TYPOGRAPHY
───────────────────────────────────────── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; color: var(--color-text); }
h1 { font-size: clamp(var(--text-2xl), 5vw, var(--text-5xl)); }
h2 { font-size: clamp(var(--text-xl),  4vw, var(--text-3xl)); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); }

.section-header { text-align: center; margin-bottom: var(--space-8); }
.section-header h2 { margin-bottom: var(--space-2); }
.section-header p { color: var(--color-text-muted); max-width: 560px; margin-inline: auto; }
.section-header__link { font-size: var(--text-sm); color: var(--color-primary); font-weight: 600; }

/* ─────────────────────────────────────────
   BUTTONS
───────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.6rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-body);
  transition: all var(--transition);
  white-space: nowrap;
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  line-height: 1.4;
}
.btn--sm  { padding: 0.4rem 0.9rem; font-size: var(--text-xs); }
.btn--lg  { padding: 0.8rem 1.75rem; font-size: var(--text-base); }
.btn--xl  { padding: 1rem 2.25rem; font-size: var(--text-lg); }
.btn--block { width: 100%; justify-content: center; }

.btn--primary  { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }

.btn--outline  { border-color: var(--color-primary); color: var(--color-primary); }
.btn--outline:hover { background: var(--color-primary-light); text-decoration: none; }

.btn--ghost { border-color: var(--color-border); color: var(--color-text); }
.btn--ghost:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }

.btn--whatsapp { background: var(--color-whatsapp); color: #fff; }
.btn--whatsapp:hover { background: #1eab55; text-decoration: none; }

.btn--danger { background: var(--color-danger); color: #fff; }

/* ─────────────────────────────────────────
   FLASH MESSAGES
───────────────────────────────────────── */
.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-sm);
  font-weight: 500;
  z-index: 9999;
  position: sticky;
  top: 0;
}
.flash--success { background: #d1fae5; color: #065f46; }
.flash--error   { background: #fee2e2; color: #991b1b; }
.flash--info    { background: var(--color-primary-light); color: var(--color-primary-dark); }
.flash__close   { font-size: 1.25rem; line-height: 1; opacity: .6; }
.flash__close:hover { opacity: 1; }

/* ─────────────────────────────────────────
   SITE HEADER
───────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 0 var(--color-border);
}

.header__top { border-bottom: 1px solid var(--color-border); }
.header__top-inner {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  height: var(--header-height);
}

/* Logo */
.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
  text-decoration: none;
}
.logo-text { font-family: var(--font-heading); font-size: var(--text-xl); color: var(--color-text); white-space: nowrap; }
.logo-text strong { color: var(--color-primary); }
.logo-icon { width: 36px; height: 36px; flex-shrink: 0; }

/* Location Picker */
.header__location { position: relative; flex-shrink: 0; }
.location-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: var(--space-2) var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg);
  white-space: nowrap;
  transition: border-color var(--transition);
  max-width: 140px;
}
.location-btn:hover { border-color: var(--color-primary); }
.location-btn .fa-location-dot { color: var(--color-danger); }
.location-btn__arrow { font-size: 10px; margin-left: auto; }

.location-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}
.location-dropdown__search {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.location-dropdown__search input {
  border: none;
  outline: none;
  width: 100%;
  font-size: var(--text-sm);
}
.location-dropdown__list { max-height: 200px; overflow-y: auto; }
.location-dropdown__list li {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  cursor: pointer;
}
.location-dropdown__list li:hover,
.location-dropdown__list li.is-active { background: var(--color-primary-light); color: var(--color-primary); }
.location-dropdown__detect {
  border-top: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-4);
}
.location-dropdown__detect button {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-primary);
  font-weight: 500;
}

/* Search bar in header */
.header__top-inner .search-bar { flex: 1; min-width: 0; max-width: 500px; }

/* Nav Actions */
.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-left: auto;
  flex-shrink: 0;
}
.header__post-btn span { display: none; }
@media (min-width: 900px) { .header__post-btn span { display: inline; } }

/* User menu */
.header__user-menu { position: relative; }
.user-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  overflow: hidden;
  border: 2px solid var(--color-primary);
}
.user-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: var(--color-primary);
  color: #fff;
  font-size: var(--text-sm);
  font-weight: 700;
}
.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 200px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}
.user-dropdown__info { padding: var(--space-3) var(--space-4); }
.user-dropdown__info strong { display: block; font-size: var(--text-sm); }
.user-dropdown__info small { color: var(--color-text-muted); font-size: var(--text-xs); }
.user-dropdown hr { border: none; border-top: 1px solid var(--color-border); }
.user-dropdown a {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  color: var(--color-text);
}
.user-dropdown a:hover { background: var(--color-bg); text-decoration: none; }
.text-danger { color: var(--color-danger) !important; }

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: var(--space-1);
}
.hamburger span {
  display: block;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all var(--transition);
}
@media (min-width: 900px) { .hamburger { display: none; } }

/* Category Nav */
.header__cat-nav {
  height: var(--cat-nav-height);
  background: var(--color-primary);
  overflow: hidden;
}
.cat-nav__list {
  display: flex;
  align-items: center;
  gap: 0;
  height: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-nav__list::-webkit-scrollbar { display: none; }
.cat-nav__list li a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 var(--space-4);
  height: 100%;
  font-size: var(--text-sm);
  font-weight: 500;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  transition: background var(--transition);
}
.cat-nav__list li a:hover { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; }
.cat-nav__more a { color: rgba(255,255,255,.7) !important; }

/* ─────────────────────────────────────────
   MOBILE NAV
───────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(85vw, 320px);
  background: #fff;
  z-index: 2000;
  transform: translateX(100%);
  transition: transform var(--transition-slow);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
}
.mobile-nav.is-open { transform: translateX(0); }
.mobile-nav__overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-slow);
}
.mobile-nav__overlay.is-visible { opacity: 1; pointer-events: auto; }
.mobile-nav__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-border);
}
.mobile-nav__close { font-size: 1.75rem; line-height: 1; color: var(--color-text-muted); }
.mobile-nav__body { padding: var(--space-4); overflow-y: auto; }
.mobile-nav__links { margin-top: var(--space-4); }
.mobile-nav__links li a {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text);
}

/* ─────────────────────────────────────────
   SEARCH BAR
───────────────────────────────────────── */
.search-bar {
  display: flex;
  align-items: stretch;
  background: #fff;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-bar:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(26,86,219,.15);
}

.search-bar--compact {
  border-radius: var(--radius-md);
  border-width: 1.5px;
}
.search-bar--hero {
  border-radius: var(--radius-xl);
  border-width: 0;
  box-shadow: var(--shadow-xl);
}
.search-bar--hero:focus-within { box-shadow: var(--shadow-xl), 0 0 0 3px rgba(26,86,219,.2); }

.search-bar__category {
  border-right: 1px solid var(--color-border);
  flex-shrink: 0;
}
.search-bar__category select {
  height: 100%;
  padding: 0 var(--space-3);
  border: none;
  outline: none;
  background: transparent;
  font-size: var(--text-sm);
  color: var(--color-text);
  cursor: pointer;
  min-width: 140px;
}

.search-bar__input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  position: relative;
  min-width: 0;
}
.search-bar__icon {
  position: absolute;
  left: var(--space-3);
  color: var(--color-text-muted);
  pointer-events: none;
}
.search-bar__input-wrap input {
  width: 100%;
  padding: 0.65rem var(--space-3) 0.65rem 2.25rem;
  border: none;
  outline: none;
  font-size: var(--text-sm);
  color: var(--color-text);
  background: transparent;
}
.search-bar--hero .search-bar__input-wrap input { padding-block: 1rem; font-size: var(--text-base); }

.search-bar__btn {
  border-radius: 0;
  padding-inline: var(--space-5);
  flex-shrink: 0;
}
.search-bar--hero .search-bar__btn { padding-inline: var(--space-8); font-size: var(--text-base); border-radius: 0 var(--radius-xl) var(--radius-xl) 0; }

/* Autocomplete */
.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
}
.autocomplete-item {
  padding: var(--space-2) var(--space-4);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.autocomplete-item:hover { background: var(--color-primary-light); }
.autocomplete-item i { color: var(--color-text-muted); width: 16px; }

/* ─────────────────────────────────────────
   CATEGORY CARD
───────────────────────────────────────── */
.category-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: all var(--transition);
  text-decoration: none;
  color: var(--color-text);
}
.category-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  text-decoration: none;
}

.category-card__thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #e0e7ff, #bfdbfe);
}
.category-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 400ms ease;
}
.category-card:hover .category-card__thumb img { transform: scale(1.05); }

.category-card__icon-bg {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--color-primary);
  background: var(--color-primary-light);
}

.category-card__body {
  padding: var(--space-3) var(--space-4);
  flex: 1;
}
.category-card__name {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-1);
}
.category-card__count {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ─────────────────────────────────────────
   LISTING CARD
───────────────────────────────────────── */
.listing-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: var(--space-4);
  align-items: start;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-4);
  position: relative;
  transition: all var(--transition);
}
.listing-card:hover { border-color: var(--color-primary); box-shadow: var(--shadow-md); }
.listing-card--featured {
  background: var(--color-featured-bg);
  border-color: var(--color-featured-border);
}

.listing-card__badge {
  position: absolute;
  top: var(--space-3);
  right: var(--space-3);
  font-size: var(--text-xs);
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  gap: 4px;
}
.listing-card__badge--featured { background: var(--color-accent); color: #fff; }
.listing-card__badge--verified { background: var(--color-secondary); color: #fff; top: var(--space-3); right: calc(var(--space-3) + 90px); }

.listing-card__logo { width: 80px; height: 80px; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--color-border); flex-shrink: 0; }
.listing-card__logo img { width: 100%; height: 100%; object-fit: cover; }

.listing-card__name { font-size: var(--text-base); font-weight: 700; margin-bottom: var(--space-1); }
.listing-card__name a { color: var(--color-text); }
.listing-card__name a:hover { color: var(--color-primary); text-decoration: none; }
.listing-card__tagline { font-size: var(--text-sm); color: var(--color-text-muted); margin-bottom: var(--space-2); }
.listing-card__rating { display: flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-1); font-size: var(--text-sm); }
.listing-card__address { font-size: var(--text-xs); color: var(--color-text-muted); display: flex; align-items: flex-start; gap: 6px; }
.listing-card__address .fa { margin-top: 2px; color: var(--color-danger); flex-shrink: 0; }

.listing-card__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  flex-shrink: 0;
  align-items: stretch;
  min-width: 90px;
}

@media (max-width: 600px) {
  .listing-card {
    grid-template-columns: 64px 1fr;
    grid-template-rows: auto auto;
  }
  .listing-card__actions {
    grid-column: 1 / -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ─────────────────────────────────────────
   STARS
───────────────────────────────────────── */
.stars { color: var(--color-star); font-size: 0.85rem; }
.rating-number { font-weight: 700; font-size: var(--text-sm); }
.rating-count { color: var(--color-text-muted); font-size: var(--text-xs); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer { background: #111827; color: rgba(255,255,255,.8); }

.footer__top { padding: var(--space-12) 0; }
.footer__grid {
  display: grid;
  gap: var(--space-8);
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; } }

.footer__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  text-decoration: none;
  margin-bottom: var(--space-4);
}
.footer__logo .logo-text { color: #fff; }
.footer__brand p { font-size: var(--text-sm); line-height: 1.7; margin-bottom: var(--space-4); color: rgba(255,255,255,.6); }

.footer__social { display: flex; gap: var(--space-3); margin-bottom: var(--space-4); }
.footer__social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.7);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.footer__social a:hover { background: var(--color-primary); color: #fff; text-decoration: none; }

.footer__apps { display: flex; gap: var(--space-3); flex-wrap: wrap; }
.app-badge {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  font-size: var(--text-xs);
  color: rgba(255,255,255,.8);
  font-weight: 500;
}
.app-badge:hover { border-color: rgba(255,255,255,.5); text-decoration: none; color: #fff; }

.footer__heading {
  font-size: var(--text-sm);
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--space-4);
  letter-spacing: .05em;
  text-transform: uppercase;
}
.footer__col ul li { margin-bottom: var(--space-2); }
.footer__col ul li a {
  font-size: var(--text-sm);
  color: rgba(255,255,255,.6);
  transition: color var(--transition);
}
.footer__col ul li a:hover { color: #fff; text-decoration: none; }

.footer__newsletter { margin-top: var(--space-6); }
.newsletter-form { display: flex; gap: var(--space-2); margin-top: var(--space-3); }
.newsletter-form input {
  flex: 1;
  padding: var(--space-2) var(--space-3);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: var(--text-sm);
  outline: none;
}
.newsletter-form input::placeholder { color: rgba(255,255,255,.4); }
.newsletter-form input:focus { border-color: var(--color-primary); }
.newsletter-form button {
  padding: var(--space-2) var(--space-4);
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: background var(--transition);
}
.newsletter-form button:hover { background: var(--color-primary-dark); }

.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: var(--space-4) 0;
}
.footer__bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.footer__bottom p { font-size: var(--text-xs); color: rgba(255,255,255,.5); }

/* ─────────────────────────────────────────
   BACK TO TOP
───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  transition: all var(--transition);
  z-index: 500;
}
.back-to-top:hover { background: var(--color-primary-dark); transform: translateY(-2px); }
@media (max-width: 768px) { .back-to-top { bottom: 80px; } }

/* ─────────────────────────────────────────
   BREADCRUMB
───────────────────────────────────────── */
.breadcrumb {
  padding: var(--space-3) 0;
  font-size: var(--text-sm);
}
.breadcrumb ol { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-2); }
.breadcrumb li { display: flex; align-items: center; gap: var(--space-2); color: var(--color-text-muted); }
.breadcrumb li:not(:last-child)::after { content: '/'; color: var(--color-border); }
.breadcrumb li a { color: var(--color-text-muted); }
.breadcrumb li a:hover { color: var(--color-primary); }
.breadcrumb li:last-child { color: var(--color-text); font-weight: 500; }

/* ─────────────────────────────────────────
   AD BANNER
───────────────────────────────────────── */
.ad-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  background: var(--color-bg);
}
.ad-banner::before {
  content: 'Ad';
  position: absolute;
  top: var(--space-2);
  right: var(--space-2);
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  z-index: 1;
}
.ad-banner img { width: 100%; height: auto; display: block; }

/* ─────────────────────────────────────────
   FILTER SIDEBAR
───────────────────────────────────────── */
.filter-sidebar {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  position: sticky;
  top: calc(var(--header-height) + var(--cat-nav-height) + var(--space-4));
}
.filter-sidebar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.filter-sidebar__header h3 { font-size: var(--text-base); }
.filter-clear { font-size: var(--text-sm); color: var(--color-primary); font-weight: 500; }

.filter-group { margin-bottom: var(--space-5); }
.filter-group__title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.filter-group__list { display: flex; flex-direction: column; gap: var(--space-2); }
.filter-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-sm);
  cursor: pointer;
}
.filter-option input { accent-color: var(--color-primary); width: 16px; height: 16px; }
.filter-option .count { margin-left: auto; font-size: var(--text-xs); color: var(--color-text-muted); background: var(--color-bg); padding: 1px 6px; border-radius: var(--radius-full); }

/* Rating filter */
.filter-rating-options { display: flex; flex-direction: column; gap: var(--space-2); }
.filter-rating-option { display: flex; align-items: center; gap: var(--space-2); cursor: pointer; font-size: var(--text-sm); }

/* ─────────────────────────────────────────
   PAGINATION
───────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: var(--space-6) 0;
}
.pagination a, .pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition);
  color: var(--color-text);
}
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); text-decoration: none; }
.pagination .is-active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }

/* ─────────────────────────────────────────
   DYNAMIC FIELDS TABLE
───────────────────────────────────────── */
.dynamic-fields { width: 100%; border-collapse: collapse; }
.dynamic-fields tr:nth-child(even) td { background: var(--color-bg); }
.dynamic-fields td {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--color-border);
  vertical-align: top;
}
.dynamic-fields td:first-child {
  font-weight: 600;
  color: var(--color-text-muted);
  width: 40%;
  white-space: nowrap;
}
.dynamic-fields td:last-child { color: var(--color-text); }

/* ─────────────────────────────────────────
   REVIEW CARD
───────────────────────────────────────── */
.review-card {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}
.review-card__header { display: flex; align-items: flex-start; gap: var(--space-3); margin-bottom: var(--space-3); }
.reviewer-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--color-primary);
  font-size: var(--text-base);
  flex-shrink: 0;
}
.review-card__meta { flex: 1; }
.review-card__name { font-weight: 600; font-size: var(--text-sm); }
.review-card__date { font-size: var(--text-xs); color: var(--color-text-muted); }
.review-card__title { font-weight: 600; margin-bottom: var(--space-1); }
.review-card__body { font-size: var(--text-sm); color: var(--color-text-muted); line-height: 1.7; }

/* ─────────────────────────────────────────
   CONTACT BUTTONS (sticky mobile)
───────────────────────────────────────── */
.sticky-contact-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 800;
  background: #fff;
  border-top: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-3);
  box-shadow: 0 -4px 20px rgba(0,0,0,.1);
}
@media (max-width: 768px) { .sticky-contact-bar { display: flex; gap: var(--space-2); } }
.sticky-contact-bar .btn { flex: 1; font-size: var(--text-xs); }

/* ─────────────────────────────────────────
   CHAT WIDGET
───────────────────────────────────────── */
.chat-widget {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 700;
}
@media (max-width: 768px) { .chat-widget { bottom: 80px; } }
.chat-fab {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-full);
  background: var(--color-primary);
  color: #fff;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: all var(--transition);
  position: relative;
}
.chat-fab:hover { background: var(--color-primary-dark); transform: scale(1.08); }
.chat-fab .chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  background: var(--color-danger);
  color: #fff;
  border-radius: var(--radius-full);
  font-size: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.chat-window {
  position: absolute;
  bottom: calc(100% + var(--space-3));
  right: 0;
  width: min(340px, 90vw);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.chat-window.is-open { display: flex; }
.chat-window__header {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-window__header h4 { font-size: var(--text-sm); font-weight: 600; }
.chat-close { color: rgba(255,255,255,.8); font-size: 1.25rem; }
.chat-messages {
  flex: 1;
  padding: var(--space-4);
  overflow-y: auto;
  max-height: 280px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  background: var(--color-bg);
}
.chat-msg { max-width: 80%; }
.chat-msg--owner { align-self: flex-start; }
.chat-msg--visitor { align-self: flex-end; }
.chat-msg__bubble {
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  line-height: 1.5;
}
.chat-msg--owner .chat-msg__bubble   { background: #fff; border: 1px solid var(--color-border); border-radius: 0 var(--radius-lg) var(--radius-lg) var(--radius-lg); }
.chat-msg--visitor .chat-msg__bubble { background: var(--color-primary); color: #fff; border-radius: var(--radius-lg) 0 var(--radius-lg) var(--radius-lg); }
.chat-msg__time { font-size: 10px; color: var(--color-text-muted); margin-top: 3px; }
.chat-msg--visitor .chat-msg__time { text-align: right; }
.chat-input-row {
  display: flex;
  gap: var(--space-2);
  padding: var(--space-3);
  border-top: 1px solid var(--color-border);
}
.chat-input {
  flex: 1;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  outline: none;
}
.chat-input:focus { border-color: var(--color-primary); }
.chat-send { padding: var(--space-2) var(--space-3); background: var(--color-primary); color: #fff; border-radius: var(--radius-md); font-size: 0.9rem; }

/* ─────────────────────────────────────────
   IMAGE SLIDER / LIGHTBOX
───────────────────────────────────────── */
.image-slider { position: relative; border-radius: var(--radius-xl); overflow: hidden; background: #000; }
.image-slider__track { display: flex; transition: transform 400ms ease; }
.image-slider__slide { flex-shrink: 0; width: 100%; aspect-ratio: 16/9; }
.image-slider__slide img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; }
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.9);
  color: var(--color-text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  z-index: 2;
  transition: all var(--transition);
}
.slider-btn:hover { background: #fff; box-shadow: var(--shadow-md); }
.slider-btn--prev { left: var(--space-3); }
.slider-btn--next { right: var(--space-3); }
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: var(--space-3) 0;
}
.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-border);
  cursor: pointer;
  transition: all var(--transition);
}
.slider-dot.is-active { background: var(--color-primary); width: 20px; }
.slider-thumbs { display: flex; gap: var(--space-2); margin-top: var(--space-2); overflow-x: auto; }
.slider-thumb {
  width: 70px;
  height: 50px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color var(--transition);
}
.slider-thumb.is-active { border-color: var(--color-primary); }
.slider-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.lightbox.is-open { display: flex; }
.lightbox__img { max-width: 90vw; max-height: 90vh; border-radius: var(--radius-lg); }
.lightbox__close { position: absolute; top: var(--space-4); right: var(--space-4); color: #fff; font-size: 2rem; }
.lightbox__prev, .lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.15);
  color: #fff;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox__prev { left: var(--space-4); }
.lightbox__next { right: var(--space-4); }

/* ─────────────────────────────────────────
   MAP EMBED
───────────────────────────────────────── */
.listing-map {
  width: 100%;
  aspect-ratio: 16/7;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--color-border);
}
.listing-map iframe { width: 100%; height: 100%; border: none; }

/* ─────────────────────────────────────────
   ENQUIRY FORM
───────────────────────────────────────── */
.enquiry-form { display: flex; flex-direction: column; gap: var(--space-3); }
.form-group { display: flex; flex-direction: column; gap: var(--space-1); }
.form-group label { font-size: var(--text-sm); font-weight: 600; }
.form-control {
  padding: var(--space-3);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: var(--font-body);
  outline: none;
  transition: border-color var(--transition);
  width: 100%;
}
.form-control:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(26,86,219,.1); }
.form-control::placeholder { color: var(--color-text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ─────────────────────────────────────────
   SKELETON LOADERS
───────────────────────────────────────── */
@keyframes skeleton-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .4; }
}
.skeleton {
  background: var(--color-border);
  border-radius: var(--radius-md);
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}
.skeleton-card {
  height: 120px;
  border-radius: var(--radius-xl);
}

/* ─────────────────────────────────────────
   GRID UTILITIES
───────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-5); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-5); }

@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px)  { .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px)  { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ─────────────────────────────────────────
   UTILITY CLASSES
───────────────────────────────────────── */
.text-center { text-align: center; }
.text-muted  { color: var(--color-text-muted); }
.font-bold   { font-weight: 700; }
.mt-0 { margin-top: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.gap-4 { gap: var(--space-4); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.w-full { width: 100%; }
.rounded-full { border-radius: var(--radius-full); }
