/* =========================================
   GLOBAL RESET
   Removes default spacing and makes sizing predictable
   ========================================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* =========================================
   BASE PAGE STYLES
   ========================================= */
body {
  font-family: 'Poppins', sans-serif;
  background: #fff7fa;
  color: #3e2c4e;
  padding: 30px 20px;
}

h1 {
  text-align: center;
  margin-bottom: 30px;
  color: #6A1EB1;
  font-size: 2rem;
  font-weight: 700;
}

form#bookingForm {
  width: 100%;
  margin: 0 auto;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

/* =========================================
   STEP VISIBILITY
   JS switches between visible and hidden steps
   ========================================= */
.step {
  display: none;
}

.step.active {
  display: block;
}

.hidden {
  display: none !important;
}

.step h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  color: #3e2c4e;
}

.step h3 {
  margin: 20px 0 12px;
  color: #6A1EB1;
  font-size: 1.05rem;
}

/* =========================================
   APP WRAPPER
   ========================================= */
.mobile-screen {
  width: 100%;
  max-width: 520px;
  min-height: 80vh;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 28px;
  border: 1px solid #eee3f5;
  box-shadow: 0 10px 30px rgba(62, 44, 78, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mobile-header {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 14px;
  border-bottom: 1px solid #f2ebf7;
  background: #fff;
}

.mobile-header h2 {
  display: block;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: #3e2c4e;
}

.mobile-content {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
}

.mobile-bottom-bar {
  display: block;
  padding: 16px 18px 18px;
  border-top: 1px solid #f2ebf7;
  background: #fff;
}

.icon-back {
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: #f7effc;
  color: #6A1EB1;
  font-size: 1.1rem;
  cursor: pointer;
  transition: 0.2s ease;
  margin: 0;
  box-shadow: none;
  padding: 0;
}

.icon-back:hover {
  background: #efe2fa;
}

.header-spacer {
  width: 44px;
  height: 44px;
}

.hidden-back {
  visibility: hidden;
}

/* =========================================
   FORM FIELDS
   ========================================= */
label {
  display: block;
  margin-bottom: 15px;
  font-weight: 500;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"] {
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px solid #d8c6ea;
  border-radius: 14px;
  font-size: 0.98rem;
  font-family: 'Poppins', sans-serif;
  background: #fff;
  color: #3e2c4e;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]:focus,
input[type="tel"]:focus,
input[type="email"]:focus,
input[type="date"]:focus {
  border-color: #6A1EB1;
  box-shadow: 0 0 0 3px rgba(106, 30, 177, 0.12);
}

/* =========================================
   BUTTONS
   ========================================= */
button {
  font-family: 'Poppins', sans-serif;
}

button.back,
button.next,
button[type="submit"] {
  border: none;
  border-radius: 999px;
  padding: 15px 18px;
  font-size: 0.96rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease;
}

button.next,
button[type="submit"] {
  background: #6A1EB1;
  color: #fff;
  box-shadow: 0 8px 20px rgba(106, 30, 177, 0.18);
}

button.back {
  background: #eee5f8;
  color: #6A1EB1;
}

button.back:hover,
button.next:hover,
button[type="submit"]:hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.full-btn {
  width: 100%;
}

/* =========================================
   PRICE ROW
   ========================================= */
.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.96rem;
}

.price-row strong {
  color: #6A1EB1;
  font-size: 1.05rem;
  font-weight: 700;
}

/* =========================================
   SERVICE GRID
   ========================================= */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.service-card {
  display: block;
  cursor: pointer;
}

.service-card input[type="radio"] {
  display: none;
}

.service-card-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: #fff;
  border: 1px solid #eadcf7;
  border-radius: 18px;
  padding: 12px;
  box-shadow: 0 6px 18px rgba(62, 44, 78, 0.06);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.service-card-inner:hover {
  transform: translateY(-2px);
  border-color: #b784e3;
  box-shadow: 0 10px 22px rgba(62, 44, 78, 0.10);
}

.service-card input[type="radio"]:checked + .service-card-inner {
  border-color: #6A1EB1;
  box-shadow: 0 0 0 3px rgba(106, 30, 177, 0.12);
}

.service-card img,
.no-image {
  width: 76px;
  height: 76px;
  min-width: 76px;
  border-radius: 14px;
  object-fit: cover;
  display: block;
  background: #f5eefc;
}

.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6A1EB1;
  font-weight: 600;
  font-size: 0.9rem;
  text-align: center;
  padding: 10px;
}

.service-info {
  flex: 1;
}

.service-name {
  font-weight: 600;
  font-size: 0.96rem;
  color: #3e2c4e;
  line-height: 1.35;
}

/* =========================================
   OPTIONS
   Returned by your PHP API partials
   ========================================= */
#sizesContainer,
#lengthsContainer,
#addonsContainer,
#timesContainer {
  display: grid;
  gap: 12px;
}

#sizesContainer label,
#lengthsContainer label,
#addonsContainer label,
#timesContainer label,
.time-option {
  display: block;
  background: #faf6fd;
  border: 1px solid #e6d8f4;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

#sizesContainer label:hover,
#lengthsContainer label:hover,
#addonsContainer label:hover,
#timesContainer label:hover,
.time-option:hover {
  border-color: #b784e3;
  background: #f6f0fc;
  transform: translateY(-1px);
}

#sizesContainer input,
#lengthsContainer input,
#addonsContainer input,
#timesContainer input,
.time-option input {
  margin-right: 10px;
}

.choice-note {
  background: #faf6fd;
  border: 1px solid #e6d8f4;
  border-radius: 14px;
  padding: 14px 16px;
  color: #7d6b8a;
}

/* =========================================
   SELECTED SERVICE DISPLAY
   ========================================= */
#selectedServiceName {
  background: #f7f1fc;
  color: #6A1EB1;
  padding: 12px 15px;
  border-radius: 12px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* =========================================
   SUMMARY BOX
   ========================================= */
#summary {
  background: #faf6fd;
  border: 1px solid #e6d8f4;
  border-radius: 16px;
  padding: 18px;
  line-height: 1.7;
}

#summary div + div {
  margin-top: 8px;
}

/* =========================================
   TABLET
   ========================================= */
@media (min-width: 768px) {
  body {
    padding: 30px 20px;
  }

  .mobile-screen {
    max-width: 680px;
    min-height: 82vh;
  }

  .mobile-content {
    padding: 22px;
  }

  .mobile-bottom-bar {
    padding: 18px 22px 22px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .service-card-inner {
    display: block;
    text-align: center;
    padding: 12px 12px 16px;
  }

  .service-card img,
  .no-image {
    width: 100%;
    height: 180px;
    min-width: 100%;
    margin-bottom: 12px;
  }

  .service-name {
    text-align: center;
  }
}

/* =========================================
   DESKTOP
   ========================================= */
@media (min-width: 1024px) {
  body {
    padding: 36px 24px;
  }

  .mobile-screen {
    max-width: 760px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }

  .service-card img,
  .no-image {
    height: 220px;
  }
}

/* =========================================
   LARGE DESKTOP
   ========================================= */
@media (min-width: 1280px) {
  .mobile-screen {
    max-width: 820px;
  }

  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .service-card img,
  .no-image {
    height: 180px;
  }
}

/* =========================================
   MOBILE
   ========================================= */
@media (max-width: 767px) {
  body {
    padding: 0;
    margin: 0;
    background: #f5f5f7;
    color: #1f1f1f;
  }

  h1 {
    display: none;
  }

  .mobile-screen {
    max-width: 100%;
    min-height: 100vh;
    border-radius: 0;
    border: none;
    box-shadow: none;
    background: #f5f5f7;
  }

  .mobile-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: #f5f5f7;
  }

  .mobile-content {
    padding: 10px 14px 110px;
  }

  .mobile-bottom-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.05);
    z-index: 50;
  }

  .mobile-content h3 {
    font-size: 0.85rem;
    font-weight: 600;
    margin: 18px 0 10px;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }

  .service-card-inner {
    display: flex;
    text-align: left;
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .service-card-inner:hover {
    transform: none;
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .service-card img,
  .no-image {
    width: 68px;
    height: 68px;
    min-width: 68px;
    margin-bottom: 0;
    border-radius: 14px;
  }

  .service-name {
    text-align: left;
    font-size: 0.92rem;
    color: #111827;
  }

  .service-card input[type="radio"]:checked + .service-card-inner {
    border-color: #b784e3;
    box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.12);
  }

  #sizesContainer label,
  #lengthsContainer label,
  #addonsContainer label,
  #timesContainer label,
  .time-option,
  #summary,
  #selectedServiceName,
  .choice-note {
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="date"] {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #111827;
  }

  input[type="text"]:focus,
  input[type="tel"]:focus,
  input[type="email"]:focus,
  input[type="date"]:focus {
    border-color: #b784e3;
    box-shadow: 0 0 0 3px rgba(47, 128, 237, 0.12);
  }

  button.next,
  button[type="submit"] {
    background: #6A1EB1;
    color: #fff;
    box-shadow: none;
  }

  button.back {
    background: #e5e7eb;
    color: #374151;
  }

  .price-row strong,
  #selectedServiceName {
    color: #b784e3;
  }
}