:root {
  --bg-body: #f5f5f7;
  --bg-elevated: #ffffff;
  --bg-soft: #eef2f7;
  --text-main: #020617;
  --text-muted: #6b7280;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-gradient: linear-gradient(135deg, #0f766e, #14b8a6);
  --accent-pink: #ff5573;
  --border-subtle: #e5e7eb;
  --radius-lg: 18px;
  --radius-md: 14px;
  --radius-sm: 999px;
  --shadow-soft: 0 18px 36px rgba(15, 23, 42, 0.1);
  --shadow-card: 0 12px 26px rgba(15, 23, 42, 0.07);
  --transition-fast: 0.18s ease-out;
}

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

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

body {
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at top left, #fffaf0, #f6f3ff 50%, #fdf7ee);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select { font: inherit; }

button { color: inherit; }

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.ui-icon {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}
.page { padding: 18px 16px 28px; }

.skip-link {
  position: fixed;
  left: 10px;
  top: 10px;
  z-index: 100;
  transform: translateY(-160%);
  border-radius: 999px;
  background: #020617;
  color: #ffffff;
  padding: 8px 12px;
  font-size: 12px;
  text-decoration: none;
}
.skip-link:focus { transform: translateY(0); }

.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;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(253, 247, 238, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.8);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  border: 0;
  background: transparent;
  padding: 0;
  text-align: left;
}
.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);
  flex: 0 0 auto;
}
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-name {
  font-weight: 700;
  letter-spacing: 0.06em;
  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-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(15, 118, 110, 0.28);
  background: rgba(236, 253, 245, 0.92);
  color: var(--primary-dark);
  font-weight: 600;
  cursor: pointer;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.location-pill:hover { background: #dcfce7; }

.env-pill {
  font-size: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.8);
  color: #334155;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.env-prod { border-color: rgba(16, 185, 129, 0.5); }
.env-staging { border-color: rgba(234, 179, 8, 0.6); }
.env-local { border-color: rgba(99, 102, 241, 0.5); }

.location-gate {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(10px);
}
.location-gate[hidden] { display: none; }
.location-card {
  width: min(100%, 520px);
  border-radius: 24px;
  background: radial-gradient(circle at top right, #fef6ff, #ffffff 52%, #f6fffb);
  box-shadow: 0 26px 70px rgba(15, 23, 42, 0.28);
  padding: 18px;
}
.location-card-header { margin-bottom: 14px; }
.location-kicker {
  margin: 0 0 4px;
  color: var(--primary-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.location-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.location-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}
.location-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.location-option {
  min-height: 74px;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  padding: 11px 12px;
  text-align: left;
  cursor: not-allowed;
}
.location-option.available {
  cursor: pointer;
  border-color: rgba(16, 185, 129, 0.55);
  background: radial-gradient(circle at top left, #ecfdf5, #ffffff 65%);
}
.location-option.available:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}
.location-option:disabled {
  opacity: 0.52;
  filter: grayscale(0.15);
}
.location-option-name,
.location-option-meta {
  display: block;
}
.location-option-name {
  color: var(--text-main);
  font-size: 14px;
  font-weight: 700;
}
.location-option-meta {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

body.location-modal-open { overflow: hidden; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr);
  gap: 18px;
  background: radial-gradient(circle at top right, #fef6ff, #ffffff 45%, #f6fffb);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 18px 20px 18px;
  margin-top: 14px;
  margin-bottom: 22px;
}
.hero-main h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.02em; }
.hero-sub { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); }

.hero-search { display: flex; flex-direction: column; gap: 8px; }
.hero-search-row {
  display: flex;
  gap: 8px;
  background: #ffffff;
  padding: 6px;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.12);
}
.hero-search-row input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  padding: 9px 12px;
  border-radius: 999px;
  font-size: 14px;
}
.hero-search-row input::placeholder { color: #9ca3af; }
.hero-search-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  outline: none;
  padding: 9px 16px;
  border-radius: 999px;
  background-image: var(--primary-gradient);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.5);
  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.6); }
.hero-search-row button:active { transform: scale(0.97); box-shadow: 0 6px 14px rgba(14, 165, 233, 0.35); }

.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: linear-gradient(145deg, #0f172a, #020617);
  color: #f9fafb;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.42);
}
.hero-badge-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6ee7b7;
}
.hero-badge-value { font-size: 15px; font-weight: 600; }
.hero-badge-note { margin: 0; font-size: 11px; color: #cbd5f5; }

.categories { margin-bottom: 24px; }
.section-heading h2 { margin: 0 0 4px; font-size: 18px; }
.section-heading p { margin: 0 0 14px; font-size: 12px; color: var(--text-muted); }

.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;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(148, 163, 184, 0.14);
  display: flex;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), border-color var(--transition-fast);
}
.category-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
  border-color: rgba(56, 189, 248, 0.6);
}
.category-card.active {
  background: radial-gradient(circle at top left, #ecfdf5, #eff6ff);
  border-color: rgba(16, 185, 129, 0.7);
  box-shadow: 0 18px 40px rgba(16, 185, 129, 0.35);
}
.category-icon { font-size: 20px; }
.category-icon svg {
  width: 22px;
  height: 22px;
  color: var(--primary);
}
.category-name { font-weight: 600; font-size: 13px; }
.category-meta { font-size: 11px; color: var(--text-muted); }

.results {
  background: var(--bg-elevated);
  border-radius: 22px;
  padding: 16px 18px 14px;
  box-shadow: var(--shadow-soft);
  margin-bottom: 28px;
  scroll-margin-top: 80px;
}
.results-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.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; flex-wrap: wrap; }
.back-to-categories-btn {
  display: none;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: #f9fafb;
  padding: 6px 10px;
  font-size: 11px;
  color: #4b5563;
  cursor: pointer;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.back-to-categories-btn:hover { background: #eef2ff; }

.filter-label { font-size: 12px; color: var(--text-muted); }
.filter-label-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.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);
  max-width: 170px;
}

.results-list {
  border-top: 1px solid rgba(229, 231, 235, 0.8);
  margin-top: 10px;
  padding-top: 10px;
}
.placeholder-text { font-size: 12px; color: var(--text-muted); margin: 4px 0 10px; }

.listing { padding: 14px 0 16px; border-bottom: 1px dashed rgba(209, 213, 219, 0.9); }
.listing:last-child { border-bottom: none; }

.listing.featured {
  position: relative;
  border-radius: 16px;
  margin: 6px -6px;
  padding: 12px 12px;
  background: radial-gradient(circle at top left, #ecfdf3, #ffffff 55%);
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
  outline: 1px solid rgba(34, 197, 94, 0.18);
  transform: translateY(-1px);
}

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

.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.4);
}

.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.9);
  background: #f9fafb;
  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: "\2605"; font-size: 10px; }

.badge-slot {
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-slot::before { content: "\2191"; font-size: 10px; opacity: 0.9; }

.badge-slot-1 { background: rgba(34, 197, 94, 0.15); border-color: rgba(34, 197, 94, 0.35); color: #166534; }
.badge-slot-2 { background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.28); color: #065f46; }
.badge-slot-3 { background: rgba(14, 165, 233, 0.10); border-color: rgba(14, 165, 233, 0.25); color: #075985; }

.listing-body { margin-top: 8px; font-size: 12px; line-height: 1.55; }
.listing-body-row { margin-bottom: 5px; }
.listing-label { font-weight: 500; }

.listing-actions {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn-call,
.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 12px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  min-height: 38px;
  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 10px 22px rgba(16, 185, 129, 0.36);
}
.btn-whatsapp {
  background: #e9fce9;
  color: #166534;
  box-shadow: 0 8px 18px rgba(22, 163, 74, 0.26);
}
.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.25); }

.btn-report {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 11px;
  color: #94a3b8;
  text-decoration: underline;
  margin-left: auto;
  align-self: center;
}

.review-prompt {
  margin-top: 10px;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(248, 250, 252, 0.92);
  padding: 10px;
}
.review-prompt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.review-prompt-title {
  font-size: 12px;
  font-weight: 600;
}
.review-choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.review-choice,
.review-submit {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: #ffffff;
  color: #475569;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
}
.review-choice.active {
  border-color: rgba(16, 185, 129, 0.55);
  background: #dcfce7;
  color: #166534;
}
.review-message-label { display: block; }
.review-message {
  width: 100%;
  resize: vertical;
  border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: var(--text-main);
  font-size: 12px;
  outline: none;
  padding: 8px 10px;
}
.review-message:focus {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}
.review-prompt-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}
.review-submit {
  background-image: var(--primary-gradient);
  border-color: transparent;
  color: #ffffff;
}
.review-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}
.review-status {
  color: var(--text-muted);
  font-size: 11px;
}
.review-status.saved {
  color: #047857;
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid rgba(209, 213, 219, 0.9);
  background: rgba(248, 250, 252, 0.9);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 18px;
  font-size: 11px;
  color: var(--text-muted);
}
.footer-inner p { margin: 0; }
.footer-meta { margin: 0; }

@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .page { padding: 18px 16px 30px; }
  .topbar-inner { padding: 11px 16px; }
  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 20px 18px;
    border-radius: 22px;
    margin-top: 18px;
    margin-bottom: 24px;
  }
  .hero-side { justify-content: flex-start; }
  .hero-badge {
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
  }
  .hero-badge-note { display: none; }
  .categories { margin-bottom: 26px; }
  .category-grid { gap: 14px; }
  .category-card {
    min-height: 104px;
    padding: 16px 16px;
    border-radius: 18px;
  }
  .results {
    border-radius: 22px;
    padding: 20px 20px 18px;
  }
  .results-list {
    margin-top: 14px;
    padding-top: 12px;
  }
  .listing {
    padding: 18px 0 20px;
  }

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

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

@media (max-width: 520px) {
  .brand-tagline { display: none; }
  .location-pill { max-width: 112px; }
  .location-card { padding: 14px; border-radius: 20px; }
  .location-card h2 { font-size: 20px; }
  .location-options { grid-template-columns: minmax(0, 1fr); }
  .hero-main h1 { font-size: 21px; line-height: 1.25; }
  .hero-sub { margin-bottom: 18px; }
  .hero-search { gap: 10px; }
  .hero-search-row {
    border-radius: 22px;
    flex-direction: column;
    gap: 10px;
    padding: 8px;
  }
  .hero-search-row input {
    padding: 12px 14px;
  }
  .hero-search-row button {
    width: 100%;
    min-height: 44px;
  }
  .hero-note { line-height: 1.55; }
  .category-grid { grid-template-columns: minmax(0, 1fr); }
  .category-card {
    padding: 18px 16px;
  }
  .results-header { gap: 10px; }
  .results-header-main h2 { font-size: 18px; }
  .results-meta {
    display: flex;
    flex-wrap: wrap;
    column-gap: 8px;
    row-gap: 2px;
    line-height: 1.55;
  }
  .divider-dot { margin: 0; }
  .results-filters { gap: 10px; }
  .back-to-categories-btn {
    min-height: 36px;
    padding: 8px 12px;
  }
  .filter-label,
  .filter-label select { width: 100%; }
  .filter-label-text { width: 100%; }
  .filter-label select {
    margin: 7px 0 0;
    max-width: none;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 14px;
  }
  .listing-name { font-size: 15px; }
  .listing-tagline { margin-top: 2px; }
  .listing-badges { margin-top: 8px; }
  .listing-body {
    margin-top: 12px;
    line-height: 1.65;
  }
  .listing-actions {
    margin-top: 14px;
    gap: 11px;
  }
  .btn-call,
  .btn-whatsapp,
  .btn-report { width: 100%; margin-left: 0; }
  .btn-call,
  .btn-whatsapp {
    min-height: 44px;
  }
  .btn-report { padding-top: 2px; }
  .review-prompt-head,
  .review-prompt-actions { align-items: stretch; flex-direction: column; }
  .review-choice-row,
  .review-submit { width: 100%; }
  .listing-header { flex-direction: column; }
}

@media (min-width: 900px) {
  .hero-main h1 { font-size: 26px; }
  .hero-sub { font-size: 14px; }
  .category-grid { grid-template-columns: repeat(5, 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; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
