:root{
  --ink-900:#0b1f3a;
  --ink-800:#122a4d;
  --ink-700:#1b3a66;
  --blue-600:#2f5fb3;
  --blue-500:#3f77d6;
  --blue-400:#6b9ceb;
  --blue-300:#a7c6f5;
  --blue-200:#d3e4fb;
  --blue-100:#eef4fe;
  --paper:#fbfaf6;
  --paper-shade:#f0eee5;
  --gold:#c8a44d;
  --available:#2f9e6e;
  --booked:#c0392b;
  --amber:#c98a2b;
  --text-dark:#1a2233;
  --text-muted:#5b6b85;
  font-family:'Georgia',serif;
}

*{box-sizing:border-box;}

body{
  margin:0;
  min-height:100vh;
  background:
    radial-gradient(1200px 700px at 15% -10%, var(--blue-300) 0%, transparent 60%),
    radial-gradient(1000px 600px at 100% 110%, var(--blue-400) 0%, transparent 55%),
    linear-gradient(160deg, var(--ink-900) 0%, var(--ink-800) 45%, var(--blue-600) 100%);
  color:var(--text-dark);
  font-family:'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  overflow-x:hidden;
}

/* ---------- Header ---------- */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 36px;
  color:var(--blue-100);
  background:linear-gradient(90deg, rgba(11,31,58,.55), rgba(63,119,214,.25));
  backdrop-filter:blur(6px);
  border-bottom:1px solid rgba(167,198,245,.25);
}
.topbar .brand{
  display:flex;
  align-items:center;
  gap:12px;
}
.topbar .brand .mark{
  width:38px;height:38px;border-radius:10px;
  background:linear-gradient(135deg,var(--gold),#e9cd85);
  display:flex;align-items:center;justify-content:center;
  font-family:'Georgia',serif;font-weight:700;color:var(--ink-900);font-size:18px;
  box-shadow:0 4px 14px rgba(200,164,77,.5);
}
.topbar h1{
  font-family:'Playfair Display','Georgia',serif;
  font-size:22px;
  margin:0;
  letter-spacing:.4px;
}
.topbar .sub{
  font-size:12px;
  color:var(--blue-300);
  letter-spacing:2px;
  text-transform:uppercase;
}
.topbar .stats{
  display:flex;
  gap:26px;
  font-size:13px;
}
.topbar .stats div{text-align:center;}
.topbar .stats b{display:block;font-size:18px;color:#fff;font-variant-numeric:tabular-nums;}
.topbar .stats span{color:var(--blue-300);font-size:11px;}
.urgency-pill{
  background:rgba(201,138,43,.18);
  border:1px solid rgba(201,138,43,.55);
  color:#ffd9a0;
  padding:7px 14px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  letter-spacing:.2px;
  white-space:nowrap;
}

/* ---------- Hero tagline ---------- */
.hero-line{
  position:relative;
  overflow:hidden;
  text-align:center;
  padding:26px 36px 28px;
  background:linear-gradient(100deg, var(--ink-900) 0%, var(--blue-600) 140%);
  border-bottom:1px solid rgba(167,198,245,.25);
}
.hero-line::before{
  content:"";
  position:absolute;inset:0;
  background:radial-gradient(700px 220px at 50% -60%, rgba(255,255,255,.14), transparent 65%);
  pointer-events:none;
}
.hero-line-title{
  position:relative;z-index:1;
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  justify-content:center;
  column-gap:12px;
  row-gap:2px;
}
.hero-line-title .script-accent{
  font-size:clamp(28px, 4.2vw, 50px);
  color:var(--gold);
  line-height:1;
}
.hero-line-title .caps-rest{
  font-size:clamp(15px, 2.1vw, 24px);
  color:#fff;
  letter-spacing:2px;
}
.hero-line-sub{
  position:relative;z-index:1;
  margin:8px auto 0;
  max-width:560px;
  font-size:13px;
  color:var(--blue-200);
  line-height:1.5;
}

/* ---------- Layout ---------- */
.layout{
  display:grid;
  grid-template-columns:1.55fr 1fr;
  gap:28px;
  padding:34px 36px 60px;
  align-items:start;
}
@media (max-width:1080px){
  .layout{grid-template-columns:1fr;}
}

/* ================= MAGAZINE / BOOK ================= */
.magazine-wrap{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
}

.stage{
  perspective:2600px;
  width:100%;
  display:flex;
  justify-content:center;
}

.book{
  position:relative;
  width:min(860px, 100%);
  aspect-ratio:860/560;
  transform-style:preserve-3d;
}
.book-pages{
  position:absolute;
  inset:0;
  z-index:1;
  transform-style:preserve-3d;
}

/* the spine shadow strip */
.book::before{
  content:"";
  position:absolute;
  left:50%;
  top:-10px;
  bottom:-10px;
  width:26px;
  transform:translateX(-50%);
  background:linear-gradient(90deg, rgba(0,0,0,.25), rgba(0,0,0,.05) 30%, rgba(0,0,0,.05) 70%, rgba(0,0,0,.25));
  filter:blur(4px);
  z-index:5;
  pointer-events:none;
  border-radius:6px;
}

.book-shadow{
  position:absolute;
  left:6%;right:6%;bottom:-26px;
  height:34px;
  background:radial-gradient(ellipse at center, rgba(0,0,0,.45), transparent 70%);
  filter:blur(6px);
  z-index:0;
}

/* Permanent left-hand panel — always gives the book two visible faces,
   even before any sheet has been turned. Flipped pages simply cover it. */
.book-left-backdrop{
  position:absolute;
  left:0;top:0;
  width:50%;height:100%;
  z-index:0;
  border-radius:8px 2px 2px 8px;
  background:
    repeating-linear-gradient(135deg, rgba(11,31,58,.05) 0 2px, transparent 2px 14px),
    linear-gradient(120deg, var(--paper) 0%, var(--paper-shade) 100%);
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.blb-mark{
  font-family:'Playfair Display',serif;
  font-size:min(18vw,220px);
  font-weight:700;
  color:rgba(11,31,58,.07);
  line-height:1;
}
.blb-text{
  font-family:'Playfair Display',serif;
  font-size:15px;
  letter-spacing:2px;
  color:rgba(11,31,58,.28);
  text-align:center;
  margin-top:-18px;
}
.blb-text span{
  display:block;
  font-family:'Segoe UI',sans-serif;
  font-size:9.5px;
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:rgba(11,31,58,.22);
  margin-top:6px;
}

.page{
  position:absolute;
  top:0;
  width:50%;
  height:100%;
  background:linear-gradient(120deg, var(--paper) 0%, var(--paper-shade) 100%);
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  transform-style:preserve-3d;
  transition:transform .85s cubic-bezier(.62,.05,.18,1);
  border-radius:2px 8px 8px 2px;
  /* NOTE: overflow must stay off this element — overflow:hidden on the
     rotating 3D box itself corrupts backface-visibility compositing in
     Chromium, causing the wrong face to render after a flip. Clipping
     is done per-face below instead. */
}

/* Shadow that sweeps across a page while it is mid-turn, giving the
   flip physical weight instead of a flat instant rotation. */
.page::after{
  content:"";
  position:absolute;inset:0;
  border-radius:inherit;
  z-index:20;
  opacity:0;
  pointer-events:none;
  background:linear-gradient(90deg, rgba(0,0,0,.55), rgba(0,0,0,.08) 35%, transparent 50%, rgba(0,0,0,.08) 65%, rgba(0,0,0,.55));
}
.page.turning::after{
  animation:pageTurnShadow .85s cubic-bezier(.62,.05,.18,1);
}
@keyframes pageTurnShadow{
  0%{opacity:0;}
  40%{opacity:.55;}
  60%{opacity:.55;}
  100%{opacity:0;}
}

/* Right-hand stack (unflipped pages) */
.page.right{
  right:0;
  left:auto;
  transform-origin:left center;
  border-radius:2px 8px 8px 2px;
}
/* Left-hand stack (already flipped pages) */
.page.left{
  left:0;
  transform-origin:right center;
  border-radius:8px 2px 2px 8px;
}

/* 179.9deg rather than an exact 180 — at precisely 180 the rotation
   matrix is degenerate and Chromium can pick the wrong face to cull,
   which is what made the back face refuse to show. */
.page.right.flipped{
  transform:rotateY(-179.9deg);
}
.page.left.unflipped{
  transform:rotateY(179.9deg);
}

.page-face{
  position:absolute;
  inset:0;
  padding:26px 26px 20px;
  display:flex;
  flex-direction:column;
  border-radius:inherit;
  overflow:hidden;
  background:linear-gradient(120deg, var(--paper) 0%, var(--paper-shade) 100%);
}
/* Rotation for whichever face is currently mounted is applied inline by
   JS at the flip's midpoint (see swapPageContent in script.js) rather
   than via a static backface-visibility + counter-rotation pair — that
   combination reliably corrupted text layout for the visible back face
   in testing, so only one face is ever in the DOM at a time instead. */

/* subtle page curl / edge shading for realism */
.page.right .page-face.front:not(.cover){
  background:linear-gradient(90deg, transparent 92%, rgba(0,0,0,.06) 100%);
}
.page.left .page-face.front:not(.cover){
  background:linear-gradient(270deg, transparent 92%, rgba(0,0,0,.06) 100%);
}

.page-header{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  border-bottom:2px solid var(--ink-900);
  padding-bottom:6px;
  margin-bottom:7px;
  font-family:'Playfair Display','Georgia',serif;
}
.page-header .kicker{
  font-size:10px;
  letter-spacing:2px;
  text-transform:uppercase;
  color:var(--blue-600);
  font-weight:700;
}
.page-header .masthead{
  font-size:13px;
  color:var(--text-muted);
  font-style:italic;
}

/* Creative "book your slot" banner under every editorial page header */
.page-cta{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  font-family:'Cormorant Garamond','Playfair Display',serif;
  font-style:italic;
  font-weight:600;
  font-size:9.5px;
  letter-spacing:.2px;
  color:var(--blue-600);
  background:linear-gradient(90deg, transparent, var(--blue-100) 25%, var(--blue-100) 75%, transparent);
  border-radius:3px;
  padding:3px 6px;
  margin-bottom:8px;
}
.page-cta-star{color:var(--gold);font-size:7px;flex:none;}

.page-title{
  font-family:'Playfair Display','Georgia',serif;
  font-size:26px;
  line-height:1.15;
  margin:0 0 6px;
  color:var(--ink-900);
}
.page-deck{
  font-size:12.5px;
  color:var(--text-muted);
  margin-bottom:8px;
  line-height:1.4;
}

/* Mixed script + small-caps headline treatment, used by every editorial template */
.page-title-mixed{
  display:flex;
  align-items:baseline;
  flex-wrap:wrap;
  column-gap:10px;
  row-gap:0;
  margin-bottom:6px;
  min-width:0;
  max-width:100%;
}
.script-accent{
  font-family:'Pinyon Script',cursive;
  font-size:clamp(22px, 3.2vw, 40px);
  color:var(--blue-600);
  line-height:.9;
  overflow-wrap:break-word;
  min-width:0;
  max-width:100%;
}
.caps-rest{
  font-family:'Playfair Display',serif;
  font-weight:800;
  font-size:clamp(13px, 1.7vw, 20px);
  letter-spacing:1.5px;
  text-transform:uppercase;
  color:var(--ink-900);
  overflow-wrap:break-word;
  min-width:0;
  max-width:100%;
}
.caps-rest:empty{display:none;}

.page-body{
  flex:1;
  min-height:0;
  min-width:0;
  overflow:hidden;
}
.page-body p{
  font-size:10.6px;
  line-height:1.6;
  color:#333;
  margin:0 0 8px;
  overflow-wrap:break-word;
}
.dropcap::first-letter{
  float:left;
  font-family:'Playfair Display',serif;
  font-size:34px;
  line-height:28px;
  padding-right:6px;
  color:var(--ink-900);
  font-weight:700;
}

.pull-quote{
  border-left:3px solid var(--gold);
  padding-left:10px;
  font-style:italic;
  font-size:12px;
  color:var(--ink-800);
  margin:8px 0;
}

/* ---- Template: full-page inventory — a short intro strip, then the
   entire remaining page as bookable sections (one half-page banner over
   two quarter-page boxes), so nothing on the page is just decoration. ---- */
.tpl-sections{
  display:flex;
  flex-direction:column;
  height:100%;
  min-height:0;
  gap:8px;
}
.sec-intro{
  display:flex;
  align-items:center;
  gap:10px;
  flex:none;
}
.sec-intro-icon{
  flex:none;
  width:15%;
  aspect-ratio:1;
  border-radius:8px;
  background:linear-gradient(150deg, var(--blue-100) 0%, var(--paper-shade) 100%);
  border:1px solid var(--blue-200);
  color:var(--ink-800);
  display:flex;align-items:center;justify-content:center;
  padding:10%;
}
.sec-intro-icon svg{width:100%;height:100%;opacity:.85;}
.sec-intro-text{min-width:0;flex:1;}
.sec-intro-text .page-deck{margin-bottom:0;}

.sec-grid{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.sec-row-half{flex:1.1;min-height:0;}
.sec-row-half .ad-slot{width:100%;height:100%;}
.sec-row-quarters{
  flex:1;
  min-height:0;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
}
.sec-row-quarters .ad-slot{width:100%;height:100%;}

.page-footer{
  display:flex;
  justify-content:space-between;
  font-size:9.5px;
  color:var(--text-muted);
  border-top:1px solid #ccc;
  padding-top:6px;
  margin-top:8px;
}

/* --------- Ad slot: dummy ad mock-up + full-detail availability film --------- */
.ad-slot{
  position:relative;
  border-radius:6px;
  cursor:pointer;
  overflow:hidden;
  border:1px solid rgba(11,31,58,.12);
  box-shadow:0 1px 3px rgba(11,31,58,.08);
  transition:transform .15s ease, box-shadow .15s ease;
}
.ad-slot:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 18px rgba(11,31,58,.22);
}
.ad-slot.booked{cursor:not-allowed;}
.ad-slot.booked:hover{transform:none;box-shadow:0 1px 3px rgba(11,31,58,.08);}

/* The dummy ad mock-up sits underneath the film, so buyers can picture
   their creative in place before the film ever fades. */
.ad-dummy{
  position:absolute;inset:0;
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:6%;
  background:#fff;
}
.dummy-img{
  flex:1;
  min-height:0;
  border-radius:3px;
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.16) 0 6px, transparent 6px 12px),
    linear-gradient(135deg, var(--blue-300), var(--blue-600));
  display:flex;align-items:center;justify-content:center;
}
.dummy-img span{
  font-size:7px;
  letter-spacing:1px;
  font-weight:700;
  color:rgba(255,255,255,.75);
  text-transform:uppercase;
}
.dummy-title{height:7px;width:70%;background:#c3ccdb;border-radius:2px;flex:none;}
.dummy-line{height:4px;width:100%;background:#e3e7ee;border-radius:2px;flex:none;}
.dummy-line.short{width:55%;}

/* The film: full placement details over a solid color film — green
   while available, gold once in this visitor's cart, red once booked. */
.ad-film{
  position:absolute;inset:0;
  z-index:5;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  gap:2px;
  padding:8%;
  color:#fff;
  transition:background .2s ease;
}
.ad-film.available{background:rgba(38,140,97,.88);}
.ad-film.selected{background:rgba(184,146,47,.92);}
.ad-film.booked{background:rgba(176,50,42,.9);}
.ad-slot:hover .ad-film.available{background:rgba(33,122,85,.92);}

.film-status{
  font-family:'Playfair Display',serif;
  font-weight:800;
  letter-spacing:.6px;
  text-transform:uppercase;
  line-height:1.15;
}
.film-placement{font-weight:600;opacity:.96;line-height:1.2;}
.film-dims{opacity:.85;font-variant-numeric:tabular-nums;}
.film-price{
  font-weight:800;
  background:rgba(255,255,255,.22);
  border-radius:999px;
  margin-top:2px;
  font-variant-numeric:tabular-nums;
}

/* Size-aware type scale + minimum footprint so each placement reads
   clearly at its real relative size within the page. Quarter/half slots
   skip the dummy title+body lines (just the image) to keep a tight,
   predictable footprint; only the full-page slot has room for both. */
.ad-slot:not(.slot-full) .dummy-title,
.ad-slot:not(.slot-full) .dummy-line{display:none;}

.hero-slots > .ad-slot,
.tile-ad > .ad-slot{flex:none;}

.slot-1x1{grid-column:span 1;min-height:52px;flex-shrink:0;}
.slot-1x1 .film-status{font-size:9px;}
.slot-1x1 .film-placement{font-size:7px;}
.slot-1x1 .film-dims{font-size:6px;}
.slot-1x1 .film-price{font-size:8px;padding:1px 7px;}

.slot-1x2{grid-column:span 2;min-height:52px;flex-shrink:0;}
.slot-1x2 .film-status{font-size:10.5px;}
.slot-1x2 .film-placement{font-size:8px;}
.slot-1x2 .film-dims{font-size:7px;}
.slot-1x2 .film-price{font-size:9px;padding:2px 8px;}

.slot-full{grid-column:span 2;flex:1;min-height:120px;}
.slot-full .film-status{font-size:15px;}
.slot-full .film-placement{font-size:10.5px;}
.slot-full .film-dims{font-size:9px;}
.slot-full .film-price{font-size:12px;padding:3px 12px;}
.slot-full .dummy-title{height:9px;}
.slot-full .dummy-line{height:5px;}

/* Cover page styling */
.cover{
  background:linear-gradient(160deg, var(--ink-900), var(--blue-600) 120%);
  color:#fff;
  justify-content:space-between;
}
.cover::before{
  content:"";
  position:absolute;inset:0;
  background:radial-gradient(500px 300px at 80% 10%, rgba(255,255,255,.12), transparent 60%);
}
.cover .cov-kicker{
  font-size:clamp(8px,1.1vw,11px);letter-spacing:3px;text-transform:uppercase;color:#e4edfc;font-weight:700;
}
.cover .cov-title{
  font-family:'Playfair Display',serif;
  font-size:clamp(22px,5vw,46px);
  line-height:1;
  margin:clamp(6px,0.9vw,10px) 0 clamp(4px,0.7vw,6px);
  color:#fff;
  text-shadow:0 4px 18px rgba(0,0,0,.45);
}
.cover .cov-sub{
  font-size:clamp(10px,1.4vw,13px);color:#eef4fe;max-width:280px;opacity:.95;line-height:1.4;
}
.cover .cov-issue{
  display:flex;justify-content:space-between;align-items:flex-end;
  font-size:clamp(9px,1.1vw,11px);color:#eef4fe;
  border-top:1px solid rgba(255,255,255,.4);
  padding-top:clamp(6px,0.9vw,10px);
}
.cover .cov-gold-line{
  height:3px;width:clamp(36px,6.3vw,60px);background:var(--gold);margin:clamp(8px,1.4vw,14px) 0;border-radius:3px;
}
.cov-stats{
  display:flex;
  gap:clamp(12px,2.3vw,22px);
  margin:clamp(10px,2.3vw,22px) 0 clamp(8px,1.8vw,20px);
  position:relative;
  z-index:2;
}
.cov-stats div{display:flex;flex-direction:column;}
.cov-stats b{
  font-family:'Playfair Display',serif;
  font-size:clamp(13px,2.3vw,19px);
  color:#fff;
  font-variant-numeric:tabular-nums;
}
.cov-stats span{
  font-size:clamp(7px,1vw,9.5px);
  letter-spacing:.4px;
  text-transform:uppercase;
  color:var(--blue-200);
}
.cov-cta{
  position:relative;
  z-index:2;
  background:linear-gradient(135deg,var(--gold),#e2c069);
  color:var(--ink-900);
  border:none;
  padding:clamp(7px,1.1vw,10px) clamp(10px,1.8vw,16px);
  border-radius:8px;
  font-size:clamp(9px,1.2vw,12px);
  font-weight:700;
  letter-spacing:.2px;
  cursor:pointer;
  box-shadow:0 8px 18px rgba(200,164,77,.35);
  transition:transform .15s ease, box-shadow .15s ease;
}
.cov-cta:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(200,164,77,.45);}

.toc-list{list-style:none;padding:0;margin:0;}
.toc-list li{
  display:flex;justify-content:space-between;
  font-size:12px;padding:8px 0;
  border-bottom:1px dotted #bbb;
  color:var(--text-dark);
}
.toc-list li b{color:var(--blue-600);}

/* ---------- Nav controls ---------- */
.book-controls{
  display:flex;
  align-items:center;
  gap:16px;
}
.nav-btn{
  width:44px;height:44px;border-radius:50%;
  border:none;
  background:rgba(255,255,255,.12);
  color:#fff;
  font-size:18px;
  cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:background .2s ease, transform .15s ease;
  border:1px solid rgba(255,255,255,.25);
}
.nav-btn:hover:not(:disabled){background:rgba(255,255,255,.25);transform:scale(1.06);}
.nav-btn:disabled{opacity:.3;cursor:default;}
.page-indicator{
  color:var(--blue-100);
  font-size:13px;
  letter-spacing:1px;
  min-width:140px;
  text-align:center;
}

.legend{
  display:flex;gap:18px;color:var(--blue-100);font-size:12px;
}
.legend span{display:flex;align-items:center;gap:6px;}
.legend i{width:12px;height:12px;border-radius:3px;display:inline-block;}
.legend .lg-avail{background:var(--available);}
.legend .lg-booked{background:var(--booked);}
.legend .lg-selected{background:var(--gold);}

/* ================= RIGHT PANEL ================= */
.panel{
  background:rgba(255,255,255,.96);
  border-radius:16px;
  padding:22px 22px 26px;
  box-shadow:0 20px 50px rgba(6,20,45,.35);
  position:sticky;
  top:24px;
  border:1px solid rgba(255,255,255,.6);
}
.panel h2{
  font-family:'Playfair Display',serif;
  font-size:19px;
  margin:0 0 4px;
  color:var(--ink-900);
}
.panel .panel-sub{
  font-size:12px;color:var(--text-muted);margin-bottom:16px;
}

.price-table{
  width:100%;
  border-collapse:collapse;
  margin-bottom:20px;
}
.price-table th{
  text-align:left;
  font-size:10.5px;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:var(--blue-600);
  padding:6px 4px;
  border-bottom:2px solid var(--blue-200);
}
.price-table td{
  font-size:12.5px;
  padding:8px 4px;
  border-bottom:1px solid #eee;
  color:var(--text-dark);
}
.price-table tr:last-child td{border-bottom:none;}
.price-table .swatch{
  width:10px;height:10px;border-radius:3px;display:inline-block;margin-right:6px;
}

.cart-head{
  display:flex;justify-content:space-between;align-items:baseline;
  font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.5px;
  color:var(--blue-600);margin-bottom:8px;
}
.cart-head span:last-child{
  color:var(--text-muted);font-weight:600;text-transform:none;letter-spacing:0;font-variant-numeric:tabular-nums;
}

.cart-list{
  border-radius:12px;
  background:linear-gradient(135deg,var(--blue-100),#fff);
  border:1px solid var(--blue-200);
  margin-bottom:12px;
  max-height:260px;
  overflow-y:auto;
}
.cart-list.empty{
  display:flex;align-items:center;justify-content:center;
  color:var(--text-muted);
  font-size:12.5px;
  text-align:center;
  padding:22px 16px;
  min-height:88px;
}
.cart-list.empty em{color:var(--available);font-style:normal;font-weight:600;}

.cart-item{
  display:grid;
  grid-template-columns:1fr auto auto;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  border-bottom:1px solid rgba(63,119,214,.14);
}
.cart-item:last-child{border-bottom:none;}
.ci-loc{font-size:12.5px;font-weight:700;color:var(--ink-900);}
.ci-sub{font-size:10.5px;color:var(--text-muted);}
.ci-price{font-size:13px;font-weight:700;color:var(--ink-900);font-variant-numeric:tabular-nums;}
.ci-remove{
  width:22px;height:22px;border-radius:50%;border:none;
  background:rgba(192,57,43,.12);color:var(--booked);
  font-size:14px;line-height:1;cursor:pointer;
  display:flex;align-items:center;justify-content:center;
  transition:background .15s ease;
}
.ci-remove:hover{background:rgba(192,57,43,.22);}

.cart-totals{margin-bottom:14px;}
.ct-row{
  display:flex;justify-content:space-between;
  font-size:13px;color:var(--text-dark);
  padding:5px 2px;
}
.ct-row.discount{color:var(--available);}
.ct-row.total{
  font-size:15px;font-weight:700;color:var(--ink-900);
  border-top:1px dashed var(--blue-200);
  margin-top:4px;padding-top:9px;
}
.ct-row span:last-child{font-variant-numeric:tabular-nums;}

.btn{
  width:100%;
  padding:12px;
  border:none;
  border-radius:9px;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
  transition:transform .12s ease, box-shadow .2s ease;
}
.btn:active{transform:scale(.98);}
.btn-primary{
  background:linear-gradient(135deg,var(--blue-600),var(--ink-900));
  color:#fff;
  box-shadow:0 8px 20px rgba(47,95,179,.4);
}
.btn-primary:disabled{
  background:#c7d3e6;
  color:#8b97ab;
  box-shadow:none;
  cursor:not-allowed;
}
.btn-primary:hover:not(:disabled){filter:brightness(1.08);}

.mini-note{
  font-size:11px;color:var(--text-muted);text-align:center;margin-top:10px;
}

/* ---------- Modal ---------- */
.modal-overlay{
  position:fixed;inset:0;
  background:rgba(10,20,40,.55);
  backdrop-filter:blur(3px);
  display:flex;align-items:center;justify-content:center;
  z-index:100;
  opacity:0;pointer-events:none;
  transition:opacity .2s ease;
}
.modal-overlay.open{opacity:1;pointer-events:auto;}
.modal{
  width:440px;max-width:92vw;
  max-height:88vh;
  overflow-y:auto;
  background:#fff;
  border-radius:16px;
  padding:26px 26px 22px;
  box-shadow:0 30px 70px rgba(0,0,0,.4);
  transform:translateY(14px) scale(.97);
  transition:transform .25s ease;
}
.modal-overlay.open .modal{transform:translateY(0) scale(1);}
.modal h3{
  font-family:'Playfair Display',serif;
  margin:0 0 4px;color:var(--ink-900);font-size:20px;
}
.modal .modal-loc{font-size:12.5px;color:var(--blue-600);margin-bottom:16px;}
.field{margin-bottom:12px;}
.field label{
  display:block;font-size:11.5px;color:var(--text-muted);margin-bottom:5px;
  text-transform:uppercase;letter-spacing:.4px;
}
.field input,.field textarea,.field select{
  width:100%;padding:9px 11px;border:1px solid #d6dde8;border-radius:8px;
  font-size:13px;font-family:inherit;background:#f9fafc;
}
.field textarea{resize:vertical;min-height:60px;}
.field-row{display:flex;gap:10px;}
.field-row .field{flex:1;}

.modal-items{
  border:1px solid var(--blue-200);
  background:var(--blue-100);
  border-radius:10px;
  padding:4px 12px;
  margin-bottom:16px;
  max-height:140px;
  overflow-y:auto;
}
.mi-row{
  display:flex;justify-content:space-between;gap:10px;
  font-size:12.5px;color:var(--text-dark);
  padding:8px 0;
  border-bottom:1px dashed rgba(63,119,214,.25);
}
.mi-row:last-child{border-bottom:none;}
.mi-row span:last-child{font-variant-numeric:tabular-nums;font-weight:600;white-space:nowrap;}

.modal-total{
  padding:4px 0 2px;margin:6px 0 10px;
  font-size:13px;
}
.mt-row{display:flex;justify-content:space-between;padding:5px 0;color:var(--text-dark);}
.mt-row span:last-child{font-variant-numeric:tabular-nums;}
.mt-row.discount{color:var(--available);}
.mt-row.grand{
  font-size:15px;font-weight:700;color:var(--ink-900);
  border-top:1px dashed #ddd;margin-top:6px;padding-top:11px;
}
.mt-row.grand b{font-size:21px;color:var(--ink-900);}

.modal-actions{display:flex;gap:10px;margin-top:14px;}
.btn-ghost{
  background:#eef1f6;color:var(--text-dark);
}
.close-x{
  position:absolute;top:16px;right:18px;background:none;border:none;font-size:18px;
  cursor:pointer;color:#999;
}
.modal{position:relative;}

.modal.receipt{text-align:center;}
.receipt-check{
  width:52px;height:52px;border-radius:50%;
  background:linear-gradient(135deg,var(--available),#3fbb85);
  color:#fff;font-size:24px;font-weight:700;
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 14px;
  box-shadow:0 10px 24px rgba(47,158,110,.4);
}
.modal.receipt .modal-loc{margin-bottom:14px;font-weight:600;}
.modal.receipt .mini-note{margin:12px 0 16px;}
.modal.receipt .modal-items{text-align:left;}
.modal.receipt .mt-row{text-align:left;}
.modal.receipt .btn{width:100%;}

.toast{
  position:fixed;bottom:26px;left:50%;transform:translateX(-50%) translateY(20px);
  background:var(--ink-900);color:#fff;padding:14px 22px;border-radius:10px;
  font-size:13px;box-shadow:0 10px 30px rgba(0,0,0,.35);
  opacity:0;pointer-events:none;transition:all .3s ease;
  z-index:200;
  display:flex;align-items:center;gap:10px;
}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0);}
.toast .dot{width:8px;height:8px;border-radius:50%;background:var(--available);}

/* ================= INVENTORY SECTION ================= */
.inventory-section{
  padding:10px 36px 50px;
  scroll-margin-top:20px;
}
.inventory-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:18px;
  margin-bottom:22px;
}
.inventory-head h2{
  font-family:'Playfair Display',serif;
  font-size:24px;
  color:#fff;
  margin:0 0 6px;
}
.inventory-sub{
  font-size:13px;
  color:var(--blue-200);
  max-width:520px;
}
.filter-bar{display:flex;gap:22px;flex-wrap:wrap;}
.filter-group{display:flex;gap:6px;}
.chip{
  border:1px solid rgba(255,255,255,.3);
  background:rgba(255,255,255,.08);
  color:var(--blue-100);
  padding:7px 14px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  transition:background .15s ease, color .15s ease, border-color .15s ease;
}
.chip:hover{background:rgba(255,255,255,.16);}
.chip.active{
  background:var(--gold);
  border-color:var(--gold);
  color:var(--ink-900);
}

.inventory-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill, minmax(240px, 1fr));
  gap:16px;
}
.inventory-empty{
  grid-column:1/-1;
  text-align:center;
  color:var(--blue-200);
  padding:40px 0;
  font-size:14px;
}
.inv-card{
  background:rgba(255,255,255,.97);
  border-radius:14px;
  padding:16px 16px 14px;
  border:1px solid rgba(255,255,255,.5);
  box-shadow:0 14px 30px rgba(6,20,45,.25);
  display:flex;
  flex-direction:column;
  gap:8px;
  border-top:3px solid var(--blue-400);
}
.inv-card.selected{border-top-color:var(--gold);}
.inv-card.booked{border-top-color:var(--booked);opacity:.82;}
.inv-top{display:flex;justify-content:space-between;align-items:center;}
.inv-loc{font-size:11px;color:var(--text-muted);font-weight:700;letter-spacing:.3px;}
.inv-status{
  font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.4px;
  padding:3px 9px;border-radius:999px;
}
.inv-status.available{background:rgba(47,158,110,.12);color:var(--available);}
.inv-status.selected{background:rgba(200,164,77,.18);color:#93701f;}
.inv-status.booked{background:rgba(192,57,43,.12);color:var(--booked);}
.inv-title{
  font-family:'Playfair Display',serif;
  font-size:17px;
  color:var(--ink-900);
}
.inv-meta{font-size:11.5px;color:var(--text-muted);}
.inv-bottom{
  display:flex;justify-content:space-between;align-items:center;
  margin-top:4px;
  padding-top:10px;
  border-top:1px solid #eee;
}
.inv-price{font-size:17px;font-weight:700;color:var(--ink-900);font-variant-numeric:tabular-nums;}
.inv-actions{display:flex;gap:8px;}
.inv-jump{
  background:none;border:1px solid var(--blue-200);color:var(--blue-600);
  padding:6px 10px;border-radius:7px;font-size:11px;font-weight:600;cursor:pointer;
  transition:background .15s ease;
}
.inv-jump:hover{background:var(--blue-100);}
.inv-add{
  background:var(--blue-600);color:#fff;border:none;
  padding:6px 12px;border-radius:7px;font-size:11px;font-weight:700;cursor:pointer;
  transition:filter .15s ease;
}
.inv-add:hover{filter:brightness(1.1);}
.inv-card.selected .inv-add{background:var(--gold);color:var(--ink-900);}
.inv-add:disabled{background:#dfe4ec;color:#9aa4b5;cursor:not-allowed;}

/* ================= STATS BAND ================= */
.stats-band{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:1px;
  background:rgba(255,255,255,.14);
  margin:0 36px 40px;
  border-radius:14px;
  overflow:hidden;
  border:1px solid rgba(255,255,255,.16);
}
.stat-card{
  background:rgba(11,31,58,.55);
  padding:22px 18px;
  text-align:center;
}
.stat-card b{
  display:block;
  font-family:'Playfair Display',serif;
  font-size:26px;
  color:#fff;
  font-variant-numeric:tabular-nums;
  margin-bottom:4px;
}
.stat-card span{
  font-size:11px;
  letter-spacing:.4px;
  text-transform:uppercase;
  color:var(--blue-300);
}
@media (max-width:900px){
  .stats-band{grid-template-columns:repeat(2,1fr);}
}

/* ================= FOOTER ================= */
.site-footer{
  display:flex;
  justify-content:space-between;
  padding:20px 36px 34px;
  font-size:12px;
  color:var(--blue-300);
  border-top:1px solid rgba(255,255,255,.14);
  margin:0 36px;
}
@media (max-width:600px){
  .site-footer{flex-direction:column;gap:6px;text-align:center;}
}
