/* ─────────────────────────────────────────────
   MAC Hair Styling — Booking Flow
   book.machairstyling.ca
   Palette:
     Cream:    #FAF7F4
     Charcoal: #1A1A1A / #2C2C2C
     Accent:   #9B6A3A (cognac)
     Gold:     #C9A96E
   Fonts: Cormorant Garamond (headings) + Jost (body)
───────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Jost:wght@300;400;500;600&display=swap');

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

html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: #FAF7F4;
  color: #1A1A1A;
  font-family: 'Jost', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 400;
}

a { text-decoration: none; color: inherit; }

.text-accent { color: #9B6A3A; }

/* ── HEADER ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FAF7F4;
  border-bottom: 1px solid rgba(26,26,26,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: #1A1A1A;
}

.logo-text em {
  font-style: italic;
  color: #9B6A3A;
}

.header__back {
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #9B6A3A;
  transition: color 0.2s;
}

.header__back:hover { color: #C9A96E; }

/* ── BOOKING WRAPPER ── */
.booking-wrapper {
  flex: 1;
  max-width: 900px;
  width: 100%;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

/* ── STEP INDICATOR ── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 3rem;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.35;
  transition: opacity 0.3s;
}

.step.active { opacity: 1; }
.step.completed { opacity: 0.7; }

.step__num {
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  border: 1.5px solid #9B6A3A;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 500;
  color: #9B6A3A;
  background: transparent;
  transition: background 0.3s, color 0.3s;
}

.step.active .step__num {
  background: #9B6A3A;
  color: #FAF7F4;
}

.step.completed .step__num {
  background: #C9A96E;
  border-color: #C9A96E;
  color: #FAF7F4;
}

.step__label {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #1A1A1A;
}

.step__line {
  flex: 1;
  height: 1px;
  background: rgba(26,26,26,0.15);
  min-width: 3rem;
  max-width: 6rem;
  margin-bottom: 1.2rem;
}

/* ── BOOKING STEPS ── */
.booking-step {
  display: none;
  animation: fadeIn 0.35s ease;
}

.booking-step.active { display: block; }

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

/* ── STEP HEADER ── */
.step-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.step-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 0.6rem;
}

.step-header p {
  font-size: 0.95rem;
  color: #555;
  max-width: 500px;
  margin: 0 auto;
}

/* ── SERVICE GRID ── */
.service-grid {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.service-category {}

.category-title {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #9B6A3A;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(155,106,58,0.2);
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.service-card {
  background: #fff;
  border: 1.5px solid rgba(26,26,26,0.1);
  border-radius: 8px;
  padding: 1.2rem 1rem;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  text-align: left;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  position: relative;
  font-family: inherit;
}

.service-card:hover {
  border-color: #9B6A3A;
  box-shadow: 0 4px 16px rgba(155,106,58,0.12);
  transform: translateY(-1px);
}

.service-card.selected {
  border-color: #9B6A3A;
  background: #FDF6EF;
  box-shadow: 0 4px 20px rgba(155,106,58,0.18);
}

.service-card__icon {
  width: 2.2rem;
  height: 2.2rem;
  flex-shrink: 0;
  color: #9B6A3A;
  opacity: 0.7;
}

.service-card__icon svg {
  width: 100%;
  height: 100%;
}

.service-card__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.service-card__info h3 {
  font-size: 1rem;
  font-weight: 400;
  font-family: 'Cormorant Garamond', serif;
  color: #1A1A1A;
}

.service-card__price {
  font-size: 0.8rem;
  font-weight: 500;
  color: #9B6A3A;
}

.service-card__duration {
  font-size: 0.72rem;
  color: #888;
}

.service-card__check {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 1.4rem;
  height: 1.4rem;
  background: #9B6A3A;
  color: #fff;
  border-radius: 50%;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.service-card.selected .service-card__check { opacity: 1; }

/* ── STEP FOOTER ── */
.step-footer {
  display: flex;
  justify-content: flex-end;
  margin-top: 2.5rem;
  gap: 1rem;
}

.step-footer--confirm {
  justify-content: space-between;
}

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-family: 'Jost', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
  text-decoration: none;
}

.btn--primary {
  background: #9B6A3A;
  color: #FAF7F4;
  border-color: #9B6A3A;
}

.btn--primary:hover:not(:disabled) {
  background: #C9A96E;
  border-color: #C9A96E;
  transform: translateY(-1px);
}

.btn--primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn--outline {
  background: transparent;
  color: #1A1A1A;
  border-color: rgba(26,26,26,0.3);
}

.btn--outline:hover {
  border-color: #1A1A1A;
}

.btn--book {
  background: #1A1A1A;
  border-color: #1A1A1A;
  color: #FAF7F4;
  font-size: 0.85rem;
  padding: 1rem 2.5rem;
}

.btn--book:hover {
  background: #9B6A3A;
  border-color: #9B6A3A;
  transform: translateY(-1px);
}

/* ── DATE & TIME LAYOUT ── */
.datetime-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* ── CALENDAR ── */
.calendar-panel {
  background: #fff;
  border: 1px solid rgba(26,26,26,0.1);
  border-radius: 8px;
  padding: 1.5rem;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.2rem;
}

.cal-month-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 400;
}

.cal-nav-btn {
  background: none;
  border: 1px solid rgba(26,26,26,0.2);
  border-radius: 4px;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  font-size: 1.1rem;
  color: #1A1A1A;
  transition: border-color 0.2s, background 0.2s;
}

.cal-nav-btn:hover {
  border-color: #9B6A3A;
  background: #FDF6EF;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.cal-day-header {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  padding: 0.3rem 0;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: none;
  font-family: 'Jost', sans-serif;
  color: #1A1A1A;
}

.cal-day:hover:not(.cal-day--disabled):not(.cal-day--empty) {
  background: #FDF6EF;
  color: #9B6A3A;
}

.cal-day.selected {
  background: #9B6A3A;
  color: #FAF7F4;
}

.cal-day--disabled {
  color: #ccc;
  cursor: not-allowed;
}

.cal-day--empty { cursor: default; }

.cal-day--today {
  font-weight: 600;
  color: #9B6A3A;
}

/* ── TIME SLOTS ── */
.time-panel {
  background: #fff;
  border: 1px solid rgba(26,26,26,0.1);
  border-radius: 8px;
  padding: 1.5rem;
  min-height: 280px;
}

.time-panel__heading {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  font-weight: 400;
  margin-bottom: 1.2rem;
  color: #555;
}

.time-slots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.time-slot {
  padding: 0.65rem 0.5rem;
  border: 1px solid rgba(26,26,26,0.15);
  border-radius: 4px;
  font-size: 0.82rem;
  font-weight: 400;
  text-align: center;
  cursor: pointer;
  background: none;
  font-family: 'Jost', sans-serif;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  color: #1A1A1A;
}

.time-slot:hover:not(.time-slot--taken) {
  border-color: #9B6A3A;
  background: #FDF6EF;
  color: #9B6A3A;
}

.time-slot.selected {
  background: #9B6A3A;
  border-color: #9B6A3A;
  color: #FAF7F4;
}

.time-slot--taken {
  color: #ccc;
  cursor: not-allowed;
  text-decoration: line-through;
}

.time-slots-placeholder {
  color: #aaa;
  font-size: 0.85rem;
  padding: 1rem 0;
  grid-column: 1 / -1;
}

/* ── CONFIRM CARD ── */
.confirm-card {
  background: #fff;
  border: 1px solid rgba(26,26,26,0.1);
  border-radius: 8px;
  overflow: hidden;
  max-width: 520px;
  margin: 0 auto 0.5rem;
}

.confirm-card__header {
  background: #2C2C2C;
  color: #FAF7F4;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.confirm-card__salon {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.3rem;
  font-weight: 400;
  letter-spacing: 0.05em;
}

.confirm-card__location {
  font-size: 0.75rem;
  color: rgba(250,247,244,0.6);
  letter-spacing: 0.08em;
}

.confirm-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.confirm-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid rgba(26,26,26,0.07);
}

.confirm-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.confirm-row__label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}

.confirm-row__value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 400;
  color: #1A1A1A;
}

.confirm-card__note {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1rem 1.5rem;
  background: #FDF6EF;
  font-size: 0.78rem;
  color: #9B6A3A;
  line-height: 1.5;
}

.fresha-note {
  text-align: center;
  font-size: 0.75rem;
  color: #aaa;
  margin-top: 1.5rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

/* ── FOOTER ── */
.book-footer {
  background: #2C2C2C;
  color: rgba(250,247,244,0.5);
  text-align: center;
  padding: 1.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-top: auto;
}

.book-footer a {
  color: #C9A96E;
  transition: color 0.2s;
}

.book-footer a:hover { color: #FAF7F4; }

/* ── RESPONSIVE ── */
@media (max-width: 680px) {
  .header { padding: 0.9rem 1.2rem; }
  .booking-wrapper { padding: 2rem 1rem 3rem; }

  .steps { gap: 0; }
  .step__line { min-width: 1.5rem; max-width: 3rem; }
  .step__label { font-size: 0.6rem; }

  .service-cards {
    grid-template-columns: 1fr 1fr;
  }

  .datetime-layout {
    grid-template-columns: 1fr;
  }

  .step-footer {
    flex-direction: column-reverse;
  }

  .step-footer--confirm {
    flex-direction: column-reverse;
  }

  .btn { width: 100%; }

  .confirm-card__header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
}

@media (max-width: 400px) {
  .service-cards {
    grid-template-columns: 1fr;
  }
}
