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

:root {
  --green:   #39ff14;
  --accent:  #f59e0b;
  --bg:      #0c0c0e;
  --card:    #141417;
  --border:  #1f1f24;
  --text:    #e8e8ec;
  --muted:   #7a7a8c;
  --radius:  10px;
  --font-h:  'Space Grotesk', sans-serif;
  --font-b:  'Inter', sans-serif;
}

body { font-family: var(--font-b); background: var(--bg); color: var(--text); line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* ===== HEADER ===== */
header {
  background: #0c0c0e;
  padding: 1rem 2rem;
  position: sticky; top: 0; z-index: 100;
  border-bottom: 2px solid var(--green);
}
.header-inner { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.logo { font-family: var(--font-h); font-weight: 700; font-size: 1.2rem; color: var(--green); text-shadow: 0 0 10px rgba(57,255,20,0.4); white-space: nowrap; }
.header-search { display: flex; flex: 1; min-width: 200px; gap: 0; }
.header-search input { flex: 1; padding: 0.5rem 1rem; border: 1px solid #333; border-right: none; border-radius: 6px 0 0 6px; background: #1a1a1e; color: #fff; font-family: var(--font-b); font-size: 0.9rem; }
.header-search input::placeholder { color: #666; }
.header-search button { padding: 0.5rem 1rem; background: var(--green); color: #0c0c0e; border: none; border-radius: 0 6px 6px 0; font-weight: 600; cursor: pointer; font-family: var(--font-b); font-size: 0.9rem; }
.header-search button:hover { background: #57ff2c; }

/* ===== HERO ===== */
.hero { background: #0c0c0e; color: #fff; text-align: center; padding: 5rem 2rem 4rem; }
.hero h1 { font-family: var(--font-h); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1rem; }
.hero .accent { color: var(--green); text-shadow: 0 0 20px rgba(57,255,20,0.4); }
.hero-sub { color: #a0aec0; font-size: 1.1rem; max-width: 540px; margin: 0 auto 2rem; }
.hero-count { margin-top: 1rem; color: #718096; font-size: 0.9rem; }

.search-bar { display: flex; justify-content: center; gap: 0; max-width: 540px; margin: 0 auto; }
.search-bar input { flex: 1; padding: 0.75rem 1.25rem; border: 2px solid #333; border-right: none; border-radius: 8px 0 0 8px; background: #1a1a1e; color: #fff; font-size: 1rem; font-family: var(--font-b); }
.search-bar input::placeholder { color: #666; }
.search-bar button { padding: 0.75rem 1.5rem; background: var(--green); color: #0c0c0e; border: none; border-radius: 0 8px 8px 0; font-weight: 700; cursor: pointer; font-size: 1rem; white-space: nowrap; }
.search-bar button:hover { background: #57ff2c; }

/* ===== SECTIONS ===== */
.section-inner { max-width: 1100px; margin: 0 auto; }
.states-section, .featured-section { padding: 3.5rem 2rem; }
.states-section { background: var(--card); border-bottom: 1px solid var(--border); }
.featured-section { background: var(--bg); border-top: 1px solid var(--border); }

h2 { font-family: var(--font-h); font-size: 1.6rem; font-weight: 700; margin-bottom: 1.5rem; }

/* ===== STATE GRID ===== */
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 0.75rem; }
.state-card { background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: var(--radius); padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.25rem; transition: border-color 0.2s, transform 0.15s; }
.state-card:hover { border-color: var(--green); transform: translateY(-2px); }
.state-code { font-family: var(--font-h); font-weight: 700; font-size: 1.1rem; }
.state-count { font-size: 0.78rem; color: var(--muted); }

/* ===== LISTINGS GRID (cards) ===== */
.listings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.business-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: 0.4rem; transition: border-color 0.2s, transform 0.15s; }
.business-card:hover { border-color: var(--green); transform: translateY(-2px); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.card-top h3 { font-family: var(--font-h); font-size: 1rem; font-weight: 600; }
.card-location, .card-phone { font-size: 0.85rem; color: var(--muted); }

/* ===== LISTINGS LIST (rows) ===== */
.listings-section { padding: 2.5rem 2rem; }
.page-header { background: var(--card); border-bottom: 1px solid var(--border); padding: 1.5rem 2rem; color: var(--text); }
.page-header h1 { font-family: var(--font-h); font-size: 1.8rem; font-weight: 700; }
.page-header p { color: var(--muted); margin-top: 0.25rem; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.5rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }

.listings-list { display: flex; flex-direction: column; gap: 0.75rem; }
.business-row { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; transition: border-color 0.2s; }
.business-row:hover { border-color: var(--green); }
.row-main { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; min-width: 0; }
.row-name { font-family: var(--font-h); font-weight: 600; font-size: 1rem; }
.row-name:hover { color: #16a34a; }
.row-location { font-size: 0.83rem; color: var(--muted); }
.row-cats { font-size: 0.78rem; color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-service-areas { font-size: 0.78rem; color: #39ff14; opacity: 0.8; }
.card-cats { font-size: 0.78rem; color: #94a3b8; }
.card-service-areas { font-size: 0.78rem; color: #39ff14; opacity: 0.8; }
.areas-toggle {
  display: inline;
  background: none;
  border: 1px solid rgba(57,255,20,0.3);
  color: #39ff14;
  font-size: 0.72rem;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 0.3rem;
  vertical-align: middle;
  opacity: 0.75;
}
.areas-toggle:hover { opacity: 1; background: rgba(57,255,20,0.08); }
.row-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.3rem; flex-shrink: 0; }
.row-phone { font-size: 0.9rem; font-weight: 600; color: #16a34a; white-space: nowrap; }
.row-phone:hover { text-decoration: underline; }

/* ===== RATING ===== */
.rating { color: var(--accent); font-weight: 600; font-size: 0.9rem; }
.rating small { color: var(--muted); font-weight: 400; }

/* ===== BUSINESS DETAIL ===== */
.business-detail { padding: 2.5rem 2rem; }
.detail-inner { display: flex; gap: 3rem; align-items: flex-start; flex-wrap: wrap; }
.detail-main { flex: 1; min-width: 280px; }
.detail-main h1 { font-family: var(--font-h); font-size: 2rem; font-weight: 700; margin-bottom: 0.75rem; }
.rating-row { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 1.5rem; }
.review-count { color: var(--muted); font-size: 0.9rem; }
.detail-facts { display: flex; flex-direction: column; gap: 1rem; }
.fact { display: flex; flex-direction: column; gap: 0.2rem; }
.fact-label { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.fact-value { font-size: 1rem; }
.fact-value.highlight { color: #16a34a; font-weight: 600; font-size: 1.2rem; }

.detail-sidebar { display: flex; flex-direction: column; gap: 0.75rem; width: 220px; }
.btn-call { display: block; background: var(--green); color: #0c0c0e; text-align: center; padding: 1rem; border-radius: 10px; font-weight: 700; line-height: 1.4; }
.btn-call:hover { background: #57ff2c; }
.btn-call small { font-weight: 400; font-size: 0.85rem; }
.btn-website { display: block; border: 2px solid var(--border); text-align: center; padding: 0.75rem; border-radius: 10px; font-weight: 600; color: var(--text); }
.btn-website:hover { border-color: var(--green); }

/* ===== PAGINATION ===== */
.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.btn-page { padding: 0.5rem 1.25rem; border: 1px solid var(--border); border-radius: 6px; font-weight: 500; background: var(--card); color: var(--text); }
.btn-page:hover { border-color: var(--green); }

/* ===== SEARCH ===== */
.inline-search { display: flex; gap: 0; max-width: 480px; margin-bottom: 1.5rem; }
.inline-search input { flex: 1; padding: 0.6rem 1rem; border: 1px solid var(--border); border-right: none; border-radius: 6px 0 0 6px; font-family: var(--font-b); background: var(--card); color: var(--text); }
.inline-search button { padding: 0.6rem 1rem; background: var(--green); color: #0c0c0e; border: none; border-radius: 0 6px 6px 0; font-weight: 600; cursor: pointer; }
.no-results { color: var(--muted); margin-top: 1rem; }

/* ===== AMAZON PROMO (top) ===== */
.amazon-promo { background: #0f1a0f; border-top: 1px solid rgba(57,255,20,0.15); border-bottom: 1px solid rgba(57,255,20,0.15); padding: 0.9rem 2rem; }
.amazon-promo a { display: flex; align-items: center; justify-content: space-between; max-width: 1100px; margin: 0 auto; text-decoration: none; transition: opacity 0.2s; }
.amazon-promo a:hover { opacity: 0.85; }
.promo-left { display: flex; align-items: center; gap: 0.85rem; }
.promo-icon { font-size: 1.6rem; }
.promo-title { display: block; font-family: var(--font-h); font-weight: 600; font-size: 0.95rem; color: #39ff14; }
.promo-sub { display: block; font-size: 0.78rem; color: var(--muted); margin-top: 0.1rem; }
.promo-cta { font-family: var(--font-h); font-weight: 700; font-size: 0.9rem; color: #f59e0b; white-space: nowrap; padding: 0.4rem 1rem; border: 1px solid rgba(245,158,11,0.3); border-radius: 6px; }
.amazon-promo a:hover .promo-cta { background: rgba(245,158,11,0.08); }

/* ===== AMAZON BANNER ===== */
.amazon-banner { background: #0c0c0e; border-top: 1px solid #1f1f24; border-bottom: 1px solid #1f1f24; padding: 0.85rem 2rem; }
.amazon-banner a { display: flex; align-items: center; gap: 0.75rem; max-width: 1100px; margin: 0 auto; color: #f59e0b; font-family: var(--font-h); font-weight: 600; font-size: 0.95rem; text-decoration: none; transition: opacity 0.2s; }
.amazon-banner a:hover { opacity: 0.85; }
.amazon-icon { font-size: 1.2rem; }
.amazon-tag { font-size: 0.72rem; color: var(--muted); font-weight: 400; font-family: var(--font-b); margin-left: auto; }

/* ===== FOOTER ===== */
footer { background: #0c0c0e; color: #718096; padding: 1.25rem 2rem; border-top: 1px solid #1f1f24; }
.footer-inner { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.85rem; }
.footer-inner strong { color: var(--green); }

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: stretch; }
  .detail-inner { flex-direction: column; }
  .detail-sidebar { width: 100%; }
  .state-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); }
  .business-row { flex-direction: column; align-items: flex-start; }
  .row-meta { align-items: flex-start; }
}
