/* =============================================
   COMPONENTS.CSS — Reusable UI Components
   ============================================= */

/* ── Service Card ── */
.service-card {
  position: relative; background: #fff; border-radius: var(--r-xl);
  overflow: hidden; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s var(--ease);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
}
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-subtle);
}
.service-card-img {
  position: relative; width: 100%; aspect-ratio: 4/3;
  overflow: hidden; background: var(--bg-2);
}
.service-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.service-card:hover .service-card-img img { transform: scale(1.12); }
.service-card-icon {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  color: var(--dark); font-size: 20px;
  box-shadow: var(--shadow-sm);
}
.service-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.service-card-title {
  font-size: 1.0625rem; font-weight: 800; color: var(--dark);
  margin-bottom: 6px; letter-spacing: -0.01em;
}
.service-card-desc {
  font-size: 0.8125rem; color: var(--text-2); line-height: 1.5;
  margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.service-card-price {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--border-light);
}
.service-card-price .price {
  font-size: 1rem; font-weight: 800; color: var(--primary);
}
.service-card-price .price small { font-size: 0.75rem; font-weight: 500; color: var(--text-3); }
.service-card-price .arrow-btn {
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: var(--bg-2); color: var(--dark);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s var(--ease); font-size: 18px;
}
.service-card:hover .arrow-btn { background: var(--primary); color: #fff; transform: translateX(4px); }

/* ── Category Card (Grid) ── */
.cat-card {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 20px 12px; background: #fff; border-radius: var(--r-xl);
  cursor: pointer; transition: all .3s var(--ease);
  text-decoration: none;
  box-shadow: var(--shadow-xs);
}
.cat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.cat-icon {
  width: 56px; height: 56px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; transition: transform .3s var(--ease-spring);
}
.cat-card:hover .cat-icon { transform: scale(1.1); }
.cat-name {
  font-size: .8125rem; font-weight: 600; color: var(--dark);
  text-align: center; line-height: 1.3;
}

/* ── Vendor Card ── */
.vendor-card {
  display: flex; gap: 16px; padding: 16px;
  background: #fff; border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm); transition: all .3s var(--ease);
  cursor: pointer; text-decoration: none;
}
.vendor-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.vendor-avatar {
  position: relative; width: 64px; height: 64px; border-radius: var(--r-lg);
  overflow: hidden; flex-shrink: 0; background: var(--bg-2);
}
.vendor-avatar img { width: 100%; height: 100%; object-fit: cover; }
.vendor-verified {
  position: absolute; bottom: -2px; right: -2px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; border: 2px solid #fff;
}
.vendor-info { flex: 1; min-width: 0; }
.vendor-name { font-size: .9375rem; font-weight: 700; color: var(--dark); }
.vendor-meta {
  display: flex; align-items: center; gap: 12px;
  margin-top: 4px; font-size: .75rem; color: var(--text-3);
}
.vendor-rating { display: flex; align-items: center; gap: 3px; }
.vendor-rating .material-icons-round { font-size: 14px; color: var(--star); }
.vendor-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 10px;
}
.vendor-price { font-size: .875rem; font-weight: 700; color: var(--primary); }
.vendor-status {
  font-size: .6875rem; font-weight: 600; padding: 3px 10px;
  border-radius: var(--r-full);
}
.vendor-status.available { background: rgba(0,200,83,.1); color: var(--primary); }
.vendor-status.busy { background: rgba(255,61,87,.1); color: var(--error); }

/* ── Review Card ── */
.review-card {
  padding: 20px; background: #fff; border-radius: var(--r-xl);
  box-shadow: var(--shadow-xs);
}
.review-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.review-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--bg-2); overflow: hidden;
}
.review-avatar img { width: 100%; height: 100%; object-fit: cover; }
.review-author { font-size: .875rem; font-weight: 600; color: var(--dark); }
.review-date { font-size: .75rem; color: var(--text-3); }
.review-stars { display: flex; gap: 2px; margin-bottom: 8px; }
.review-stars .material-icons-round { font-size: 16px; color: var(--star); }
.review-text { font-size: .8125rem; color: var(--text-2); line-height: 1.6; }

/* ── Time Slot Pills ── */
.slot-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.slot-pill {
  padding: 12px; border-radius: var(--r-md); text-align: center;
  font-size: .8125rem; font-weight: 600; color: var(--text-2);
  background: var(--bg-2); border: 2px solid transparent;
  cursor: pointer; transition: all .2s var(--ease);
}
.slot-pill:hover { border-color: var(--primary); color: var(--primary); }
.slot-pill.selected {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: var(--shadow-btn);
}
.slot-pill.disabled {
  opacity: .4; pointer-events: none;
}

/* ── Input Fields ── */
.input-group { margin-bottom: 20px; }
.input-group label {
  display: block; font-size: .8125rem; font-weight: 600;
  color: var(--dark); margin-bottom: 8px;
}
.input-field {
  width: 100%; padding: 14px 16px;
  background: var(--bg-2); border: 2px solid transparent;
  border-radius: var(--r-md); font-size: .9375rem;
  color: var(--dark); transition: all .2s var(--ease);
}
.input-field:focus { border-color: var(--primary); background: #fff; }
.input-field::placeholder { color: var(--text-3); }

/* ── Chips / Tags ── */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: var(--r-full);
  font-size: .75rem; font-weight: 600;
  background: var(--bg-2); color: var(--text-2);
  transition: all .2s;
}
.chip.active { background: var(--primary-subtle); color: var(--primary); }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--r-full);
  font-size: .6875rem; font-weight: 700;
}
.badge-green { background: rgba(0,200,83,.1); color: var(--primary); }
.badge-blue { background: rgba(41,121,255,.1); color: var(--info); }
.badge-orange { background: rgba(255,179,0,.1); color: var(--warning); }
.badge-red { background: rgba(255,61,87,.1); color: var(--error); }

/* ── Step Progress Bar ── */
.steps-bar { display: flex; align-items: center; gap: 0; margin-bottom: 32px; }
.step-item {
  flex: 1; display: flex; align-items: center; gap: 8px;
  font-size: .75rem; font-weight: 600; color: var(--text-3);
}
.step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-2); display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 700; flex-shrink: 0;
  transition: all .3s var(--ease);
}
.step-item.active .step-dot { background: var(--primary); color: #fff; box-shadow: var(--shadow-btn); }
.step-item.done .step-dot { background: var(--primary); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border-light); margin: 0 4px; }
.step-item.done + .step-line { background: var(--primary); }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state .material-icons-round { font-size: 64px; color: var(--text-3); margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-3); max-width: 320px; margin: 0 auto; }

/* ── Skeleton Loader ── */
.skeleton { background: linear-gradient(90deg, var(--bg-2) 25%, var(--bg-3) 50%, var(--bg-2) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; border-radius: var(--r-md); }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 20px; width: 60%; margin-bottom: 12px; }
.skeleton-avatar { width: 48px; height: 48px; border-radius: 50%; }
.skeleton-card { height: 200px; border-radius: var(--r-xl); }
