/* ═══════════════════════════════════════════
   COMPONENTS.CSS — Shaq's Auto Spa
   Header / Nav / Footer — shared across pages
   ═══════════════════════════════════════════ */

/* ──────────────────────────────────────────
   HEADER / NAVIGATION
   ────────────────────────────────────────── */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: rgba(10, 10, 10, 0.9);
  backdrop-filter: blur(0);
  transition: background-color var(--transition), backdrop-filter var(--transition);
}

/* Scrolled state — added via JS */
.site-header.scrolled {
  background-color: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
}

/* ── Logo / Wordmark ── */
.logo {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text);
  line-height: 1;
}

.logo .accent {
  color: var(--color-primary);
}

/* ── Desktop Nav ── */
.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-xl);
}

.nav-links a {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  transition: color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-primary);
}

/* Show desktop nav at 768px+ */
@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

/* ── Nav CTA Button ── */
.nav-cta {
  display: none;
}

@media (min-width: 768px) {
  .nav-cta {
    display: inline-flex;
  }
}

/* ── Hamburger Toggle (mobile only) ── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

/* Hamburger → X animation */
.hamburger.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hide hamburger on desktop */
@media (min-width: 768px) {
  .hamburger {
    display: none;
  }
}

/* ── Mobile Menu (slide-down) ── */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  background-color: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  padding: var(--space-sm) 0;
  transition: color var(--transition);
}

.mobile-menu a:hover,
.mobile-menu a.active {
  color: var(--color-primary);
}

.mobile-menu .btn-primary {
  margin-top: var(--space-sm);
  text-align: center;
}

/* Hide mobile menu on desktop */
@media (min-width: 768px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ── Body offset for fixed header ── */
.page-content {
  padding-top: var(--nav-height);
}

/* ──────────────────────────────────────────
   FOOTER
   ────────────────────────────────────────── */

.site-footer {
  background-color: var(--color-base);
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-3xl);
}

.footer-inner {
  display: grid;
  gap: var(--space-2xl);
}

/* Footer columns at desktop */
@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-3xl);
  }
}

/* ── Footer Brand Column ── */
.footer-brand .logo {
  font-size: var(--text-2xl);
  margin-bottom: var(--space-md);
}

.footer-tagline {
  color: var(--color-muted);
  font-size: var(--text-sm);
  line-height: 1.6;
  max-width: 320px;
}

/* ── Footer Column Headings ── */
.footer-heading {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text);
  margin-bottom: var(--space-md);
}

/* ── Footer Nav Links ── */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a {
  font-size: var(--text-sm);
  color: var(--color-muted);
  transition: color var(--transition);
}

.footer-links a:hover {
  color: var(--color-primary);
}

/* ── Footer Service Areas ── */
.footer-areas {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-areas span {
  font-size: var(--text-sm);
  color: var(--color-muted);
}

/* ── Copyright Bar ── */
.footer-bottom {
  margin-top: var(--space-2xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--color-muted);
}

@media (min-width: 768px) {
  .footer-bottom {
    flex-direction: row;
    justify-content: space-between;
  }
}

.footer-bottom a {
  color: var(--color-primary);
  transition: color var(--transition);
}

.footer-bottom a:hover {
  color: var(--color-primary-hover);
}

/* ──────────────────────────────────────────
   BOOKING MODAL — Global overlay
   ────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 20px;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  display: flex;
  opacity: 1;
}

.modal-container {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: modalSlideUp 0.3s ease;
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #2a2a2a;
  flex-shrink: 0;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: #e5e5e5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #888;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s ease;
}

.modal-close:hover {
  color: #e5e5e5;
}

.modal-body {
  padding: 24px 24px 28px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

/* Remove background/border from .booking-form inside modal —
   the modal container already provides the card look */
.modal-body .booking-form {
  max-width: none;
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
}

/* Body scroll lock when modal is open */
body.modal-open {
  overflow: hidden;
}

/* ── Mobile: bottom-sheet style ── */
@media (max-width: 480px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-container {
    max-width: 100%;
    max-height: 92vh;
    border-radius: 16px 16px 0 0;
    animation: modalSheetUp 0.3s ease;
  }

  @keyframes modalSheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }

  .modal-body {
    padding: 20px 20px 24px;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .modal-container {
    animation-duration: 0s;
  }
}

/* ──────────────────────────────────────────
   BOOKING FORM — Multi-Step Wizard
   (Global — used inside modal on all pages)
   ────────────────────────────────────────── */

@keyframes bookingFadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.booking-form {
  max-width: 580px;
  margin-inline: auto;
}

/* ── Progress indicator ── */
.booking-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 28px;
}

.booking-progress__step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 56px;
}

.booking-progress__dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #2a2a2a;
  color: #555;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.25s ease, color 0.25s ease;
}

.booking-progress__label {
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  color: #555;
  transition: color 0.25s ease;
}

.booking-progress__step.active .booking-progress__dot {
  background: #84cc16;
  color: #0a0a0a;
}

.booking-progress__step.active .booking-progress__label {
  color: #84cc16;
}

.booking-progress__step.completed .booking-progress__dot {
  background: #2a2a2a;
  color: #888;
}

.booking-progress__step.completed .booking-progress__label {
  color: #888;
}

.booking-progress__line {
  flex: 1;
  height: 1px;
  background: #2a2a2a;
  margin: 0 4px;
  margin-bottom: 20px;
}

/* ── Step panels ── */
.booking-step {
  animation: bookingFadeIn 0.25s ease;
}

.booking-step__label {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: #e5e5e5;
  margin-bottom: 16px;
}

/* ── Step 1 — Vehicle cards ── */
.booking-vehicles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.booking-vehicle-card {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.booking-vehicle-card:hover {
  border-color: #3a3a3a;
}

.booking-vehicle-card.selected {
  border-color: #84cc16;
  background: rgba(132, 204, 22, 0.06);
}

.booking-vehicle-card.selected .booking-vehicle-card__name {
  color: #84cc16;
}

.booking-vehicle-card__emoji {
  display: block;
  font-size: 28px;
  margin-bottom: 8px;
}

.booking-vehicle-card__name {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: #e5e5e5;
  transition: color 0.2s ease;
}

.booking-vehicle-card__sub {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}

@media (max-width: 374px) {
  .booking-vehicle-card { padding: 12px 4px; }
  .booking-vehicle-card__emoji { font-size: 22px; }
  .booking-vehicle-card__name { font-size: 11px; }
}

.booking-text-hint {
  display: block;
  text-align: center;
  font-family: var(--font-ui);
  font-size: 12px;
  color: #555;
  margin-top: 12px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.booking-text-hint:hover {
  color: #888;
  text-decoration: underline;
}

/* ── Next / Prev buttons ── */
.booking-btn-next {
  width: 100%;
  margin-top: 24px;
}

.booking-btn-next:disabled {
  opacity: 0.4;
  pointer-events: none;
}

.booking-btn-row {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.booking-btn-row .booking-btn-prev {
  flex-shrink: 0;
}

.booking-btn-row .booking-btn-next {
  flex: 1;
  margin-top: 0;
}

/* ── Step 2 — Service rows ── */
.booking-services {
  display: flex;
  flex-direction: column;
}

.booking-service-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 0;
  border-bottom: 1px solid #161616;
  cursor: pointer;
  transition: background 0.2s ease, padding-left 0.2s ease;
  position: relative;
}

.booking-service-row:last-child {
  border-bottom: none;
}

.booking-service-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.booking-service-row.selected {
  background: rgba(132, 204, 22, 0.04);
  border-left: 3px solid #84cc16;
  padding-left: 12px;
}

.booking-service-row__name {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: #e5e5e5;
  flex: 1;
}

.booking-service-row__time {
  font-family: var(--font-ui);
  font-size: 12px;
  color: #888;
  white-space: nowrap;
}

.booking-service-row__price {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: #84cc16;
  white-space: nowrap;
}

.booking-service-row__badge {
  position: absolute;
  top: -1px;
  right: 0;
  padding: 2px 8px;
  background: #84cc16;
  color: #0a0a0a;
  font-family: var(--font-ui);
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-radius: 0 0 4px 4px;
}

.booking-price-note {
  font-family: var(--font-ui);
  font-size: 11px;
  color: #555;
  font-style: italic;
  margin-top: 12px;
}

/* ── Step 3 — Add-on tiles ── */
.booking-addons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .booking-addons {
    grid-template-columns: 1fr;
  }
}

.booking-addon-tile {
  position: relative;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.booking-addon-tile:hover {
  border-color: #3a3a3a;
}

.booking-addon-check {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.booking-addon-tile__check {
  display: none;
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 12px;
  color: #84cc16;
}

.booking-addon-tile.checked {
  border-color: #84cc16;
}

.booking-addon-tile.checked .booking-addon-tile__check {
  display: block;
}

.booking-addon-tile__name {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: #e5e5e5;
}

.booking-addon-tile__price {
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  color: #84cc16;
  margin-top: 4px;
}

.booking-running-total {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  color: #84cc16;
  margin-top: 16px;
}

/* ── Step 4 — Contact fields ── */
.booking-fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.booking-field__label {
  display: block;
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: #e5e5e5;
  margin-bottom: 6px;
}

.booking-field__optional {
  font-weight: 400;
  color: #888;
  font-size: 12px;
}

.booking-field__input {
  width: 100%;
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 6px;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 14px;
  color: #e5e5e5;
  outline: none;
  transition: border-color 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

.booking-field__input::placeholder {
  color: #555;
}

.booking-field__input:focus {
  border-color: #84cc16;
}

.booking-field__input.valid {
  border-color: #84cc16;
}

.booking-field__input.invalid {
  border-color: #ef4444;
}

.booking-field__error {
  display: none;
  font-family: var(--font-ui);
  font-size: 12px;
  color: #ef4444;
  margin-top: 4px;
}

.booking-field__error.show {
  display: block;
}

.booking-field__input[type="date"]::-webkit-calendar-picker-indicator {
  filter: invert(1);
  cursor: pointer;
}

select.booking-field__input {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

.booking-field__checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #888;
  cursor: pointer;
}

.booking-field__checkbox-label input[type="checkbox"] {
  accent-color: #84cc16;
}

/* ── Booking summary ── */
.booking-summary {
  background: #111;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.booking-summary__row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.booking-summary__row + .booking-summary__row {
  border-top: 1px solid #1a1a1a;
}

.booking-summary__key {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  color: #888;
  min-width: 70px;
}

.booking-summary__val {
  font-family: var(--font-ui);
  font-size: 13px;
  color: #e5e5e5;
  flex: 1;
}

.booking-summary__row--total .booking-summary__val {
  color: #84cc16;
  font-weight: 600;
}

.booking-summary__edit {
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 11px;
  color: #84cc16;
  cursor: pointer;
  padding: 0;
}

.booking-summary__edit:hover {
  text-decoration: underline;
}

/* ── Submit button ── */
.booking-btn-submit {
  width: 100%;
  font-size: 15px;
}

@keyframes bookingShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.booking-btn-submit.shake {
  animation: bookingShake 0.4s ease;
}

/* ── Success state ── */
.booking-success {
  text-align: center;
  padding: 24px 0;
  animation: bookingFadeIn 0.3s ease;
}

.booking-success__icon {
  margin-bottom: 20px;
}

.booking-success__headline {
  font-family: var(--font-display);
  font-size: 36px;
  color: #e5e5e5;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.booking-success__subtext {
  font-family: var(--font-ui);
  font-size: 14px;
  color: #888;
  line-height: 1.6;
  max-width: 380px;
  margin-inline: auto;
  margin-bottom: 20px;
}

.booking-success__phone {
  display: inline-flex;
  margin-bottom: 16px;
}

.booking-success__reset {
  display: block;
  margin-inline: auto;
  background: none;
  border: none;
  font-family: var(--font-ui);
  font-size: 13px;
  color: #84cc16;
  cursor: pointer;
  padding: 0;
}

.booking-success__reset:hover {
  text-decoration: underline;
}

/* ── Error state ── */
.booking-error {
  text-align: center;
  padding: 24px 0;
  animation: bookingFadeIn 0.3s ease;
}

.booking-error__text {
  font-family: var(--font-ui);
  font-size: 14px;
  color: #ef4444;
  margin-bottom: 16px;
}
