/* ------------------------------------------------------------------ *
 * British Airways demo skin - the booking-flow surface for the
 * Salesforce Personalization behaviour-capture demo (forked structure,
 * flight domain). Task 4 wires the flight/offer/ancillary rendering.
 *
 * All brand tokens are CSS variables (house standard), defined once at the
 * top of this file - edit here to re-theme the whole site.
 * ------------------------------------------------------------------ */
:root {
  /* --- BA brand tokens (source of truth) --- */
  --ba-navy: #01295c;        /* primary - header/footer, headings, primary ink */
  --ba-red: #eb0029;         /* accent / Speedmarque red - CTAs, highlights */
  --ba-mid-blue: #1d4e89;    /* secondary blue - links, secondary actions */
  --bg: #ffffff;             /* app background */
  --surface: #f4f6f9;        /* cards, panels, drawers - cool light grey-blue */
  --ink: #1a1a1a;            /* body copy */
  --muted: #5a6b7b;          /* secondary text, meta, placeholders */

  /* --- Derived shades (built from the tokens above, not separate brand colours) --- */
  --ba-navy-dk: #011c40;      /* hover/active shade of navy */
  --ba-red-dk: #c4001f;       /* hover/active shade of red */
  --line: #dde3ea;            /* hairline borders */
  --line-2: #e9edf2;

  /* --- Legacy alias map (rest of the stylesheet still reads these names -
   * every one of them now resolves back to a BA token above) --- */
  --brand-yellow: var(--ba-red);
  --brand-yellow-dk: var(--ba-red-dk);
  --brand-green: var(--ba-navy);
  --brand-green-dk: var(--ba-navy-dk);
  --link-blue: var(--ba-mid-blue);

  /* --- Layout tokens --- */
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow-sm: 0 2px 10px rgba(1, 41, 92, 0.08);
  --shadow-md: 0 18px 44px rgba(1, 41, 92, 0.18);
  --maxw: 1180px;
  --font: "Mundo Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.14; letter-spacing: -0.025em; margin: 0; }

/* Browser surfaces themed from the brand palette (not left to UA defaults) */
::selection { background: var(--ba-red); color: #fff; }
:focus-visible { outline: 2px solid var(--ba-navy); outline-offset: 2px; border-radius: 4px; }
html { caret-color: var(--ba-navy); accent-color: var(--ba-navy); scrollbar-color: #cfcfcf transparent; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-thumb { background: #d0d0d0; border: 3px solid var(--bg); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #b7b7b7; }

/* ------------------------------------------------------------------ *
 * Header + footer chrome
 * ------------------------------------------------------------------ */
.c-hd {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 32px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 16px rgba(1, 41, 92, 0.06);
}
.c-logo {
  display: inline-flex;
  align-items: center;
  line-height: 0;
}
.c-logo img {
  height: 32px;
  width: auto;
  display: block;
}
.c-nav { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.c-nav a { font-weight: 500; font-size: 15px; color: var(--ba-navy); transition: color 0.15s; }
.c-nav a:hover { color: var(--ba-red); text-decoration: underline; }
.c-nav .c-phone { color: var(--muted); font-weight: 600; }
.c-signin {
  border: 1.5px solid var(--ba-navy);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  font-weight: 600;
  color: var(--ba-navy);
  cursor: pointer;
  background: transparent;
  font-family: var(--font);
  font-size: 15px;
  transition: background 0.15s, color 0.15s, transform 0.12s;
}
.c-signin:hover { background: var(--ba-navy); color: #fff; transform: translateY(-1px); }
.c-basket-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}
.c-basket-count {
  background: var(--ba-red);
  color: #fff;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.c-main { max-width: var(--maxw); margin: 0 auto; padding: 32px 24px 64px; }

.c-ft {
  background: var(--ba-navy);
  border-top: 1px solid var(--ba-navy);
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
  padding: 48px 24px 40px;
}
.c-ft-inner { max-width: var(--maxw); margin: 0 auto; }
.c-ft-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 28px;
  margin-bottom: 28px;
}
.c-ft-cols h4 { font-size: 15px; color: #fff; margin-bottom: 12px; }
.c-ft-cols a { display: block; padding: 4px 0; color: rgba(255, 255, 255, 0.72); }
.c-ft-cols a:hover { color: #fff; text-decoration: underline; }
.c-ft-legal {
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.c-ft-partof { font-weight: 600; color: #fff; }
.c-ft-partof .mark { color: var(--ba-red); }

/* ------------------------------------------------------------------ *
 * Icons + ticks (drawn SVG, one consistent stroke)
 * ------------------------------------------------------------------ */
.ic { flex: none; vertical-align: -3px; }
.tick { color: var(--brand-green-dk); display: inline-flex; align-items: center; }
.tick .ic { vertical-align: middle; }

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */
.btn {
  display: inline-block;
  background: var(--brand-yellow); /* BA red - the signature CTA colour */
  color: #fff; /* white text on red for contrast */
  font-weight: 700;
  font-size: 16px;
  font-family: var(--font);
  padding: 14px 28px;
  border: 0;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-align: center;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
  box-shadow: var(--shadow-sm);
}
.btn:hover { background: var(--brand-yellow-dk); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn.block { display: block; width: 100%; }
.btn-secondary {
  background: var(--surface);
  color: var(--ba-navy);
  border: 1.5px solid var(--ba-navy);
  box-shadow: none;
}
.btn-secondary:hover { background: var(--ba-navy); color: #fff; }

/* ------------------------------------------------------------------ *
 * Hero + search widget
 * ------------------------------------------------------------------ */
/* Hero: the background lives on a ::before layer so the hero box itself
 * never has overflow:hidden. That is what previously clipped the search
 * widget (it was absolutely positioned below the hero's bottom edge) and
 * caused the "image scrolls up" jump when an input inside the clipped
 * container took focus. The widget now sits in normal flow inside the hero,
 * fully visible, and the guests panel can drop below it without being cut. */
.hero {
  position: relative;
  isolation: isolate;
  border-radius: var(--radius);
  color: #fff;
  padding: clamp(44px, 7vw, 88px) clamp(24px, 4vw, 52px) clamp(28px, 4vw, 44px);
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-end;
  min-height: min(72vh, 560px);
}
.hero::before {
  /* Full-bleed hero background: the offer photo (via the --hero-img custom
   * property set in renderHome) sits UNDER a navy scrim so the white copy on
   * the left stays legible while the image remains visible on the right. When
   * --hero-img is unset the layer resolves to `none` and the base navy gradient
   * shows through, so there is never a 404 or broken-image icon. */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background-image:
    radial-gradient(120% 140% at 12% 0%, rgba(235,0,41,0.22) 0%, rgba(235,0,41,0) 44%),
    linear-gradient(95deg, rgba(1,28,64,0.96) 0%, rgba(1,28,64,0.80) 40%, rgba(1,28,64,0.42) 70%, rgba(1,28,64,0.22) 100%),
    linear-gradient(0deg, rgba(1,28,64,0.55) 0%, rgba(1,28,64,0) 45%),
    var(--hero-img, none),
    linear-gradient(150deg, var(--ba-navy) 0%, var(--ba-navy-dk) 60%, #000a17 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.hero h1 { font-size: clamp(32px, 5vw, 52px); max-width: 20ch; margin-bottom: 12px; text-shadow: 0 2px 20px rgba(0,0,0,0.34); }
.hero p { font-size: clamp(16px, 2.1vw, 20px); max-width: 48ch; margin-bottom: clamp(22px, 3vw, 34px); text-shadow: 0 1px 14px rgba(0,0,0,0.32); }

/* ------------------------------------------------------------------ *
 * #heroSlot - the SP Web Campaign zone (default/fallback = the NYC Club
 * World offer, rendered client-side; a live campaign later fills this).
 * ------------------------------------------------------------------ */
.hero-slot { display: flex; gap: clamp(24px, 4vw, 48px); align-items: center; width: 100%; flex-wrap: wrap; }
.hero-copy { flex: 1 1 320px; min-width: 260px; }
.hero-eyebrow {
  display: inline-block;
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
/* (.hero-media tile removed - the hero image is now the full-bleed .hero background) */
.hero-copy { max-width: 640px; }

/* Search widget - a white bar seated in the lower third of the hero */
.search-widget {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: 0 20px 54px rgba(1,41,92,0.26), 0 2px 6px rgba(1,41,92,0.1);
  padding: 12px;
  color: var(--ink);
  width: 100%;
}
.hero .search-widget { align-self: stretch; }
.sw-row {
  display: grid;
  grid-template-columns: 1.3fr 1.3fr 1.2fr 1.2fr auto;
  gap: 10px;
  align-items: stretch;
}
.sw-field { display: flex; flex-direction: column; gap: 5px; position: relative; justify-content: center; padding: 6px 6px 6px 14px; border-left: 1px solid var(--line-2); }
.sw-field:first-child { border-left: 0; }
.sw-field label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.sw-field input,
.sw-field select {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 500;
  padding: 6px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  width: 100%;
  cursor: pointer;
}
.sw-field input::placeholder { color: var(--muted); font-weight: 400; }
.sw-field input:focus,
.sw-field select:focus { outline: 2px solid var(--brand-yellow); outline-offset: 3px; border-radius: 6px; }
.sw-go { justify-content: center; padding: 4px; border-left: 0; }
.sw-field .btn { padding: 16px 32px; width: 100%; }

/* ------------------------------------------------------------------ *
 * Trust strip
 * ------------------------------------------------------------------ */
.trust {
  display: flex;
  flex-wrap: wrap;
  gap: 18px 36px;
  justify-content: center;
  padding: 8px 0 40px;
}
.trust span { font-size: 14px; font-weight: 600; color: var(--ink); display: inline-flex; align-items: center; gap: 8px; }
.trust .tick { color: var(--brand-green-dk); font-weight: 800; }

/* ------------------------------------------------------------------ *
 * Section headings
 * ------------------------------------------------------------------ */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 40px 0 18px; }
.sec-head h2 { font-size: 26px; }
.sec-head a { font-weight: 700; color: var(--ink); border-bottom: 2px solid var(--brand-yellow); padding-bottom: 2px; }
.sec-head a:hover { color: var(--brand-green-dk); }

/* ------------------------------------------------------------------ *
 * Flight card grid (search results + inspiration strip share `.card`)
 * ------------------------------------------------------------------ */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s, box-shadow 0.15s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-media { position: relative; overflow: hidden; }
.card-media .media-tile { border-radius: 0; transition: transform 0.4s; }
.card:hover .card-media .media-tile img { transform: scale(1.05); }
.card-badges { position: absolute; top: 10px; left: 10px; display: flex; gap: 6px; flex-wrap: wrap; z-index: 1; }
.badge {
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.badge.green { background: var(--brand-green); color: #fff; }
.badge.yellow { background: var(--brand-yellow); color: #fff; }
.card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-loc { font-size: 13px; color: var(--muted); font-weight: 600; }
.card-body h3 { font-size: 19px; }
.card-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: #f4f4f4;
  color: var(--ink);
}
.chip.highlight { background: rgba(1,41,92,0.08); color: var(--brand-green-dk); }
.spec-row { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); font-weight: 600; }
.spec-row .spec { display: inline-flex; align-items: center; gap: 5px; }
.card-foot { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; padding-top: 8px; }
.rating { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.rating .star { color: var(--brand-yellow); }
.price { font-weight: 700; }
.price .amt { font-size: 22px; }
.price .per { font-size: 12px; color: var(--muted); font-weight: 600; display: block; }
.card .btn-secondary { align-self: stretch; margin-top: 4px; }

/* ------------------------------------------------------------------ *
 * Search / listing page layout
 * ------------------------------------------------------------------ */
.listing { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
.facets {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  position: sticky;
  top: 84px;
}
.facets h3 { font-size: 18px; margin-bottom: 6px; }
.facet-group { padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.facet-group:last-child { border-bottom: 0; }
.facet-group > h4 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 10px; }
.facet-check { display: flex; align-items: center; gap: 10px; padding: 6px 0; font-size: 15px; cursor: pointer; }
.facet-check input { width: 18px; height: 18px; accent-color: var(--brand-green); cursor: pointer; }
.facet-group select,
.facet-group input[type="range"] { width: 100%; font-family: var(--font); }
.facet-group select { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; }
.facet-price-val { font-weight: 700; font-size: 15px; margin-top: 6px; }
.facet-reset { background: none; border: 0; color: var(--link-blue); font-weight: 600; cursor: pointer; font-family: var(--font); font-size: 14px; padding: 12px 0 0; }
.facet-reset:hover { text-decoration: underline; }

.results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 12px; }
.results-head h1 { font-size: 26px; }
.results-head .count { color: var(--muted); font-weight: 600; font-size: 15px; }
.results-sort { display: flex; align-items: center; gap: 10px; }
.results-sort select { padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font-family: var(--font); font-size: 14px; }
.no-results { padding: 40px; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

/* Filter drawer toggle (mobile) */
.facet-toggle { display: none; }

/* ------------------------------------------------------------------ *
 * Recommendation container (SP web-campaign target - kept empty)
 * ------------------------------------------------------------------ */
.reco:empty { display: none; }
.reco {
  background: var(--surface);
  border: 1px dashed var(--brand-green);
  border-radius: var(--radius);
  padding: 18px 22px;
  margin: 24px 0;
}
.reco h4 { color: var(--brand-green-dk); font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }
.grid-reco { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 760px) { .grid-reco { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ *
 * Media tile - graceful image fallback (Owen standard: never a grey box
 * or a broken-image icon). Every catalog image path is rendered inside one
 * of these; if the file 404s, the onerror handler hides the <img> and adds
 * .img-fallback, revealing a branded gradient tile with the destination /
 * route label instead. Image paths that DO resolve simply cover the tile.
 * ------------------------------------------------------------------ */
.media-tile {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--ba-navy) 0%, var(--ba-mid-blue) 55%, var(--ba-red-dk) 145%);
  aspect-ratio: 16 / 10;
}
.media-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-tile.img-fallback img { display: none; }
.media-tile.img-fallback::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.35);
}
.media-tile.tile-lg { aspect-ratio: 16 / 9; }
.media-tile.tile-lg.img-fallback::after { font-size: 22px; }

/* ------------------------------------------------------------------ *
 * Inspiration strip (home) - destination cards
 * ------------------------------------------------------------------ */
.insp-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; margin: 8px 0 40px; }
.insp-card { display: block; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform 0.15s, box-shadow 0.15s; }
.insp-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.insp-card .media-tile { border-radius: 0; aspect-ratio: 4 / 3; }
.insp-body { padding: 12px 14px 16px; }
.insp-body .dest { font-weight: 700; font-size: 15px; }
.insp-body .from { color: var(--muted); font-size: 13px; font-weight: 600; margin-top: 2px; }

/* ------------------------------------------------------------------ *
 * Cabin badge (flight cards + flight detail)
 * ------------------------------------------------------------------ */
/* Solid backgrounds throughout (never tinted-transparent) - these badges sit
 * on top of the media-tile gradient, so contrast has to hold up regardless. */
.cabin-badge { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); background: #fff; color: var(--ba-navy); box-shadow: var(--shadow-sm); }
.cabin-badge.cabin-economy { background: #fff; color: var(--ink); }
.cabin-badge.cabin-premium { background: #fff; color: var(--ba-mid-blue); }
.cabin-badge.cabin-club { background: var(--ba-navy); color: #fff; }
.cabin-badge.cabin-first { background: var(--ba-red); color: #fff; }

/* ------------------------------------------------------------------ *
 * Flight detail page
 * ------------------------------------------------------------------ */
.pdp-gallery { display: grid; grid-template-columns: 2fr 1fr; grid-template-rows: 1fr 1fr; gap: 10px; border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.pdp-gallery .g-main { grid-row: 1 / 3; position: relative; }
.pdp-gallery .media-tile { border-radius: 0; height: 100%; aspect-ratio: auto; }
.pdp-gallery .g-main .media-tile { min-height: 340px; }
.pdp-gallery .g-thumb { position: relative; min-height: 165px; }
.pdp-photocount { position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,0.65); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: var(--radius-pill); z-index: 1; }

.pdp-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; margin-top: 24px; }
.pdp-title-type { color: var(--muted); font-weight: 600; font-size: 14px; text-transform: uppercase; letter-spacing: 0.03em; }
.pdp-layout h1 { font-size: 34px; margin: 6px 0 10px; }
.pdp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pdp-specrow { display: flex; flex-wrap: wrap; gap: 28px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 16px 0 24px; }
.pdp-spec { text-align: center; }
.pdp-spec .n { font-size: 24px; font-weight: 700; }
.pdp-spec .l { font-size: 13px; color: var(--muted); font-weight: 600; }
.pdp-section { margin: 28px 0; }
.pdp-section h2 { font-size: 22px; margin-bottom: 12px; }
.pdp-section p { color: #333; max-width: 68ch; }
.feature-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.feature-list li { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.feature-list .tick { color: var(--brand-green-dk); font-weight: 800; }
.goodtoknow { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; }
.goodtoknow dl { margin: 0; display: grid; grid-template-columns: 160px 1fr; gap: 12px 20px; }
.goodtoknow dt { font-weight: 700; }
.goodtoknow dd { margin: 0; color: var(--muted); }

/* ------------------------------------------------------------------ *
 * #seatExtras - ancillary recommendation surface (static fallback list
 * today; a later task wires the live SP recommender into this container)
 * ------------------------------------------------------------------ */
.extras-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.extra-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.extra-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-sm); border-color: var(--ba-navy); }
.extra-card .extra-ic { color: var(--ba-navy); }
.extra-card .extra-name { font-weight: 700; font-size: 15px; }
.extra-card .extra-price { font-size: 14px; color: var(--muted); font-weight: 600; }
.extra-card .extra-price strong { color: var(--ink); font-weight: 700; }
.extra-toggle {
  margin-top: auto;
  border: 1.5px solid var(--ba-navy);
  background: transparent;
  color: var(--ba-navy);
  font-weight: 700;
  font-size: 13px;
  font-family: var(--font);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.extra-toggle:hover { background: var(--ba-navy); color: #fff; }
.extra-toggle.added { background: var(--brand-green-dk); border-color: var(--brand-green-dk); color: #fff; }

/* Fare / basket widget (sticky) */
.booking {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
  position: sticky;
  top: 84px;
}
.booking .b-price { font-size: 15px; color: var(--muted); font-weight: 600; }
.booking .b-price strong { font-size: 28px; color: var(--ink); display: block; }
.booking .b-block { margin: 16px 0; }
.booking label.b-label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); margin-bottom: 8px; }
.b-summary { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.b-lowdep { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--brand-green-dk); margin-top: 10px; }

/* ------------------------------------------------------------------ *
 * #upgradePanel - manage my booking (mmb.html) cabin-upgrade recommendation
 * surface. Static fallback content today; a later task wires the live SP
 * recommender into this same container.
 * ------------------------------------------------------------------ */
.upgrade-panel h3 { font-size: 20px; margin: 4px 0 12px; }
.upgrade-eyebrow {
  display: inline-block;
  background: rgba(1, 41, 92, 0.08);
  color: var(--ba-navy);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 8px;
}
.upgrade-eyebrow.eyebrow-confirmed { display: inline-flex; align-items: center; gap: 6px; }
.upgrade-eyebrow.eyebrow-confirmed .ic { width: 13px; height: 13px; }
.upgrade-panel .media-tile { aspect-ratio: 16 / 9; margin: 10px 0 14px; }
.upgrade-copy { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.upgrade-benefits { margin-bottom: 18px; grid-template-columns: 1fr; gap: 8px; }
.upgrade-benefits li { font-weight: 500; font-size: 14px; }
.upgrade-price-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 14px; }
.upgrade-price { display: flex; flex-direction: column; }
.upgrade-price strong { font-size: 26px; }
.upgrade-price span { font-size: 13px; color: var(--muted); font-weight: 600; }
.upgrade-confirmed {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(1, 41, 92, 0.08);
  color: var(--brand-green-dk);
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-sm);
}
.upgrade-panel.is-confirmed #confirmUpgrade { background: var(--muted); box-shadow: none; cursor: default; }
.upgrade-panel.is-confirmed #confirmUpgrade:hover { transform: none; box-shadow: none; }

/* ------------------------------------------------------------------ *
 * Basket + checkout + confirmation
 * ------------------------------------------------------------------ */
.flow-layout { display: grid; grid-template-columns: 1fr 380px; gap: 40px; align-items: start; }
.summary-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.summary-card .sc-media .media-tile { border-radius: 0; aspect-ratio: 16 / 9; }
.summary-card .sc-body { padding: 20px 22px; }
.summary-card h2 { font-size: 22px; margin-bottom: 4px; }
.summary-card .sc-loc { color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.sc-detail { display: flex; flex-wrap: wrap; gap: 10px 28px; padding: 14px 0; border-top: 1px solid var(--line-2); }
.sc-detail div { font-size: 14px; }
.sc-detail .k { color: var(--muted); font-weight: 600; }
.sc-detail .v { font-weight: 700; }

.price-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: sticky;
  top: 84px;
}
.price-panel h3 { font-size: 20px; margin-bottom: 14px; }
.price-line { display: flex; justify-content: space-between; padding: 10px 0; font-size: 15px; }
.price-line.total { border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 14px; font-size: 20px; font-weight: 700; }
.price-line .lbl { color: var(--muted); }
.reassure { font-size: 13px; color: var(--brand-green-dk); font-weight: 600; margin-top: 14px; display: inline-flex; gap: 6px; }

.empty-state { text-align: center; padding: 60px 20px; }
.empty-state h1 { font-size: 28px; margin-bottom: 12px; }
.empty-state p { color: var(--muted); margin-bottom: 24px; }

/* Checkout form */
.checkout-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkout-form .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 700; }
.field input {
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
}
.field input:focus { outline: 2px solid var(--brand-yellow); border-color: var(--brand-yellow); }

/* Confirmation */
.conf-hero { text-align: center; padding: 40px 20px; }
.conf-tick {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--brand-green);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  box-shadow: 0 10px 26px rgba(1,41,92,0.35);
}
.conf-tick .ic { width: 40px; height: 40px; vertical-align: 0; }
.conf-ref {
  display: inline-block;
  background: var(--brand-yellow);
  color: #fff;
  font-weight: 700;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  margin: 8px 0 24px;
  letter-spacing: 0.06em;
}

/* ------------------------------------------------------------------ *
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 960px) {
  .pdp-layout, .flow-layout { grid-template-columns: 1fr; }
  .booking, .price-panel, .facets { position: static; }
  .hero-media { max-width: 100%; flex-basis: 100%; }
}
@media (max-width: 820px) {
  .listing { grid-template-columns: 1fr; }
  .facet-toggle {
    display: block;
    width: 100%;
    margin-bottom: 16px;
  }
  .facets { display: none; }
  .facets.open { display: block; }
  .sw-row { grid-template-columns: 1fr; gap: 2px; }
  .sw-field { border-left: 0; border-top: 1px solid var(--line-2); padding: 10px 6px; }
  .sw-field:first-child { border-top: 0; }
  .sw-field:last-child { padding-top: 12px; }
  .sw-field:last-child label { display: none; }
  .sw-field .btn { width: 100%; height: auto; }
  .hero { min-height: 0; padding-bottom: clamp(20px, 5vw, 32px); }
}
@media (max-width: 640px) {
  .c-hd { padding: 12px 16px; gap: 12px; flex-wrap: wrap; }
  .c-nav { gap: 14px; }
  .c-nav .c-phone, .c-nav .nav-hide { display: none; }
  .c-main { padding: 20px 16px 48px; }
  .pdp-gallery { grid-template-columns: 1fr; }
  .pdp-gallery .g-main { grid-row: auto; }
  .pdp-gallery .g-thumb { display: none; }
  .checkout-form { grid-template-columns: 1fr; }
}

/* ================================================================== *
 * Overlay Personalisation Toolbox (ba-toolbox.js) - demo presenter aid.
 * All classes namespaced .ba-tbx*; renders only when ?toolbox=1 armed.
 * ================================================================== */
.ba-tbx {
  position: fixed; bottom: 18px; right: 18px; z-index: 9000;
  width: 360px; max-width: calc(100vw - 36px);
  font-family: var(--font);
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 8px;
}
/* switch bar - always visible when armed */
.ba-tbx-switchbar {
  display: flex; align-items: center; gap: 10px;
  background: var(--ba-navy); color: #fff;
  padding: 8px 12px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-md);
}
.ba-tbx-badge {
  background: var(--ba-red); color: #fff; font-weight: 700;
  font-size: 10px; letter-spacing: .06em;
  padding: 2px 7px; border-radius: var(--radius-pill);
}
.ba-tbx-sw-label { font-size: 12px; font-weight: 600; margin-right: auto; }

/* iOS-style toggle */
.ba-tbx-toggle { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.ba-tbx-toggle input { opacity: 0; width: 0; height: 0; }
.ba-tbx-slider {
  position: absolute; inset: 0; cursor: pointer;
  background: rgba(255, 255, 255, .28); border-radius: var(--radius-pill);
  transition: background .25s ease;
}
.ba-tbx-slider::before {
  content: ""; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  transition: transform .25s ease;
}
.ba-tbx-toggle input:checked + .ba-tbx-slider { background: var(--ba-red); }
.ba-tbx-toggle input:checked + .ba-tbx-slider::before { transform: translateX(20px); }

/* panel - visible only when master switch ON */
.ba-tbx-panel {
  width: 100%;
  background: var(--ba-navy-dk); color: #eef2f7;
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  overflow: hidden;
  max-height: 0; opacity: 0; transform: translateY(6px);
  transition: max-height .3s ease, opacity .25s ease, transform .25s ease;
  pointer-events: none;
}
.ba-tbx-active .ba-tbx-panel {
  max-height: 460px; opacity: 1; transform: translateY(0); pointer-events: auto;
}
.ba-tbx-row { padding: 11px 13px; }
.ba-tbx-row-top {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .1); font-size: 11.5px;
}
.ba-tbx-sdk-status { display: inline-flex; align-items: center; gap: 6px; }
.ba-tbx-identity { color: #cdd7e3; text-align: right; }
.ba-tbx-identity strong { color: #fff; }

.ba-tbx-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: #f2c14e; }
.ba-tbx-dot-on { background: #2fd07a; box-shadow: 0 0 0 3px rgba(47, 208, 122, .22); }
.ba-tbx-dot-fallback { background: var(--ba-red); }
@keyframes ba-tbx-pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
.ba-tbx-dot-on, .ba-tbx-dot-loading { animation: ba-tbx-pulse 1.8s ease-in-out infinite; }

.ba-tbx-controls { display: flex; gap: 8px; align-items: center; }
.ba-tbx-btn {
  font-family: var(--font); font-size: 11px; font-weight: 600;
  color: #fff; background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
  padding: 5px 11px; border-radius: var(--radius-sm); cursor: pointer;
  transition: background .18s ease, transform .12s ease;
}
.ba-tbx-btn:hover { background: rgba(255, 255, 255, .22); transform: translateY(-1px); }
.ba-tbx-btn.is-on { background: var(--ba-mid-blue); border-color: var(--ba-mid-blue); }
.ba-tbx-btn-reset { margin-left: auto; background: var(--ba-red); border-color: var(--ba-red); }
.ba-tbx-btn-reset:hover { background: var(--ba-red-dk); }

.ba-tbx-stream {
  border-top: 1px solid rgba(255, 255, 255, .1);
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .3s ease, opacity .25s ease;
}
.ba-tbx-stream.is-open { max-height: 300px; opacity: 1; }
.ba-tbx-stream-head {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 13px 4px; font-size: 10.5px; color: #aebccb;
}
.ba-tbx-log {
  font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  font-size: 10.5px; line-height: 1.5; color: #b9f5cf;
  padding: 4px 13px 12px; max-height: 220px; overflow-y: auto;
}
.ba-tbx-line { white-space: nowrap; }
.ba-tbx-t { color: #7f8ea0; }
.ba-tbx-m { color: #ffd98a; }
.ba-tbx-badge-sdk { color: #2fd07a; font-weight: 700; }
.ba-tbx-badge-log { color: #ff8a9c; font-weight: 700; }

/* zone annotations - only outlined while the overlay is ON and Zones pinned */
.ba-tbx-pz, .ba-tbx-sdk { position: relative; }
body.ba-tbx-show-zones .ba-tbx-pz {
  outline: 3px dashed var(--ba-mid-blue); outline-offset: 4px;
}
body.ba-tbx-show-zones .ba-tbx-sdk {
  outline: 3px dashed var(--ba-red); outline-offset: 4px;
}
body.ba-tbx-show-zones .ba-tbx-pz::after,
body.ba-tbx-show-zones .ba-tbx-sdk::after {
  position: absolute; top: -11px; left: 8px; z-index: 5;
  font-family: var(--font); font-size: 10px; font-weight: 700;
  color: #fff; padding: 2px 8px; border-radius: var(--radius-pill);
  white-space: nowrap; letter-spacing: .02em;
}
body.ba-tbx-show-zones .ba-tbx-pz::after { content: "Personalisation Zone"; background: var(--ba-mid-blue); }
body.ba-tbx-show-zones .ba-tbx-sdk::after { content: "SDK Event"; background: var(--ba-red); }

@media (max-width: 640px) {
  .ba-tbx { width: calc(100vw - 24px); right: 12px; bottom: 12px; }
  .ba-tbx-log, .ba-tbx-line { white-space: normal; }
}

/* ---- Toolbox notification sender + the toast it fires ---- */
.ba-tbx-notify { display: flex; gap: 8px; align-items: center; }
.ba-tbx-select {
  flex: 1; min-width: 0; font-family: var(--font); font-size: 12.5px;
  padding: 7px 9px; border-radius: 9px; color: #fff;
  background: rgba(255, 255, 255, 0.10); border: 1px solid rgba(255, 255, 255, 0.22);
}
.ba-tbx-select option { color: #12233b; }
.ba-tbx-btn-send { flex: none; background: var(--ba-mid-blue); border-color: var(--ba-mid-blue); }
.ba-tbx-btn-send:hover { background: var(--ba-navy); border-color: var(--ba-navy); }

/* The fired notification toast (a real notification arriving on the page,
   independent of the overlay). Click opens the matching surface in a new tab. */
.ba-tbx-toast {
  position: fixed; top: 18px; left: 50%;
  transform: translate(-50%, -150%);
  width: min(420px, calc(100vw - 32px));
  display: flex; gap: 12px; align-items: flex-start; text-align: left;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border: 1px solid rgba(1, 41, 92, 0.10); border-radius: 18px;
  padding: 12px 14px; cursor: pointer; font-family: var(--font);
  box-shadow: 0 18px 44px rgba(1, 41, 92, 0.24);
  opacity: 0; z-index: 2147483000;
  transition: transform 0.34s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.34s, box-shadow 0.2s;
}
.ba-tbx-toast.in { transform: translate(-50%, 0); opacity: 1; }
.ba-tbx-toast:hover { box-shadow: 0 22px 54px rgba(1, 41, 92, 0.30); }
.ba-tbx-toast-icon {
  flex: none; width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--ba-navy), var(--ba-mid-blue));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; letter-spacing: 0.02em;
}
.ba-tbx-toast-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ba-tbx-toast-app { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
.ba-tbx-toast-title { font-size: 14px; font-weight: 700; color: var(--ink); }
.ba-tbx-toast-text { font-size: 13px; color: var(--muted); line-height: 1.4; }

/* ---- Sign-in modal (fires on Save Search when anonymous) ---- */
.signin-overlay {
  position: fixed; inset: 0; z-index: 2147483200;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(1, 20, 46, 0.55);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity 0.25s;
}
.signin-overlay.in { opacity: 1; }
.signin-card {
  width: 100%; max-width: 380px; background: var(--bg);
  border-radius: var(--radius); padding: 28px 26px 22px;
  box-shadow: 0 30px 80px rgba(1, 41, 92, 0.40); text-align: left;
  transform: translateY(12px) scale(0.98); transition: transform 0.25s;
}
.signin-overlay.in .signin-card { transform: none; }
.signin-logo { height: 26px; margin-bottom: 16px; }
.signin-h { font-size: 20px; color: var(--ba-navy); margin: 0 0 6px; }
.signin-sub { font-size: 14px; color: var(--muted); margin: 0 0 18px; line-height: 1.5; }
.signin-field { position: relative; margin-bottom: 14px; }
.signin-field label { display: block; font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.signin-field input {
  width: 100%; font-family: var(--font); font-size: 15px; padding: 11px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--line); color: var(--ink); background: var(--bg);
}
/* password-manager autofill look */
.signin-fill input { background: #eef4ff; border-color: #b9d0f5; }
.signin-1p {
  position: absolute; right: 10px; bottom: 9px; display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 700; color: #2b6fe0;
  background: #fff; border: 1px solid #cfe0fa; border-radius: var(--radius-pill); padding: 3px 8px;
}
.signin-go { margin-top: 4px; }
.signin-cancel {
  display: block; width: 100%; margin-top: 10px; background: none; border: 0;
  color: var(--muted); font-family: var(--font); font-size: 13px; cursor: pointer;
}
.signin-cancel:hover { color: var(--ink); text-decoration: underline; }
