/* ============================================================================
   PayLess Publishing — Shop, customiser, cart & checkout components
   ========================================================================= */

/* -------------------------------------------------------------- book card */
.book-grid { display: grid; gap: var(--sp-5); grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.book-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.book-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.book-card-media { position: relative; background: var(--cream-2); }
.book-card-media img { width: 100%; aspect-ratio: 5 / 7; object-fit: cover; }
.book-card-media .pill { position: absolute; top: var(--sp-3); left: var(--sp-3); }
.book-card-body { padding: var(--sp-4) var(--sp-5) var(--sp-5); display: flex; flex-direction: column; flex: 1; }
.book-card-body h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.book-card-body h3 a { color: inherit; text-decoration: none; }
.book-card-body h3 a:hover { color: var(--coral-deep); }
.book-card-foot { margin-top: auto; padding-top: var(--sp-4); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }

/* The homepage ladder sits centred in its own block rather than stretching the
   full container width. */
.price-ladder-block { max-width: 34rem; margin-inline: auto; }
.price-ladder-block .price-ladder { margin-top: var(--sp-4); }

/* Two routes, each with its own ladder, grouped under a heading. */
.price-ladder-group + .price-ladder-group { margin-top: var(--sp-5); }
.pl-group-title {
  font-family: var(--font-display); font-weight: 800; font-size: var(--fs-md);
  color: var(--cyan); margin: 0 0 .5rem;
}
.card:not(.card-ink) .pl-group-title { color: var(--cyan-dark); }

/* --------------------------------------------------------- route chooser */
/* Step 1 of the customiser: personalise an existing story, or commission a
   brand-new one. The price difference between them is large, so they sit side
   by side with their full price lists visible. */
.scope-grid {
  display: grid; gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
  align-items: start;
}
.scope-card {
  position: relative; text-align: left; font: inherit; cursor: pointer;
  background: var(--paper); border: 2px solid var(--line);
  border-radius: var(--r-lg); padding: var(--sp-5);
  display: flex; flex-direction: column;
  transition: transform .16s var(--ease), border-color .16s var(--ease),
              box-shadow .16s var(--ease), background .16s var(--ease);
}
.scope-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.scope-card[aria-pressed="true"] {
  border-color: var(--cyan); background: var(--cyan-tint);
  box-shadow: 0 0 0 4px rgba(0, 168, 248, .14);
}
.scope-card h3 { font-size: var(--fs-xl); margin-bottom: var(--sp-2); }
.scope-from {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--fs-2xl); color: var(--ink); margin-bottom: 0;
}
.scope-card .price-ladder { border-top-color: var(--line); margin-top: var(--sp-4); }
.scope-card .price-ladder-row { border-bottom-color: var(--line); }
.scope-card .pl-name { color: var(--text); }
.scope-card .pl-price { color: var(--ink); }

/* ---------------------------------------------------------------- price UI */
/* The detailed price list. Lists every edition, so a customer can compare the
   personalised price against the as-is one at each step. */
.price-ladder {
  margin-top: var(--sp-5);
  border-top: 1px solid rgba(255, 255, 255, .22);
}
.price-ladder-row {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--sp-4); padding: .65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}
.pl-name { font-size: var(--fs-md); font-weight: 600; color: var(--text-on-dark); }
.pl-price {
  font-family: var(--font-display); font-weight: 800;
  font-size: var(--fs-xl); color: #fff; white-space: nowrap;
}
/* On a light card the same ladder needs dark text. */
.card:not(.card-ink) .price-ladder { border-top-color: var(--line); }
.card:not(.card-ink) .price-ladder-row { border-bottom-color: var(--line); }
.card:not(.card-ink) .pl-name { color: var(--text); }
.card:not(.card-ink) .pl-price { color: var(--ink); }

.price { display: flex; align-items: baseline; gap: var(--sp-2); flex-wrap: wrap; }
.price-now { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-xl); color: var(--ink); }
.price-was { font-size: var(--fs-sm); text-decoration: line-through; color: var(--text-mute); }
.price-save { font-size: var(--fs-xs); font-weight: 800; color: var(--ok); background: var(--ok-soft);
  padding: .15rem .5rem; border-radius: var(--r-full); }

/* ------------------------------------------------------------ product page */
.product-layout {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 4vw, 3.5rem); align-items: start;
}
@media (max-width: 940px) { .product-layout { grid-template-columns: 1fr; } }

.gallery-main {
  border-radius: var(--r-lg); overflow: hidden; background: var(--cream-2);
  border: 1px solid var(--line); position: relative; box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}
.gallery-main img { width: 100%; }
.gallery-main .gallery-pos {
  position: absolute; bottom: var(--sp-3); right: var(--sp-3);
  background: rgba(0, 20, 52,.8); color: #fff; font-size: var(--fs-xs); font-weight: 700;
  padding: .25rem .65rem; border-radius: var(--r-full); backdrop-filter: blur(4px);
}
.gallery-thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr));
  gap: var(--sp-2); margin-top: var(--sp-3);
}
.gallery-thumbs button {
  padding: 0; border: 2px solid transparent; border-radius: var(--r-sm);
  overflow: hidden; cursor: pointer; background: var(--cream-2); line-height: 0;
  transition: border-color .16s var(--ease), transform .16s var(--ease);
}
.gallery-thumbs button:hover { transform: translateY(-2px); }
.gallery-thumbs button[aria-current="true"] { border-color: var(--coral); }
.gallery-thumbs img { width: 100%; aspect-ratio: 5/7; object-fit: cover; }

.gallery-nav { display: flex; gap: var(--sp-2); margin-top: var(--sp-3); }

/* ------------------------------------------------------- buy box extras */
.buy-alt { font-size: var(--fs-sm); color: var(--text-mute); margin: var(--sp-4) 0 0; }
.linklike {
  background: none; border: 0; padding: 0; font: inherit;
  color: var(--coral-deep); font-weight: 700; cursor: pointer;
  text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 2px;
}
.linklike:hover { color: var(--coral-dark); }

/* ------------------------------------------------------------- FAQ layout */
.faq-jump { display: flex; flex-wrap: wrap; gap: var(--sp-2); padding-block: var(--sp-5) 0; }
.faq-jump a {
  display: inline-flex; align-items: center;
  font-size: var(--fs-sm); font-weight: 700; text-decoration: none;
  color: var(--ink); background: var(--paper);
  border: 2px solid var(--line); border-radius: var(--r-full);
  padding: .45rem 1rem; transition: all .16s var(--ease);
}
.faq-jump a:hover { border-color: var(--coral); background: var(--coral-tint); color: var(--coral-dark); }

/* Two columns so a 19-question page uses the page width instead of stranding
   a narrow strip in the middle of a 1440px screen. */
.faq-layout { columns: 2; column-gap: clamp(2rem, 4vw, 3.5rem); }
.faq-group { break-inside: avoid; }
.faq-group h2 { break-after: avoid; }
@media (max-width: 900px) { .faq-layout { columns: 1; } }

/* ------------------------------------------------------------ edition pick */
.edition-list { display: grid; gap: var(--sp-3); margin-bottom: var(--sp-5); }
.edition {
  position: relative; display: grid; grid-template-columns: auto 1fr auto;
  gap: var(--sp-4); align-items: center; text-align: left;
  background: var(--paper); border: 2px solid var(--line); border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-4); cursor: pointer; font: inherit; width: 100%;
  transition: border-color .16s var(--ease), background .16s var(--ease), box-shadow .16s var(--ease);
}
.edition:hover { border-color: var(--line-strong); }
.edition[aria-pressed="true"] { border-color: var(--coral); background: var(--coral-tint); box-shadow: 0 0 0 4px rgba(252,74,46,.1); }
.edition-radio {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong);
  display: grid; place-items: center; flex-shrink: 0; background: #fff;
}
.edition[aria-pressed="true"] .edition-radio { border-color: var(--coral); }
.edition[aria-pressed="true"] .edition-radio::after {
  content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--coral);
}
/* The name and the tagline are separate lines. Without this they render as
   inline siblings and concatente into "PDF eBookInstant download…". */
.edition-body { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.edition-name { display: block; font-weight: 800; color: var(--ink); font-family: var(--font-display); font-size: var(--fs-lg); line-height: 1.2; }
.edition-tag { display: block; font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.35; }
.edition-price { text-align: right; flex-shrink: 0; }
.edition-price .now { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg); color: var(--ink); display: block; }
.edition-price .was { font-size: var(--fs-xs); text-decoration: line-through; color: var(--text-mute); }
.edition-badge {
  position: absolute; top: -10px; right: var(--sp-4);
  background: var(--amber); color: var(--ink); font-size: .66rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .07em; padding: .15rem .55rem; border-radius: var(--r-full);
}
@media (max-width: 520px) {
  .edition { grid-template-columns: auto 1fr; }
  .edition-price { grid-column: 2; text-align: left; }
}

.feature-list { list-style: none; padding: 0; margin: 0 0 var(--sp-5); }
.feature-list li { display: flex; gap: var(--sp-3); align-items: flex-start; margin-bottom: var(--sp-2); font-size: var(--fs-sm); color: var(--text-soft); }
.feature-list svg { flex-shrink: 0; margin-top: 3px; color: var(--ok); }

.qty {
  display: inline-flex; align-items: center; border: 2px solid var(--line);
  border-radius: var(--r-full); overflow: hidden; background: #fff;
}
.qty button {
  width: 40px; height: 40px; border: 0; background: transparent; cursor: pointer;
  font-size: 1.25rem; font-weight: 700; color: var(--ink); line-height: 1;
}
.qty button:hover { background: var(--cream-2); }
.qty input {
  width: 48px; height: 40px; border: 0; text-align: center; font: inherit;
  font-weight: 700; color: var(--ink); background: transparent;
  -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.buy-row { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; margin-bottom: var(--sp-4); }
.buy-row .btn { flex: 1 1 200px; }

.trust-row { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-top: var(--sp-5); }
.trust-item { display: flex; gap: var(--sp-3); align-items: flex-start; font-size: var(--fs-sm); color: var(--text-soft); }
.trust-item svg { flex-shrink: 0; color: var(--coral); margin-top: 2px; }

/* -------------------------------------------------------------- accordion */
.acc { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--paper); }
.acc + .acc { margin-top: var(--sp-3); }
.acc summary {
  cursor: pointer; padding: var(--sp-4) var(--sp-5); font-weight: 700; color: var(--ink);
  font-family: var(--font-display); font-size: var(--fs-lg); list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
}
.acc summary::-webkit-details-marker { display: none; }
.acc summary::after {
  content: "+"; font-size: 1.5rem; line-height: 1; color: var(--coral);
  font-family: var(--font-body); font-weight: 700; flex-shrink: 0;
  transition: transform .2s var(--ease);
}
.acc[open] summary::after { transform: rotate(45deg); }
.acc-body { padding: 0 var(--sp-5) var(--sp-5); color: var(--text-soft); }
.acc-body > *:last-child { margin-bottom: 0; }

/* ------------------------------------------------------------ testimonial */
.quote {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-5); position: relative;
}
.quote::before {
  content: "\201C"; font-family: Georgia, serif; font-size: 4rem; line-height: .8;
  color: var(--coral); opacity: .28; display: block; margin-bottom: -.6rem;
}
.quote p { font-size: var(--fs-md); color: var(--text); }
.quote-by { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); margin-top: var(--sp-3); }
.quote-by span { display: block; font-weight: 400; color: var(--text-mute); }

/* -------------------------------------------------------------- steps/how */
.steps { counter-reset: step; display: grid; gap: var(--sp-6); grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
/* The number disc is absolutely positioned at the top-left, so the column needs
   enough top padding to clear it AND leave a gap. This was exactly --sp-6 (2rem),
   which is the disc's own 46px height, so the title sat flush against the bottom
   of the circle and the two read as one overlapping lump. */
.step { position: relative; padding-top: 3.6rem; }
.step-num {
  counter-increment: step; position: absolute; top: 0; left: 0;
  width: 46px; height: 46px; border-radius: 50%;
  background: linear-gradient(140deg, var(--cyan), var(--cyan-deep));
  color: #fff;
  display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; font-size: var(--fs-lg);
  box-shadow: var(--shadow-coral);
}
.step-num::before { content: counter(step); }
.step h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); line-height: 1.25; }

.how-line { display: grid; gap: var(--sp-4); }

/* ------------------------------------------------------------ customiser */
.wizard { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 880px) { .wizard { grid-template-columns: 1fr; } }

.wizard-rail { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
@media (max-width: 880px) { .wizard-rail { position: static; } }
.wizard-steps { list-style: none; padding: 0; margin: 0; }
.wizard-steps li { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-2) 0; color: var(--text-mute); font-size: var(--fs-sm); font-weight: 600; }
.wizard-steps .dot {
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--line-strong);
  display: grid; place-items: center; font-size: var(--fs-xs); font-weight: 800;
  flex-shrink: 0; background: #fff; color: var(--text-mute);
}
.wizard-steps li[data-state="active"] { color: var(--ink); }
.wizard-steps li[data-state="active"] .dot { background: var(--coral); border-color: var(--coral); color: #fff; }
.wizard-steps li[data-state="done"] { color: var(--ok); }
.wizard-steps li[data-state="done"] .dot { background: var(--ok-soft); border-color: var(--ok); color: var(--ok); }

.wizard-panel { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(1.25rem, 3vw, 2.25rem); box-shadow: var(--shadow-sm); }
.wizard-panel > h2 { margin-bottom: var(--sp-2); }
.wizard-foot { display: flex; justify-content: space-between; gap: var(--sp-3); margin-top: var(--sp-6); padding-top: var(--sp-5); border-top: 1px solid var(--line); flex-wrap: wrap; }

.field { margin-bottom: var(--sp-5); }
.field:last-child { margin-bottom: 0; }
.field > label, .field-label { display: block; font-weight: 700; color: var(--ink); margin-bottom: var(--sp-2); font-size: var(--fs-sm); }
.field .hint { font-size: var(--fs-xs); color: var(--text-mute); margin-top: var(--sp-2); font-weight: 400; }
.field .req { color: var(--coral); }

.input, .textarea, .select {
  width: 100%; font: inherit; font-size: var(--fs-base); color: var(--text);
  background: #fff; border: 2px solid var(--line); border-radius: var(--r-md);
  padding: .7rem .9rem; transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--coral); box-shadow: 0 0 0 4px rgba(252,74,46,.12);
}
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--err); background: #FFFBFB; }
.textarea { min-height: 130px; resize: vertical; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%236B5544' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .9rem center; padding-right: 2.4rem; }
.err-msg { color: var(--err); font-size: var(--fs-xs); font-weight: 700; margin-top: var(--sp-2); display: none; }
.err-msg[data-show="true"] { display: block; }

.field-row { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* choice chips */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.chip {
  border: 2px solid var(--line); background: #fff; border-radius: var(--r-full);
  padding: .5rem 1rem; cursor: pointer; font: inherit; font-size: var(--fs-sm);
  font-weight: 600; color: var(--text-soft);
  transition: all .16s var(--ease);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--coral); border-color: var(--coral); color: #fff; }

/* theme cards */
.theme-grid { display: grid; gap: var(--sp-3); grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.theme-card {
  text-align: left; background: #fff; border: 2px solid var(--line); border-radius: var(--r-md);
  padding: var(--sp-4); cursor: pointer; font: inherit;
  transition: all .16s var(--ease);
}
.theme-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.theme-card[aria-pressed="true"] { border-color: var(--coral); background: var(--coral-tint); box-shadow: 0 0 0 4px rgba(252,74,46,.1); }
.theme-card strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: var(--fs-md); margin-bottom: .2rem; }
.theme-card span { font-size: var(--fs-sm); color: var(--text-soft); line-height: 1.5; }

/* packages */
.pkg-grid { display: grid; gap: var(--sp-4); grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); align-items: stretch; }
.pkg {
  background: #fff; border: 2px solid var(--line); border-radius: var(--r-lg);
  padding: var(--sp-5); display: flex; flex-direction: column; position: relative;
  cursor: pointer; text-align: left; font: inherit;
  transition: all .16s var(--ease);
}
.pkg:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pkg[aria-pressed="true"] { border-color: var(--coral); background: var(--coral-tint); box-shadow: 0 0 0 4px rgba(252,74,46,.1); }
.pkg[data-popular="true"] { border-color: var(--amber); }
.pkg-tag {
  position: absolute; top: -11px; left: var(--sp-5); background: var(--amber); color: var(--ink);
  font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .07em;
  padding: .18rem .6rem; border-radius: var(--r-full);
}
.pkg h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-1); }
.pkg .pkg-for { font-size: var(--fs-sm); color: var(--text-soft); min-height: 2.6em; }
.pkg .pkg-price { font-family: var(--font-display); font-weight: 800; font-size: var(--fs-2xl); color: var(--ink); margin: var(--sp-3) 0 var(--sp-1); }
.pkg .pkg-turn { font-size: var(--fs-xs); color: var(--text-mute); margin-bottom: var(--sp-4); }
.pkg ul { list-style: none; padding: 0; margin: 0 0 var(--sp-4); }
.pkg li { display: flex; gap: var(--sp-2); font-size: var(--fs-sm); color: var(--text-soft); margin-bottom: var(--sp-2); align-items: flex-start; }
.pkg li svg { flex-shrink: 0; margin-top: 4px; color: var(--coral); }
.pkg .pkg-cta { margin-top: auto; }

/* uploads */
.dropzone {
  border: 2.5px dashed var(--line-strong); border-radius: var(--r-lg);
  background: var(--cream-2); padding: var(--sp-6) var(--sp-4); text-align: center;
  cursor: pointer; transition: all .18s var(--ease);
}
.dropzone:hover, .dropzone[data-drag="true"] { border-color: var(--coral); background: var(--coral-tint); }
.dropzone strong { display: block; color: var(--ink); font-family: var(--font-display); font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.dropzone svg { color: var(--coral); margin: 0 auto var(--sp-3); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: var(--sp-3); margin-top: var(--sp-4); }
.thumb {
  position: relative; border-radius: var(--r-md); overflow: hidden;
  border: 1px solid var(--line); background: #fff; aspect-ratio: 1;
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-del {
  position: absolute; top: 5px; right: 5px; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(0, 20, 52,.82); color: #fff; border: 0; cursor: pointer;
  display: grid; place-items: center; font-size: 15px; line-height: 1;
}
.thumb-del:hover { background: var(--err); }
.thumb-name {
  position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0, 20, 52,.78);
  color: #fff; font-size: .64rem; padding: .2rem .35rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.thumb-meta { position: absolute; top: 5px; left: 5px; background: rgba(255,255,255,.92); border-radius: var(--r-full);
  font-size: .6rem; font-weight: 800; padding: .1rem .4rem; color: var(--ink); }

/* review panel */
.review-box { background: var(--cream-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--sp-4); }
.review-line { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-2) 0; font-size: var(--fs-sm); border-bottom: 1px dashed var(--line); }
.review-line:last-child { border-bottom: 0; }
.review-line dt { color: var(--text-mute); }
.review-line dd { margin: 0; font-weight: 700; color: var(--ink); text-align: right; }

/* ---------------------------------------------------------------- cart drawer */
.scrim {
  position: fixed; inset: 0; background: rgba(0, 20, 52,.5); z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity .22s var(--ease);
  backdrop-filter: blur(2px);
}
.scrim[data-open="true"] { opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(430px, 100vw);
  background: var(--cream); z-index: 301; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s var(--ease);
  box-shadow: -14px 0 44px rgba(0, 20, 52,.2);
}
.drawer[data-open="true"] { transform: translateX(0); }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5); background: var(--plum); color: #fff;
}
.drawer-head h2 { color: #fff; font-size: var(--fs-lg); margin: 0; }
.drawer-close {
  background: rgba(255,255,255,.12); border: 0; color: #fff; width: 36px; height: 36px;
  border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; display: grid; place-items: center;
}
.drawer-close:hover { background: rgba(255,255,255,.24); }
.drawer-body { flex: 1; overflow-y: auto; padding: var(--sp-5); }
.drawer-foot { padding: var(--sp-5); border-top: 1px solid var(--line); background: var(--paper); }

.cart-item { display: grid; grid-template-columns: 62px 1fr auto; gap: var(--sp-3); padding: var(--sp-4) 0; border-bottom: 1px solid var(--line); }
.cart-item:first-child { padding-top: 0; }
.cart-item img { width: 62px; border-radius: var(--r-sm); border: 1px solid var(--line); }
.cart-item h4 { font-size: var(--fs-base); margin-bottom: .1rem; font-family: var(--font-body); font-weight: 700; }
.cart-item .ci-meta { font-size: var(--fs-xs); color: var(--text-mute); margin-bottom: var(--sp-2); }
.cart-item .ci-actions { display: flex; align-items: center; gap: var(--sp-3); }
.cart-remove { background: none; border: 0; color: var(--text-mute); cursor: pointer; font: inherit; font-size: var(--fs-xs); text-decoration: underline; padding: 0; }
.cart-remove:hover { color: var(--err); }
.cart-line-price { font-weight: 800; color: var(--ink); font-family: var(--font-display); white-space: nowrap; }

.cart-empty { text-align: center; padding: var(--sp-8) var(--sp-4); color: var(--text-soft); }
.cart-empty svg { color: var(--line-strong); margin: 0 auto var(--sp-4); }

.totals { font-size: var(--fs-sm); }
.totals-row { display: flex; justify-content: space-between; padding: var(--sp-2) 0; }
.totals-row.grand { font-size: var(--fs-lg); font-weight: 800; color: var(--ink); font-family: var(--font-display);
  border-top: 2px solid var(--line-strong); margin-top: var(--sp-2); padding-top: var(--sp-3); }

/* ------------------------------------------------------------------- toast */
.toast-wrap { position: fixed; bottom: var(--sp-5); left: 50%; transform: translateX(-50%); z-index: 400;
  display: flex; flex-direction: column; gap: var(--sp-2); align-items: center; pointer-events: none; width: min(440px, calc(100vw - 2rem)); }
.toast {
  background: var(--plum); color: #fff; padding: var(--sp-3) var(--sp-5); border-radius: var(--r-full);
  font-size: var(--fs-sm); font-weight: 600; box-shadow: var(--shadow-lg);
  animation: toast-in .3s var(--ease); max-width: 100%; text-align: center;
}
.toast-ok { background: var(--ok); }
.toast-err { background: var(--err); }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ----------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 500; background: rgba(15,9,5,.95);
  display: none; align-items: center; justify-content: center; padding: var(--sp-5);
}
.lightbox[data-open="true"] { display: flex; }
.lightbox img { max-height: 88vh; max-width: 92vw; border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,.14);
  border: 0; color: #fff; width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  font-size: 26px; line-height: 1; display: grid; place-items: center;
}
.lightbox-nav:hover { background: rgba(255,255,255,.3); }
.lightbox-prev { left: var(--sp-5); } .lightbox-next { right: var(--sp-5); }
.lightbox-close { position: absolute; top: var(--sp-5); right: var(--sp-5); background: rgba(255,255,255,.14);
  border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 22px; }
.lightbox-close:hover { background: rgba(255,255,255,.3); }
.lightbox-cap { position: absolute; bottom: var(--sp-5); left: 0; right: 0; text-align: center; color: var(--text-on-dark-soft); font-size: var(--fs-sm); }

/* ---------------------------------------------------------------- checkout */
.checkout-layout { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(1.75rem, 4vw, 3rem); align-items: start; }
@media (max-width: 940px) { .checkout-layout { grid-template-columns: 1fr; } }
.checkout-aside { position: sticky; top: calc(var(--header-h) + var(--sp-5)); }
@media (max-width: 940px) { .checkout-aside { position: static; } }

.radio-card {
  display: flex; gap: var(--sp-3); align-items: flex-start; padding: var(--sp-4);
  border: 2px solid var(--line); border-radius: var(--r-md); background: #fff;
  cursor: pointer; margin-bottom: var(--sp-3); transition: all .16s var(--ease);
}
.radio-card:hover { border-color: var(--line-strong); }
.radio-card[aria-pressed="true"] { border-color: var(--coral); background: var(--coral-tint); }
.radio-card input { margin-top: 4px; flex-shrink: 0; accent-color: var(--coral); width: 18px; height: 18px; }
.radio-card .rc-body { flex: 1; }
.radio-card .rc-title { font-weight: 700; color: var(--ink); display: flex; justify-content: space-between; gap: var(--sp-3); }
.radio-card .rc-note { font-size: var(--fs-xs); color: var(--text-mute); }

.pay-methods { display: flex; flex-wrap: wrap; gap: var(--sp-2); }

/* success / failure */
.result-icon { width: 82px; height: 82px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto var(--sp-5); }

/* ------------------------------------------------------------------ misc */
.badge-roundel {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  background: var(--amber-soft); color: var(--amber-deep); border: 1px solid #F0D79C;
  border-radius: var(--r-full); padding: .3rem .8rem; font-size: var(--fs-xs);
  font-weight: 800; text-transform: uppercase; letter-spacing: .06em;
}
.marquee-strip {
  background: var(--coral); color: #fff; padding: var(--sp-3) 0; overflow: hidden;
}
.marquee-inner { display: flex; gap: var(--sp-6); align-items: center; justify-content: center; flex-wrap: wrap;
  font-size: var(--fs-sm); font-weight: 700; }
.marquee-inner svg { color: var(--amber); flex-shrink: 0; }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding-left: var(--sp-6); padding-bottom: var(--sp-5); border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: -8px; top: 4px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--coral); border: 3px solid var(--cream);
}
.timeline h4 { margin-bottom: var(--sp-1); font-size: var(--fs-md); }

.crumbs { font-size: var(--fs-xs); color: var(--text-mute); padding-block: var(--sp-4) 0; }
.crumbs a { color: var(--text-mute); text-decoration: none; }
.crumbs a:hover { color: var(--coral-deep); text-decoration: underline; }
.crumbs span { margin-inline: var(--sp-2); }

.page-hero { background: var(--cream-2); padding-block: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin-bottom: var(--sp-3); }

.price-table { width: 100%; border-collapse: collapse; font-size: var(--fs-sm); }
.price-table th, .price-table td { text-align: left; padding: var(--sp-3) var(--sp-4); border-bottom: 1px solid var(--line); }
.price-table th { background: var(--cream-2); font-family: var(--font-display); color: var(--ink); font-size: var(--fs-base); }
.price-table td:last-child, .price-table th:last-child { text-align: right; }
.price-table tr:last-child td { border-bottom: 0; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: #fff; }

@media (max-width: 640px) {
  .wrap { padding-inline: var(--sp-4); }
  .card-pad-lg { padding: var(--sp-5); }
  .drawer { width: 100vw; }
}


