:root {
  --bg-page: radial-gradient(circle at top left, #fffaf0, #f6f3ff 50%, #fdf7ee);
  --bg-elevated: #ffffff;
  --bg-soft: #eef2f7;
  --bg-soft-2: #f7fbfa;
  --bg-overlay: rgba(2, 6, 23, 0.6);

  --text-main: #020617;
  --text-muted: #6b7280;
  --text-soft: #94a3b8;

  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-gradient: linear-gradient(135deg, #0f766e, #14b8a6);

  --border-subtle: #e5e7eb;
  --border-strong: rgba(148, 163, 184, 0.18);

  --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.12);
  --shadow-card: 0 12px 28px rgba(15, 23, 42, 0.08);
  --shadow-dark: 0 18px 40px rgba(15, 23, 42, 0.45);

  --hero-panel-bg: radial-gradient(circle at top right, #fef6ff, #ffffff 45%, #f6fffb);
  --hero-badge-bg: linear-gradient(145deg, #0f172a, #020617);
  --hero-badge-text: #f9fafb;
  --hero-badge-subtext: #cbd5f5;
  --hero-badge-label: #6ee7b7;

  --results-card-bg: #ffffff;
  --listing-featured-bg: radial-gradient(circle at top left, #ecfdf3, #ffffff 55%);
  --listing-featured-outline: rgba(34, 197, 94, 0.18);

  --footer-bg: rgba(248, 250, 252, 0.9);
  --topbar-bg: rgba(253, 247, 238, 0.9);

  --transition-fast: 0.18s ease-out;
}

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

html,
body {
  margin: 0;
  padding: 0;
}

html {
  overflow-y: scroll;
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-page);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* GLOBAL */
.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 14px;
}

.page {
  padding: 16px 14px 24px;
}

/* TOPBAR */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--topbar-bg);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background-image: var(--primary-gradient);
  color: #ffffff;
  font-weight: 700;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(0, 184, 148, 0.4);
}

.brand-copy {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: lowercase;
  font-size: 16px;
}

.brand-tagline {
  font-size: 11px;
  color: var(--text-muted);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.location-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.35);
  background: var(--bg-elevated);
  color: var(--primary);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.location-btn:hover {
  background: var(--bg-soft-2);
  border-color: var(--primary);
}

.location-icon {
  font-size: 13px;
}

.location-caret {
  font-size: 10px;
  opacity: 0.6;
}

/* LOCATION OVERLAY */
.location-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.location-overlay.hidden {
  display: none;
}

body.overlay-open {
  overflow: hidden;
}

.location-modal {
  background: var(--bg-elevated);
  border-radius: 28px;
  padding: 32px 28px 28px;
  max-width: 400px;
  width: 100%;
  box-shadow: 0 32px 64px rgba(15, 23, 42, 0.3);
}

.location-modal-header {
  text-align: center;
  margin-bottom: 24px;
  position: relative;
}

.location-modal-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-soft);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  line-height: 1;
}

.location-modal-close:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.location-modal-icon {
  font-size: 32px;
  display: block;
  margin-bottom: 10px;
}

.location-modal-header h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.location-modal-header p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

.location-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.location-option {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--border-subtle);
  background: var(--bg-soft-2);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  font-family: inherit;
  color: var(--text-main);
}

.location-option:hover {
  border-color: var(--primary);
  background: #ecfdf5;
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 118, 110, 0.15);
}

.loc-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
}

.loc-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* HERO */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr);
  gap: 16px;
  background: var(--hero-panel-bg);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 16px 18px 14px;
  margin-top: 14px;
  margin-bottom: 18px;
}

.hero-main h1 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.hero-sub {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-search {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-search-row {
  display: flex;
  gap: 8px;
  background: var(--bg-elevated);
  padding: 5px;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.hero-search-row input {
  flex: 1;
  border: none;
  outline: none;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  min-width: 0;
  background: transparent;
  color: var(--text-main);
}

.hero-search-row input::placeholder {
  color: var(--text-soft);
}

.hero-search-row button {
  border: none;
  outline: none;
  padding: 9px 16px;
  border-radius: 999px;
  background-image: var(--primary-gradient);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.32);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
  white-space: nowrap;
}

.hero-search-row button:hover {
  filter: brightness(1.05);
  box-shadow: 0 14px 32px rgba(14, 165, 233, 0.4);
}

.hero-search-row button:active {
  transform: scale(0.97);
  box-shadow: 0 6px 14px rgba(14, 165, 233, 0.25);
}

.hero-note {
  margin: 0;
  font-size: 12px;
  color: var(--text-muted);
}

.hero-side {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}

.hero-badge {
  align-self: stretch;
  border-radius: 20px;
  background: var(--hero-badge-bg);
  color: var(--hero-badge-text);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-dark);
}

.hero-badge-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--hero-badge-label);
}

.hero-badge-value {
  font-size: 15px;
  font-weight: 600;
}

.hero-badge-note {
  margin: 0;
  font-size: 11px;
  color: var(--hero-badge-subtext);
}

/* PAGE BODY */
.page-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* CATEGORIES */
.categories {
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.section-heading p {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-muted);
}

/* CATEGORY GRID */
.category-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.category-card {
  border: none;
  outline: none;
  text-align: left;
  padding: 14px 14px 12px;
  border-radius: 18px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  gap: 0;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
  position: relative;
  overflow: hidden;
  color: inherit;
}

.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 118, 110, 0.35);
}

.category-card.active {
  background: #f0fdf8;
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.16);
}

.cat-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #f0fdf8;
  border: 1px solid rgba(15, 118, 110, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 10px;
  flex-shrink: 0;
  line-height: 1;
}

.cat-name {
  font-weight: 600;
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.3;
  margin-bottom: 4px;
}

.cat-desc {
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* RESULTS */
.results {
  display: none;
  background: var(--results-card-bg);
  border-radius: 22px;
  padding: 14px 14px 12px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 22px;
  scroll-margin-top: 80px;
  overflow: hidden;
}

body.has-results .results {
  display: block;
}

body.has-results .categories {
  display: none;
}

/* BACK BUTTON */
.back-to-categories-btn {
  display: none;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
  padding: 0.72rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-soft-2);
  color: var(--primary);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
  white-space: nowrap;
}

.back-to-categories-btn::before {
  content: "←";
  font-size: 0.95rem;
  line-height: 1;
}

.back-to-categories-btn:hover {
  background: #ecfdf5;
  border-color: #99f6e4;
  color: var(--primary-dark);
  transform: translateY(-1px);
}

.back-to-categories-btn:active {
  transform: translateY(0);
}

.back-to-categories-btn:focus-visible {
  outline: 2px solid var(--primary-dark);
  outline-offset: 2px;
}

/* RESULTS HEADER */
.results-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  padding: 0;
}

.results-header-main h2 {
  margin: 0 0 2px;
  font-size: 17px;
}

.results-meta {
  margin: 0;
  font-size: 11px;
  color: var(--text-muted);
}

.divider-dot {
  margin: 0 6px;
  opacity: 0.7;
}

.results-filters {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.filter-label {
  font-size: 12px;
  color: var(--text-muted);
}

.filter-label select {
  margin-left: 6px;
  padding: 5px 10px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-soft);
  color: var(--text-main);
  font-family: inherit;
}

.results-list {
  border-top: 1px solid rgba(229, 231, 235, 0.8);
  margin-top: 10px;
  padding: 6px 0 0;
}

.placeholder-text {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 10px;
}

/* LISTINGS */
.listing {
  padding: 10px 0;
  border-bottom: 1px dashed rgba(209, 213, 219, 0.4);
}

.listing:last-child {
  border-bottom: none;
}

.listing.featured {
  position: relative;
  border-radius: 16px;
  margin: 8px 0;
  padding: 12px 12px;
  background: var(--listing-featured-bg);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
  outline: 1px solid var(--listing-featured-outline);
  transform: translateY(-1px);
}

.listing.prime {
  border-left: 5px solid #16a34a;
  box-shadow: 0 18px 40px rgba(22, 163, 74, 0.22);
  outline: 1px solid rgba(34, 197, 94, 0.3);
}

.listing.prime::before {
  content: "⭐ PRIME LISTING";
  position: absolute;
  top: -10px;
  right: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.98);
  color: #78350f;
  box-shadow: 0 6px 14px rgba(202, 138, 4, 0.25);
}

.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}

.listing-name {
  font-weight: 600;
  font-size: 14px;
}

.listing-tagline {
  font-size: 12px;
  color: var(--text-muted);
}

.listing-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.badge {
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 7px;
  border: 1px solid rgba(209, 213, 219, 0.5);
  background: var(--bg-soft);
  color: var(--text-muted);
}

.badge-pill {
  background: #e0fdf4;
  border-color: #a7f3d0;
  color: #047857;
}

.badge-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.badge-prime {
  background: #facc15;
  border-color: #eab308;
  color: #78350f;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-prime::before {
  content: "★";
  font-size: 10px;
}

.badge-premium {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.3);
  color: #0369a1;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.badge-free {
  background: var(--bg-soft);
  border-color: rgba(209, 213, 219, 0.5);
  color: var(--text-muted);
}

.listing-body {
  margin-top: 6px;
  font-size: 12px;
}

.listing-body-row {
  margin-bottom: 4px;
}

.listing-label {
  font-weight: 500;
}

/* ACTION BUTTONS */
.listing-actions {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-call,
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  font-family: inherit;
  text-decoration: none;
  border: none;
  cursor: pointer;
  min-height: 36px;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), filter var(--transition-fast);
}

.btn-call {
  background-image: var(--primary-gradient);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.28);
}

.btn-whatsapp {
  background: #e9fce9;
  color: #166534;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.2);
}

.btn-call:hover,
.btn-whatsapp:hover {
  filter: brightness(1.05);
}

.btn-call:active,
.btn-whatsapp:active {
  transform: scale(0.97);
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.18);
}

/* FOOTER */
.site-footer {
  border-top: 1px solid rgba(209, 213, 219, 0.18);
  background: var(--footer-bg);
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px 14px;
  font-size: 11px;
  color: var(--text-muted);
}

.footer-inner p {
  margin: 0;
}

.footer-meta {
  margin: 0;
}

/* MOBILE */
@media (max-width: 899px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 14px 12px;
  }

  .hero-side {
    justify-content: flex-start;
  }

  .hero-badge {
    margin-top: 6px;
  }

  .hero-search-row {
    flex-direction: column;
    border-radius: 18px;
    padding: 8px;
  }

  .hero-search-row input,
  .hero-search-row button {
    width: 100%;
  }

  .hero-search-row button {
    justify-content: center;
  }

  .listing.prime::before {
    right: 8px;
    top: -9px;
    font-size: 9px;
    padding: 2px 6px;
  }

  .back-to-categories-btn {
    font-size: 12px;
    padding: 11px 14px;
  }
}

/* DESKTOP */
@media (min-width: 900px) {
  .hero-main h1 {
    font-size: 26px;
  }

  .hero-sub {
    font-size: 14px;
  }

  .category-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .results-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}