@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Design tokens ────────────────────────────────────────────────────────── */
/* Pico itself defines its light-theme --pico-* tokens on
   :root:not([data-theme=dark]) (specificity 0,2,0) — a plain :root here
   (0,1,0) would lose that fight regardless of load order, so every --pico-*
   override below has to be declared on a selector at least as specific. Our
   own custom tokens (--surface-1, --white-*, etc.) don't collide with
   anything Pico defines, but live in the same rule for a single source of
   truth per theme. */
:root:not([data-theme=dark]) {
  --pico-font-family-sans-serif: 'Inter', system-ui, sans-serif;
  color-scheme: light dark;

  /* Base colors (light theme — the default) */
  --pico-primary: #1a1a2e;
  --pico-primary-hover: #16213e;
  --surface-1: rgb(250, 250, 250);
  --surface-2: rgb(240, 240, 240);

  /* Accent */
  --accent: rgb(255, 0, 0);
  --accent-hover: rgb(230, 0, 0);
  --accent-light: rgb(255, 100, 100);
  --accent-dark: rgb(230, 30, 30);
  --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
  --gradient-accent-hover: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);

  /* Status */
  --color-success: #2ecc71;
  --color-danger: #e74c3c;
  --color-warning: #f39c12;

  /* Foreground "ink" alpha scale — low-opacity overlays, borders and text,
     tinted away from the current surface. Black here for the light theme;
     swapped to white under the dark media query below. Semantic text/border
     tokens are derived from this scale, so they follow it automatically. */
  --white-03: rgba(0, 0, 0, 0.03);
  --white-05: rgba(0, 0, 0, 0.05);
  --white-08: rgba(0, 0, 0, 0.08);
  --white-10: rgba(0, 0, 0, 0.10);
  --white-12: rgba(0, 0, 0, 0.12);
  --white-15: rgba(0, 0, 0, 0.15);
  --white-20: rgba(0, 0, 0, 0.20);
  --white-25: rgba(0, 0, 0, 0.25);
  --white-30: rgba(0, 0, 0, 0.30);
  --white-40: rgba(0, 0, 0, 0.40);
  --white-50: rgba(0, 0, 0, 0.50);
  --white-60: rgba(0, 0, 0, 0.60);
  --white-70: rgba(0, 0, 0, 0.70);
  --white-80: rgba(0, 0, 0, 0.80);
  --white-85: rgba(0, 0, 0, 0.85);
  --white-90: rgba(0, 0, 0, 0.90);

  /* Accent alpha scale */
  --accent-08: rgba(217, 83, 122, 0.08);
  --accent-10: rgba(217, 83, 122, 0.10);
  --accent-12: rgba(217, 83, 122, 0.12);
  --accent-15: rgba(217, 83, 122, 0.15);
  --accent-20: rgba(217, 83, 122, 0.20);
  --accent-25: rgba(217, 83, 122, 0.25);
  --accent-30: rgba(217, 83, 122, 0.30);
  --accent-35: rgba(217, 83, 122, 0.35);
  --accent-40: rgba(217, 83, 122, 0.40);
  --accent-50: rgba(217, 83, 122, 0.50);
  --accent-60: rgba(217, 83, 122, 0.60);

  /* Status alpha scale */
  --success-10: rgba(46, 204, 113, 0.10);
  --success-12: rgba(46, 204, 113, 0.12);
  --success-15: rgba(46, 204, 113, 0.15);
  --success-20: rgba(46, 204, 113, 0.20);
  --success-30: rgba(46, 204, 113, 0.30);
  --success-40: rgba(46, 204, 113, 0.40);
  --danger-10: rgba(231, 76, 60, 0.10);
  --danger-12: rgba(231, 76, 60, 0.12);
  --danger-15: rgba(231, 76, 60, 0.15);
  --danger-30: rgba(231, 76, 60, 0.30);
  --warning-10: rgba(243, 156, 18, 0.10);
  --warning-15: rgba(243, 156, 18, 0.15);
  --warning-30: rgba(243, 156, 18, 0.30);
  --black-10: rgba(0, 0, 0, 0.10);
  --black-20: rgba(0, 0, 0, 0.20);
  --black-30: rgba(0, 0, 0, 0.30);
  --black-40: rgba(0, 0, 0, 0.40);
  --black-50: rgba(0, 0, 0, 0.50);

  /* Near-opaque overlay used behind popups (dropdown, mobile nav, autocomplete) */
  --overlay-panel: rgba(255, 255, 255, 0.96);
  /* Translucent nav-bar background (tinted with the surface color) */
  --surface-1-60: rgba(238, 241, 247, 0.6);
  --surface-1-95: rgba(238, 241, 247, 0.95);

  /* Hero photo wash — fades the background image into --surface-2 */
  --hero-overlay: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 255, 255, 0.90) 60%,
    rgba(255, 255, 255, 0.95) 100%
  );

  /* Semantic text colors */
  --text-primary: #15151f;
  --text-secondary: var(--white-70);
  --text-muted: var(--white-60);
  --text-subtle: var(--white-50);
  --text-faint: var(--white-40);
  --text-disabled: var(--white-25);
  /* Text sitting on a solid accent-colored fill (buttons, count badges,
     active pills) — always light, independent of the page theme. */
  --text-on-accent: #fff;

  /* Semantic borders */
  --border-subtle: var(--white-08);
  --border-default: var(--white-15);
  --border-accent: var(--accent-20);
  --border-accent-soft: var(--accent-15);

  /* Glass effect */
  --glass-blur: 10px;
  --glass-border: var(--white-15);
  --glass-shadow: 0 8px 32px var(--black-10);
  --glass-shadow-hover: 0 12px 48px var(--black-20);
  --surface-card: var(--white-05);

  /* Spacing scale */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
  --space-7: 3rem;

  /* Font-size scale */
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.875rem;
  --fs-md: 0.95rem;
  --fs-lg: 1.1rem;
  --fs-xl: 1.25rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.5rem;
  --fs-4xl: 3rem;

  /* Shape */
  --radius: 16px;
  --radius-sm: 8px;

  /* Transitions */
  --transition-smooth: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 150ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Form spacing */
  --pico-form-element-spacing-vertical: .5rem;
  --pico-form-element-spacing-horizontal: .8rem;
  --pico-block-spacing-vertical: 1rem;
  --pico-block-spacing-horizontal: 1rem;

  /* Pico overrides (theme-aware via the tokens above) */
  --pico-background-color: var(--surface-2);
  --pico-card-background-color: var(--surface-card);
  --pico-card-border-radius: var(--radius);
  --pico-card-sectioning-background-color: var(--white-03);

  /* Form elements (input/select/textarea) — Pico applies these itself via
     its own selectors, so components don't need to set background/border/
     color by hand. */
  --pico-form-element-background-color: var(--white-05);
  --pico-form-element-border-color: var(--accent-20);
  --pico-form-element-color: var(--text-primary);
  --pico-form-element-placeholder-color: var(--text-faint);
  --pico-form-element-active-background-color: var(--white-08);
  --pico-form-element-active-border-color: var(--accent-50);
  --pico-form-element-focus-color: var(--accent-15);
}

/* Dark theme — mirrors the light defaults above, swapped in automatically
   when the OS/browser prefers dark. There is no manual toggle: Pico itself
   follows this same prefers-color-scheme media query (and the matching
   :root:not([data-theme]) specificity) for its own base styles, since the
   <html> tag no longer hardcodes data-theme="dark". */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --surface-1: #0f3460;
    --surface-2: #16213e;

    --white-03: rgba(255, 255, 255, 0.03);
    --white-05: rgba(255, 255, 255, 0.05);
    --white-08: rgba(255, 255, 255, 0.08);
    --white-10: rgba(255, 255, 255, 0.10);
    --white-12: rgba(255, 255, 255, 0.12);
    --white-15: rgba(255, 255, 255, 0.15);
    --white-20: rgba(255, 255, 255, 0.20);
    --white-25: rgba(255, 255, 255, 0.25);
    --white-30: rgba(255, 255, 255, 0.30);
    --white-40: rgba(255, 255, 255, 0.40);
    --white-50: rgba(255, 255, 255, 0.50);
    --white-60: rgba(255, 255, 255, 0.60);
    --white-70: rgba(255, 255, 255, 0.70);
    --white-80: rgba(255, 255, 255, 0.80);
    --white-85: rgba(255, 255, 255, 0.85);
    --white-90: rgba(255, 255, 255, 0.90);

    --overlay-panel: rgba(12, 24, 46, 0.96);
    --surface-1-60: rgba(15, 52, 96, 0.6);
    --surface-1-95: rgba(15, 52, 96, 0.95);

    --hero-overlay: linear-gradient(
      180deg,
      rgba(15, 32, 60, 0.82) 0%,
      rgba(15, 24, 48, 0.92) 60%,
      rgba(10, 16, 36, 0.97) 100%
    );

    --text-primary: #fff;
  }
}

/* ── Hero background ─────────────────────────────────────────────────────── */
body {
  background-size: cover;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-image:
    var(--hero-overlay),
    url('/static/web/img/zidani_1.jpg');
  background-blend-mode: normal;
  position: relative;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}


/* ── Utilities ────────────────────────────────────────────────────────────
   Small, reusable, Bootstrap-style helper classes. Prefer these over new
   inline styles or one-off classes for layout/spacing/typography tweaks. */

/* Display & flex */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-block { display: block; }
.d-none { display: none; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 0; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* Spacing */
.m-0 { margin: 0; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.ms-2 { margin-left: var(--space-2); }
.mx-auto { margin-left: auto; margin-right: auto; }
.p-5 { padding: var(--space-5); }

/* Text */
.text-center { text-align: center; }
.text-end { text-align: right; }
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }
.fs-xs { font-size: var(--fs-xs); }
.fs-sm { font-size: var(--fs-sm); }
.fs-base { font-size: var(--fs-base); }
.fs-md { font-size: var(--fs-md); }
.fs-lg { font-size: var(--fs-lg); }
.fs-xl { font-size: var(--fs-xl); }
.fs-2xl { font-size: var(--fs-2xl); }
.fs-3xl { font-size: var(--fs-3xl); }
.fs-4xl { font-size: var(--fs-4xl); }
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-subtle { color: var(--text-subtle); }
.text-faint { color: var(--text-faint); }
.text-disabled { color: var(--text-disabled); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--color-danger); }
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Sizing */
.w-100 { width: 100%; }
.w-auto { width: auto; }
.min-w-0 { min-width: 0; }
.max-w-sm { max-width: 480px; }
.max-w-md { max-width: 800px; }
.max-w-lg { max-width: 900px; }

/* Position */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.inset-0 { inset: 0; }

/* ── Glass Morphism base ──────────────────────────────────────────────────── */
.glass-base {
  background: var(--surface-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.glass-base:hover {
  backdrop-filter: blur(15px);
  box-shadow: var(--glass-shadow-hover);
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
button, [role="button"], input[type="submit"], input[type="button"] {
  transition: var(--transition-smooth);
}

a.btn-accent, a.outline {
  display: inline-block;
  text-decoration: none;
}

.btn-block { display: block; width: 100%; text-align: center; }
.btn-lg { padding: 0.75rem 2rem; border-radius: var(--radius); }
.btn-sm { padding: 0.6rem; border-radius: var(--radius-sm); font-size: var(--fs-base); }

.btn-accent {
  background: var(--gradient-accent);
  border-color: transparent;
  border: 1px solid var(--white-20);
  color: var(--text-on-accent);
  font-weight: 600;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px var(--accent-15);
}

.btn-accent:hover {
  background: var(--gradient-accent-hover);
  border-color: var(--white-30);
  box-shadow: 0 8px 24px var(--accent-25);
  backdrop-filter: blur(12px);
}

.btn-accent:focus {
  border-color: var(--white-40);
  box-shadow: 0 0 0 3px var(--accent-20);
}

input:not([type="checkbox"], [type="radio"]), select, textarea, [type="button"], [type="reset"], [type="submit"] {
	margin-bottom: inherit;
}

/* ── Nav ──────────────────────────────────────────────────────────────────── */
nav.top-nav {
  padding: 0 1rem;
  background: var(--surface-1-60);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--white-10);
  border-top: 1px solid var(--accent-20);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  box-shadow: 0 4px 20px var(--black-30);
  transition: var(--transition-smooth);
}

nav.top-nav:hover {
  backdrop-filter: blur(15px);
}

nav.top-nav .brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  letter-spacing: -0.02em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: var(--transition-smooth);
}

nav.top-nav .brand-logo {
  height: 1.75rem;
  width: auto;
}

nav.top-nav .nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Cart badge */
.cart-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  background: var(--white-08);
  backdrop-filter: blur(8px);
  border: 1px solid var(--accent-30);
  border-radius: 999px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: var(--fs-base);
  font-weight: 500;
  transition: var(--transition-fast);
}

.cart-badge:hover {
  background: var(--white-12);
  backdrop-filter: blur(12px);
  border-color: var(--accent-60);
  color: var(--text-primary);
}

.cart-badge .count {
  background: var(--gradient-accent);
  color: var(--text-on-accent);
  border-radius: 999px;
  padding: 0 0.4rem;
  font-size: var(--fs-xs);
  font-weight: 700;
  min-width: 1.25rem;
  text-align: center;
  box-shadow: 0 2px 8px var(--accent-20);
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
  border: 1px solid var(--white-10);
  transition: var(--transition-fast);
}

.badge-draft {
  background: var(--white-08);
  color: var(--text-muted);
  border-color: var(--white-15);
}

.badge-confirmed {
  background: var(--success-15);
  color: var(--color-success);
  border-color: var(--success-30);
  box-shadow: 0 4px 12px var(--success-10);
}

.badge-paid {
  background: var(--success-20);
  color: var(--color-success);
  border-color: var(--success-40);
  box-shadow: 0 4px 16px var(--success-15);
}

.badge-cancelled {
  background: color-mix(in srgb, var(--color-danger) 16%, transparent);
  color: var(--color-danger);
}

.badge-pending {
  background: var(--warning-15);
  color: var(--color-warning);
  border-color: var(--warning-30);
  box-shadow: 0 4px 12px var(--warning-10);
}

.badge-failed {
  background: var(--danger-15);
  color: var(--color-danger);
  border-color: var(--danger-30);
  box-shadow: 0 4px 12px var(--danger-10);
}

/* ── Offer cards ──────────────────────────────────────────────────────────── */
.offer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.offer-grid--single-column {
  display: flex;
  flex-direction: column;
}

.offer-card {
  background: var(--surface-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.offer-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: -1px;
  right: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent-50), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.offer-card:hover {
  backdrop-filter: blur(15px);
  box-shadow: var(--glass-shadow-hover);
  border-color: var(--accent-30);
}

.offer-card:hover::before {
  opacity: 1;
}

.offer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.offer-card .offer-name {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.3;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.offer-card .offer-price {
  font-size: var(--fs-xl);
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.offer-attrs {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: var(--fs-sm);
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.offer-attr {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.offer-attr-label {
  color: var(--text-faint);
}

.offer-card.selected {
  border-color: var(--accent-60);
  box-shadow: 0 0 0 2px var(--accent-25);
}

/* Pico gives buttons a default bottom margin; since these are always the
   last element in the card, that margin is just dead space before the
   card's own padding. */
.offer-card button {
  margin-bottom: 0;
}

.offer-select-btn svg {
  transition: var(--transition-fast);
}

.offer-date-field {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}

.offer-date-select {
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  padding: 0.2rem 1.6rem 0.2rem 0.5rem;
  font-size: var(--fs-sm);
  line-height: 1.3;
  height: auto;
  background-position: right 0.4rem center;
  background-size: 0.7rem auto;
}

.offer-select-btn.open svg {
  transform: rotate(180deg);
}

.sub-ticket-panel {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--white-08);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.sub-ticket-panel > .flex-1,
.sub-ticket-panel > button {
  width: 100%;
}

/* .d-none alone loses this specificity tie to `.sub-ticket-panel { display: flex }`
   since both are single-class selectors — pin it explicitly so collapsed panels
   actually stay collapsed. */
.sub-ticket-panel.d-none {
  display: none;
}

.addons-hint {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin: 0 0 0.4rem;
}

.sub-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sub-ticket-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100% !important;
  gap: 0.5rem;
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  cursor: pointer;
}

.sub-ticket-details {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 0.15rem;
}

.sub-ticket-name {
  color: var(--text-primary);
  line-height: 1.3;
}

.sub-ticket-class {
  color: var(--text-muted);
  font-size: var(--fs-xs);
}

.sub-ticket-checkbox {
  accent-color: var(--accent);
  cursor: pointer;
}

.sub-ticket-checkbox:disabled:not(:checked) {
  opacity: 0.4;
  cursor: not-allowed;
}

.sub-ticket-price {
  align-self: center;
  color: var(--text-primary);
  font-size: var(--fs-md);
  font-weight: 600;
  white-space: nowrap;
}

.admin-edit-link {
  position: absolute;
  top: -0.5rem;
  right: 0;
  padding: 0.25rem;
  color: var(--text-disabled);
  transition: color 150ms;
}

.admin-edit-link:hover {
  color: var(--color-accent);
}

/* ── Search form ──────────────────────────────────────────────────────────── */
.search-card {
  background: var(--surface-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
  /*box-shadow: var(--glass-shadow);*/
  transition: var(--transition-smooth);
}

.search-card:hover {
  backdrop-filter: blur(15px);
  /*box-shadow: var(--glass-shadow-hover);*/
}

/* Wide screens: the picker starts centered (same as the mobile stack, just
   given room to breathe) and only moves to a left sidebar once results have
   actually loaded into #results, with the results panel beside it on the
   right. Narrower screens always keep the single-column stack. */
.search-layout {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: var(--pico-block-spacing-horizontal);
}

@media (min-width: 960px) {
  .search-layout-picker {
    position: sticky;
    top: 0;
    max-height: 100vh;
    overflow-y: auto;
    padding-top: var(--pico-block-spacing-vertical);
    padding-bottom: var(--pico-block-spacing-vertical);
  }

  /* Once results have loaded, switch to a two-column layout: a picker
     sidebar just wide enough that the category/subtype pills don't wrap,
     and a results column that takes up the rest of the container instead
     of being capped to its own width. */
  .search-layout:has(#results:not(:empty)) {
    grid-template-columns: minmax(400px, 480px) 1fr;
  }

  .search-layout:has(#results:not(:empty)) .search-layout-picker .search-card {
    max-width: none;
    margin: 0;
  }

  /* The picker sidebar is narrower than the original centered card, so its
     internal from/to/date grid should stay single-column even though we're
     above the .search-grid mobile breakpoint. */
  .search-layout:has(#results:not(:empty)) .search-layout-picker .search-grid {
    grid-template-columns: 1fr;
  }
}

.search-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 600px) {
  .search-grid { grid-template-columns: 1fr; }
}

/* Category / subtype pills */
.pill-group { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pill-label input { display: none; }
.pill-text {
  display: inline-block;
  padding: var(--pico-form-element-spacing-vertical) var(--pico-form-element-spacing-horizontal);
  border-radius: 999px;
  border: 1px solid var(--white-15);
  font-size: var(--fs-base);
  cursor: pointer;
}
.pill-label input:checked + .pill-text {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--text-primary);
}
.pill-text:hover { background: var(--white-08); }

.card-picker {
  margin-top: 1rem;
  border-top: 1px solid var(--white-08);
  padding-top: 1rem;
}

.card-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, calc(50% - 0.25rem)));
  gap: 0.5rem;
}

.card-picker-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  min-width: 0;
  padding: 0.6rem 0.75rem;
  background: var(--white-05);
  border: 1px solid var(--white-15);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition-fast);
}

.card-picker-tile:hover {
  background: var(--white-08);
  border-color: var(--accent-40);
}

.card-picker-tile.selected {
  background: var(--accent-10);
  border-color: var(--accent-60);
}

.card-picker-tile-name {
  max-width: 100%;
  font-size: var(--fs-base);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-picker-tile-cuid {
  max-width: 100%;
  font-size: var(--fs-xs);
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* CUID input + WebNFC scan button */
.cuid-field-wrapper {
  position: relative;
}

.cuid-field-wrapper input {
  padding-right: 2.5rem;
}

.nfc-scan-btn {
  position: absolute;
  right: 0.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--accent);
  cursor: pointer;
  transition: var(--transition-fast);
}

.nfc-scan-btn:hover {
  background: var(--accent-12);
}

.nfc-scan-btn.scanning {
  color: var(--color-success);
  animation: nfc-pulse 1s ease-in-out infinite;
}

.nfc-scan-btn.d-none {
  display: none;
}

@keyframes nfc-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.nfc-hint {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.nfc-hint.d-none {
  display: none;
}

/* Autocomplete */
.autocomplete-wrapper {
  position: relative;
}

.suggestions-list {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--overlay-panel);
  border: 1px solid var(--white-15);
  border-radius: var(--radius-sm);
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
  margin: 0.25rem 0 0;
  padding: 0.25rem 0;
  list-style: none;
  box-shadow: 0 16px 48px var(--black-50);
}

.suggestions-list li {
  padding: 0.55rem 1rem;
  cursor: pointer;
  font-size: var(--fs-md);
  color: var(--white-90);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  transition: var(--transition-fast);
}

.suggestions-list li:hover {
  background: var(--accent-15);
  color: var(--text-primary);
}

.suggestions-list li .station-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
}
.suggestions-list li .station-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 2.5rem 1rem 1.5rem;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.35rem;
  color: var(--text-primary);
}

.hero .subtitle {
  color: var(--white-60);
  font-size: 1rem;
  margin-bottom: 0;
}

/* ── Cart table ───────────────────────────────────────────────────────────── */
.cart-table {
  width: 100%;
  border-collapse: collapse;
}

.cart-table th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  padding: 0.75rem;
  border-bottom: 1px solid var(--accent-20);
  background: var(--white-03);
}

.cart-table td {
  padding: 1rem 0.75rem;
  border-bottom: 1px solid var(--white-05);
  vertical-align: middle;
}

.cart-table tbody tr {
  transition: var(--transition-fast);
}

.cart-table tbody tr:hover {
  background: var(--accent-08);
}

.cart-table .cart-subproduct-row {
  background: var(--white-03);
}

.cart-table .cart-subproduct-row td:first-child {
  padding-left: 2rem;
  position: relative;
}

.cart-subproduct-label {
  display: block;
  color: var(--text-faint);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.2rem;
  text-transform: uppercase;
}

/* ── Totals ───────────────────────────────────────────────────────────────── */
.totals-box {
  background: var(--surface-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  max-width: 360px;
  margin-left: auto;
  margin-top: 1.5rem;
  box-shadow: var(--glass-shadow);
  transition: var(--transition-smooth);
}

.totals-box:hover {
  backdrop-filter: blur(15px);
  box-shadow: var(--glass-shadow-hover);
}

.totals-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: var(--fs-md);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.totals-row.total {
  border-top: 1px solid var(--accent-20);
  margin-top: 0.75rem;
  padding-top: 1rem;
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text-primary);
  background: linear-gradient(90deg, transparent, var(--accent-10));
  padding: 1rem 1.5rem 1rem;
  margin: 0.75rem -1.5rem 0;
}

/* ── Form styling ─────────────────────────────────────────────────────────── */
/* Colors, borders and the focus ring come from the --pico-form-element-*
   tokens above — Pico's own input/select/textarea rules already apply them.
   Only the glass blur (not a Pico concept) needs setting here.
   `select` is deliberately excluded from the backdrop-filter: applying it to a
   native <select> breaks the OS popup's click-to-open/click-to-pick behavior
   in some browsers, turning it into a hold-and-release combobox instead. */
input:not([type="checkbox"], [type="radio"]),
select,
textarea {
  border-radius: var(--radius-sm);
}

input:not([type="checkbox"], [type="radio"]),
textarea {
  backdrop-filter: blur(8px);
  transition: backdrop-filter var(--transition-fast);
}

input:not([type="checkbox"], [type="radio"], [readonly]):is(:active, :focus),
textarea:not([readonly]):is(:active, :focus) {
  backdrop-filter: blur(12px);
}

/* Automated field rendering (web/forms/field.html + WebFormRenderer) */
.form-field {
  margin-bottom: 1rem;
}

.form-field > label,
.form-field > legend {
  display: block;
  margin-bottom: 0.35rem;
  font-size: var(--fs-base);
  color: var(--text-secondary);
}

.form-help {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--text-faint);
  font-size: var(--fs-xs);
}

ul.errorlist {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  color: var(--color-danger);
  font-size: var(--fs-xs);
}

ul.errorlist.nonfield {
  margin-bottom: 1rem;
}

.form-grid {
  margin-bottom: 1rem;
}

.form-grid .form-field {
  margin-bottom: 0;
}

[hidden] {
  display: none !important;
}

/* ── Auth card ────────────────────────────────────────────────────────────── */
.auth-card {
  max-width: 440px;
  margin: 4rem auto;
  background: var(--surface-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--glass-shadow);
}

.auth-card > * {
  transition: var(--transition-smooth);
}

/* ── Payment method cards ─────────────────────────────────────────────────── */
.payment-methods {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.payment-method-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white-05);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--white-10);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 2px 8px var(--black-10);
}

.payment-method-label:hover {
  background: var(--white-08);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 16px var(--black-20);
}

.payment-method-label:has(input:checked) {
  border-color: var(--accent-60);
  background: var(--accent-10);
  box-shadow: 0 0 0 1px var(--accent-30), 0 4px 16px var(--accent-15);
}

.payment-method-label input[type="radio"] {
  accent-color: var(--accent);
  cursor: pointer;
}

/* ── Content cards (contact / legal / FAQ sections) ──────────────────────── */
.content-card {
  background: var(--surface-card);
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--border-accent-soft);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition-smooth);
}

.content-card + .content-card {
  margin-top: 1.5rem;
}

.content-card--sm {
  padding: 1.5rem;
}

.content-card--flat {
  backdrop-filter: none;
  border-color: var(--white-08);
}

.content-card h2,
.content-card h3 {
  margin-top: 0;
  color: var(--text-primary);
}

.content-card h3 {
  margin-bottom: 0.5rem;
}

.content-card p,
.content-card ul,
.content-card ol {
  color: var(--text-secondary);
  line-height: 1.6;
}

.content-card p:last-child,
.content-card ul:last-child {
  margin-bottom: 0;
}

.content-card-icon {
  font-size: var(--fs-3xl);
  margin-bottom: 1rem;
}

/* FAQ accordion */
.faq-item {
  padding: 0;
  overflow: hidden;
}

.faq-item__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
  user-select: none;
  list-style: none;
}

.faq-item__summary::-webkit-details-marker {
  display: none;
}

.faq-item__summary::after {
  content: '';
  width: 0.6rem;
  height: 0.6rem;
  flex: 0 0 0.6rem;
  border-right: 2px solid var(--accent-light);
  border-bottom: 2px solid var(--accent-light);
  transform: rotate(45deg) translateY(-0.15rem);
  transition: transform 150ms ease;
}

.faq-item[open] .faq-item__summary::after {
  transform: rotate(225deg) translateY(-0.15rem);
}

.faq-item__summary:hover {
  color: var(--accent-light);
}

.faq-item__summary:focus-visible {
  outline: 2px solid var(--accent-light);
  outline-offset: -2px;
}

.faq-item__answer {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.faq-item__answer p:last-child {
  margin-bottom: 0;
}

.status-icon {
  font-size: var(--fs-4xl);
  margin-bottom: 1rem;
}

/* ── Misc ─────────────────────────────────────────────────────────────────── */
.page-header {
  padding: 2rem 0 1rem;
  border-bottom: 1px solid var(--accent-20);
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: var(--fs-2xl);
  font-weight: 700;
  margin: 0;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-faint);
}

.empty-state h2 {
  color: var(--text-muted);
}

a {
  color: var(--accent);
  transition: var(--transition-fast);
}

a:hover {
  color: var(--accent-light);
  text-decoration: underline;
}

footer.site-footer {
  border-top: 1px solid var(--accent-15);
  padding: 1rem;
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--text-disabled);
  margin-top: 2rem;
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  margin-right: 1.5rem;
}

.footer-links a:last-child {
  margin-right: 0;
}

/* Lang switcher — segmented pill */
.lang-form {
  display: inline-flex;
  margin: 0;
  background: var(--white-05);
  border: 1px solid var(--white-12);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
  backdrop-filter: blur(8px);
}

.lang-btn {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-subtle);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: var(--transition-fast);
  line-height: 1.4;
  margin: 0;
}

.lang-btn:hover {
  color: var(--white-85);
  background: var(--white-08);
}

.lang-btn.active {
  background: var(--gradient-accent);
  color: var(--text-on-accent);
  box-shadow: 0 2px 8px var(--accent-30);
}

/* Nav links */
.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: var(--fs-base);
  transition: var(--transition-fast);
}
.nav-link:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-register {
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: var(--fs-base);
  text-decoration: none;
}

/* Dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.75rem;
  background: var(--white-08);
  backdrop-filter: blur(8px);
  border: 1px solid var(--white-15);
  border-radius: 999px;
  color: var(--white-85);
  font-size: var(--fs-base);
  cursor: pointer;
  transition: var(--transition-fast);
}

.nav-dropdown-trigger:hover {
  background: var(--white-12);
  border-color: var(--accent-40);
  color: var(--text-primary);
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100%);
  right: 0;
  min-width: 200px;
  background: var(--surface-1-95);
  backdrop-filter: blur(20px);
  border: 1px solid var(--white-12);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px var(--black-40);
  z-index: 200;
  animation: dropdown-in 0.15s ease;
}

@keyframes dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
  display: block;
}

.nav-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  margin: 0;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: var(--white-80);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
}

.nav-dropdown-item:hover {
  background: var(--accent-12);
  color: var(--text-primary);
  text-decoration: none;
}

.nav-dropdown-item--danger {
  color: var(--color-danger);
}

.nav-dropdown-item--danger:hover {
  background: var(--danger-12);
  color: var(--color-danger);
}

/* ── Account layout ───────────────────────────────────────────────────────── */
.account-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 2rem;
  margin-top: 1rem;
}

@media (max-width: 640px) {
  .account-layout {
    grid-template-columns: 1fr;
  }
}

.account-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  align-self: start;
}

.account-nav-link {
  display: block;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: var(--fs-base);
  color: var(--text-secondary);
  text-decoration: none;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.account-nav-link:hover {
  background: var(--white-05);
  color: var(--white-90);
  text-decoration: none;
}

.account-nav-link.active {
  background: var(--accent-10);
  border-color: var(--accent-25);
  color: var(--text-primary);
  font-weight: 500;
}

.account-content {
  min-width: 0;
}

/* Alert banners */
.homepage-banner {
  border: 1px solid;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

.homepage-banner h2 {
  margin: 0 0 0.35rem;
  font-size: var(--fs-lg);
}

.homepage-banner p:last-child {
  margin-bottom: 0;
}

.homepage-banner--info {
  background: var(--accent-10);
  border-color: var(--accent-30);
  color: var(--text-primary);
}

.homepage-banner--success {
  background: var(--success-12);
  border-color: var(--success-30);
  color: var(--color-success);
}

.homepage-banner--warning {
  background: var(--warning-15);
  border-color: var(--warning-30);
  color: var(--text-primary);
}

.homepage-banner--danger {
  background: var(--danger-12);
  border-color: var(--danger-30);
  color: var(--color-danger);
}

.alert-success {
  background: var(--success-12);
  border: 1px solid var(--success-30);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--color-success);
  margin-bottom: 1.25rem;
  font-size: var(--fs-md);
}

.alert-danger {
  background: var(--danger-12);
  border: 1px solid var(--danger-30);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
  color: var(--color-danger);
  margin-bottom: 1.25rem;
  font-size: var(--fs-md);
}

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .form-grid { grid-template-columns: 1fr; }
}

/* Card rows */
.card-row {
  transition: var(--transition-smooth);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
}

.card-row:hover {
  border-color: var(--accent-20);
}

.card-row-actions {
  flex-shrink: 0;
}

.card-add-form {
  border-radius: var(--radius);
}

.card-rename-form {
  margin-top: 1rem;
  border-top: 1px solid var(--white-08);
  padding-top: 1rem;
}

.card-rename-form.d-none {
  display: none;
}

.btn-chip {
  padding: 0.3rem 0.75rem;
  font-size: var(--fs-sm);
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
}

.btn-chip-neutral {
  background: var(--white-08);
  border: 1px solid var(--white-15);
  color: var(--text-secondary);
}

.btn-chip-danger {
  background: var(--danger-10);
  border: 1px solid var(--danger-30);
  color: var(--color-danger);
}

/* ── Orders list ─────────────────────────────────────────────────────────── */
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.order-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

.order-card:hover {
  border-color: var(--accent-35);
  box-shadow: var(--glass-shadow-hover);
  color: inherit;
  text-decoration: none;
}

.order-card-main {
  flex: 1;
  min-width: 0;
}

.order-card-name {
  font-weight: 600;
  font-size: var(--fs-md);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card-date {
  font-size: var(--fs-xs);
  color: var(--text-faint);
  margin-top: 0.2rem;
}

.order-card-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.order-card-amount {
  font-weight: 700;
  font-size: var(--fs-md);
}

.order-card-pay {
  font-size: var(--fs-base);
  font-weight: 600;
  color: var(--accent);
}

.order-card-arrow {
  color: var(--text-faint);
  font-size: 1rem;
}

/* ── Order detail ────────────────────────────────────────────────────────── */
.order-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  align-items: start;
}

.order-ticket-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: var(--surface-card);
  border: 1px solid var(--white-08);
  border-radius: var(--radius-sm);
  padding: 0.75rem 1rem;
}

.hide-mobile { }
.show-mobile { display: none; }

/* ── Checkout ────────────────────────────────────────────────────────────── */
.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 2rem;
  align-items: start;
}

/* ── Mobile nav ──────────────────────────────────────────────────────────── */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
}

.nav-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white-80);
  border-radius: 2px;
  transition: var(--transition-fast);
}

.nav-mobile-menu {
  display: none;
  position: absolute;
  top: 60px;
  left: 0;
  right: 0;
  background: var(--overlay-panel);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--white-08);
  padding: 0.75rem 1rem;
  z-index: 200;
  box-shadow: 0 8px 32px var(--black-40);
}

.nav-mobile-menu.open {
  display: block;
}

.nav-mobile-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.5rem;
  color: var(--white-80);
  text-decoration: none;
  font-size: var(--fs-md);
  border-bottom: 1px solid var(--white-05);
  transition: var(--transition-fast);
}

.nav-mobile-item:last-child {
  border-bottom: none;
}

.nav-mobile-item:hover {
  color: var(--text-primary);
  text-decoration: none;
}

.nav-mobile-item--danger {
  color: var(--color-danger);
}

.nav-mobile-item--danger:hover {
  color: var(--color-danger);
}

.nav-mobile-item-btn {
  width: 100%;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
}

.nav-mobile-divider {
  height: 1px;
  background: var(--accent-20);
  margin: 0.4rem 0;
}

.nav-mobile-lang-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 0.5rem 0.25rem;
}

/* ── Mobile breakpoints ──────────────────────────────────────────────────── */
@media (max-width: 640px) {
  /* Nav: hide desktop items, show hamburger */
  nav.top-nav {
    position: relative;
  }

  .nav-right .nav-link,
  .nav-right .nav-register,
  .nav-right .nav-dropdown,
  .nav-right .lang-form {
    display: none;
  }

  .nav-hamburger {
    display: flex;
  }

  /* Cart badge: shorter on mobile */
  .cart-badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.6rem;
  }

  /* Container padding */
  .container {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  /* Search card */
  .search-card {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-sm);
  }

  .search-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  /* Hero text */
  .hero {
    padding: 2rem 0.5rem 1.5rem;
  }

  .hero h1 {
    font-size: clamp(1.6rem, 8vw, 2.5rem);
  }

  /* Account layout: stacked on mobile */
  .account-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .account-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .account-nav-link {
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
  }

  /* Card row: stack actions on small screens */
  .card-row > div:first-child {
    flex-wrap: wrap;
  }

  /* Auth card */
  .auth-card {
    margin: 2rem auto;
    padding: 1.5rem 1rem;
  }

  /* Page header */
  .page-header {
    padding: 1.25rem 0 0.75rem;
    margin-bottom: 1.25rem;
  }

  /* Totals box */
  .totals-box {
    max-width: 100%;
  }

  /* Orders list */
  .order-card-right {
    gap: 0.5rem;
  }

  .order-card-amount {
    font-size: 0.875rem;
  }

  /* Order detail: sidebar moves above main content on mobile */
  .order-detail-grid {
    grid-template-columns: 1fr;
  }

  .order-detail-sidebar {
    order: -1;
  }

  /* Checkout: stack on mobile */
  .checkout-grid {
    grid-template-columns: 1fr;
  }

  .hide-mobile { display: none; }
  .show-mobile { display: inline; }
}
