/* Cart, offers and terms pages. Builds on styles.css tokens. */

.page main { max-width: 1180px; margin: 0 auto; padding: 18px var(--gutter) 72px; animation: pageIn .5s var(--ease-out) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } }
html.settled .page main { animation: none; }
.page h1 { font-size: clamp(36px, 8vw, 60px); font-weight: 450; letter-spacing: -.02em; }
.muted { color: var(--muted); }
.top__nav a[aria-current="page"] { color: var(--plum); background: color-mix(in srgb, var(--plum) 8%, transparent); }
a.bag-btn { text-decoration: none; }
.foot a { color: var(--plum); }
.link-btn { border: 0; background: none; padding: 0 2px; min-height: 44px; color: var(--muted); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; }
.link-btn:hover { color: var(--plum); }
.toast__act { margin-left: 10px; border: 0; background: none; color: var(--gold-soft); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; min-height: 32px; }

.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 15px; }
.back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease-spring); }
.back:hover { color: var(--plum); }
.back:hover svg { transform: translateX(-3px); }

/* ---------- cart ---------- */
.cart__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 14px 24px; margin: 4px 0 26px; }
.steps-mini { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; font-size: 13px; color: var(--muted); }
.steps-mini li { display: flex; align-items: center; gap: 6px; }
.steps-mini li + li::before { content: ""; width: 18px; height: 1.5px; background: var(--line); }
.steps-mini li.on { color: var(--plum); font-weight: 600; }

.cart__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.cart__grid > *, .cline__info { min-width: 0; }
.cline h3 { overflow-wrap: anywhere; }
@media (min-width: 900px) { .cart__grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 44px; } .cart__grid.is-empty { grid-template-columns: minmax(0, 1fr); } }

.cart__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cline {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 14px;
  padding: 18px 0; border-bottom: 1px solid var(--line);
  animation: cardIn .5s var(--ease-out) both;
}
.cline:nth-child(2) { animation-delay: .05s; } .cline:nth-child(3) { animation-delay: .1s; } .cline:nth-child(4) { animation-delay: .15s; }
.cline.out { animation: lineOut .32s var(--ease-out) forwards; }
.cline__img img { width: 92px; height: 112px; object-fit: cover; border-radius: 12px; box-shadow: var(--shadow-1); transition: transform .4s var(--ease-spring); }
.cline__img:active img { transform: scale(.95); }
.cline h3 { font-size: 18px; line-height: 1.25; }
.cline h3 a { text-decoration: none; }
.cline p { font-size: 13.5px; color: var(--muted); line-height: 1.45; margin-top: 3px; }
.cline__unit { font-size: 13px !important; }
.cline__row { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.cline__price { font: 600 17px var(--sans); white-space: nowrap; }
.stepper--sm { height: 42px; }
.stepper--sm button { width: 42px; height: 40px; font-size: 20px; }
.stepper--sm output { min-width: 22px; }

.cart__empty { text-align: center; padding: 40px 12px 20px; display: grid; justify-items: center; gap: 10px; color: var(--muted); }
.cart__empty svg { width: 130px; height: 100px; fill: none; stroke: var(--plum); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.cart__empty-heart { fill: var(--blush); stroke: var(--plum); transform-origin: 60px 55px; animation: beat 1.8s ease-in-out infinite; }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.14); } 30% { transform: scale(.98); } 45% { transform: scale(1.08); } }
.cart__empty .hand { font-size: 22px; color: var(--plum); }
.cart__empty .btn { margin-top: 8px; }

.summary {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 22px; box-shadow: var(--shadow-1);
  position: relative;
}
@media (min-width: 900px) { .summary { position: sticky; top: calc(var(--top-h) + 20px); } }
.summary h2 { font-size: 24px; margin-bottom: 16px; }
.coupon label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.coupon__row { display: flex; gap: 8px; }
.coupon__row input {
  flex: 1; min-width: 0; height: 50px; padding: 0 16px; border-radius: 14px;
  border: 1.5px dashed var(--gold); background: var(--cream);
  font: 600 16px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.coupon__row input::placeholder { color: color-mix(in srgb, var(--muted) 55%, transparent); letter-spacing: .08em; }
.coupon__row input:focus { outline: none; border-style: solid; box-shadow: 0 0 0 4px color-mix(in srgb, var(--gold) 22%, transparent); }
.coupon__row .btn { min-height: 50px; padding: 0 18px; }
.coupon__msg { font-size: 13.5px; margin-top: 8px; min-height: 0; }
.coupon__msg.ok { color: var(--wa); font-weight: 500; }
.coupon__msg.err { color: #A3122A; }
.coupon__link { display: inline-flex; align-items: center; min-height: 40px; font-size: 14px; color: var(--plum); font-weight: 500; }
.sum { margin: 14px 0 18px; display: grid; gap: 10px; }
.sum > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sum dt { color: var(--muted); font-size: 15px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px 8px; }
.sum dt span { font-size: 13px; }
.sum dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.sum dd.muted { font-weight: 400; font-size: 14px; }
.sum__disc dd { color: var(--wa); }
.sum__disc .link-btn { min-height: 0; font-size: 13px; }
.sum__total { border-top: 1px dashed var(--line); padding-top: 12px; }
.sum__total dt { color: var(--ink); font-weight: 600; }
.sum__total dd { font: 600 26px var(--serif); }
.sum__total dd.tick { animation: inkPop .45s var(--ease-spring); }
.chip-code { display: inline-block; padding: 2px 8px; border-radius: 6px; background: color-mix(in srgb, var(--wa) 12%, transparent); color: var(--wa); font: 600 12px/1.5 var(--sans); letter-spacing: .06em; }
.note-field { display: grid; gap: 6px; margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.note-field small { color: var(--muted); font-weight: 400; }
.note-field textarea { border-radius: 14px; border: 1.5px solid var(--line); background: var(--cream); padding: 12px 14px; font: 400 15px/1.5 var(--sans); color: var(--ink); resize: vertical; }
.note-field textarea:focus { outline: none; border-color: var(--gold); }
.summary .fine { margin-top: 12px; }
.summary .fine a { color: var(--plum); }
.spark { position: fixed; z-index: 80; width: 8px; height: 8px; pointer-events: none; background: var(--gold); clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%); }
.spark:nth-child(3n) { background: var(--plum); }

.also { margin-top: 64px; }
.also h2 { font-size: clamp(26px, 5vw, 36px); margin-bottom: 18px; }
.also__row { list-style: none; margin: 0 calc(var(--gutter) * -1); padding: 4px var(--gutter) 10px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.also__row::-webkit-scrollbar { display: none; }
.also__card { flex: 0 0 min(42vw, 200px); scroll-snap-align: start; }
.also__card a { display: grid; gap: 4px; text-decoration: none; }
.also__card img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-md); box-shadow: var(--shadow-1); transition: transform .5s var(--ease-spring); }
.also__card a:active img { transform: scale(.96); }
.also__name { font: 500 16px/1.25 var(--serif); margin-top: 6px; }
.also__price { font-size: 13.5px; color: var(--muted); }

/* ---------- offers ---------- */
.offers__hero, .terms__hero { padding: 18px 0 30px; display: grid; gap: 8px; }
.offers__hero .hand, .terms__hero .hand { color: var(--gold-ink); font-size: 19px; transform: rotate(-1.5deg); transform-origin: left; }
.offers__hero p:not(.hand) { color: var(--muted); max-width: 32em; font-size: 17px; }
.tickets { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
@media (min-width: 820px) { .tickets { grid-template-columns: 1fr 1fr; gap: 22px; } }
.ticket {
  --c: var(--plum); --ink-on: var(--cream);
  position: relative; display: grid; grid-template-columns: 1fr auto;
  border-radius: 20px; overflow: hidden; color: var(--ink-on); background: var(--c);
  box-shadow: var(--shadow-2);
  -webkit-mask: radial-gradient(circle 12px at calc(100% - 132px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 12px at calc(100% - 132px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
          mask: radial-gradient(circle 12px at calc(100% - 132px) 0, transparent 98%, #000) top / 100% 51% no-repeat,
                radial-gradient(circle 12px at calc(100% - 132px) 100%, transparent 98%, #000) bottom / 100% 51% no-repeat;
  transition: transform .45s var(--ease-spring);
}
.ticket:hover { transform: translateY(-3px) rotate(-.4deg); }
.ticket--teal { --c: var(--teal); }
.ticket--maroon { --c: var(--maroon); }
.ticket--gold { --c: #E9D3A3; --ink-on: #3a2610; }
.ticket__main { padding: 22px 18px 22px 22px; display: grid; gap: 6px; align-content: start; }
.ticket__big { font: 500 46px/1 var(--serif); letter-spacing: -.02em; }
.ticket__big small { font-size: 18px; font-style: italic; margin-left: 2px; }
.ticket h2 { font-size: 20px; color: inherit; }
.ticket__main p:not(.ticket__big) { font-size: 14px; opacity: .82; }
.ticket__stub {
  width: 132px; padding: 18px 12px; display: grid; align-content: center; gap: 10px; justify-items: center;
  border-left: 2px dashed color-mix(in srgb, var(--ink-on) 35%, transparent);
  background: color-mix(in srgb, #000 10%, transparent);
}
.ticket__code {
  display: grid; justify-items: center; gap: 4px; width: 100%; min-height: 64px; padding: 8px 4px;
  border: 0; border-radius: 12px; background: color-mix(in srgb, var(--ink-on) 14%, transparent); color: inherit;
  font: 600 14px var(--sans); letter-spacing: .08em;
  transition: transform .35s var(--ease-spring), background-color .2s;
}
.ticket__code svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.ticket__code:active { transform: scale(.92); }
.ticket__code.copied { background: color-mix(in srgb, var(--ink-on) 28%, transparent); }
.ticket__use { border: 0; background: none; color: inherit; font: 600 13.5px var(--sans); min-height: 44px; text-decoration: underline; text-underline-offset: 3px; }
.offers__more { margin-top: 48px; padding: clamp(24px, 5vw, 44px); border-radius: var(--r-lg); background: var(--blush); display: grid; gap: 12px; justify-items: start; }
.offers__more h2 { font-size: clamp(26px, 5vw, 36px); }
.offers__more p { color: var(--muted); max-width: 34em; }
.offers__fine { margin-top: 20px; }
.offers__fine a { color: var(--plum); }

/* ---------- terms ---------- */
.terms__layout { display: grid; gap: 24px; }
.toc { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(var(--gutter) * -1); padding: 0 var(--gutter) 4px; }
.toc::-webkit-scrollbar { display: none; }
.toc a { flex: none; display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); text-decoration: none; font-size: 14px; color: var(--muted); }
.toc a:hover { color: var(--plum); border-color: var(--plum); }
@media (min-width: 900px) {
  .terms__layout { grid-template-columns: 220px 1fr; gap: 56px; align-items: start; }
  .toc { position: sticky; top: calc(var(--top-h) + 24px); flex-direction: column; margin: 0; padding: 0; gap: 2px; }
  .toc a { border: 0; background: none; padding: 0 12px; border-radius: 10px; }
}
.terms__body { max-width: 720px; }
.terms__body details { border-bottom: 1px solid var(--line); }
.terms__body summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 60px; font: 500 21px/1.25 var(--serif);
}
.terms__body summary::-webkit-details-marker { display: none; }
.terms__body summary::after { content: ""; width: 11px; height: 11px; flex: none; border-right: 2px solid var(--plum); border-bottom: 2px solid var(--plum); transform: rotate(45deg) translate(-3px, -3px); transition: transform .35s var(--ease-spring); }
.terms__body details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.terms__body details p { color: var(--muted); padding-bottom: 14px; max-width: 62ch; }
.terms__body details[open] > p { animation: rise .45s var(--ease-out) both; }
.terms__body details a { color: var(--plum); }
.terms__body .fine { margin-top: 24px; }

@media (prefers-reduced-motion: reduce) {
  .page main { animation: none; }
}
