/* Storefront base styles: the structure and the default look.
 *
 * Everything here sits in the "base" cascade layer. A theme's stylesheet
 * (themes/<id>/theme.css) is loaded after this one and is not layered, so any
 * rule in it wins over any rule here, whatever the selectors' specificity.
 * A theme changes the look in two ways:
 *
 *   1. Tokens: set the custom properties below on :root. Most themes need
 *      little else; every colour, font, radius and the main sizes here come
 *      from a token.
 *   2. Overrides: restyle any component by its class (.site-header, .card,
 *      .btn-primary, .dt-slot, ...), or add to it.
 *
 * Keep this file free of any one customer's look: neutral defaults only.
 * See README.md, "Themes".
 */

@layer base {

:root {
    /* ---- Colour ---------------------------------------------------------- */
    --color-bg:            #f2f2f2;   /* the page behind the content */
    --color-surface:       #ffffff;   /* cards, panels, inputs */
    --color-surface-muted: #f3f3f3;   /* avatars, quiet fills */
    --color-hero-fill:     #d4d4d4;   /* image placeholders */
    --color-border:        #d8d8d8;
    --color-divider:       #ececec;

    --color-text:          #1a1a1a;
    --color-text-muted:    #474747;
    --color-text-faint:    #bababa;   /* past dates, disabled labels */

    --color-primary:       #0073e6;   /* main buttons, selected states */
    --color-primary-hov:   #005bb8;
    --color-primary-fg:    #ffffff;   /* text on --color-primary */
    --color-primary-tint:  color-mix(in srgb, var(--color-primary) 7%, transparent);
    --color-primary-disabled: #d8dee5;

    --color-link:          var(--color-primary);
    --color-link-hov:      var(--color-primary-hov);
    --color-icon:          var(--color-primary);   /* header and action icons */
    --color-icon-hov:      var(--color-primary-hov);

    --color-brand:         var(--color-primary);   /* a venue's name on its card */
    --color-accesso:       #5fa728;

    --color-header-bg:     var(--color-surface);
    --color-header-fg:     var(--color-text);
    --color-header-border: var(--color-border);
    --color-footer-bg:     var(--color-surface);
    --color-footer-fg:     var(--color-text-muted);
    --color-footer-link:   var(--color-link);
    --color-footer-border: var(--color-border);

    --color-success:       #2e7d32;
    --color-danger:        #d32f2f;
    --color-warning:       #d9a400;
    --color-warning-text:  #b07c00;
    --color-success-bg: #edf7ee;  --color-success-border: #b7dfb9;  --color-success-text: #1e5e22;
    --color-info-bg:    #eef5fd;  --color-info-border:    #b9d6f5;  --color-info-text:    #0b4a8b;
    --color-danger-bg:  #fdf1f1;  --color-danger-border:  #f2c4c4;  --color-danger-text:  #a12121;
    --color-overlay:       rgba(0, 0, 0, 0.45);

    /* ---- Type ------------------------------------------------------------ */
    /* A theme that uses web fonts loads them itself (an @import at the top of
     * its theme.css) and names them here. */
    --font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: var(--font-body);
    --font-sans:    var(--font-body);   /* older name, still used below */
    --heading-weight:         700;
    --heading-color:          var(--color-text);
    --heading-letter-spacing: normal;
    --heading-transform:      none;
    --button-weight:          600;
    --button-transform:       none;
    --button-letter-spacing:  normal;

    --type-headline-5: 700 16px/24px var(--font-heading);
    --type-body-2:     400 14px/20px var(--font-body);

    /* ---- Space, shape, depth --------------------------------------------- */
    --space-1:  4px;
    --space-2:  8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    --radius-sm:     4px;
    --radius-md:     6px;
    --radius-lg:    16px;
    --radius-pill: 999px;   /* time slots, the currency picker, badges */
    --radius-button: var(--radius-md);
    --radius-card:   var(--radius-md);
    --radius-input:  var(--radius-md);

    --shadow-card:  0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-modal: 0 12px 32px rgba(0, 0, 0, 0.18);

    /* ---- Layout ---------------------------------------------------------- */
    --container-max:     1280px;
    --brand-logo-width:   160px;
    --brand-logo-height:   48px;
    --hero-height:        230px;
}

/* Hidden until the theme's stylesheet has loaded (load-theme.js), so the
 * page never shows unthemed. */
html.theme-loading body { visibility: hidden; }

h1, h2, h3, h4,
.section-title, .card-title, .conf-tickets-title {
    font-family: var(--font-heading);
    font-weight: var(--heading-weight);
    color: var(--heading-color);
    letter-spacing: var(--heading-letter-spacing);
    text-transform: var(--heading-transform);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.5;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--color-link); }
a:hover { color: var(--color-link-hov); }

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-5);
    width: 100%;
}

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

.site-header {
    background: var(--color-header-bg);
    color: var(--color-header-fg);
    border-bottom: 1px solid var(--color-header-border);
    padding: var(--space-4) 0;
    flex-shrink: 0;
}

.site-header .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-4);
}

.site-header .nav-left,
.site-header .nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.site-header .nav-right { justify-content: flex-end; }

.brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
/* The logo comes from the theme: its theme.css gives .brand-logo a
 * background-image and sets the size tokens. Without one, the name shows. */
.brand-logo {
    display: none;
    width: calc(var(--brand-logo-width) * var(--brand-logo-scale, 1));
    height: calc(var(--brand-logo-height) * var(--brand-logo-scale, 1));
    background: center / contain no-repeat;
}
.brand-name {
    font: var(--heading-weight) 22px/1.2 var(--font-heading);
    color: var(--color-header-fg);
}

.platform-mark {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}
.platform-mark img {
    width: 36px;
    height: 36px;
    display: block;
}

/* Header currency picker — shown only when the site offers more than one
 * currency to show prices in (sdk.i18n.currencies()). */
.currency-picker {
    height: 32px;
    margin-right: 6px;
    padding: 0 8px;
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-pill);
    background: var(--color-surface);
    color: var(--color-primary);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.currency-picker[hidden] { display: none; }

/* Under a converted total: the prices are approximate; this is what is paid. */
.currency-note {
    margin: 8px 0 0;
    font-size: 13px;
    color: var(--color-text-muted);
}

/* Header icons: the SVG is a mask and the colour is --color-icon, so a
 * theme recolours them with a token. The account and cart icons swap to a
 * filled shape on hover (and the account icon when signed in). */
.header-icon {
    display: inline-block;
    width: 36px;
    height: 36px;
    text-decoration: none;
    background-color: var(--color-icon);
    -webkit-mask: var(--icon) center / 26px no-repeat;
            mask: var(--icon) center / 26px no-repeat;
}
.header-icon:hover { background-color: var(--color-icon-hov); }
.header-icon--account { --icon: url('../assets/icon-account.svg'); }
.header-icon--account:hover,
.header-icon--account.is-authed { --icon: url('../assets/icon-account-hover.svg'); }
.header-icon--cart { --icon: url('../assets/icon-cart.svg'); }
.header-icon--cart:hover { --icon: url('../assets/icon-cart-hover.svg'); }
.header-icon--manage { --icon: url('../assets/icon-search.svg'); }

/* ---- Hero ------------------------------------------------------------- */

.hero {
    min-height: var(--hero-height);
    background: var(--color-hero-fill) center / cover no-repeat;
    flex-shrink: 0;
    display: flex;
    align-items: flex-end;
}
/* The hero's words come from the theme (theme.js, hero); any left empty are
 * hidden. A theme with an image sets .hero's background-image. */
.hero-inner { padding-top: var(--space-6); padding-bottom: var(--space-6); }
.hero-eyebrow {
    margin: 0 0 var(--space-2);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}
.hero-title {
    margin: 0;
    font-size: clamp(32px, 5vw, 56px);
    line-height: 1.05;
}
.hero-sub {
    margin: var(--space-3) 0 0;
    max-width: 40em;
    font-size: 17px;
    color: var(--color-text-muted);
}
.hero [hidden] { display: none; }

/* Hero only shows on the venue grid and ticket listing screens —
 * inner flow steps (datetime, guests, cart, etc.) drop it per Figma. */
body:not(.page-venue):not(.page-tickets) .hero { display: none; }

/* ---- Main / step container -------------------------------------------- */

main {
    flex: 1;
}
/* main is also a .container, whose side padding would otherwise reset these. */
main.container {
    padding-top: var(--space-7);
    padding-bottom: var(--space-7);
}

.section-title {
    margin: 0 0 var(--space-5);
    font-size: 22px;
    font-weight: 600;
}

/* ---- Card grid -------------------------------------------------------- */

.card-grid {
    display: grid;
    gap: var(--space-5);
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
/* auto-fit collapses empty tracks, so a lone card's 1fr stretches it across the
 * whole row (a huge tile). Only in the single-card case, cap the track at the
 * two-up width — (row − one gap) / 2 — so it matches the size of one of a pair.
 * Multi-card grids keep the 1fr flow above (needed for auto-fit to lay out 3+
 * columns; a definite max would force the track count down). */
.card-grid:has(> .card:only-child) {
    grid-template-columns: minmax(220px, calc((100% - var(--space-5)) / 2));
}

.card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.card-image {
    background: var(--color-hero-fill);
    aspect-ratio: 16 / 10;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-image .venue-name {
    color: var(--color-brand);
    font: var(--heading-weight) 24px/1.1 var(--font-heading);
    text-align: center;
}

.card-body {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    flex: 1;
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
}

.card-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin: 0;
    flex: 1;
}

.card-actions {
    padding: 0 var(--space-4) var(--space-4);
    display: flex;
    justify-content: flex-end;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2) var(--space-5);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: var(--button-weight);
    text-transform: var(--button-transform);
    letter-spacing: var(--button-letter-spacing);
    border-radius: var(--radius-button);
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background 0.12s ease, transform 0.12s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--color-primary);
    color: var(--color-primary-fg);
}
.btn-primary:hover { background: var(--color-primary-hov); }

/* ---- Footer ----------------------------------------------------------- */

.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-fg);
    border-top: 1px solid var(--color-footer-border);
    padding: var(--space-5) 0;
    text-align: center;
    font-size: 14px;
    flex-shrink: 0;
}

.site-footer a {
    color: var(--color-footer-link);
    text-decoration: none;
    margin: 0 var(--space-3);
}

.site-footer a:hover { text-decoration: underline; }

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
}
/* A theme shows its logo here by giving .footer-logo a background-image,
 * a size and display: block. */
.footer-logo {
    display: none;
    width: var(--brand-logo-width);
    height: var(--brand-logo-height);
    background: center / contain no-repeat;
}
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; }
.footer-links:empty { display: none; }
.footer-note { margin: 0; font-size: 13px; }
.footer-note[hidden] { display: none; }
.footer-powered {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 12px;
}
.footer-powered img { width: 20px; height: 20px; }

/* ---- Back arrow + title row ------------------------------------------ */

.back-title {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
}

.back-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    color: var(--color-primary);
    text-decoration: none;
    font-size: 18px;
    border-radius: 50%;
}
.back-arrow:hover { background: var(--color-primary-tint); }

/* ---- Product card extras --------------------------------------------- */

.product-card .card-image {
    position: relative;
}

.price-badge {
    position: absolute;
    top: var(--space-3);
    right: var(--space-3);
    background: var(--color-surface);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-3);
    box-shadow: var(--shadow-card);
    text-align: center;
    line-height: 1.1;
    min-width: 64px;
}
.price-badge .price-from {
    display: block;
    font-size: 11px;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.price-badge .price-amt {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: var(--color-text);
}

.product-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-info {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid var(--color-icon);
    cursor: pointer;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* The "i" is a mask in the icon colour, drawn over the button, so the
     * page templates keep their plain <button> markup. */
    color: transparent;
    font-size: 0;
}
.btn-info::before {
    content: "";
    position: absolute;
    inset: 0;
    background-color: var(--color-icon);
    -webkit-mask: url('../assets/icon-info.svg') center / 16px 16px no-repeat;
            mask: url('../assets/icon-info.svg') center / 16px 16px no-repeat;
}
.btn-info:hover { background-color: var(--color-primary-tint); }

/* ---- Breadcrumb ------------------------------------------------------- */

.breadcrumb {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: var(--space-5);
}
.breadcrumb a {
    color: var(--color-link);
    text-decoration: none;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb .sep { margin: 0 var(--space-2); }

/* ---- Date/Time layout ------------------------------------------------ */

.dt-grid {
    display: grid;
    grid-template-columns: 320px 440px 1fr;
    gap: var(--space-6);
    align-items: start;
}

.dt-included {
    margin-top: var(--space-4);
    font-size: 13px;
    color: var(--color-text-muted);
}
.dt-included strong { color: var(--color-text); display: block; margin-top: var(--space-3); }
.dt-included p { margin: var(--space-1) 0 0; }

.dt-summary { /* right column */ }

/* ---- Calendar -------------------------------------------------------- */

.cal {
    /* Bordered card per Figma node 1115:8104 — white bg, 1px G4 border,
     * 16px radius, 4px outer padding. */
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 4px;
}

.cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}
.cal-month {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font: var(--type-headline-5);
    letter-spacing: 0.8px;
    color: var(--color-text);
    padding: 10px var(--space-2);
}
.cal-month::after {
    content: "▾";
    font-size: 11px;
    color: var(--color-text-muted);
    margin-top: 2px;
}
.cal-nav {
    background: url('../assets/icon-chevron-left.svg') no-repeat center / 24px 24px;
    border: none;
    width: 24px; height: 24px;
    color: var(--color-text);
    cursor: pointer;
    margin: var(--space-3);
    flex-shrink: 0;
    padding: 0;
    font-size: 0;
}
.cal-nav.next { transform: rotate(180deg); }
.cal-nav:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.cal-row.dow {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    color: var(--color-text-muted);
    font: var(--type-body-2);
    height: 36px;
}
.cal-row.dow .cal-cell {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px 0;
    margin-top: 0;
}

.cal-cell.day {
    background: transparent;
    border: none;
    font: var(--type-headline-5);
    letter-spacing: 0.8px;
    cursor: pointer;
    padding: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text);
}
.cal-cell.day .day-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border-radius: 50%;
    line-height: 1;
    text-align: center;
}
.cal-cell.day:hover .day-num { background: var(--color-primary-tint); }
.cal-cell.day.past,
.cal-cell.day.unavailable {
    color: var(--color-text-faint);
    cursor: not-allowed;
}
.cal-cell.day.past:hover .day-num,
.cal-cell.day.unavailable:hover .day-num { background: transparent; }
.cal-cell.day.sel .day-num {
    background: var(--color-primary);
    color: var(--color-primary-fg);
}

/* ---- Time slots (inline below calendar) -----------------------------
 * Pill-style picker per the Figma "Available Times" group: 3-column
 * grid of bordered rounded pills, white bg + dark text by default,
 * filled with the primary colour when selected. */

.dt-slots { margin-top: var(--space-6); padding: 0; }
.dt-slots-head {
    text-align: center;
    font: var(--type-headline-5);
    letter-spacing: 0.4px;
    color: var(--color-text);
    margin: 0 0 var(--space-4);
}
.dt-slot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
}
.dt-slot {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    padding: var(--space-2) var(--space-3);
    cursor: pointer;
    color: var(--color-text);
    font: 700 14px/20px var(--font-sans);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.dt-slot:hover:not(:disabled) { border-color: var(--color-primary); }
.dt-slot .dt-slot-time { display: block; }
.dt-slot .dt-slot-cap {
    font: 600 11px/14px var(--font-sans);
    color: var(--color-text-muted);
    letter-spacing: 0.2px;
}
.dt-slot.sel {
    background: var(--color-primary);
    color: var(--color-primary-fg);
    border-color: var(--color-primary);
}
.dt-slot.sel .dt-slot-cap { color: var(--color-primary-fg); opacity: 0.85; }

/* Near capacity — amber accent on the pill + caption. */
.dt-slot.low { border-color: var(--color-warning); }
.dt-slot.low .dt-slot-cap { color: var(--color-warning-text); }
.dt-slot.low.sel { background: var(--color-primary); border-color: var(--color-primary); }

/* Sold out — greyed, non-interactive. */
.dt-slot.sold-out {
    cursor: not-allowed;
    color: var(--color-text-faint);
    background: var(--color-surface);
    border-color: var(--color-border);
}
.dt-slot.sold-out .dt-slot-time { text-decoration: line-through; }
.dt-slot.sold-out .dt-slot-cap { color: var(--color-text-faint); }

/* Near-capacity day marker in the month calendar — small amber dot under the
 * date number. Available days are otherwise unmarked. */
.cal-cell.day.low { position: relative; }
.cal-cell.day.low::after {
    content: "";
    position: absolute;
    bottom: 4px; left: 50%;
    transform: translateX(-50%);
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--color-warning);
}
.cal-cell.day.low.sel::after { background: var(--color-primary-fg); }

/* ---- Datetime summary (right column) -------------------------------- */

.dt-summary-card {
    /* Plain stack — no surrounding card per the Figma */
}
.dt-summary-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-3) 0;
    font-size: 14px;
}
.dt-summary-row .key { color: var(--color-text); font-weight: 600; }
.dt-summary-row .val { color: var(--color-primary); font-weight: 500; }
.dt-summary-rule {
    border: none;
    border-top: 1px solid var(--color-divider);
    margin: 0;
}
.dt-summary-cta {
    width: 100%;
    margin-top: var(--space-5);
}
.dt-summary-cta:disabled {
    background: var(--color-primary-disabled);
    color: var(--color-primary-fg);
    cursor: not-allowed;
}

.g-rows { display: flex; flex-direction: column; gap: var(--space-3); }

.cal-icon {
    display: inline-block;
    width: 22px;
    height: 22px;
    margin-right: var(--space-2);
    vertical-align: -4px;
    background-color: var(--color-icon);
    -webkit-mask: url('../assets/icon-calendar.svg') center / contain no-repeat;
            mask: url('../assets/icon-calendar.svg') center / contain no-repeat;
}

/* ---- Guests / quantity layout --------------------------------------- */

.g-grid {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    gap: var(--space-6);
    align-items: start;
}

/* One outer card for all guest rows per Figma node 1129:12991 —
 * not per-row borders. White surface, G4 border, 16px radius. */
.g-rows {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 0 var(--space-4);
}

.g-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) 0;
}
.g-row + .g-row { border-top: 1px solid var(--color-divider); }

.g-row-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.g-row-name {
    font: var(--type-body-2);
    color: var(--color-text);
}
.g-row-price {
    /* Caption from the design system tokens — 12/16, G2. */
    font: 400 12px/16px var(--font-sans);
    color: var(--color-text-muted);
}

/* Quantity stepper: minus / number-field / plus.
 * Each control sits in a 40px hit area; the visual circle/box
 * is centered and 24px (steppers) or 40px (number field). */
.qty-stepper {
    display: flex;
    align-items: center;
    gap: 0;
}
.qty-step {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    position: relative;
    /* The 24px circle outline + icon inside the 40px hit box */
    background-position: center;
    background-repeat: no-repeat;
    background-size: 12px 12px;
}
.qty-step::before {
    content: "";
    position: absolute;
    width: 24px;
    height: 24px;
    border: 2px solid var(--color-text-muted);
    border-radius: 50%;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
}
.qty-step.plus  { background-image: url('../assets/icon-plus.svg'); }
.qty-step.minus { background-image: url('../assets/icon-minus.svg'); background-size: 10px 2px; }
.qty-step.is-disabled { cursor: not-allowed; }
.qty-step.is-disabled::before { border-color: var(--color-text-faint); }   /* G3 */
.qty-step.is-disabled { filter: opacity(0.45); }

.qty-field {
    width: 40px;
    height: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-text-faint);
    border-radius: var(--radius-input);
    display: flex;
    align-items: center;
    justify-content: center;
    font: var(--type-body-2);
    color: var(--color-text);
}

.g-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
    font-size: 14px;
}
.g-sum-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-2);
}
.g-sum-row.total {
    font-weight: 700;
    font-size: 16px;
}
.g-sum-rule {
    border: none;
    border-top: 1px solid var(--color-divider);
    margin: var(--space-3) 0;
}
.g-add-btn {
    width: 100%;
    margin-top: var(--space-4);
}

.add-icon { --icon: url('../assets/icon-account.svg'); }

/* A small icon beside a heading, drawn as a mask in the icon colour so a
 * theme recolours it with --color-icon (an emoji would keep the platform's
 * own artwork). */
.heading-icon {
    display: inline-block;
    flex: none;
    width: 1em;
    height: 1em;
    margin-right: var(--space-2);
    vertical-align: -0.12em;
    background-color: var(--color-icon);
    -webkit-mask: var(--icon) center / contain no-repeat;
            mask: var(--icon) center / contain no-repeat;
}


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

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-5);
}
.cart-count { font-size: 14px; color: var(--color-text-muted); }
.cart-header .section-title { margin-bottom: 0; }
.cart-icon-sm { --icon: url('../assets/icon-cart.svg'); }

.cart-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-6);
    align-items: start;
}

.cart-item {
    display: grid;
    grid-template-columns: 100px 1fr auto;
    gap: var(--space-4);
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-3);
    align-items: center;
}
.cart-item-img {
    width: 100px; height: 80px;
    background-color: var(--color-hero-fill);
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-sm);
}
.cart-item-title { font-size: 15px; font-weight: 700; margin: 0 0 var(--space-1); }
.cart-item-meta { font-size: 12px; color: var(--color-text-muted); margin: 0; }
.cart-item-end {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--space-2);
}
.cart-item-price { font-weight: 700; }
.cart-item-remove {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-text-muted);
    font-size: 16px;
}
.cart-item-remove:hover { color: var(--color-text); }

.cart-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}

.totals-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-3);
}
.totals-row.total {
    font-weight: 700;
    font-size: 16px;
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-divider);
}

.voucher {
    display: flex;
    gap: var(--space-2);
    margin: var(--space-4) 0;
}
.voucher input {
    flex: 1;
    /* Without min-width:0 a flex text input keeps its intrinsic ~20ch width
       and won't shrink, tipping the row into overflow so the Apply button
       spills over the .cart-summary border. */
    min-width: 0;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font: inherit;
}
.voucher-msg {
    font-size: 13px;
    margin-top: var(--space-2);
    min-height: 1em;
}
.voucher-msg.ok  { color: var(--color-success); }
.voucher-msg.err { color: var(--color-danger); }

.cart-cta { width: 100%; margin-top: var(--space-3); }

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}
.btn-secondary:hover { background: var(--color-primary-tint); }

/* ---- Upsell ---------------------------------------------------------- */

.upsell-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-6);
    align-items: start;
}
.upsell-cards { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.upsell-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-4) var(--space-4);
}

.upsell-summary {
    position: sticky;
    top: var(--space-4);
}

/* ---- Checkout (personal + payment) ----------------------------------- */

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: var(--space-6);
    align-items: start;
}

.checkout-form {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-7);
}

.step-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    margin-bottom: var(--space-7);
    font-size: 14px;
}
.step-active   { font-weight: 700; color: var(--color-text); }
.step-future   { color: var(--color-text-muted); }
.step-done a   { color: var(--color-primary); text-decoration: none; }
.step-done a:hover { text-decoration: underline; }
.step-line {
    width: 60px;
    height: 1px;
    background: var(--color-text-muted);
    display: inline-block;
}

.form-heading {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 var(--space-2);
}
.form-sub { color: var(--color-text-muted); margin: 0 0 var(--space-5); font-size: 13px; }

.sf-form { display: flex; flex-direction: column; gap: var(--space-4); }
.field {
    display: block;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    transition: border 0.12s ease;
}
.field:focus-within { border-color: var(--color-primary); }
.field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: var(--space-1);
}
.field input {
    width: 100%;
    border: none;
    outline: none;
    font: inherit;
    color: var(--color-text);
    background: transparent;
}

.form-cta { width: 100%; margin-top: var(--space-3); padding: var(--space-3) var(--space-5); font-size: 16px; }

/* ---- Payment specifics ---------------------------------------------- */

.gift-add {
    width: 100%;
    background: transparent;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    cursor: not-allowed;
    text-align: left;
    color: var(--color-text-muted);
    font: inherit;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}
.gift-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.pay-methods {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}
.pay-method {
    display: flex;
    align-items: center;
    padding: var(--space-4);
    border-bottom: 1px solid var(--color-divider);
    cursor: pointer;
    gap: var(--space-3);
}
.pay-method:last-child { border-bottom: none; }
.pay-method.selected { background: var(--color-primary-tint); }
.pay-method.disabled { color: var(--color-text-muted); cursor: not-allowed; }
.pay-method input { accent-color: var(--color-primary); }

/* Card fields in the page: the payment provider puts its own iframes in these
   two boxes. N-Genius's card iframe is height:100%, so the box needs a real
   height (not min-height) or the frame falls back to 150px and scrolls. Its
   four fields — number, expiry, CVV, card holder — need about 240px. */
.card-fields {
    height: 250px;
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}
.pay-step:empty { display: none; }
.pay-step {
    margin-top: var(--space-4);
    display: flex;
    justify-content: center;
}
.pay-step iframe { max-width: 100%; }
.lock-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: var(--space-1);
    vertical-align: -3px;
}

/* ---- Cart-timer + summary aside ------------------------------------- */

.checkout-summary { position: sticky; top: var(--space-4); }

.cart-timer {
    background: var(--color-danger-bg);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-3);
    color: var(--color-danger-text);
    font-size: 13px;
}
.cart-timer-label { display: block; font-size: 12px; }
.cart-timer-val {
    font-size: 18px;
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}
.cart-timer-icon {
    width: 18px;
    height: 18px;
    /* SVG inherits via fill="var(--fill-0, currentColor)"; the timer
     * lives on a red-tinted background, so let it pick up the
     * surrounding text color. */
    filter: brightness(0) saturate(100%) invert(15%) sepia(86%) saturate(2657%) hue-rotate(347deg) brightness(91%) contrast(96%);
}

/* ---- Confirmation --------------------------------------------------- */

.conf-grid {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: var(--space-6);
    align-items: start;
}

.conf-title { margin: 0 0 var(--space-3); font-size: 28px; }
.conf-meta { margin: 0; font-size: 13px; }
.conf-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-top: var(--space-4);
}
.conf-card-row { display: grid; grid-template-columns: 80px 1fr; gap: var(--space-4); align-items: start; }
.conf-card-key { font-size: 11px; color: var(--color-text-muted); letter-spacing: 0.04em; }
.conf-card-row strong { display: block; }
.conf-card-meta { display: block; font-size: 12px; color: var(--color-text-muted); margin-top: var(--space-1); }

.conf-cta { display: inline-flex; margin-right: var(--space-3); margin-top: var(--space-4); }

.conf-summary {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-5);
}
.conf-summary-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}
.conf-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-divider);
}
.conf-line:last-child { border-bottom: none; }
.conf-line-body { display: flex; flex-direction: column; gap: var(--space-1); }
.conf-line-meta { font-size: 12px; color: var(--color-text-muted); }
.conf-line-date { color: var(--color-primary); }
.conf-line-end { text-align: right; display: flex; flex-direction: column; gap: var(--space-1); }

/* ---- Placeholder utility --------------------------------------------- */

.placeholder {
    padding: var(--space-7) var(--space-5);
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: var(--radius-md);
    text-align: center;
    color: var(--color-text-muted);
}

/* ---- Auth (sign-in / register / forgot / account) -------------------- */

.auth-card {
    max-width: 440px;
    margin: var(--space-6) auto;
    padding: var(--space-6);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.auth-title {
    margin: 0 0 var(--space-2);
    font-size: 24px;
    font-weight: 700;
    color: var(--color-text);
}

.auth-sub {
    margin: 0 0 var(--space-5);
    color: var(--color-text-muted);
    font-size: 14px;
}

.auth-msg {
    margin-bottom: var(--space-4);
    font-size: 13px;
    color: var(--color-danger);
    min-height: 1em;
}
.auth-msg-success { color: var(--color-success); }

.auth-links {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-top: var(--space-5);
    font-size: 14px;
}
.auth-links a {
    color: var(--color-primary);
    text-decoration: none;
}
.auth-links a:hover { text-decoration: underline; }

/* ---- Checkout identity chooser --------------------------------------- */

.checkout-chooser {
    display: flex;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: var(--space-5);
}
.chooser-tab {
    flex: 1;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 0;
    border-right: 1px solid var(--color-border);
    font: inherit;
    font-size: 14px;
    color: var(--color-text);
    cursor: pointer;
    text-align: center;
}
.chooser-tab:last-child { border-right: 0; }
.chooser-tab.active {
    background: var(--color-primary);
    color: var(--color-primary-fg);
}

.chooser-form {
    margin-bottom: var(--space-6);
    padding: var(--space-5);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

/* ---- Account page ---------------------------------------------------- */

.account-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-5);
    margin: var(--space-5) 0;
}
@media (max-width: 720px) {
    .account-grid { grid-template-columns: 1fr; }
}

.account-card {
    padding: var(--space-6);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}

.account-meta {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: var(--space-2) var(--space-4);
    margin: var(--space-4) 0 var(--space-5);
    font-size: 14px;
}
.account-meta dt { color: var(--color-text-muted); }
.account-meta dd { margin: 0; color: var(--color-text); }

.account-order {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}
.account-order:last-child { border-bottom: 0; }
.account-order-date {
    margin-left: var(--space-3);
    color: var(--color-text-muted);
    font-size: 13px;
}
/* An order row links to its detail when a SaleId is present. */
a.account-order {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: background 0.12s ease;
}
a.account-order:hover { background: var(--color-divider); }
a.account-order::after {
    content: '›';
    margin-left: var(--space-3);
    color: var(--color-text-muted);
}

/* ---- Order detail: tickets ------------------------------------------- */

.account-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-top: var(--space-4);
}

/* ---- Pass holder forms (one fieldset per holder) --------------------- */

.holder-block {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-4);
}
.holder-block legend {
    font-size: 12px;
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 0 var(--space-2);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ---- My passes ------------------------------------------------------- */

.passes-profile {
    display: flex;
    gap: var(--space-4);
    align-items: center;
    margin-top: var(--space-4);
}
.passes-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--color-surface-muted);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 36px;
}
.passes-avatar img { width: 100%; height: 100%; object-fit: cover; }

.passes-profile-meta { flex: 1; min-width: 0; }
.passes-profile-meta strong { display: block; margin-bottom: var(--space-1); }

.loyalty-panel {
    margin-top: var(--space-5);
    padding: var(--space-4) var(--space-5);
    background: var(--color-primary);
    color: var(--color-primary-fg);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}
.loyalty-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.8;
}
.loyalty-balance {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.1;
    margin-top: var(--space-1);
}
.loyalty-expiry {
    font-size: 13px;
    text-align: right;
    opacity: 0.9;
}

.passes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-3);
}
.pass-card {
    text-align: center;
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.pass-qr {
    width: 100%;
    max-width: 180px;
    aspect-ratio: 1 / 1;
    display: block;
    margin: 0 auto var(--space-3);
}
.pass-name {
    font-weight: 600;
    color: var(--color-text);
}
.pass-meta {
    font-size: 12px;
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}
.pass-renew {
    width: 100%;
    margin-top: var(--space-3);
}
.pass-terms {
    margin-top: var(--space-1);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--color-primary);
}

/* ---- Renew-pass modal ------------------------------------------------- */
.sf-modal-overlay {
    position: fixed;
    inset: 0;
    background: var(--color-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    z-index: 1000;
}
.sf-modal {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-modal);
    padding: var(--space-6);
    width: 100%;
    max-width: 420px;
}
.sf-modal:focus { outline: none; }
.sf-modal .section-title {
    margin: 0 0 var(--space-4);
}
.sf-modal .btn {
    width: 100%;
    margin-top: var(--space-2);
}
.sf-modal .cal {
    margin: var(--space-3) 0;
}
.sf-modal .dt-slot-grid {
    margin: var(--space-3) 0;
}
.sf-change-sessions-head {
    font: var(--type-headline-5);
    letter-spacing: 0.4px;
    color: var(--color-text);
    margin: var(--space-2) 0 0;
}
.renew-opt {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
}
.renew-opt span { flex: 1; }
.renew-opt strong { color: var(--color-text); }
.renew-opt.single { background: var(--color-divider); }
.renew-receipt {
    margin: var(--space-3) 0 var(--space-4);
}
.renew-receipt div {
    display: flex;
    justify-content: space-between;
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-divider);
    font-size: 14px;
}
.renew-receipt span { color: var(--color-text-muted); }

.related-block {
    padding: var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}
.related-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: var(--space-3);
    gap: var(--space-3);
    flex-wrap: wrap;
}
.related-header h3 { font-size: 16px; font-weight: 600; margin: 0; color: var(--color-text); }
.related-header .pill {
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    background: var(--color-primary);
    color: var(--color-primary-fg);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.placeholder h2 { margin-top: 0; color: var(--color-text); }

/* ---- Wallet ------------------------------------------------------------ */

.wallet-page { margin: var(--space-5) 0; }
.wallet-back {
    display: inline-block;
    margin-bottom: var(--space-3);
    color: var(--color-primary);
    text-decoration: none;
    font-size: 14px;
}
.wallet-back:hover { text-decoration: underline; }

.wallet-notice {
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: var(--space-4);
    border: 1px solid transparent;
}
.wallet-notice-success { background: var(--color-success-bg); border-color: var(--color-success-border); color: var(--color-success-text); }
.wallet-notice-info    { background: var(--color-info-bg);    border-color: var(--color-info-border);    color: var(--color-info-text); }
.wallet-notice-error   { background: var(--color-danger-bg);  border-color: var(--color-danger-border);  color: var(--color-danger-text); }

.wallet-balance {
    font-size: 40px;
    line-height: 48px;
    font-weight: 700;
    color: var(--color-brand);
    margin: var(--space-2) 0 var(--space-3);
}

.wallet-presets {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}
.wallet-preset {
    flex: 1 1 0;
    min-width: 72px;
    padding: var(--space-3) var(--space-4);
    font: inherit;
    font-weight: 600;
    color: var(--color-text);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
}
.wallet-preset:hover { border-color: var(--color-primary); }
.wallet-preset.selected {
    border-color: var(--color-primary);
    background: var(--color-primary-tint);
    color: var(--color-primary);
}
.wallet-terms { margin: var(--space-3) 0 0; }

.wallet-activity { margin-bottom: var(--space-5); }
.wallet-activity-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 14px;
}
.wallet-activity-row:last-of-type { border-bottom: 0; }
.wallet-activity-label { color: var(--color-text); }
.wallet-activity-date { color: var(--color-text-muted); font-size: 12px; margin-top: 2px; }
.wallet-activity-amount { font-weight: 600; color: var(--color-text); white-space: nowrap; }
.wallet-activity-amount.is-credit { color: var(--color-success); }
.wallet-more { margin-top: var(--space-4); }

/* Payment step: paying from the wallet. */
.wallet-option { justify-content: space-between; }
.wallet-option .pay-method-name { flex: 1; }
.wallet-available { color: var(--color-text-muted); font-size: 13px; }
.g-sum-row.wallet .g-sum-val { color: var(--color-success); }

/* ---- Tickets with their QR codes (confirmation, a booking's page) -------- */
.conf-tickets { margin: var(--space-5) 0; }
.conf-tickets-title { margin: 0 0 var(--space-2); font-size: 20px; }
.ticket-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-3);
}
.ticket-card {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
    padding: var(--space-3);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
}
.ticket-qr {
    flex: none;
    width: 112px;
    height: 112px;
    background: #ffffff;           /* a QR code needs a light ground to scan */
    image-rendering: pixelated;
}
.ticket-qr--none { background: var(--color-surface-muted); }
.ticket-info { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ticket-name { font-size: 15px; }
.ticket-meta { font-size: 13px; color: var(--color-text-muted); }
.ticket-code {
    margin-top: var(--space-1);
    font-size: 12px;
    letter-spacing: 0.04em;
    color: var(--color-text-muted);
    font-variant-numeric: tabular-nums;
}
.ticket-action { margin-top: var(--space-2); align-self: flex-start; }

/* ---- Responsive ------------------------------------------------------- *
 * The pages are laid out for a desktop first; these narrow them. Three
 * widths (media queries cannot read custom properties, so the numbers are
 * here and in README.md, "Themes"):
 *
 *   1100px  the three-column booking steps (date & time, guests) put the
 *           chosen ticket above, and keep the other two side by side
 *    900px  the two-column pages (cart, add-ons, checkout, confirmation)
 *           stack: content first, the summary under it (checkout: the
 *           summary and its timer first, so the hold is seen)
 *    600px  phones: one column everywhere, tighter spacing, smaller
 *           headings, the chosen ticket as a compact card
 */
@media (max-width: 1100px) {
    .dt-grid,
    .g-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: var(--space-5);
    }
    .dt-grid > .dt-left,
    .g-grid > .g-col:first-child { grid-column: 1 / -1; }
    .dt-grid > .dt-left .card,
    .g-grid > .g-col:first-child .card { max-width: 520px; }
    /* Above the choice, the chosen ticket is a reminder, not a picture: a
     * short band. */
    .dt-ticket .card-image { aspect-ratio: auto; height: 72px; }
    .dt-ticket .price-badge { top: var(--space-2); right: var(--space-2); }
}

@media (max-width: 900px) {
    .cart-grid,
    .upsell-grid,
    .checkout-grid,
    .conf-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
    .checkout-summary,
    .upsell-summary { position: static; }
    .checkout-summary { order: -1; }
}

@media (max-width: 600px) {
    /* Scales rather than sizes: a theme sets the logo's size and spacing,
     * and its :root would win over this one. */
    :root {
        --space-7: 32px;
        --brand-logo-scale: 0.78;
    }
    .container { padding: 0 var(--space-4); }
    main.container { padding-top: var(--space-5); padding-bottom: var(--space-6); }
    .site-header .nav-right { gap: var(--space-2); }
    .header-icon { width: 32px; height: 32px; }
    .section-title { font-size: 20px; margin-bottom: var(--space-4); }
    .breadcrumb { margin-bottom: var(--space-4); }

    /* One column: ticket, then the choice, then the summary. */
    .dt-grid,
    .g-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
    .dt-grid > .dt-left .card,
    .g-grid > .g-col:first-child .card { max-width: none; }

    .dt-slots { margin-top: var(--space-5); }

    .card-grid,
    .card-grid:has(> .card:only-child) { grid-template-columns: minmax(0, 1fr); }

    .cart-item {
        grid-template-columns: 64px minmax(0, 1fr) auto;
        gap: var(--space-3);
        padding: var(--space-3);
    }
    .cart-item-img { width: 64px; height: 52px; }

    .checkout-form { padding: var(--space-5) var(--space-4); }
    .chooser-tab { padding: var(--space-3) var(--space-2); font-size: 13px; }

    .conf-title { font-size: 24px; }
    .conf-card { padding: var(--space-4); }
    .conf-card-row { grid-template-columns: minmax(0, 1fr); gap: var(--space-1); }

    .ticket-list { grid-template-columns: minmax(0, 1fr); }
    .ticket-qr { width: 96px; height: 96px; }

    .account-card { padding: var(--space-5) var(--space-4); }
    /* A week must fit the dialog's narrower width as well as the page's. */
    .cal-cell.day { padding: 2px 0; }
    .sf-modal { padding: var(--space-5) var(--space-4); max-height: calc(100vh - 2 * var(--space-4)); overflow-y: auto; }
}

} /* @layer base */
