/**
 * Marketplace — page-specific styles (Phase 1+).
 * Shared tokens, base, layout & components: ecosystem.css
 */

/* —— Header (Car Care Connect–style IA) —— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 1rem;
}
a.logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: var(--weight-extrabold);
  font-size: var(--text-lg);
  color: var(--text);
  text-decoration: none;
}

.nav-desktop {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
}
.nav-desktop a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius-sm);
}
.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--primary);
  background: var(--primary-pale);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

@media (max-width: 959px) {
  .hide-mobile { display: none; }
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}
.mobile-nav {
  display: none;
  position: fixed;
  inset: var(--header-h) 0 0 0;
  background: var(--surface);
  padding: 1rem 1.25rem 2rem;
  overflow-y: auto;
  z-index: 99;
  border-top: 1px solid var(--border);
}
.mobile-nav.is-open { display: block; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav a {
  display: block;
  padding: 0.85rem 0;
  font-weight: 500;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.mobile-nav .mobile-ctas {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

@media (min-width: 960px) {
  .nav-desktop { display: flex; }
  .nav-toggle { display: none; }
  .mobile-nav { display: none !important; }
}

/* —— Hero —— */
.hero {
  padding: 2.5rem 0 3rem;
  background: var(--gradient-hero);
}
.hero-grid {
  display: grid;
  gap: 2rem;
  align-items: center;
}
.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  margin: 0 0 0.75rem;
}
.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(1.85rem, 4.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.03em;
}
.hero h1 em {
  font-style: normal;
  color: var(--primary);
}
.hero-lead {
  margin: 0 0 1.5rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 32rem;
}

.search-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-lg);
}
.search-card label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}
.search-row {
  display: grid;
  gap: 0.75rem;
}
.search-row input,
.search-row select {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  background: var(--surface);
}
.search-row input:focus,
.search-row select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.chip {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  color: var(--text);
  text-decoration: none;
}
.chip:hover {
  border-color: var(--primary);
  background: var(--primary-pale);
  text-decoration: none;
}

.hero-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 1.5rem;
}
.hero-map-placeholder {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 4/3;
  background:
    linear-gradient(180deg, var(--primary-pale) 0%, #fff 100%);
  border-radius: var(--radius-md);
  position: relative;
}
.hero-map-placeholder::after {
  content: "";
  position: absolute;
  inset: 20%;
  border: 2px dashed var(--brand-mid);
  border-radius: 50%;
  opacity: 0.5;
}

@media (min-width: 900px) {
  .hero { padding: 3.5rem 0 4rem; }
  .hero-grid { grid-template-columns: 1.1fr 0.9fr; }
  .search-row { grid-template-columns: 1fr 1fr auto; align-items: end; }
  .search-row .btn { height: 44px; }
}

/* —— SOS strip —— */
.sos-band {
  background: var(--text);
  color: #fff;
  padding: 1.25rem 0;
}
.sos-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.sos-band h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.sos-band p { margin: 0.25rem 0 0; font-size: 0.88rem; opacity: 0.85; }
.sos-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* —— Sections —— */
.section { padding: 3rem 0; }
.section-muted { background: var(--surface-muted); }
.section-head {
  margin-bottom: 1.75rem;
  max-width: 36rem;
}
.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.4rem, 3vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.section-head p { margin: 0; color: var(--text-muted); }

.grid-4 {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .grid-4 { grid-template-columns: repeat(4, 1fr); } }

.category-card {
  padding: 1.25rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.category-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.category-card__icon {
  width: 44px;
  height: 44px;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  background: var(--primary-pale);
  display: grid;
  place-items: center;
  font-size: 1.25rem;
}
.category-card h3 {
  margin: 0 0 0.25rem;
  font-size: 0.92rem;
  font-weight: 700;
}
.category-card p {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Provider cards (CCC / Vitara doctor-card pattern) */
.providers-scroll {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}
.provider-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.provider-card:hover {
  border-color: var(--brand-mid);
  box-shadow: var(--shadow-md);
}
.provider-card__top {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.provider-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: var(--gradient-brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.provider-card h3 {
  margin: 0 0 0.15rem;
  font-size: 0.95rem;
  font-weight: 700;
}
.provider-card__type {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
}
.provider-card__stats {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}
.steps {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
}
.step {
  position: relative;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
}
.step h3 { margin: 0 0 0.35rem; font-size: 1rem; }
.step p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }

.audience-grid {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 768px) {
  .audience-grid { grid-template-columns: 1fr 1fr; }
}
.audience-card {
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  border-top: 4px solid var(--primary);
}
.audience-card--provider { border-top-color: var(--accent-warm); }
.audience-card h3 { margin: 0 0 0.5rem; font-size: 1.15rem; }
.audience-card ul {
  margin: 0 0 1.25rem;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
.audience-card li { margin-bottom: 0.35rem; }

.trust-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.trust-item {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--surface);
  border: 1px solid var(--border);
}
.trust-item strong {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}
.trust-item span { font-size: 0.82rem; color: var(--text-muted); }

.cta-banner {
  padding: 2.5rem 1.5rem;
  border-radius: var(--radius-lg);
  background: var(--gradient-brand);
  color: #fff;
  text-align: center;
}
.cta-banner h2 { margin: 0 0 0.5rem; font-size: 1.5rem; }
.cta-banner p { margin: 0 0 1.25rem; opacity: 0.92; }
.cta-banner .btn-primary {
  background: #fff;
  color: var(--primary-deep);
  box-shadow: none;
}
.cta-banner .btn-primary:hover { background: var(--primary-pale); }

/* Footer */
.site-footer {
  background: var(--text);
  color: #cbd5e1;
  padding: 2.5rem 0 1.5rem;
  font-size: 0.88rem;
}
.footer-grid {
  display: grid;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.5fr repeat(3, 1fr); }
}
.site-footer h4 {
  color: #fff;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.4rem; }
.site-footer a { color: #94a3b8; text-decoration: none; }
.site-footer a:hover { color: var(--brand-mid); }
.footer-bottom {
  padding-top: 1.25rem;
  border-top: 1px solid #334155;
  color: #64748b;
  font-size: 0.8rem;
}
