/* ==========================================================================
   Gloss & Tips — booking flow.
   Self-contained: booking.html does NOT load css/public.css, so the brand
   tokens are declared here and the homepage stylesheet can change freely
   without dragging the booking UI with it.
   Warm cream ground, white cards, charcoal type, champagne-gold accents.
   ========================================================================== */

:root {
  --cream: #fbf7f0;
  --cream-soft: #f6f0e6;
  --white: #ffffff;
  --charcoal: #191919;
  --blush: #f7d6de;
  --dusty-pink: #e7a1b1;
  --gold: #c9a66b;
  --gold-light: #e0b45b;

  --ink-soft: rgba(25, 25, 25, 0.62);
  --ink-faint: rgba(25, 25, 25, 0.42);
  --line: rgba(25, 25, 25, 0.1);
  --line-strong: rgba(25, 25, 25, 0.22);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --font-serif: "Playfair Display", Georgia, serif;
  --font-sans: "Inter", -apple-system, "Segoe UI", sans-serif;

  --bk-header-h: 132px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-lang="ar"] body { direction: rtl; }

body.booking {
  margin: 0;
  background: var(--cream);
  color: var(--charcoal);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.booking * { box-sizing: border-box; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 600; margin: 0; line-height: 1.15; }
p { margin: 0; }
img { max-width: 100%; display: block; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* ---- Header -------------------------------------------------------------- */

.bk-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(251, 247, 240, 0.94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.bk-header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.bk-back {
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  width: 34px;
  height: 34px;
  font: inherit;
  font-size: 1rem;
  cursor: pointer;
  color: var(--charcoal);
  flex-shrink: 0;
  transition: border-color 0.2s ease;
}
.bk-back:hover { border-color: var(--charcoal); }
html[data-lang="ar"] .bk-back { transform: scaleX(-1); }

.bk-brand { display: inline-flex; text-decoration: none; margin-inline-end: auto; }

/* logo.png is a transparent square canvas; crop to the wordmark band. */
.brand-logo-frame { position: relative; display: inline-block; }
.brand-logo {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 702 / 288;
}
.brand-logo img {
  position: absolute;
  width: 145.9%;
  max-width: none;
  height: auto;
  left: -27.07%;
  top: -104.17%;
  pointer-events: none;
}
.brand-logo--booking { width: 132px; }

.bk-header-right { display: flex; align-items: center; gap: 16px; }

.bk-help {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.bk-help:hover { color: var(--charcoal); border-bottom-color: var(--gold); }

.bk-close {
  font-size: 1.6rem;
  line-height: 1;
  color: var(--charcoal);
  text-decoration: none;
  padding: 0 4px;
  transition: color 0.2s ease;
}
.bk-close:hover { color: var(--gold); }

/* ---- Progress ------------------------------------------------------------ */

.bk-progress { border-top: 1px solid var(--line); }

.bk-steps {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 22px;
  list-style: none;
  display: flex;
  gap: 6px;
}

.bk-step {
  flex: 1;
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding-top: 9px;
  border-top: 2px solid var(--line);
  transition: color 0.25s ease, border-color 0.25s ease;
}
.bk-step.is-done { color: var(--ink-soft); border-top-color: var(--gold); }
.bk-step.is-done span::before { content: "✓ "; color: var(--gold); }
.bk-step.is-current { color: var(--charcoal); font-weight: 600; border-top-color: var(--charcoal); }

.bk-progress-mobile { display: none; padding: 10px 20px 12px; }
.bk-progress-count {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
.bk-progress-title { font-family: var(--font-serif); font-size: 1.15rem; margin-top: 2px; }
.bk-progress-bar {
  margin-top: 10px;
  height: 3px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.bk-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--gold);
  border-radius: 999px;
  transition: width 0.3s var(--ease);
}

/* ---- Layout -------------------------------------------------------------- */

.bk-main { max-width: 1240px; margin: 0 auto; padding: 34px 22px 80px; }

.bk-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

.bk-content { min-width: 0; }

/* Step panels are shown/hidden via the [hidden] attribute. No keyframe
   entrance animation here on purpose: a panel that is display:none while its
   animation would have run ends up stranded at the from-state (opacity 0) in
   WebKit, which blanked the whole step. The progress rail already signals the
   step change. */
.bk-panel { opacity: 1; }

.bk-h { font-size: clamp(1.6rem, 2.6vw, 2.1rem); }
.bk-sub { color: var(--ink-soft); margin-top: 8px; font-size: 0.98rem; max-width: 56ch; }

/* ---- Large choice cards (steps 1 & 2) ------------------------------------ */

.bk-choice-grid {
  margin-top: 26px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
}

.bk-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  text-align: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 0 0 22px;
  overflow: hidden;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.25s ease, box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.bk-choice--plain { padding: 26px; }
.bk-choice:hover { box-shadow: 0 14px 34px -22px rgba(25, 25, 25, 0.4); }
.bk-choice[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold), 0 16px 38px -24px rgba(25, 25, 25, 0.45);
  background: linear-gradient(180deg, rgba(251, 247, 240, 0.7), var(--white) 60%);
}
.bk-choice[disabled] { opacity: 0.5; cursor: not-allowed; }

/* The gradient is the placeholder. When the owner configures a photo in
   Settings → Booking Images, js/booking.js appends an <img> that covers it;
   if that image fails to load the <img> is removed and the gradient shows
   again, so this tile is never blank or broken. */
.bk-choice-media {
  position: relative;
  height: 148px;
  background: linear-gradient(150deg, #efe6da 0%, #f6eee5 48%, #ecdfe0 100%);
}
.bk-choice-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.bk-choice-media--home {
  background: linear-gradient(150deg, #f3e6ea 0%, #f7f1e8 52%, #eee3d6 100%);
}

.bk-choice-body { display: block; padding: 20px 22px 0; }
.bk-choice--plain .bk-choice-body { padding: 0; }
.bk-choice-title { display: block; font-family: var(--font-serif); font-size: 1.28rem; }
.bk-choice-addr {
  display: block;
  margin-top: 5px;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}
.bk-choice-desc { display: block; margin-top: 9px; color: var(--ink-soft); font-size: 0.92rem; }

.bk-tick {
  position: absolute;
  top: 14px;
  inset-inline-end: 14px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.9);
  transition: background 0.2s ease, border-color 0.2s ease;
}
.bk-choice[aria-pressed="true"] .bk-tick,
.bk-card[aria-pressed="true"] .bk-tick,
.bk-pro[aria-pressed="true"] .bk-tick {
  background: var(--gold);
  border-color: var(--gold);
}
.bk-choice[aria-pressed="true"] .bk-tick::after,
.bk-card[aria-pressed="true"] .bk-tick::after,
.bk-pro[aria-pressed="true"] .bk-tick::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.78rem;
}

/* ---- Date strip ---------------------------------------------------------- */

.bk-datestrip-wrap { margin-top: 24px; display: flex; align-items: center; gap: 8px; }

.bk-strip-arrow {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  font: inherit;
  cursor: pointer;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.bk-strip-arrow:hover { border-color: var(--charcoal); }
.bk-strip-arrow[disabled] { opacity: 0.35; cursor: not-allowed; }

.bk-datestrip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 2px;
}
.bk-datestrip::-webkit-scrollbar { display: none; }

.bk-date {
  flex: 0 0 auto;
  width: 72px;
  padding: 10px 0 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--white);
  cursor: pointer;
  font: inherit;
  text-align: center;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.25s var(--ease);
}
.bk-date:hover:not([disabled]) { border-color: var(--gold); }
.bk-date[aria-pressed="true"] {
  border-color: var(--charcoal);
  background: linear-gradient(180deg, var(--cream-soft), var(--white));
  box-shadow: inset 0 0 0 1px var(--charcoal);
}
.bk-date[disabled] { opacity: 0.4; cursor: not-allowed; }
.bk-date-dow {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.bk-date-num { display: block; font-family: var(--font-serif); font-size: 1.3rem; margin-top: 2px; }
.bk-date-closed { display: block; font-size: 0.6rem; color: var(--ink-faint); text-transform: uppercase; }

/* ---- Times --------------------------------------------------------------- */

.bk-times { margin-top: 28px; }
.bk-times-group + .bk-times-group { margin-top: 22px; }
.bk-times-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 10px;
}
.bk-time-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 9px; }
.bk-time {
  padding: 11px 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--white);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.bk-time:hover { border-color: var(--gold); }
.bk-time[aria-pressed="true"] { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }

/* ---- Catalog (services / packages) --------------------------------------- */

.bk-chips { display: flex; gap: 8px; overflow-x: auto; padding: 22px 2px 4px; scrollbar-width: none; }
.bk-chips::-webkit-scrollbar { display: none; }
.bk-chip {
  flex: 0 0 auto;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.bk-chip[aria-selected="true"] { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }

/* Hover for the category pills. Scoped with :not([aria-selected="true"]) so it
   can never override the selected pill's charcoal fill — the active state must
   always read as active first. Only colours move; padding, size and shape are
   untouched, so there is no layout shift. The 0.2s background/color/border
   transition already on .bk-chip carries it.
   Behind a pointer query because these pills are tapped repeatedly on a phone,
   where an unguarded :hover latches until the next tap elsewhere. */
@media (hover: hover) and (pointer: fine) {
  .bk-chip:not([aria-selected="true"]):hover {
    background: var(--cream-soft);
    border-color: var(--gold);
  }
  /* The selected pill acknowledges the hover with its edge only. */
  .bk-chip[aria-selected="true"]:hover {
    border-color: var(--gold);
  }
}

.bk-catalog { margin-top: 18px; display: flex; flex-direction: column; gap: 12px; }

.bk-card {
  position: relative;
  display: block;
  width: 100%;
  text-align: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 18px 52px 18px 20px;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.25s ease, box-shadow 0.3s var(--ease);
}
html[data-lang="ar"] .bk-card { padding: 18px 20px 18px 52px; }
.bk-card:hover { box-shadow: 0 12px 30px -22px rgba(25, 25, 25, 0.42); }
.bk-card[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
  background: linear-gradient(180deg, rgba(247, 214, 222, 0.12), var(--white) 70%);
}
.bk-card-title { font-family: var(--font-serif); font-size: 1.1rem; }
.bk-card-desc { color: var(--ink-soft); font-size: 0.88rem; margin-top: 4px; max-width: 58ch; }
.bk-card-meta { margin-top: 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bk-pill {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--cream-soft);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 4px 10px;
}
.bk-card-price { font-family: var(--font-serif); font-size: 1.02rem; margin-inline-start: auto; }

.bk-pkg-photo { height: 168px; width: 100%; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 14px; }
.bk-pkg-includes { margin: 10px 0 0; padding-inline-start: 18px; color: var(--ink-soft); font-size: 0.86rem; }
.bk-pkg-count { display: none; }
.bk-save { color: #2f6135; font-size: 0.78rem; font-weight: 600; }

/* Option groups revealed under a selected service */
.bk-options {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bk-optgroup-name { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }
.bk-optgroup-req { color: var(--dusty-pink); }
.bk-optlist { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.bk-opt {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--white);
  font: inherit;
  font-size: 0.84rem;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.bk-opt[aria-pressed="true"] { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
.bk-opt-delta { opacity: 0.7; font-size: 0.78rem; }

/* ---- Professionals ------------------------------------------------------- */

.bk-pro-grid { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.bk-pro {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.25s ease, box-shadow 0.3s var(--ease);
}
.bk-pro:hover { box-shadow: 0 12px 30px -22px rgba(25, 25, 25, 0.42); }
.bk-pro[aria-pressed="true"] { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.bk-pro-avatar {
  width: 62px; height: 62px; border-radius: 50%;
  margin: 0 auto 12px; object-fit: cover;
  background: var(--cream-soft);
  display: grid; place-items: center;
  font-family: var(--font-serif); font-size: 1.15rem; color: var(--gold);
}
.bk-pro-name { font-family: var(--font-serif); font-size: 1.05rem; }
.bk-pro-role { color: var(--ink-soft); font-size: 0.82rem; margin-top: 2px; }
.bk-pro-note { color: var(--gold); font-size: 0.76rem; margin-top: 8px; }
.bk-pro--any { border-style: dashed; }

/* ---- Form ---------------------------------------------------------------- */

.bk-form { margin-top: 24px; display: flex; flex-direction: column; gap: 16px; max-width: 520px; }
.bk-field { display: flex; flex-direction: column; gap: 6px; }
.bk-field label { font-size: 0.82rem; font-weight: 600; }
.bk-req { color: var(--dusty-pink); }
.bk-optional { color: var(--ink-faint); font-weight: 400; }
.bk-field input,
.bk-field textarea {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: inherit;
  transition: border-color 0.2s ease;
}
.bk-field input:focus, .bk-field textarea:focus { border-color: var(--gold); }
.bk-field input[aria-invalid="true"], .bk-field textarea[aria-invalid="true"] { border-color: #b4514f; }
.bk-phone { display: flex; align-items: stretch; }
.bk-phone-cc {
  display: grid; place-items: center;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-inline-end: none;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  background: var(--cream-soft);
  font-size: 0.9rem;
  color: var(--ink-soft);
}
html[data-lang="ar"] .bk-phone-cc { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.bk-phone input { flex: 1; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
html[data-lang="ar"] .bk-phone input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.bk-hint { font-size: 0.76rem; color: var(--ink-faint); }
.bk-error { font-size: 0.78rem; color: #b4514f; }
.bk-error:empty { display: none; }
.bk-error--block { margin-top: 16px; padding: 12px 14px; background: #fbf0ef; border-radius: var(--radius-sm); }

/* ---- Review / success ---------------------------------------------------- */

.bk-review {
  margin-top: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.bk-review-row { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; font-size: 0.94rem; }
.bk-review-row dt { color: var(--ink-soft); }
.bk-review-row dd { margin: 0; text-align: end; font-weight: 500; }
.bk-review-sep { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.bk-review-total { font-family: var(--font-serif); font-size: 1.25rem; }
.bk-payment-note { margin-top: 14px; color: var(--ink-soft); font-size: 0.88rem; }

.bk-panel--success { text-align: center; padding-top: 20px; }
.bk-success-mark {
  width: 62px; height: 62px; border-radius: 50%;
  margin: 0 auto 20px;
  display: grid; place-items: center;
  background: var(--cream-soft);
  color: var(--gold);
  font-size: 1.5rem;
}
.bk-ref {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
}
.bk-success-actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---- Summary ------------------------------------------------------------- */

.bk-summary { position: sticky; top: calc(var(--bk-header-h) + 20px); }
.bk-summary-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.bk-summary-title {
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--font-sans);
  font-weight: 600;
  color: var(--ink-soft);
}
.bk-summary-body { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.bk-sum-line { display: flex; justify-content: space-between; gap: 12px; font-size: 0.9rem; }
.bk-sum-line dt { color: var(--ink-soft); margin: 0; }
.bk-sum-line dd { margin: 0; text-align: end; }
.bk-sum-item { padding: 9px 0; border-top: 1px solid var(--line); }
.bk-sum-item:first-of-type { border-top: none; }
.bk-sum-item-name { display: flex; justify-content: space-between; gap: 12px; }
.bk-sum-item-meta { color: var(--ink-faint); font-size: 0.8rem; margin-top: 2px; }
.bk-sum-total { border-top: 1px solid var(--line-strong); padding-top: 12px; margin-top: 4px; }
.bk-sum-total .bk-sum-line { font-family: var(--font-serif); font-size: 1.15rem; }
/* Values only — Duration / Subtotal / VAT / Total move to the booking UI's
   body sans so the figures read cleanly; tabular figures line the decimal
   points up down the column. The labels beside them stay serif, and the rows
   above (Location / Date / Time / Professional) are untouched because this is
   scoped under .bk-sum-total. Nothing else on the page uses this selector —
   card, review and public-site prices keep their own serif rules. */
.bk-sum-total .bk-sum-line dd {
  font-family: var(--font-sans);
  font-variant-numeric: tabular-nums;
}
.bk-summary-empty { color: var(--ink-faint); font-size: 0.9rem; }
.bk-summary-note { margin-top: 10px; font-size: 0.76rem; color: var(--ink-faint); text-align: center; }

.bk-cta {
  margin-top: 18px;
  width: 100%;
  padding: 15px 22px;
  border: none;
  border-radius: 999px;
  background: var(--charcoal);
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, opacity 0.2s ease;
}
.bk-cta:hover:not([disabled]) { background: var(--gold); color: var(--charcoal); }
.bk-cta[disabled] { opacity: 0.4; cursor: not-allowed; }

.bk-btn-ghost {
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: transparent;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--charcoal);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.bk-btn-ghost:hover { border-color: var(--charcoal); }

/* ---- Skeletons / states -------------------------------------------------- */

.bk-skel { display: flex; flex-direction: column; gap: 12px; }
.bk-skel-row {
  height: 78px;
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #f2ece3 25%, #f8f4ee 37%, #f2ece3 63%);
  background-size: 400% 100%;
  animation: bk-shimmer 1.3s ease infinite;
}
@keyframes bk-shimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }

.bk-empty { color: var(--ink-soft); padding: 22px 0; }
.bk-inline-error {
  padding: 16px 18px;
  border: 1px solid rgba(180, 81, 79, 0.3);
  background: #fbf0ef;
  border-radius: var(--radius-md);
  color: #8a3f3f;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---- Mobile bar + sheet + modal ------------------------------------------ */

.bk-mobilebar { display: none; }

.bk-sheet-scrim, .bk-modal-scrim {
  position: fixed; inset: 0; background: rgba(20, 16, 12, 0.45); z-index: 60;
}
.bk-sheet-scrim[hidden], .bk-modal-scrim[hidden], .bk-sheet[hidden] { display: none; }

.bk-sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  padding: 20px 22px calc(22px + env(safe-area-inset-bottom));
  max-height: 78vh;
  overflow-y: auto;
}
.bk-sheet-head { display: flex; align-items: center; justify-content: space-between; }
.bk-sheet-close { background: none; border: none; font-size: 1.6rem; line-height: 1; cursor: pointer; }

.bk-modal-scrim { display: grid; place-items: center; padding: 20px; }
.bk-modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px;
  width: min(460px, 100%);
}
.bk-modal-title { font-size: 1.3rem; }
.bk-modal-text { color: var(--ink-soft); margin-top: 10px; font-size: 0.94rem; }
.bk-modal-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 9px; margin-top: 18px; }
.bk-modal-actions { margin-top: 20px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---- Responsive ---------------------------------------------------------- */

@media (max-width: 900px) {
  :root { --bk-header-h: 118px; }

  .bk-steps { display: none; }
  .bk-progress-mobile { display: block; }

  .bk-layout { grid-template-columns: 1fr; }
  .bk-summary { display: none; }

  .bk-main { padding: 22px 18px 120px; }

  .bk-mobilebar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.97);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--line);
  }
  .bk-mobilebar-info {
    flex: 1;
    text-align: start;
    background: none;
    border: none;
    font: inherit;
    font-size: 0.84rem;
    color: var(--ink-soft);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  #bk-mobilebar-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bk-cta--compact { width: auto; margin-top: 0; padding: 13px 22px; flex-shrink: 0; }

  .bk-time-grid { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
  .bk-pro-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .bk-choice-media { height: 120px; }
}

/* ---- Phone density pass --------------------------------------------------
   Phones get two cards per row so the treatment and package lists stop
   feeling endless. Everything here is scoped to <=760px, so the 761-900px
   tablet range and the desktop two-column layout are untouched.
   ------------------------------------------------------------------------ */

@media (max-width: 760px) {
  /* Two-up grids. .bk-catalog is a flex column at wider widths; on phones it
     becomes the grid itself. Service cards sit inside .bk-card-wrap, package
     cards are direct children, so both are made to stretch. */
  .bk-catalog {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 10px;
    row-gap: 12px;
    align-items: stretch;
    /* Clears the sticky summary bar so the final row scrolls fully clear. */
    padding-bottom: 16px;
  }
  .bk-card-wrap { display: flex; }
  .bk-catalog > .bk-card,
  .bk-card-wrap > .bk-card { width: 100%; }

  /* A card showing its option groups needs the full width — otherwise it
     towers over its neighbour. */
  .bk-catalog > .bk-card-wrap:has(.bk-options) { grid-column: 1 / -1; }

  .bk-card {
    display: flex;
    flex-direction: column;
    min-height: 132px;
    padding: 13px 34px 13px 13px;
    border-radius: 12px;
  }
  html[data-lang="ar"] .bk-card { padding: 13px 13px 13px 34px; }

  .bk-card-title {
    font-size: 0.94rem;
    line-height: 1.3;
    /* Long names wrap to two lines rather than stretching the card. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Descriptions are the main source of uneven card heights — clamped to two
     lines on services, hidden entirely on packages where the image already
     carries the story. */
  .bk-card-desc {
    font-size: 0.78rem;
    line-height: 1.35;
    margin-top: 3px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  /* Price + duration anchored to the bottom so the row reads evenly. */
  .bk-card-meta {
    margin-top: auto;
    padding-top: 8px;
    gap: 6px;
  }
  .bk-pill { font-size: 0.64rem; padding: 3px 7px; }
  .bk-card-price { font-size: 0.94rem; }

  .bk-tick { top: 9px; inset-inline-end: 9px; width: 20px; height: 20px; }
  .bk-choice[aria-pressed="true"] .bk-tick::after,
  .bk-card[aria-pressed="true"] .bk-tick::after,
  .bk-pro[aria-pressed="true"] .bk-tick::after { font-size: 0.68rem; }

  /* Packages: keep the photo, drop the long included-services list in favour
     of the short count. The full list stays on desktop. */
  .bk-pkg-photo { height: 96px; margin-bottom: 9px; }
  .bk-pkg-includes { display: none; }
  .bk-pkg-count {
    display: block;
    margin-top: 5px;
    font-size: 0.72rem;
    color: var(--ink-soft);
  }
  .bk-catalog > .bk-card[data-package] .bk-card-desc { display: none; }
  .bk-save { font-size: 0.68rem; }

  /* Option pills inside an expanded service card */
  .bk-options { margin-top: 10px; padding-top: 10px; gap: 10px; }
  .bk-opt { padding: 7px 11px; font-size: 0.78rem; }

  /* Category chips: one tidy scrolling row, tighter than desktop. */
  .bk-chips { padding: 14px 2px 2px; gap: 6px; }
  .bk-chip { padding: 7px 12px; font-size: 0.8rem; }

  /* Tighten the vertical rhythm without shrinking touch targets. */
  .bk-h { font-size: 1.35rem; }
  .bk-sub { font-size: 0.88rem; margin-top: 6px; }
  .bk-main { padding: 16px 14px 116px; }

  /* Very narrow phones: two columns stop being readable, so fall back. */
  @media (max-width: 350px) {
    .bk-catalog { grid-template-columns: 1fr; }
    .bk-card { min-height: 0; }
    .bk-pkg-photo { height: 130px; }
  }
}

@media (min-width: 901px) {
  .bk-sheet, .bk-sheet-scrim { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .bk-skel-row { animation: none; }
  .bk-choice, .bk-card, .bk-pro, .bk-date, .bk-time, .bk-cta, .bk-progress-bar span {
    transition: none;
  }
}

/* ==========================================================================
   Step 1 — location control, packages chip, cart
   ========================================================================== */

/* Rendered only when salon_settings.home_service_enabled is true. */
.bk-where {
  margin: 22px 0 26px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--white);
}
.bk-where-label {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.bk-where-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.bk-where-opt {
  flex: 1 1 200px;
  min-width: 0;
  text-align: start;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.3s var(--ease);
}
.bk-where-opt:hover { border-color: var(--gold); }
.bk-where-opt[aria-pressed="true"] {
  border-color: var(--gold);
  box-shadow: 0 0 0 1px var(--gold);
  background: linear-gradient(180deg, rgba(251, 247, 240, 0.7), var(--white) 60%);
}
.bk-where-name { display: block; font-weight: 600; font-size: 0.92rem; }
.bk-where-meta { display: block; margin-top: 2px; font-size: 0.78rem; color: var(--ink-soft); }

/* Packages read as one more category chip. */
.bk-chip--pkg[aria-selected="true"] { border-color: var(--gold); }

/* Advisory note when package / individual treatments would conflict. */
.bk-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #fdf6ec;
  border: 1px solid #ecdcbe;
  font-size: 0.82rem;
  color: #7a5a17;
}

/* ---- Cart ---------------------------------------------------------------- */

.bk-cart {
  margin-top: 26px;
  padding: 16px 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--white);
}
.bk-cart-title {
  margin: 0 0 10px;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.bk-cart-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  border-top: 1px solid var(--line);
}
.bk-cart-row:first-of-type { border-top: none; }
.bk-cart-main { min-width: 0; }
.bk-cart-name { display: block; font-weight: 600; font-size: 0.9rem; }
.bk-cart-meta {
  display: block;
  font-size: 0.76rem;
  color: var(--ink-soft);
  margin-top: 1px;
}
.bk-cart-price {
  font-size: 0.86rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.bk-cart-remove {
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: none;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.bk-cart-remove:hover {
  color: #b4514f;
  border-color: #e3c9c8;
  background: #fdf3f3;
}

@media (max-width: 760px) {
  .bk-where { margin: 16px 0 20px; padding: 13px 14px; }
  .bk-where-opt { flex: 1 1 100%; }
  .bk-cart { margin-top: 20px; padding: 13px 14px; }
  /* Comfortable tap target on the remove control. */
  .bk-cart-remove { width: 40px; height: 40px; }
  .bk-cart-row { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .bk-cart-remove { grid-row: 1 / span 2; grid-column: 2; }
  .bk-cart-price { grid-column: 1; font-size: 0.82rem; }
}

/* Owner-configured Booking Images, re-homed onto the compact location
   control. The gradient remains the fallback for "not configured". */
.bk-where-opt { display: flex; align-items: center; gap: 12px; }
.bk-where-body { min-width: 0; }
.bk-where-thumb {
  position: relative;
  flex-shrink: 0;
  width: 88px;
  height: 62px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(150deg, #efe6da 0%, #f6eee5 48%, #ecdfe0 100%);
}
.bk-where-thumb--home {
  background: linear-gradient(150deg, #f3e6ea 0%, #f7f1e8 52%, #eee3d6 100%);
}
.bk-where-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 760px) {
  .bk-where-thumb { width: 76px; height: 54px; }
}

/* A service or package whose treatments are already represented elsewhere in
   the cart. Uses the existing [disabled] convention from .bk-choice. */
.bk-card[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.bk-card-blocked {
  display: block;
  margin-bottom: 6px;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
}

/* A candidate time that cannot be booked. Stays in the grid, greyed and
   genuinely disabled, so the schedule reads as a continuous run of times
   rather than an arbitrarily gappy list. */
.bk-time[disabled] {
  cursor: not-allowed;
  color: var(--ink-faint);
  background: var(--cream-soft);
  border-color: var(--line);
  opacity: 0.75;
  padding-block: 7px;
}
.bk-time[disabled]:hover {
  border-color: var(--line);
}
.bk-time-note {
  display: block;
  margin-top: 1px;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}
.bk-empty--inline {
  margin-bottom: 14px;
}

/* ---- Owner master switches (Services → Service Availability) -------------- */
/* A closed location is removed from the control entirely. .bk-where-opt sets
   display:flex, which would otherwise beat the [hidden] attribute. */
.bk-where-opt[hidden] { display: none !important; }

/* Both locations paused: a calm notice in place of the booking flow. */
.bk-paused {
  max-width: 520px;
  margin: 48px auto;
  padding: 28px 26px;
  text-align: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--white);
}
.bk-paused h2 {
  margin: 0 0 10px;
  font-family: var(--font-serif);
  font-size: 1.4rem;
}
.bk-paused p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.6;
}
.bk-is-paused .bk-progress,
.bk-is-paused .bk-summary,
.bk-is-paused .bk-mobilebar {
  display: none !important;
}

/* ---- Home-service minimum order notice (Step 1) --------------------------- */
.bk-min-order {
  margin-top: 16px;
  padding: 14px 16px 14px 18px;
  border: 1px solid rgba(185, 146, 88, 0.55);
  border-left: 3px solid var(--gold, #b99258);
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(251, 247, 240, 0.9), var(--white));
}
.bk-min-order[hidden] { display: none; }
.bk-min-title {
  margin: 0 0 4px;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink, #2f2623);
}
.bk-min-text {
  margin: 0;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--ink-soft);
}
.bk-min-text strong { color: var(--ink, #2f2623); font-weight: 600; }
