/* =======================================================================
   Tavannas Kebab — design system
   "Modern glass" (2026-09) — committed dark theme, translucent glass-card
   surfaces, rounded sans-serif type, red→gold gradient accents. Built
   around the shop's own logo palette (near-black / terracotta / red /
   gold) — same brand hues as before, restyled from warm-cream-and-cards
   to dark-and-glass. No external fonts/assets — system font stack only,
   CSP stays locked to 'self'.
   ======================================================================= */

:root {
    /* Brand */
    --red: #c1272d;
    --red-dark: #9c1f24;
    --terracotta: #b5652b;
    --gold: #d9a441;
    --ink: #1c1410;

    /* Surface — dark by design, this is the brand now, not a
       prefers-color-scheme fallback */
    --bg: #2a201b;
    --surface: #2e231c;
    --surface-2: #36291f;
    --border: #3a2c22;
    --text: #f3e9dc;
    --text-muted: #b7a794;

    /* System */
    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35), 0 1px 1px rgba(0, 0, 0, 0.25);
    --shadow: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 20px 48px -12px rgba(0, 0, 0, 0.6);
    --success: #4caf50;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* -----------------------------------------------------------------------
   Light animations — subtle entrance/hover polish, all respect
   prefers-reduced-motion via the override above.
   ----------------------------------------------------------------------- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
main { animation: fadeInUp 0.5s ease both; }
.menu-item { animation: fadeInUp 0.45s ease both; }
.menu-item:nth-child(2) { animation-delay: 0.04s; }
.menu-item:nth-child(3) { animation-delay: 0.08s; }
.menu-item:nth-child(4) { animation-delay: 0.12s; }
.menu-item:nth-child(5) { animation-delay: 0.16s; }
.menu-item:nth-child(6) { animation-delay: 0.2s; }
.menu-item:nth-child(7) { animation-delay: 0.24s; }
.menu-item:nth-child(8) { animation-delay: 0.28s; }

img { max-width: 100%; height: auto; display: block; }

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }

a { color: inherit; }

:focus-visible {
    outline: 2px solid var(--red);
    outline-offset: 2px;
    border-radius: 4px;
}

/* -----------------------------------------------------------------------
   Header
   ----------------------------------------------------------------------- */
.site-header {
    /* Grid, not flex: with flex + justify-content:space-between, once the
       search box (flex-grow) hits its max-width cap, the leftover grow
       space has nowhere defined to go and just sits as a gap next to it
       instead of re-centering it — real bug, seen live at desktop widths.
       A 3-column grid with the middle column fr-sized guarantees the
       search box sits at the true midpoint between brand and nav,
       regardless of how wide either side is. */
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: var(--space-4);
    padding: 12px 28px;
    background: rgba(28, 20, 16, 0.86);
    backdrop-filter: blur(10px) saturate(1.2);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.site-header .brand { display: flex; align-items: center; flex-shrink: 0; justify-self: start; }
.brand-logo { height: 46px; width: auto; display: block; border-radius: 50%; }

.header-right { display: flex; align-items: center; gap: var(--space-4); flex-shrink: 0; justify-self: end; }

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}
.nav-toggle:hover { background: rgba(255, 255, 255, 0.1); }

.main-nav { display: flex; align-items: center; gap: 22px; }

.main-nav a {
    color: #fff;
    text-decoration: none;
    opacity: 0.82;
    font-weight: 500;
    font-size: 0.95rem;
    transition: opacity 0.15s ease;
}
.main-nav a:hover { opacity: 1; }

/* Logout is a POST+CSRF form, not a link (AUDIT_SECURITE.md point 4,
   2026-09-30) — display:contents lets the <button> sit directly among
   the nav's flex items so spacing/wrapping match the <a> siblings. */
.nav-logout-form { display: contents; }
.nav-logout-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #fff;
    text-decoration: none;
    opacity: 0.82;
    font-weight: 500;
    font-size: 0.95rem;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s ease;
}
.nav-logout-btn:hover { opacity: 1; }

.promo-banner {
    background: var(--gold);
    color: var(--ink);
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 10px 16px;
    letter-spacing: 0.01em;
}

.nav-cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.nav-cart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--ink);
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1;
}

.lang-switch { display: flex; gap: 2px; background: rgba(255,255,255,0.08); border-radius: 999px; padding: 3px; }
.lang-switch a {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}
.lang-switch a.active { background: var(--red); opacity: 1; }

/* -----------------------------------------------------------------------
   Header search
   ----------------------------------------------------------------------- */
.header-search-wrap {
    /* Grid item (see .site-header) — sits in the middle `auto` column, so
       it's sized to its own content/max-width and centered by the grid
       itself, not by flex-grow + margin:auto. */
    position: relative;
    min-width: 0;
    max-width: 400px;
    width: 100%;
    display: flex;
    justify-content: center;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    padding: 4px 6px 4px 16px;
    width: 100%;
    max-width: 360px;
}
.header-search input {
    background: none;
    border: none;
    outline: none;
    color: #fff;
    flex: 1;
    min-width: 0;
    font-size: 0.9rem;
}
.header-search input::placeholder { color: rgba(255, 255, 255, 0.6); }
.header-search button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px 10px;
    border-radius: 999px;
    line-height: 1;
}
.header-search button:hover { background: rgba(255, 255, 255, 0.15); }

/* Live suggest dropdown */
.search-suggest {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    background: var(--surface);
    color: var(--text);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 40;
}
.search-suggest-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
}
.search-suggest-item:last-child { border-bottom: none; }
.search-suggest-thumb {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-2);
}
.search-suggest-thumb--placeholder { display: block; }
.search-suggest-main {
    /* Wrap into two rows (name+price, then actions) instead of a single
       row — at the header search box's width, name + both buttons side
       by side left almost no room for the name, truncating it down to
       2-3 characters ("Ta...") — real bug, seen live. */
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px var(--space-3);
}
.search-suggest-info { display: flex; flex-direction: column; gap: 2px; flex: 1 1 100%; min-width: 0; color: inherit; text-decoration: none; }
.search-suggest-name { font-weight: 600; font-size: 0.9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-suggest-price { font-size: 0.8rem; color: var(--text-muted); }
.search-suggest-actions { display: flex; gap: 6px; flex: 1 1 100%; justify-content: flex-end; }
.search-suggest-actions form { margin: 0; }
.search-suggest-view, .search-suggest-add {
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}
.search-suggest-view { background: var(--surface-2); color: var(--text); }
.search-suggest-view:hover { background: var(--border); }
.search-suggest-add { background: var(--red); color: #fff; }
.search-suggest-add:hover { filter: brightness(1.08); }
.search-suggest-empty { padding: 14px; color: var(--text-muted); font-size: 0.85rem; text-align: center; }

/* -----------------------------------------------------------------------
   Search results
   ----------------------------------------------------------------------- */
.search-count { color: var(--text-muted); margin-bottom: var(--space-4); }
.search-result-link { display: block; color: inherit; text-decoration: none; }
.search-result-actions { padding: 0 var(--space-4) var(--space-4); }
.search-result-actions form { margin: 0; }
.search-result-actions .checkout-btn { display: block; width: 100%; text-align: center; }

/* -----------------------------------------------------------------------
   Layout
   ----------------------------------------------------------------------- */
main {
    max-width: 1080px;
    margin: 0 auto;
    padding: var(--space-6) var(--space-5) 80px;
}

/* -----------------------------------------------------------------------
   Breadcrumbs
   ----------------------------------------------------------------------- */
.breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: var(--space-5);
}
.breadcrumbs a { color: var(--text-muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--red); text-decoration: underline; }
.breadcrumbs .sep { opacity: 0.5; }
.breadcrumbs .current { color: var(--text); font-weight: 600; }

/* -----------------------------------------------------------------------
   Toast (add-to-cart confirmation)
   ----------------------------------------------------------------------- */
.toast {
    /* Top-right on desktop (PC), bottom-center on mobile (media query
       below re-anchors it) — per explicit request. */
    position: fixed;
    top: 20px;
    right: 20px;
    left: auto;
    bottom: auto;
    transform: translateY(-16px);
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    width: max-content;
    max-width: min(400px, calc(100vw - 32px));
    /* Same translucent glass treatment as .site-header on scroll. */
    background: rgba(28, 20, 16, 0.86);
    backdrop-filter: blur(10px) saturate(1.2);
    -webkit-backdrop-filter: blur(10px) saturate(1.2);
    color: #fff;
    padding: 14px 18px 17px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    overflow: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translateY(0); pointer-events: auto; }
.toast-msg { font-weight: 600; font-size: 0.9rem; }
.toast-actions { display: flex; gap: 8px; margin-left: auto; }
.toast-actions a, .toast-actions button {
    padding: 7px 15px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    border: none;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.toast-cta { background: var(--red); color: #fff; }
.toast-cta:hover { filter: brightness(1.08); }
.toast-dismiss { background: rgba(255,255,255,0.15); color: #fff; }
.toast-dismiss:hover { background: rgba(255,255,255,0.25); }

.toast-progress {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 3px;
    background: rgba(255,255,255,0.12);
}
.toast-progress span {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--gold);
    transform: scaleX(1);
    transform-origin: left;
}
.toast-progress span.run { animation: toast-shrink 10s linear forwards; }
@keyframes toast-shrink {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}
@media (prefers-reduced-motion: reduce) {
    .toast-progress span.run { animation: none; }
}

/* -----------------------------------------------------------------------
   Hero
   ----------------------------------------------------------------------- */
.hero {
    position: relative;
    text-align: center;
    padding: 110px 16px;
    background-size: cover;
    background-position: center;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-6);
    isolation: isolate;
    overflow: hidden;
}

/* Path is relative to this stylesheet (public/assets/css/), not the page,
   so it works regardless of deploy path — and keeps this out of an inline
   style="" attribute, which a nonce-based CSP blocks. */
.hero-home { background-image: url('../img/image-inside-kebab-man-cutting.png'); }

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(28,20,16,0.35) 0%, rgba(28,20,16,0.75) 100%);
}

.hero-overlay {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-5) var(--space-6);
}

.hero-overlay h1 {
    color: #fff;
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.75rem);
    font-weight: 800;
    text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-cta {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(90deg, var(--red) 0%, var(--terracotta) 100%);
    color: #fff;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 8px 20px -6px rgba(193, 39, 45, 0.6);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.hero-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -6px rgba(217, 164, 65, 0.5); }

/* -----------------------------------------------------------------------
   Category quick-nav (sticky pill chips)
   ----------------------------------------------------------------------- */
.category-nav {
    position: sticky;
    top: 70px;
    z-index: 20;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: var(--space-3) 2px var(--space-4);
    margin-bottom: var(--space-2);
    background: linear-gradient(var(--bg) 65%, transparent);
    scrollbar-width: none;
}
.category-nav::-webkit-scrollbar { display: none; }

.category-nav a {
    flex: 0 0 auto;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.09);
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.category-nav a:hover { border-color: var(--red); color: var(--red); background: rgba(193, 39, 45, 0.1); }

/* -----------------------------------------------------------------------
   Menu
   ----------------------------------------------------------------------- */
.menu-category { scroll-margin-top: 130px; }

.menu-category h2 {
    display: inline-block;
    margin: var(--space-6) 0 var(--space-4);
    padding-bottom: 6px;
    border-bottom: 3px solid var(--red);
    font-size: 1.4rem;
}

.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-5);
}

.menu-item {
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    overflow: hidden;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.menu-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(217, 164, 65, 0.35); }
.menu-item-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.menu-item-body { padding: var(--space-4); display: flex; flex-direction: column; gap: 4px; flex: 1; }
.menu-item h3 { margin: 0; font-size: 1.02rem; }
.menu-item-desc { color: var(--text-muted); font-size: 0.85rem; margin: 0; flex: 1; }
.menu-item-price {
    align-self: flex-start;
    margin-top: 6px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(217, 164, 65, 0.12);
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--gold);
}

/* -----------------------------------------------------------------------
   Product detail / add-to-cart form
   ----------------------------------------------------------------------- */
.product-detail { max-width: 680px; margin: 0 auto; }
.product-detail-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    box-shadow: var(--shadow);
}
.product-desc { color: var(--text-muted); }
.product-base-price { font-size: 1.4rem; font-weight: 800; color: var(--red-dark); margin: 4px 0 var(--space-4); }

/* Option groups — native <details>/<summary> accordion: free keyboard
   support + no JS needed just to open/close, avoids <fieldset>/<legend>'s
   inconsistent cross-browser box model (the old alignment bugs). */
.option-group {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: var(--space-3) var(--space-4);
    margin-bottom: var(--space-4);
}

.option-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 6px 4px;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
}
.option-group summary::-webkit-details-marker { display: none; }
.option-group summary::after {
    content: "";
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    margin-left: 4px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}
.option-group[open] summary::after { transform: rotate(-135deg); }

.option-group-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.option-group summary small { color: var(--text-muted); font-weight: 500; font-size: 0.8rem; white-space: nowrap; }

.required {
    color: var(--red);
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: color-mix(in srgb, var(--red) 12%, transparent);
    padding: 2px 8px;
    border-radius: 999px;
}

.option-group-body { padding-top: 4px; }

.option-line {
    display: grid;
    grid-template-columns: 20px 1fr auto;
    align-items: start;
    gap: 10px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border);
    border-radius: 8px;
    transition: background 0.12s ease;
}
.option-line:hover { background: var(--surface-2); }
.option-line--checkbox { grid-template-columns: 20px 1fr; }
.option-line:last-of-type { border-bottom: none; }
/* `.option-line{display:grid}` above otherwise beats the browser's own
   [hidden]{display:none} at equal specificity (author style wins over the
   UA stylesheet) — this is what silently broke "Voir plus/moins". */
.option-line[hidden] { display: none; }
.option-line input { accent-color: var(--red); width: 18px; height: 18px; margin-top: 2px; }
.option-price { font-size: 0.85rem; color: var(--text-muted); font-weight: 600; white-space: nowrap; }
.option-free { color: var(--success); }

.option-line-payment-main { display: flex; flex-direction: column; gap: 6px; }
.payment-brands { display: flex; flex-wrap: wrap; gap: 6px; }
.payment-brand {
    display: inline-flex;
    align-items: center;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 1.4;
    white-space: nowrap;
}
.payment-brand--visa { background: #1434cb; color: #fff; font-style: italic; }
.payment-brand--mastercard { background: #fff; color: #16171a; border: 1px solid var(--border); gap: 4px; }
.payment-brand-dots { position: relative; width: 18px; height: 11px; display: inline-block; }
.payment-brand-dots::before,
.payment-brand-dots::after { content: ''; position: absolute; top: 0; width: 11px; height: 11px; border-radius: 50%; }
.payment-brand-dots::before { left: 0; background: #eb001b; }
.payment-brand-dots::after { left: 7px; background: #f79e1b; mix-blend-mode: multiply; }
.payment-brand--applepay { background: #000; color: #fff; }
.payment-brand--googlepay { background: #fff; color: #3c4043; border: 1px solid var(--border); }
.payment-brand--paypal { background: #fff; color: #003087; border: 1px solid var(--border); }
/* Lot 2 step C (2026-10-22): badges a Datatrans `payment_methods` list may add (PaymentBrand::checkoutBadges()). */
.payment-brand--twint { background: #000; color: #fff; font-style: normal; }
.payment-brand--postfinance { background: #ffcc00; color: #16171a; font-style: normal; }
.payment-brand--maestro { background: #fff; color: #16171a; border: 1px solid var(--border); font-style: normal; }
.payment-brand--amex { background: #2e77bc; color: #fff; font-style: normal; }
.payment-brand--cash { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); font-style: normal; }

.option-toggle-more {
    display: block;
    margin: 6px auto 2px;
    padding: 6px 16px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--red-dark);
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
}
.option-toggle-more:hover { background: var(--surface-2); }

.quantity-field { display: block; margin: var(--space-4) 0; font-weight: 600; font-size: 0.9rem; }
.checkout-field-row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}
.checkout-field-row .quantity-field { flex: 1 1 140px; min-width: 0; margin-top: var(--space-4); margin-bottom: 0; }
.checkout-field-row .checkout-field-zip { flex: 0 1 90px; }
.field-hint { display: block; margin-top: 4px; font-weight: 400; font-size: 0.78rem; color: var(--text-muted); }
#phone:invalid:not(:placeholder-shown) { border-color: var(--red); }
.quantity-field-label { margin: var(--space-4) 0 4px; font-weight: 600; font-size: 0.9rem; }
.quantity-field input,
.quantity-field select,
.quantity-field textarea {
    display: block;
    width: 100%;
    max-width: 260px;
    margin-top: 6px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
}
.quantity-field input:focus,
.quantity-field select:focus,
.quantity-field textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent);
}

.product-form button:not(.admin-btn),
.checkout-btn,
.admin-inline-form button:not(.admin-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 13px 28px;
    background: var(--red);
    background-image: linear-gradient(135deg, var(--red) 0%, var(--terracotta) 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 16px -6px rgba(193, 39, 45, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.product-form button:not(.admin-btn):hover,
.checkout-btn:hover,
.admin-inline-form button:not(.admin-btn):hover { transform: translateY(-1px); filter: brightness(1.05); }
.product-form button:not(.admin-btn):active,
.checkout-btn:active { transform: translateY(0); }

.product-form { position: relative; }
.product-form > button[type="submit"] {
    width: 100%;
    margin-top: var(--space-2);
}

/* -----------------------------------------------------------------------
   Cart
   ----------------------------------------------------------------------- */
.cart-item {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}
.cart-item--with-img { display: flex; gap: var(--space-4); align-items: flex-start; }
.cart-item-img {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-2);
}
.cart-item-body { flex: 1; min-width: 0; }
.cart-item-main { display: flex; justify-content: space-between; font-size: 1.02rem; font-weight: 600; }
.cart-item-options { margin: 8px 0 0; padding-left: 18px; color: var(--text-muted); font-size: 0.85rem; }
.cart-item-note-display { margin: 6px 0 0; color: var(--text-muted); font-size: 0.85rem; }
.cart-item-actions { display: flex; align-items: center; gap: 12px; margin-top: var(--space-3); }
.cart-item-actions form { display: flex; align-items: center; gap: 6px; }
.cart-item-actions input[type="number"] {
    width: 56px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
}
.cart-item-note {
    width: 150px;
    padding: 6px 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.85rem;
}
.cart-item-actions button {
    padding: 7px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface-2);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
}
.remove-btn { color: var(--red-dark); }
.line-total { margin-left: auto; font-weight: 800; }
.cart-subtotal {
    text-align: right;
    font-size: 1.2rem;
    margin: var(--space-4) 0;
    padding: var(--space-4);
    background: var(--surface-2);
    border-radius: var(--radius);
}
.cart-page, .checkout-page { max-width: 720px; margin: 0 auto; }
.cart-page h1, .checkout-page h1 { font-size: 1.6rem; margin-bottom: var(--space-4); }

.checkout-page--centered { text-align: center; }

.order-recap { max-width: 460px; margin: var(--space-5) auto 0; text-align: left; }
.order-recap-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border);
}
.order-recap-img {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--surface-2);
}
.order-recap-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.order-recap-name { font-weight: 600; }
.order-recap-options { margin: 0; padding-left: 16px; color: var(--text-muted); font-size: 0.8rem; }
.order-recap-note { margin: 4px 0 0; color: var(--text-muted); font-size: 0.8rem; }
.order-recap-amount { font-weight: 700; white-space: nowrap; }
.order-recap-totals { margin-top: var(--space-3); padding-top: var(--space-3); border-top: 2px solid var(--border); }
.order-recap-totals p { display: flex; justify-content: space-between; gap: var(--space-3); margin: 4px 0; color: var(--text-muted); }
.order-recap-total { font-weight: 800; font-size: 1.1rem; color: var(--text) !important; }
.order-recap-discount { color: var(--success) !important; }
.order-recap-discount span { color: var(--success) !important; }
.order-recap-invoice { text-align: center; margin-top: var(--space-4); }
.btn-invoice {
    display: inline-block;
    padding: 10px 22px;
    border-radius: 999px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--text);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;
}
.btn-invoice:hover { background: var(--border); }

.contact-page { max-width: 560px; margin: 0 auto; }
.contact-page h1 { font-size: 1.6rem; margin-bottom: var(--space-4); }
.contact-page h2 { font-size: 1.15rem; margin: var(--space-6) 0 var(--space-3); scroll-margin-top: 90px; }
.contact-info {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    padding: var(--space-4);
}
.contact-info-row {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--border);
}
.contact-info-row:last-child { border-bottom: none; }
.contact-info-label { color: var(--text-muted); font-weight: 600; }
.contact-hours-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}
.contact-hours-table th, .contact-hours-table td { padding: 10px 16px; border-bottom: 1px solid var(--border); font-weight: 400; }
.contact-hours-table tr:last-child th, .contact-hours-table tr:last-child td { border-bottom: none; }
.contact-hours-table th { text-align: left; font-weight: 600; }
.contact-hours-table td { text-align: right; color: var(--text-muted); }

.address-field-wrap { position: relative; }

.address-suggestions {
    position: absolute;
    z-index: 10;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    box-shadow: var(--shadow);
    max-height: 220px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 4px;
}
.address-suggestions li { padding: 9px 10px; cursor: pointer; font-size: 0.9rem; border-radius: 8px; }
.address-suggestions li:hover { background: var(--surface-2); }
.order-summary-item { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); }

/* -----------------------------------------------------------------------
   Auth
   ----------------------------------------------------------------------- */
.auth-form {
    max-width: 400px;
    margin: 60px auto;
    background: var(--surface);
    padding: var(--space-6);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.auth-form h1 { margin-top: 0; }
.auth-form label { display: block; margin-bottom: var(--space-3); font-size: 0.9rem; font-weight: 600; }
.auth-form input {
    display: block;
    width: 100%;
    padding: 11px 12px;
    margin-top: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: 0.95rem;
}
.auth-form input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 18%, transparent);
}
.auth-form button {
    width: 100%;
    padding: 13px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    margin-top: var(--space-2);
    box-shadow: 0 6px 16px -6px rgba(193, 39, 45, 0.55);
}
.auth-form button:hover { filter: brightness(1.05); }
.auth-switch { text-align: center; font-size: 0.88rem; color: var(--text-muted); margin-top: var(--space-3); }

.form-error {
    color: #ffb4ab; /* light red: --red-dark was unreadable on the dark surface (2026-10-28) */
    background: color-mix(in srgb, var(--red) 10%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--red) 25%, transparent);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
}
.form-error a { color: inherit; font-weight: 700; text-decoration: underline; }

.form-notice {
    color: var(--gold);
    background: color-mix(in srgb, var(--gold) 12%, var(--surface));
    border: 1px solid color-mix(in srgb, var(--gold) 30%, transparent);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: var(--space-4);
}
.form-notice a { color: var(--gold); font-weight: 700; }
.form-notice-inline-form { display: inline; margin-left: 6px; }
.cart-changed-notice ul { margin: 6px 0 0; padding-left: 20px; }
.cart-changed-notice li { margin-bottom: 4px; }

/* Cookie consent — floating glass card (2026-10-05 restyle; was a flat
   top bar with unstyled browser-default buttons). Same markup contract:
   `.cookie-banner` + the two POST forms, nothing behavioural changed. */
@keyframes cookieBannerIn {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}
.cookie-banner {
    position: fixed;
    z-index: 1000;
    left: 50%;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: min(760px, calc(100% - 32px));
    translate: -50% 0;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    background: rgba(46, 35, 28, 0.92);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: var(--text);
    border: 1px solid color-mix(in srgb, var(--gold) 35%, var(--border));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg), 0 0 0 1px rgba(0, 0, 0, 0.2);
    animation: cookieBannerIn 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
.cookie-banner-icon {
    flex: 0 0 auto;
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    font-size: 24px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--gold) 18%, var(--surface-2));
    border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent);
}
.cookie-banner-body { flex: 1 1 auto; min-width: 0; }
.cookie-banner-title { display: block; font-size: 1rem; margin-bottom: 2px; }
.cookie-banner p { margin: 0; font-size: 0.9rem; line-height: 1.45; color: var(--text-muted); }
.cookie-banner a { color: var(--gold); font-weight: 600; text-underline-offset: 2px; }
.cookie-banner-actions { flex: 0 0 auto; display: flex; flex-direction: column; gap: 8px; }
.cookie-banner-actions form { margin: 0; }
.cookie-banner-actions button {
    width: 100%;
    min-height: 40px;
    padding: 9px 18px;
    border-radius: 999px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: filter 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}
.cookie-banner-accept {
    border: 0;
    color: #fff;
    background: linear-gradient(90deg, var(--red), var(--terracotta));
    box-shadow: 0 6px 16px -6px rgba(193, 39, 45, 0.7);
}
.cookie-banner-accept:hover { filter: brightness(1.1); transform: translateY(-1px); }
.cookie-banner-decline {
    color: var(--text);
    background: transparent;
    border: 1px solid color-mix(in srgb, var(--gold) 55%, transparent);
}
.cookie-banner-decline:hover { background: color-mix(in srgb, var(--gold) 12%, transparent); }
@media (max-width: 640px) {
    .cookie-banner { flex-wrap: wrap; gap: 12px; padding: 16px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); }
    .cookie-banner-icon { width: 38px; height: 38px; font-size: 20px; }
    .cookie-banner-body { flex: 1 1 calc(100% - 52px); }
    .cookie-banner-actions { flex: 1 1 100%; flex-direction: row; }
    .cookie-banner-actions form { flex: 1 1 0; }
    .cookie-banner-actions button { white-space: normal; }
}
@media (prefers-reduced-motion: reduce) {
    .cookie-banner { animation: none; }
}
.footer-legal { margin-top: 8px; font-size: 0.85rem; }
.cookies-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.cookies-table th, .cookies-table td { text-align: left; padding: 6px 10px; border-bottom: 1px solid color-mix(in srgb, var(--gold) 20%, transparent); }
.cookies-disclaimer { font-size: 0.85rem; opacity: 0.8; margin-top: 24px; }

.zone-feedback {
    margin: -6px 0 var(--space-3);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}
.zone-feedback--error { color: var(--red-dark); background: color-mix(in srgb, var(--red) 10%, var(--surface)); }
.zone-feedback--warning { color: #8a6d1a; background: #fdf1cf; }
.zone-feedback--success { color: var(--success); background: color-mix(in srgb, var(--success) 12%, var(--surface)); }
.zone-feedback--info { color: #1a5fa8; background: #dbe9fb; }

.zones-toggle-btn {
    /* Same primary-CTA treatment as .checkout-btn — was a subtle grey
       pill, easy to miss right when it matters most (after a "not
       deliverable" error). */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: -4px 0 var(--space-3);
    padding: 11px 22px;
    background: var(--red);
    background-image: linear-gradient(135deg, var(--red) 0%, var(--terracotta) 100%);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 6px 16px -6px rgba(193, 39, 45, 0.55);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.zones-toggle-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.zones-toggle-btn:active { transform: translateY(0); }
.delivery-zones-panel { margin: 0 0 var(--space-4); }
.delivery-zones-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.delivery-zones-table th, .delivery-zones-table td {
    text-align: left;
    padding: 8px 12px;
    border-bottom: 1px solid var(--border);
    font-size: 0.85rem;
}
.delivery-zones-table th { background: var(--surface-2); font-weight: 700; }
.delivery-zones-table tr:last-child td { border-bottom: none; }

/* Sortable table headers (click to sort) — shared by /contact and the
   checkout zones panel, wired up generically in layout/main.php. */
.sortable-th { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable-th::after { content: '↕'; opacity: 0.4; margin-left: 4px; font-size: 0.8em; }
.sortable-th.sort-asc::after { content: '↑'; opacity: 1; }
.sortable-th.sort-desc::after { content: '↓'; opacity: 1; }

/* -----------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------- */
.site-footer {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

.footer-hours {
    max-width: 320px;
    margin: var(--space-4) auto 0;
    text-align: left;
}
.footer-hours h2 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-align: center;
    margin: 0 0 var(--space-2);
    color: var(--text);
}
.footer-hours ul { list-style: none; margin: 0; padding: 0; }
.footer-hours li {
    display: flex;
    justify-content: space-between;
    gap: var(--space-3);
    padding: 3px 0;
}
.footer-hours-day { font-weight: 600; color: var(--text); }

/* -----------------------------------------------------------------------
   Admin
   ----------------------------------------------------------------------- */
.admin-nav { list-style: none; padding: 0; display: grid; gap: var(--space-3); max-width: 360px; }
.admin-nav a {
    display: block;
    padding: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: inherit;
    text-decoration: none;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.admin-nav a:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.admin-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-5);
    align-items: center;
    background: var(--surface);
    padding: var(--space-3);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.admin-inline-form input,
.admin-inline-form select {
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
}
.admin-inline-form button:not(.admin-btn) { padding: 9px 18px; font-size: 0.9rem; }
.settings-hint { flex-basis: 100%; margin: 0; font-size: 0.85rem; color: var(--text-muted); }
.settings-status-ok { color: var(--success); }
.settings-status-warn { color: var(--red-dark); }
.admin-inline-form--bare { margin: 0; padding: 0; border: none; background: none; }
.admin-product-image-preview {
    display: block;
    width: 160px;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 12px;
}

.admin-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.admin-table th { background: var(--surface-2); font-weight: 700; }
.payment-method-cell { white-space: nowrap; }

.status-badge {
    display: inline-block;
    padding: 3px 11px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
    background: var(--surface-2);
    color: var(--text-muted);
}
.status-pending { background: #fdf1cf; color: #8a6d1a; }
.status-paid { background: #dcf3df; color: var(--success); }
.status-failed, .status-cancelled { background: #fbdede; color: var(--red-dark); }
.status-refunded { background: #e6e0f5; color: #5b3fa8; }
.status-in_progress { background: #dbe9fb; color: #1a5fa8; }
.status-ready { background: #d6f5ee; color: #147d63; }
.status-completed { background: #e2e2e2; color: #333; }

.admin-zone-list { display: flex; flex-direction: column; gap: var(--space-3); }
.admin-zone-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-4);
    box-shadow: var(--shadow-sm);
}
.admin-zone-row label { display: flex; flex-direction: column; font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }
.admin-zone-row input[type="number"] {
    width: 90px;
    padding: 7px;
    margin-top: 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
}
.admin-zone-zip { min-width: 50px; font-size: 1.05rem; }
.admin-zone-label { color: var(--text-muted); flex: 1; min-width: 100px; }
.admin-zone-active { flex-direction: row !important; align-items: center; gap: 6px; }
.admin-zone-row button:not(.admin-btn) {
    padding: 9px 18px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
}

/* =======================================================================
   Responsive
   ======================================================================= */
@media (max-width: 860px) {
    main { padding: var(--space-5) var(--space-4) 90px; }
    .hero { padding: 64px 16px; }
    .category-nav { top: 64px; }
}

@media (max-width: 700px) {
    .site-header {
        display: grid;
        padding: 10px 16px;
        grid-template-columns: 1fr auto;
        grid-template-areas: "brand right" "search search";
        row-gap: 10px;
    }
    .site-header .brand { grid-area: brand; }
    .header-right { grid-area: right; justify-self: end; }
    .header-search-wrap {
        grid-area: search;
        position: static;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        max-width: none;
    }
    .header-search { max-width: none; }
    .nav-toggle { display: block; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        background: rgba(28, 20, 16, 0.97);
        backdrop-filter: blur(10px);
        padding: var(--space-2) var(--space-4) var(--space-4);
        gap: 0;
        z-index: 20;
    }
    .main-nav.open { display: flex; }
    .main-nav a, .main-nav .nav-logout-btn { padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); width: 100%; text-align: left; }
    /* `.main-nav a` above has the same specificity as `.lang-switch a`
       (app.css) and comes later, so on mobile it was overriding the
       pills' own padding down to `12px 0` — zero horizontal padding,
       crushing FR/DE/EN into barely-visible slivers. Real bug, seen live. */
    .main-nav .lang-switch a { padding: 4px 10px; border-bottom: none; }
    .lang-switch { margin: var(--space-2) 0; align-self: flex-start; }
    .site-header { position: sticky; flex-wrap: wrap; }

    .menu-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: var(--space-3); }
    .menu-item-body { padding: var(--space-3); }
    .menu-item h3 { font-size: 0.95rem; }

    .cart-item-actions { flex-wrap: wrap; }
    .cart-item-actions .line-total { margin-left: 0; width: 100%; text-align: right; }

    .option-group summary { align-items: flex-start; }
    .option-group summary small { white-space: normal; }

    .admin-zone-row { flex-direction: column; align-items: stretch; }
    .admin-zone-row label { flex-direction: row; justify-content: space-between; }
    .admin-zone-row input[type="number"] { width: 100%; }

    /* Sticky "add to cart" action bar on mobile product pages — only the
       button sticks; the form itself must stay in normal flow, otherwise
       `position: sticky` on a form far taller than the viewport drags the
       whole thing (image/title/price included) up to pin its bottom edge,
       overlapping everything above it. */
    .product-form { margin-top: var(--space-5); }
    .product-form > button[type="submit"] {
        position: sticky;
        bottom: 12px;
        box-shadow: var(--shadow-lg);
    }
}

@media (max-width: 480px) {
    .hero { padding: 48px 16px; border-radius: var(--radius); }
    .hero-overlay { padding: var(--space-4) var(--space-5); }
    .hero-overlay h1 { font-size: 1.5rem; }
    .brand-logo { height: 38px; }
    .menu-grid { grid-template-columns: 1fr 1fr; }
    main { padding: var(--space-4) var(--space-3) 90px; }

    .toast { top: auto; left: 16px; right: 16px; bottom: 16px; width: auto; transform: translateY(20px); max-width: none; }
    .toast.show { transform: translateY(0); }
    .toast-actions { width: 100%; margin-left: 0; }
    .toast-actions a, .toast-actions button { flex: 1; text-align: center; }
}
.payment-cash-rounding { font-size: 0.8rem; opacity: 0.8; font-weight: 400; }

/* Exceptional closure banner (2026-10-08) — shown above the promo banner */
.closure-banner { background: #b3261e; color: #fff; text-align: center; padding: 10px 16px; font-size: 0.95rem; line-height: 1.4; }
.closure-banner strong { text-transform: uppercase; letter-spacing: 0.03em; margin-right: 4px; }
.closure-banner-reason { font-style: italic; }
/* Online payment in TEST mode (lot 2 step B, D13): admin + payment page. */
.payment-test-banner { background: #b3261e; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 0.95rem; line-height: 1.4; margin: 0 0 var(--space-3, 12px); }
.payment-test-banner strong { text-transform: uppercase; letter-spacing: 0.03em; }
/* -----------------------------------------------------------------------
   Admin small buttons + modal (2026-10-08): row actions (Modifier /
   Supprimer) and <dialog> forms. Native <dialog>, opened from the page's
   nonce'd script — no inline handlers (CSP).
   ----------------------------------------------------------------------- */
.admin-actions { display: flex; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; }
.admin-actions form { margin: 0; }
.admin-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border);
    background: var(--surface-2); color: var(--text);
    font: inherit; font-size: 0.85rem; font-weight: 700; line-height: 1.2;
    cursor: pointer; text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.admin-btn:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-1px); }
.admin-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.admin-btn--danger { background: transparent; border-color: color-mix(in srgb, var(--red) 55%, transparent); color: #f08a8e; }
.admin-btn--danger:hover { background: var(--red); border-color: var(--red); color: #fff; }
.admin-btn--primary { background-image: linear-gradient(135deg, var(--red) 0%, var(--terracotta) 100%); border-color: transparent; color: #fff; }
.admin-btn--primary:hover { color: #fff; border-color: transparent; filter: brightness(1.07); }
.admin-btn--big { padding: 12px 22px; font-size: 0.98rem; }

.admin-modal {
    width: min(440px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border);
    border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
.admin-modal::backdrop { background: rgba(0, 0, 0, 0.6); }
.admin-modal form { display: grid; gap: var(--space-3); padding: var(--space-5); margin: 0; }
.admin-modal h2 { margin: 0; font-size: 1.15rem; }
.admin-modal p { margin: 0; color: var(--text-muted); font-size: 0.9rem; }
.admin-modal label { display: grid; gap: 4px; font-size: 0.85rem; font-weight: 700; color: var(--text-muted); }
.admin-modal input, .admin-modal select, .admin-modal textarea {
    padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.95rem;
}
.admin-modal textarea { min-height: 70px; resize: vertical; }
.admin-modal input:focus, .admin-modal select:focus, .admin-modal textarea:focus { outline: none; border-color: var(--gold); }
.admin-modal-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
.admin-modal-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }
@media (max-width: 480px) { .admin-modal-row { grid-template-columns: 1fr; } }

/* Master switch on the admin dashboard */
.closure-switch {
    display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap;
    max-width: 560px; margin: 0 0 var(--space-5); padding: var(--space-4) var(--space-5);
    border-radius: var(--radius); border: 2px solid color-mix(in srgb, var(--success) 60%, transparent);
    background: color-mix(in srgb, var(--success) 10%, var(--surface));
}
.closure-switch.is-closed { border-color: var(--red); background: color-mix(in srgb, var(--red) 16%, var(--surface)); }
.closure-switch.is-planned { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, var(--surface)); }
.closure-switch-state { display: grid; gap: 2px; }
.closure-switch-state strong { font-size: 1.05rem; }
.closure-switch-state span { color: var(--text-muted); font-size: 0.88rem; }
.closure-switch-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--success); margin-right: 6px; }
.closure-switch.is-closed .closure-switch-dot { background: var(--red); }
.closure-switch.is-planned .closure-switch-dot { background: var(--gold); }
.closure-switch-buttons { display: flex; gap: var(--space-2); flex-wrap: wrap; }
.admin-flash { max-width: 560px; margin: 0 0 var(--space-3); }
/* Products padlock (2026-10-28): one click shows / hides a product on the site. */
.admin-lock { white-space: nowrap; min-width: 7.5em; justify-content: center; }
.admin-lock--open { border-color: var(--success); color: var(--success); }
.admin-lock--closed { border-color: color-mix(in srgb, var(--red) 55%, transparent); color: #f08a8e; }
.admin-row--hidden td { opacity: 0.6; }
.admin-row--hidden td:nth-last-child(-n+2) { opacity: 1; }
.admin-table tr[id^="product-"] { scroll-margin-top: 140px; }   /* back to the row below the sticky header */
.admin-table tr[id^="product-"]:target td { background: color-mix(in srgb, var(--gold) 15%, transparent); }
/* Add-to-cart refused during an exceptional closure (layout modal, 2026-10-08) */
.closure-refused-reason { color: var(--text) !important; font-style: italic; }

/* Copy-link button on /admin/tablet-tokens (2026-10-08) */
.admin-btn.is-copied { border-color: var(--success); color: var(--success); }
.admin-tablet-token-row { flex-wrap: wrap; }

/* -----------------------------------------------------------------------
   Admin layout + responsive (2026-10-08)
   Cards, aligned field rows, and tables that become stacked cards on
   phones (labels from data-label, set by the layout script). Wide tables
   (orders, Z list) also stack on tablets.
   ----------------------------------------------------------------------- */
.admin-card-list { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.admin-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: var(--space-4); box-shadow: var(--shadow-sm); display: grid; gap: var(--space-3);
}
.token-card { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
.token-card .admin-tablet-token-url { grid-column: 1 / -1; grid-row: 2; }
.token-card-name { font-size: 1rem; }
.admin-tablet-token-url {
    width: 100%; min-width: 0; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text-muted); font: inherit; font-size: 0.85rem;
}
.car-card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.car-card-head strong { font-size: 1.05rem; margin-right: var(--space-2); }
.car-card-meta { color: var(--text-muted); font-size: 0.82rem; }
.admin-field-row { display: flex; align-items: flex-end; gap: var(--space-3); flex-wrap: wrap; margin: 0; }
.admin-field-row label { display: grid; gap: 4px; flex: 1 1 220px; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.admin-field-row input, .admin-field-row select {
    padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface-2); color: var(--text); font: inherit; font-size: 0.95rem; min-width: 0;
}
.admin-card .settings-hint { margin: 0; }

.admin-table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
.admin-table td, .zl-table td { overflow-wrap: anywhere; }

@media (max-width: 1024px) {
    .admin-nav { max-width: none; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .closure-switch { max-width: none; }
}

@media (max-width: 760px) {
    .token-card { grid-template-columns: 1fr; }
    .token-card .admin-actions { justify-content: stretch; }
    .token-card .admin-actions > *, .token-card .admin-actions form button { flex: 1 1 auto; justify-content: center; width: 100%; }
    .admin-field-row .admin-btn { width: 100%; justify-content: center; }
    .admin-inline-form { align-items: stretch; }
    .admin-inline-form > input, .admin-inline-form > select, .admin-inline-form > label, .admin-inline-form > button { flex: 1 1 100%; }
    .admin-inline-form label select, .admin-inline-form label input { width: 100%; }
    .closure-switch-buttons { width: 100%; }
    .closure-switch-buttons .admin-btn { flex: 1 1 auto; justify-content: center; }
    .admin-modal-actions .admin-btn { flex: 1; justify-content: center; }
}

/* Stacked-card tables: phones for every admin table, tablets too for the wide ones. */
@media (max-width: 700px) {
    .admin-table, .zl-table { background: none; box-shadow: none; border-radius: 0; }
    .admin-table thead, .zl-table thead { display: none; }
    .admin-table, .admin-table tbody, .admin-table tr, .admin-table td,
    .zl-table, .zl-table tbody, .zl-table tr, .zl-table td { display: block; width: 100%; }
    .admin-table tr, .zl-table tr {
        background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
        padding: var(--space-2) 0; margin-bottom: var(--space-3); box-shadow: var(--shadow-sm);
    }
    .admin-table td, .zl-table td {
        display: flex; justify-content: space-between; align-items: center; gap: var(--space-3);
        border: none !important; padding: 6px var(--space-4) !important; text-align: right !important;
    }
    .admin-table td::before, .zl-table td::before {
        content: attr(data-label); font-weight: 700; color: var(--text-muted); font-size: 0.8rem; text-align: left; flex-shrink: 0;
    }
    .admin-table td[data-label=""]::before, .zl-table td[data-label=""]::before { display: none; }
    .admin-table td[data-label=""], .zl-table td[data-label=""] { justify-content: flex-end; }
    .admin-table td .admin-actions { width: 100%; }
    .admin-table td .admin-actions .admin-btn { flex: 1; justify-content: center; }
}

/* Wide tables (orders, Z list) stack as cards on tablets too (portrait/landscape up to 1100px). */
@media (max-width: 1100px) {
    .admin-table--wide { background: none; box-shadow: none; border-radius: 0; }
    .admin-table--wide thead { display: none; }
    .admin-table--wide, .admin-table--wide tbody, .admin-table--wide tr, .admin-table--wide td { display: block; width: 100%; }
    .admin-table--wide tbody { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: var(--space-3); }
    .admin-table--wide tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: var(--space-2) 0; box-shadow: var(--shadow-sm); }
    .admin-table--wide td { display: flex; justify-content: space-between; align-items: center; gap: var(--space-3); border: none !important; padding: 6px var(--space-4) !important; text-align: right !important; }
    .admin-table--wide td::before { content: attr(data-label); font-weight: 700; color: var(--text-muted); font-size: 0.8rem; text-align: left; flex-shrink: 0; }
    .admin-table--wide td[data-label=""]::before { display: none; }
    .admin-table--wide td[data-label=""] { justify-content: flex-end; }
}
@media (max-width: 700px) {
    .admin-table--wide tbody { display: block; }
    .admin-table--wide tr { margin-bottom: var(--space-3); }
}
/* Orders list on a computer (2026-10-28): 12 columns never fit the 720px page — wider page, and words are never
   cut letter by letter (overflow-wrap: anywhere above is for the stacked cards); too narrow → the wrap scrolls. */
main:has(> .admin-page--wide) { max-width: 1400px; }
.checkout-page.admin-page--wide { max-width: 1320px; }
@media (min-width: 1101px) {
    .admin-page--wide .admin-table--wide th, .admin-page--wide .admin-table--wide td { padding: 10px 12px; overflow-wrap: normal; }
    .admin-page--wide .admin-table--wide th, .admin-page--wide .admin-table--wide td:nth-child(-n+2) { white-space: nowrap; }
}

/* Daily backup indicator on the admin dashboard (2026-10-08) */
.backup-health { max-width: 560px; margin: 0 0 var(--space-5); padding: var(--space-3) var(--space-4); border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); font-size: 0.9rem; }
.backup-health--ok { border-color: color-mix(in srgb, var(--success) 50%, transparent); }
.backup-health--late, .backup-health--error { border: 2px solid var(--red); background: color-mix(in srgb, var(--red) 14%, var(--surface)); font-weight: 700; }
.backup-health--none { color: var(--text-muted); }
@media (max-width: 1024px) { .backup-health { max-width: none; } }