/* ==========================================================================
   BARBERSHOP — Client Frontend
   Design tokens:
   - Ink:     #0f0f0f (base)
   - Ink-2:   #161616 (surface)
   - Ink-3:   #1e1e20 (raised surface)
   - Blue:    #2563eb (primary)
   - Blue-2:  #3b82f6 (primary hover)
   - Steel:   #64748b (muted)
   - Silver:  #e5e7eb (text)
   - Gold:    #d4af37 (accent — used sparingly for the "sharpened" signature)
   Type: 'Bebas Neue' (display, condensed/barber-pole feel) + 'Inter' (body/UI)
   Signature: the "fade line" — a diagonal razor-edge gradient divider used at
   section seams, echoing a barber's fade haircut gradient.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #0f0f0f;
  --ink-2: #15151600;
  --surface: #161616;
  --surface-2: #1e1e20;
  --surface-3: #26262a;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);

  --blue: #2563eb;
  --blue-2: #3b82f6;
  --blue-glow: rgba(37, 99, 235, 0.35);

  --gold: #d4af37;

  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-dim: #71717a;

  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;

  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 22px;
  --radius-full: 999px;

  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.55);

  --font-display: 'Bebas Neue', sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--ink);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 900px 500px at 15% -10%, var(--blue-glow), transparent 60%),
    radial-gradient(ellipse 700px 500px at 110% 20%, rgba(212, 175, 55, 0.10), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--ink); }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }

/* ===== Fade line — signature divider (barber fade gradient) ===== */
.fade-line {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, transparent, var(--blue) 20%, var(--gold) 50%, var(--blue) 80%, transparent);
  opacity: 0.7;
  position: relative;
}
.fade-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  filter: blur(8px);
  opacity: 0.6;
}

/* ===== Header / Nav ===== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 15, 15, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--border);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: 1px;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-2);
}

.brand-logo-fallback {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 20px;
}

.nav-actions { display: flex; gap: 10px; align-items: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 14.5px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  color: #fff;
  box-shadow: 0 6px 20px var(--blue-glow);
}
.btn-primary:hover { box-shadow: 0 8px 28px var(--blue-glow); transform: translateY(-1px); }

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--blue); }

.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(239, 68, 68, 0.12); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.btn-danger:hover { background: rgba(239, 68, 68, 0.2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 64px 0 48px;
  overflow: hidden;
}

.hero-banner {
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(160deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.hero-banner-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}

.hero-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,15,15,0.1) 0%, rgba(15,15,15,0.55) 55%, rgba(15,15,15,0.95) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 40px;
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.35);
  font-size: 12.5px;
  font-weight: 600;
  color: #93c5fd;
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 7vw, 68px);
  line-height: 0.95;
  letter-spacing: 0.5px;
  margin-bottom: 18px;
  text-transform: uppercase;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}

.meta-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  font-size: 13.5px;
  color: var(--text-muted);
}
.meta-pill svg { width: 16px; height: 16px; color: var(--blue-2); flex-shrink: 0; }
.meta-pill strong { color: var(--text); font-weight: 600; }

.map-embed {
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  height: 220px;
}
.map-embed iframe { width: 100%; height: 100%; border: 0; filter: grayscale(0.3) invert(0.9) contrast(0.85); }

/* ===== Section headers ===== */
.section {
  padding: 56px 0;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 20px;
}

.section-eyebrow {
  font-size: 12.5px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-2);
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 46px);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* ===== Services grid ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.service-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  backdrop-filter: blur(10px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}

.service-img-wrap {
  height: 190px;
  background: var(--surface-2);
  position: relative;
  overflow: hidden;
}

.service-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.service-card:hover .service-img-wrap img { transform: scale(1.06); }

.service-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  background: linear-gradient(135deg, var(--surface-2), var(--surface-3));
}
.service-img-placeholder svg { width: 48px; height: 48px; opacity: 0.5; }

.service-duration-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15,15,15,0.75);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border);
}
.service-duration-badge svg { width: 13px; height: 13px; color: var(--gold); }

.service-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.service-name {
  font-size: 19px;
  font-weight: 700;
}

.service-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  flex: 1;
}

.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 12px;
}

.service-price {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--blue-2);
  letter-spacing: 0.5px;
}
.service-price span { font-size: 13px; color: var(--text-dim); font-family: var(--font-body); font-weight: 500; }

/* ===== Empty / loading states ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 56px; height: 56px; margin: 0 auto 16px; opacity: 0.4; }
.empty-state h3 { font-size: 18px; color: var(--text); margin-bottom: 6px; }

.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 37%, var(--surface-2) 63%);
  background-size: 400% 100%;
  animation: skeleton-loading 1.4s ease infinite;
  border-radius: var(--radius);
}
@keyframes skeleton-loading {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.page-loader {
  position: fixed;
  inset: 0;
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  flex-direction: column;
  gap: 18px;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.page-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }

.loader-scissors {
  font-family: var(--font-display);
  font-size: 30px;
  letter-spacing: 3px;
  background: linear-gradient(90deg, var(--blue-2), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: pulse-glow 1.4s ease infinite;
}
@keyframes pulse-glow { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.loader-bar {
  width: 160px;
  height: 3px;
  background: var(--surface-2);
  border-radius: 3px;
  overflow: hidden;
}
.loader-bar::after {
  content: '';
  display: block;
  width: 40%;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--gold));
  animation: loader-slide 1.1s ease-in-out infinite;
}
@keyframes loader-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s ease;
}
.modal-overlay.active .modal { transform: translateY(0) scale(1); }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 24px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}
.modal-title { font-family: var(--font-display); font-size: 22px; letter-spacing: 0.5px; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s ease;
}
.modal-close:hover { background: rgba(255,255,255,0.14); }

.modal-body { padding: 24px; }

/* ===== Form elements ===== */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.3px;
}
.form-input, .form-textarea, .form-select {
  width: 100%;
  padding: 13px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14.5px;
  font-family: inherit;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  outline: none;
  border-color: var(--blue);
  background: rgba(37, 99, 235, 0.06);
}
.form-input.error, .form-textarea.error { border-color: var(--danger); }
.form-error-msg { font-size: 12.5px; color: #fca5a5; margin-top: 6px; display: none; }
.form-error-msg.active { display: block; }
.form-textarea { resize: vertical; min-height: 80px; }

/* ===== Time slots ===== */
.slots-section { margin-top: 22px; }
.slots-date-picker { margin-bottom: 18px; }

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(78px, 1fr));
  gap: 10px;
}

.slot-btn {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-strong);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  transition: all 0.18s ease;
}
.slot-btn:hover { border-color: var(--blue); background: rgba(37, 99, 235, 0.1); }
.slot-btn.selected {
  background: linear-gradient(135deg, var(--blue), #1d4ed8);
  border-color: var(--blue);
  color: #fff;
  box-shadow: 0 4px 16px var(--blue-glow);
}

.slots-empty {
  text-align: center;
  padding: 30px 10px;
  color: var(--text-muted);
  font-size: 14px;
}

/* ===== Booking summary card ===== */
.booking-summary {
  background: rgba(37, 99, 235, 0.06);
  border: 1px solid rgba(37, 99, 235, 0.25);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.booking-summary-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: rgba(37,99,235,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.booking-summary-icon svg { width: 20px; height: 20px; color: var(--blue-2); }
.booking-summary-text { font-size: 13.5px; color: var(--text-muted); line-height: 1.5; }
.booking-summary-text strong { color: var(--text); }

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 360px;
  width: calc(100% - 40px);
}
.toast {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: toast-in 0.3s ease;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: translateX(0); } }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--blue); }
.toast-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 1px; }
.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info .toast-icon { color: var(--blue-2); }
.toast-text { font-size: 13.5px; line-height: 1.5; flex: 1; }
.toast-close { flex-shrink: 0; opacity: 0.5; }
.toast-close:hover { opacity: 1; }

/* ===== My appointments (client) ===== */
.appt-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}
.appt-service-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  flex-shrink: 0;
  overflow: hidden;
}
.appt-service-icon img { width: 100%; height: 100%; object-fit: cover; }
.appt-info { flex: 1; min-width: 0; }
.appt-service-name { font-weight: 700; font-size: 15.5px; margin-bottom: 4px; }
.appt-meta { font-size: 13px; color: var(--text-muted); display: flex; gap: 12px; flex-wrap: wrap; }

.status-badge {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.status-pending { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.status-confirmed { background: rgba(37, 99, 235, 0.15); color: #60a5fa; }
.status-completed { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.status-cancelled { background: rgba(239, 68, 68, 0.15); color: #f87171; }

/* ===== Footer ===== */
.footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  margin-top: 40px;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s ease;
}
.footer-social a:hover { background: var(--blue); border-color: var(--blue); }
.footer-social svg { width: 17px; height: 17px; }
.footer-copy { font-size: 13px; color: var(--text-dim); }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.hidden { display: none !important; }

@media (max-width: 640px) {
  .hero-content { padding: 24px; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .services-grid { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; text-align: center; }
  .modal { max-height: 92vh; }
}
