/* ════════════════════════════════════════════════════
   Service Detail Page — Urban Company Style
   ════════════════════════════════════════════════════ */

:root {
  --svc-accent: #7c3aed;
  --svc-accent-light: #ede9fe;
  --svc-green: #059669;
  --svc-green-bg: #d1fae5;
  --svc-star: #f59e0b;
  --svc-border: #e2e8f0;
  --svc-card-bg: #fff;
  --svc-text: #1e293b;
  --svc-muted: #64748b;
  --svc-radius: 14px;
}

* { box-sizing: border-box; }

/* ── Layout Wrapper ── */
.svc-wrap {
  max-width: 640px;
  margin: 0 auto;
  background: #f8fafc;
  min-height: 100vh;
  padding-bottom: 90px;
}

/* ── Sticky Header ── */
.svc-hdr {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 56px;
  border-bottom: 1px solid var(--svc-border);
}
.svc-back-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: #f1f5f9; color: var(--svc-text);
  text-decoration: none; flex-shrink: 0;
}
.svc-back-btn:hover { background: #e2e8f0; }
.svc-hdr-title {
  flex: 1; text-align: center;
  font-size: .9375rem; font-weight: 600;
  color: var(--svc-text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0 10px;
}
.svc-hdr-right {
  display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  background: #f1f5f9; color: var(--svc-text); text-decoration: none;
  flex-shrink: 0;
}

/* ── Image Slider ── */
.svc-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #e2e8f0;
  overflow: hidden;
}
.svc-slider-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
}
.svc-slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.svc-slide {
  flex: 0 0 100%;
  height: 100%;
}
.svc-slide img {
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}
/* Auto-slider thin progress bar */
.svc-progress-bar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,.25);
  z-index: 10;
  overflow: hidden;
}
.svc-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #ff6e1d, #ff9a52);
  border-radius: 0 2px 2px 0;
  will-change: width;
}

.svc-slider-dots {
  position: absolute; bottom: 10px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px;
}
.svc-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255,255,255,.5); border: none; padding: 0; cursor: pointer;
  transition: all .2s;
}
.svc-dot.active {
  background: #fff; width: 18px; border-radius: 3px;
}

/* ── Meta Card ── */
.svc-meta-card {
  background: #fff;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--svc-border);
}
.svc-promo-badge {
  display: inline-block;
  background: linear-gradient(90deg,#7c3aed,#6d28d9);
  color: #fff; font-size: .72rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  margin-bottom: 6px; letter-spacing: .02em;
}
.svc-title {
  font-size: 1.5rem; font-weight: 700;
  color: var(--svc-text); margin: 0 0 8px; line-height: 1.2;
}
.svc-rating-row {
  display: flex; align-items: center; gap: 5px; margin-bottom: 10px;
}
.svc-stars { display: flex; gap: 1px; }
.svc-star-full  { color: var(--svc-star); font-size: 1rem; }
.svc-star-empty { color: #cbd5e1; font-size: 1rem; }
.svc-rating-val {
  font-size: .9rem; font-weight: 700; color: var(--svc-text);
  text-decoration: underline; text-underline-offset: 2px; cursor: pointer;
}
.svc-rating-cnt { font-size: .85rem; color: var(--svc-muted); text-decoration: underline; cursor: pointer; }

.svc-tech-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #ecfdf5, #f0fdf4);
  border: 1px solid rgba(5, 150, 105, 0.2);
  border-radius: 12px;
}
.svc-tech-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
}
.svc-tech-avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e2e8f0;
  color: #64748b;
}
.svc-tech-meta { min-width: 0; }
.svc-tech-name {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--svc-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svc-tech-rating {
  font-size: 0.75rem;
  color: var(--svc-muted);
  margin-top: 2px;
}
.svc-tech-rc { color: #94a3b8; }
.svc-tech-live {
  color: #059669;
  font-weight: 700;
}

.svc-price-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.svc-price-original {
  font-size: 1rem; color: var(--svc-muted); text-decoration: line-through;
}
.svc-price-offer {
  font-size: 1.375rem; font-weight: 700; color: var(--svc-text);
}
.svc-price-label {
  font-size: .85rem; color: var(--svc-muted);
}
.svc-discount-chip {
  background: #dcfce7; color: #15803d;
  font-size: .75rem; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
}
.svc-duration-chip {
  display: inline-flex; align-items: center; gap: 3px;
  background: #f1f5f9; color: var(--svc-muted);
  font-size: .8rem; padding: 3px 8px; border-radius: 20px;
}

/* ── Sections ── */
.svc-section {
  background: #fff;
  margin-top: 8px;
  padding: 16px 16px;
}
.svc-section-title {
  font-size: 1.0625rem; font-weight: 700;
  color: var(--svc-text); margin: 0 0 14px;
}

/* ── Sub-service horizontal cards (UC style) ── */
.svc-sub-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.svc-sub-scroll::-webkit-scrollbar { display: none; }

.svc-sub-card {
  flex: 0 0 148px;
  background: #fff;
  border: 1.5px solid var(--svc-border);
  border-radius: var(--svc-radius);
  padding: 12px;
  display: flex; flex-direction: column; gap: 4px;
  box-shadow: 0 1px 4px rgba(15,23,42,.06);
}
.svc-sub-img {
  width: 100%; aspect-ratio: 16/9;
  object-fit: cover; border-radius: 8px;
  margin-bottom: 4px;
}
.svc-sub-name {
  font-size: .875rem; font-weight: 600; color: var(--svc-text);
  line-height: 1.3;
}
.svc-sub-rating {
  font-size: .78rem; color: var(--svc-star); font-weight: 600;
}
.svc-sub-price {
  font-size: .9375rem; font-weight: 700; color: var(--svc-text);
  margin-top: 4px;
}
.svc-sub-add-btn {
  display: block; text-align: center;
  color: var(--svc-accent); border: 1.5px solid var(--svc-accent);
  border-radius: 8px; padding: 6px 0;
  font-size: .875rem; font-weight: 700;
  text-decoration: none; margin-top: 8px;
  transition: background .15s, color .15s;
}
.svc-sub-add-btn:hover { background: var(--svc-accent); color: #fff; }

/* ── Big book button (no sub-services) ── */
.svc-book-btn-big {
  display: block; text-align: center;
  background: linear-gradient(90deg, var(--svc-accent), #6d28d9);
  color: #fff; font-size: 1rem; font-weight: 700;
  padding: 14px 24px; border-radius: 12px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(124,58,237,.35);
  transition: transform .15s, box-shadow .15s;
}
.svc-book-btn-big:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(124,58,237,.4); }

/* ── Our Process ── */
.svc-process-list { display: flex; flex-direction: column; gap: 12px; }
.svc-process-item { display: flex; align-items: flex-start; gap: 12px; }
.svc-process-num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  background: var(--svc-accent-light); color: var(--svc-accent);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .8125rem; font-weight: 700;
}
.svc-process-text {
  margin: 0; padding-top: 4px;
  font-size: .9rem; color: var(--svc-text); line-height: 1.4;
}

/* ── Highlights ── */
.svc-highlights-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.svc-highlight-item {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: .9rem; color: var(--svc-text); line-height: 1.4;
}
.svc-check-icon { flex-shrink: 0; color: var(--svc-green); margin-top: 2px; }

/* ── Add-ons ── */
.svc-addons-list { display: flex; flex-direction: column; gap: 2px; }
.svc-addon-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
  font-size: .9rem;
}
.svc-addon-row:last-child { border-bottom: none; }
.svc-addon-name { color: var(--svc-text); }
.svc-addon-price { font-weight: 600; color: var(--svc-accent); }

/* ── Similar services ── */
.svc-similar-scroll {
  display: flex; gap: 12px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding-bottom: 4px; scrollbar-width: none;
}
.svc-similar-scroll::-webkit-scrollbar { display: none; }

.svc-sim-card {
  flex: 0 0 130px;
  background: #fff;
  border: 1.5px solid var(--svc-border);
  border-radius: var(--svc-radius);
  overflow: hidden; text-decoration: none;
  display: flex; flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.svc-sim-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(15,23,42,.1); }
.svc-sim-img {
  width: 100%; aspect-ratio: 4/3;
  object-fit: cover; display: block;
}
.svc-sim-img-placeholder {
  background: #ede9fe;
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.svc-sim-name {
  font-size: .8rem; font-weight: 600; color: var(--svc-text);
  padding: 8px 8px 2px; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.svc-sim-rating {
  font-size: .75rem; color: var(--svc-star); font-weight: 600;
  padding: 0 8px;
}
.svc-sim-price {
  font-size: .875rem; font-weight: 700; color: var(--svc-text);
  padding: 4px 8px 10px;
}

/* ── Sticky Bottom Bar ── */
.svc-sticky-bar {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: #fff;
  border-top: 1px solid var(--svc-border);
  padding: 10px 16px;
  display: flex; align-items: center; gap: 12px;
  z-index: 90;
  box-shadow: 0 -4px 20px rgba(15,23,42,.08);
  max-width: 640px; margin: 0 auto;
  transition: transform .25s;
}
.svc-sticky-bar.svc-sticky-hidden { transform: translateY(120%); }
.svc-sticky-meta { flex: 1; }
.svc-sticky-price {
  font-size: 1.0625rem; font-weight: 700; color: var(--svc-text);
}
.svc-sticky-rating {
  font-size: .8rem; color: var(--svc-muted); margin-top: 1px;
}
.svc-sticky-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #ff7a3d 0%, #fa5608 55%, #ef4444 100%);
  color: #fff; font-size: .9375rem; font-weight: 700;
  padding: 12px 22px; border-radius: 14px;
  height: 54px;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
  transition: transform .15s;
}
.svc-sticky-btn:hover { transform: translateY(-1px); }

/* Mobile tab bar sits under sticky CTA */
@media (max-width: 767px) {
  body.has-app-bottom-nav .svc-sticky-bar {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  body.has-app-bottom-nav .svc-wrap {
    padding-bottom: calc(132px + 80px);
  }
  body.has-service-scart .scart-footer {
    bottom: calc(80px + env(safe-area-inset-bottom, 0px));
  }
  body.has-service-scart .scart-wrap {
    padding-bottom: calc(146px + 80px);
  }
  .svc-sticky-btn {
    width: 100%;
  }
}

/* ── Desktop tweaks ── */
@media (min-width: 640px) {
  .svc-slider { aspect-ratio: 16 / 7; }
  .svc-title { font-size: 1.75rem; }
  .svc-sub-card { flex: 0 0 180px; }
  .svc-sim-card { flex: 0 0 160px; }
  .svc-sticky-bar { left: 50%; right: auto; transform: translateX(-50%); width: 640px; border-radius: 16px 16px 0 0; }
}

/* Nearest technician / vendor-style hero block */
.svc-hero-pro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin: 12px 0 14px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #faf5ff, #f5f3ff);
  border: 1px solid #e9d5ff;
  border-radius: var(--svc-radius);
}
.svc-hero-pro-text { flex: 1; min-width: 0; }
.svc-by-line { font-size: 0.875rem; color: var(--svc-muted); margin-bottom: 4px; }
.svc-hero-dist { font-size: 0.8125rem; font-weight: 600; color: #c2410c; margin-top: 6px; }
.svc-hero-eta { font-size: 0.75rem; color: var(--svc-muted); margin-top: 2px; }
.svc-hero-from { font-size: 0.9375rem; font-weight: 700; color: var(--svc-text); margin-top: 6px; }
.svc-rating-row--muted {
  opacity: 0.92;
  font-size: 0.8125rem;
  flex-wrap: wrap;
  gap: 6px;
}

.svc-require-card {
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: #fff;
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}
.svc-require-card h3 {
  margin: 0 0 6px;
  font-size: 0.875rem;
  font-weight: 800;
  color: #0f172a;
}
.svc-require-card p {
  margin: 0;
  font-size: 0.8125rem;
  color: #475569;
  line-height: 1.55;
}
.svc-brand-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.svc-brand-chip {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: #f8fafc;
  padding: 10px 6px;
  text-align: center;
  font-size: 0.8125rem;
  font-weight: 800;
  color: #334155;
}
.svc-faq-list {
  display: grid;
  gap: 8px;
}
.svc-faq-item {
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: #fff;
  padding: 0 12px;
}
.svc-faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: #0f172a;
}
.svc-faq-answer {
  padding: 0 0 12px;
  color: #475569;
  font-size: 0.8125rem;
  line-height: 1.55;
}
