/* ══════════════════════════════════════════════════════════════
   RVP Connect — Services Marketplace CSS
   v7.0 — Mobile-first, matches Foodie/Veggies design language
   ════════════════════════════════════════════════════════════ */

:root {
  --sv-purple:       #6C2BD9;
  --sv-purple-dark:  #4338ca;
  --sv-purple-light: #ede9fe;
  --sv-bg:           #f8fafc;
  --sv-white:        #ffffff;
  --sv-border:       #e2e8f0;
  --sv-text:         #1e293b;
  --sv-muted:        #64748b;
  --sv-radius:       14px;
  --sv-shadow:       0 2px 12px rgba(108,43,217,.10);
}

/* ── Header ─────────────────────────────────────────── */
.sv-header {
  background: linear-gradient(135deg, #6C2BD9, #4338ca);
  position: sticky;
  top: var(--header-h, 64px);
  z-index: 900;
  box-shadow: 0 2px 12px rgba(108,43,217,.3);
}
.sv-header-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  max-width: 1200px;
  margin: 0 auto;
}
.sv-logo {
  font-weight: 900;
  font-size: 1rem;
  color: #fff;
  flex-shrink: 0;
  line-height: 1.1;
}
.sv-logo span {
  display: block;
  font-size: .65rem;
  font-weight: 400;
  opacity: .85;
}

/* Search */
.sv-search-wrap {
  flex: 1;
  position: relative;
}
.sv-search {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border-radius: 20px;
  border: none;
  font-size: .85rem;
  background: rgba(255,255,255,.18);
  color: #fff;
  outline: none;
  box-sizing: border-box;
}
.sv-search::placeholder { color: rgba(255,255,255,.65); }
.sv-search-icon {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255,255,255,.7);
  pointer-events: none;
}

/* ── Category Tabs ──────────────────────────────────── */
.sv-categories {
  background: #fff;
  border-bottom: 1px solid var(--sv-border);
  padding: 12px 0;
}
.sv-cat-title {
  font-size: .72rem;
  font-weight: 700;
  color: var(--sv-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 0 14px 8px;
}
.sv-cat-scroll {
  display: flex;
  gap: 8px;
  padding: 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.sv-cat-scroll::-webkit-scrollbar { display: none; }
.sv-cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1.5px solid var(--sv-border);
  background: #fff;
  transition: all .2s;
  min-width: 68px;
}
.sv-cat-item.active,
.sv-cat-item:active {
  background: var(--sv-purple-light);
  border-color: var(--sv-purple);
  color: var(--sv-purple);
}
.sv-cat-icon { font-size: 1.5rem; line-height: 1; }
.sv-cat-label { font-size: .65rem; font-weight: 600; text-align: center; color: var(--sv-text); }
.sv-cat-item.active .sv-cat-label { color: var(--sv-purple); }

/* ── Provider Grid ──────────────────────────────────── */
.sv-provider-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 14px;
}
@media (min-width: 600px) { .sv-provider-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 900px) { .sv-provider-grid { grid-template-columns: repeat(4, 1fr); } }

/* Provider Card */
.sv-provider-card {
  background: var(--sv-white);
  border-radius: var(--sv-radius);
  box-shadow: var(--sv-shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  border: 1.5px solid var(--sv-border);
}
.sv-provider-card:active { transform: scale(.97); }

.sv-provider-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
  background: var(--sv-purple-light);
}
.sv-provider-img-placeholder {
  width: 100%;
  height: 130px;
  background: linear-gradient(135deg, var(--sv-purple-light), #ddd6fe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.sv-provider-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.sv-provider-cat {
  font-size: .65rem;
  font-weight: 700;
  color: var(--sv-purple);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.sv-provider-name {
  font-size: .9rem;
  font-weight: 800;
  color: var(--sv-text);
  line-height: 1.2;
}
.sv-provider-service {
  font-size: .75rem;
  color: var(--sv-muted);
  line-height: 1.3;
}
.sv-provider-price {
  font-size: .8rem;
  font-weight: 700;
  color: var(--sv-purple-dark);
  margin-top: 2px;
}
.sv-provider-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.sv-rating {
  font-size: .7rem;
  color: #f59e0b;
  font-weight: 700;
}
.sv-location {
  font-size: .67rem;
  color: var(--sv-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* WA Button on card */
.sv-wa-quick-btn {
  margin: 0 10px 10px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 10px;
  font-size: .78rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: Inter, sans-serif;
  text-decoration: none;
}

/* ── Provider Detail Modal / Page ───────────────────── */
.sv-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 9000;
  display: flex;
  align-items: flex-end;
  backdrop-filter: blur(3px);
}
.sv-detail-sheet {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 0 0 40px;
  animation: svSlideUp .25s ease;
}
@keyframes svSlideUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.sv-detail-header {
  position: sticky;
  top: 0;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--sv-border);
  z-index: 1;
}
.sv-detail-close {
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1.5px solid var(--sv-border);
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sv-detail-hero {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.sv-detail-body {
  padding: 16px;
}
.sv-detail-cat {
  font-size: .72rem;
  font-weight: 700;
  color: var(--sv-purple);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 4px;
}
.sv-detail-name {
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--sv-text);
  margin: 0 0 4px;
}
.sv-detail-service {
  font-size: .85rem;
  color: var(--sv-muted);
  margin-bottom: 10px;
}
.sv-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.sv-detail-tag {
  background: var(--sv-purple-light);
  color: var(--sv-purple-dark);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: .72rem;
  font-weight: 600;
}
.sv-detail-desc {
  font-size: .85rem;
  color: var(--sv-text);
  line-height: 1.6;
  margin-bottom: 16px;
  background: var(--sv-bg);
  border-radius: 10px;
  padding: 12px;
}
.sv-detail-wa-btn {
  width: 100%;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  border: none;
  border-radius: 14px;
  padding: 16px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 16px rgba(37,211,102,.35);
  font-family: Inter, sans-serif;
  text-decoration: none;
}
.sv-detail-call-btn {
  width: 100%;
  background: var(--sv-purple-light);
  color: var(--sv-purple-dark);
  border: 1.5px solid var(--sv-purple);
  border-radius: 14px;
  padding: 14px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: Inter, sans-serif;
  text-decoration: none;
  margin-top: 10px;
}

/* Gallery */
.sv-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin: 14px 0;
}
.sv-gallery img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
}

/* ── Empty / Loading States ─────────────────────────── */
.sv-empty {
  text-align: center;
  padding: 60px 20px;
  grid-column: 1 / -1;
}
.sv-empty-icon { font-size: 3.5rem; margin-bottom: 14px; }
.sv-loading {
  text-align: center;
  padding: 40px 20px;
  grid-column: 1 / -1;
  color: var(--sv-muted);
  font-size: .85rem;
}

/* ── Section ─────────────────────────────────────────── */
.sv-section {
  padding: 0;
}
.sv-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
}
.sv-section-title {
  font-size: .95rem;
  font-weight: 800;
  color: var(--sv-text);
}

/* ── Toast ───────────────────────────────────────────── */
.sv-toast {
  position: fixed;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sv-text);
  color: #fff;
  border-radius: 20px;
  padding: 10px 20px;
  font-size: .85rem;
  font-weight: 600;
  z-index: 9999;
  opacity: 0;
  transition: opacity .3s;
  pointer-events: none;
  white-space: nowrap;
}
.sv-toast.show { opacity: 1; }
