/* ==========================================================================
   RPLAY.LT — COMPONENTS
   Reusable interface pieces. Every component reads its values from tokens.css;
   no colour, radius, duration or spacing literal appears below.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   Variants: primary | secondary | ghost | danger. Sizes: default | sm | lg.
   Every variant supports hover, active, focus-visible, disabled and loading.
   -------------------------------------------------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-border: var(--stroke-strong);
  --btn-shadow: none;

  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 12px 20px;
  border: 1px solid var(--btn-border);
  border-radius: var(--r-full);
  background: var(--btn-bg);
  color: var(--btn-fg);
  box-shadow: var(--btn-shadow);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  isolation: isolate;
  transition:
    background var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out),
    box-shadow var(--dur-2) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}

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

.btn svg,
.btn img { flex: none; width: 18px; height: 18px; }

/* Primary — muted iOS blue glass. No neon / solid gradient fill. */
.btn--primary {
  --btn-bg: var(--ios-blue-soft);
  --btn-fg: #8dccff;
  --btn-border: var(--ios-blue-border);
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045), 0 10px 26px -20px rgba(51, 162, 255, 0.42);
}

.btn--primary:hover {
  --btn-bg: var(--ios-blue-hover);
  --btn-fg: #b6deff;
  --btn-border: rgba(51, 162, 255, 0.34);
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 28px -20px rgba(51, 162, 255, 0.5);
}

/* Secondary — neutral iOS/milky glass with only a faint blue reaction. */
.btn--secondary {
  --btn-bg: var(--ios-neutral-soft);
  --btn-fg: var(--text-2);
  --btn-border: rgba(255, 255, 255, 0.095);
  --btn-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.btn--secondary:hover {
  --btn-bg: rgba(51, 162, 255, 0.065);
  --btn-border: rgba(51, 162, 255, 0.18);
  --btn-fg: #dcecff;
}

/* Ghost controls stay quiet until interaction. */
.btn--ghost {
  --btn-bg: rgba(255, 255, 255, 0.012);
  --btn-border: rgba(255, 255, 255, 0.045);
  --btn-fg: var(--text-2);
  padding-inline: 14px;
}

.btn--ghost:hover {
  --btn-bg: rgba(51, 162, 255, 0.055);
  --btn-fg: var(--text);
  --btn-border: rgba(51, 162, 255, 0.15);
}

.btn--danger {
  --btn-bg: var(--ios-red-soft);
  --btn-fg: #ff8f87;
  --btn-border: rgba(255, 69, 58, 0.24);
}

.btn--danger:hover {
  --btn-bg: var(--ios-red-hover);
  --btn-border: rgba(255, 69, 58, 0.34);
  --btn-fg: #ffaaa4;
}

.btn--sm { padding: 8px 14px; font-size: var(--fs-xs); }
.btn--sm svg, .btn--sm img { width: 15px; height: 15px; }

.btn--lg { padding: 16px 28px; font-size: 1rem; }
.btn--lg svg, .btn--lg img { width: 20px; height: 20px; }

.btn--block { width: 100%; }

.btn[disabled],
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  filter: none;
  pointer-events: none;
}

/* Loading — the label stays in place (so the button keeps its width) but is
   hidden from sight and from assistive tech, and a spinner takes over. */
.btn[data-loading="true"] {
  pointer-events: none;
  color: transparent;
}

.btn[data-loading="true"] > * { visibility: hidden; }

.btn[data-loading="true"]::after {
  content: "";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  color: var(--btn-fg);
  animation: rplay-spin 620ms linear infinite;
}

@keyframes rplay-spin { to { transform: rotate(360deg); } }

/* Icon-only button. Always needs an aria-label in the markup. */
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(51, 162, 255, 0.10);
  border-radius: var(--r-full);
  background: rgba(51, 162, 255, 0.035);
  color: var(--text-2);
  cursor: pointer;
  transition:
    background var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}

.icon-btn:hover {
  background: rgba(51, 162, 255, 0.09);
  border-color: rgba(51, 162, 255, 0.20);
  color: #dcecff;
}

.icon-btn:active { transform: scale(0.94); }

.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm svg { width: 16px; height: 16px; }

.icon-btn--xs { width: 32px; height: 32px; }
.icon-btn--xs svg { width: 15px; height: 15px; }

/* --------------------------------------------------------------------------
   Badges and pills
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-full);
  background: var(--neutral-wash);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.5;
  white-space: nowrap;
}

.badge--accent  { background: var(--accent-wash);  color: var(--accent);  border-color: var(--stroke-accent); }
.badge--gold    { background: var(--gold-wash);    color: var(--gold);    border-color: rgba(255, 166, 64, 0.3); }
.badge--success { background: var(--success-wash); color: var(--success); border-color: rgba(53, 214, 160, 0.3); }
.badge--warning { background: var(--warning-wash); color: var(--warning); border-color: rgba(255, 194, 75, 0.3); }
.badge--danger  { background: var(--danger-wash);  color: var(--danger);  border-color: rgba(255, 93, 107, 0.3); }

/* Status dot. The ring pulses only while the state is live, and never under
   reduced motion (handled globally in base.css). */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
  position: relative;
}

.dot--live::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0;
  animation: rplay-ping 2.4s var(--ease-out) infinite;
}

@keyframes rplay-ping {
  0%   { opacity: 0.7; transform: scale(0.6); }
  70%  { opacity: 0;   transform: scale(1.5); }
  100% { opacity: 0;   transform: scale(1.5); }
}

/* --------------------------------------------------------------------------
   Cards
   The base card is a flat surface with a hairline border. Glass and lift are
   opt-in modifiers, used sparingly — not every card is a glass card.
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--s-5);
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
}

/* A one-pixel highlight along the top edge, as if lit from above. Cheap, and
   it is what makes the flat surfaces read as physical rather than painted. */
.card--lit::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.16) 30%, rgba(255, 255, 255, 0.16) 70%, transparent);
}

.card--interactive {
  transition:
    border-color var(--dur-3) var(--ease-out),
    background var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out);
}

.card--interactive:hover {
  border-color: var(--stroke-accent);
  background: var(--surface-hover);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.card__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: var(--s-4);
  border: 1px solid var(--stroke-accent);
  border-radius: var(--r-sm);
  background: var(--accent-wash);
  color: var(--accent);
}

.card__icon svg { width: 20px; height: 20px; }

.card h3 { margin-bottom: var(--s-2); }

.card p { color: var(--text-muted); font-size: var(--fs-sm); line-height: var(--lh-loose); }

/* --------------------------------------------------------------------------
   Header + navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  background: transparent;
  transition: transform var(--dur-3) var(--ease-out);
}

/* Retracts on scroll-down, returns on scroll-up. Toggled from app.js. */
.site-header.is-hidden { transform: translateY(calc(-100% - 12px)); }

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  height: 68px;
  margin-top: var(--s-3);
  padding-inline: var(--s-4);
  border: 1px solid var(--stroke);
  border-radius: var(--r-full);
  background: rgba(9, 13, 26, 0.94);
  transition:
    background var(--dur-3) var(--ease-out),
    border-color var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out);
}

/* Once the page has scrolled, the bar densifies rather than changing shape. */
.site-header.is-stuck .site-header__inner {
  background: rgba(9, 13, 26, 0.98);
  border-color: var(--stroke-strong);
  box-shadow: var(--shadow-lg);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
  text-decoration: none;
  color: var(--text);
  flex: none;
}

/* RPLAY emblem. The supplied PNG is transparent artwork, so keep the whole
   silhouette visible instead of cropping it into a square tile. */
.brand__mark {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border: 0;
  border-radius: 0;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.28));
}

.brand__name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}

.brand__name span { color: var(--accent); }

.nav {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  margin-left: auto;
}

.nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 14px;
  border-radius: var(--r-full);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  text-decoration: none;
  transition: color var(--dur-2) var(--ease-out), background var(--dur-2) var(--ease-out);
}

.nav__link:hover { color: var(--text); background: var(--surface); }

/* Active section, driven by the scroll spy in app.js. */
.nav__link[aria-current] { color: var(--text); }

.nav__link[aria-current]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 3px;
  height: 2px;
  border-radius: var(--r-full);
  background: var(--accent);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  flex: none;
}

/* Dropdown ------------------------------------------------------------- */
.nav__group { position: relative; }

.nav__link .chev { width: 14px; height: 14px; transition: transform var(--dur-2) var(--ease-out); }

.nav__group[data-open="true"] .chev { transform: rotate(180deg); }

.nav__menu {
  position: absolute;
  /* Sits close under the bar so it reads as part of the header rather than a
     panel floating on its own. */
  top: calc(100% + 6px);
  left: 50%;
  z-index: var(--z-raised);
  width: 248px;
  padding: 6px;
  border: 1px solid var(--stroke-strong);
  border-radius: var(--r-md);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: var(--shadow-pop);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition:
    opacity var(--dur-2) var(--ease-out),
    transform var(--dur-2) var(--ease-out),
    visibility var(--dur-2);
}

.nav__group[data-open="true"] .nav__menu {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

/* Invisible bridge so the pointer can cross the gap without the menu closing. */
.nav__group::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 12px;
}

.nav__menu-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--r-sm);
  color: var(--text-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  transition:
    background var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out);
}

/* Hover reads as the row lighting up and the icon taking the accent, with a
   short rule sliding in on the left — the same language as the eyebrows. */
.nav__menu-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--accent);
  transform: translateY(-50%);
  transition: height var(--dur-2) var(--ease-out);
}

.nav__menu-link:hover,
.nav__menu-link:focus-visible {
  background: var(--surface-hover);
  color: var(--text);
}

.nav__menu-link:hover::before,
.nav__menu-link:focus-visible::before { height: 56%; }

.nav__menu-link[aria-current] { color: var(--text); background: var(--accent-wash); }
.nav__menu-link[aria-current]::before { height: 56%; }

.nav__menu-link svg {
  width: 17px;
  height: 17px;
  flex: none;
  color: var(--text-faint);
  transition: color var(--dur-2) var(--ease-out);
}

.nav__menu-link:hover svg,
.nav__menu-link:focus-visible svg,
.nav__menu-link[aria-current] svg { color: var(--accent); }

.nav__menu-link small {
  display: block;
  margin-top: 1px;
  color: var(--text-faint);
  font-size: 0.72rem;
  font-weight: 400;
}

/* Cart button ----------------------------------------------------------- */
.cart-btn { position: relative; }

.cart-btn__count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 19px;
  height: 19px;
  padding-inline: 5px;
  display: grid;
  place-items: center;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--text-on-accent);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  transform: scale(0);
  transition: transform var(--dur-2) var(--ease-spring);
}

.cart-btn__count[data-has-items="true"] { transform: scale(1); }

/* Burger ---------------------------------------------------------------- */
.burger { display: none; }

.burger__bars {
  position: relative;
  width: 18px;
  height: 12px;
}

.burger__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur-3) var(--ease-out), opacity var(--dur-2) var(--ease-out);
}

.burger__bars span:nth-child(1) { top: 0; }
.burger__bars span:nth-child(2) { top: 5px; }
.burger__bars span:nth-child(3) { top: 10px; }

.burger[aria-expanded="true"] .burger__bars span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.burger[aria-expanded="true"] .burger__bars span:nth-child(2) { opacity: 0; transform: scaleX(0.3); }
.burger[aria-expanded="true"] .burger__bars span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* Desktop / mobile switch ------------------------------------------------ */
@media (max-width: 1040px) {
  :root { --header-space: 74px; }
  .nav { display: none; }
  .burger { display: inline-grid; }
  .cart-btn .btn__label { display: none; }
  /* The Discord call to action moves into the sheet; three labelled controls
     do not fit beside the wordmark on a phone. */
  .nav__actions > .btn--primary { display: none; }
  .site-header__inner { height: 62px; padding-inline: var(--s-3); }
  .brand__name { font-size: 1.35rem; }
}

@media (max-width: 380px) {
  .brand__mark { width: 32px; height: 32px; }
  .brand__name { font-size: 1.2rem; }
  .site-header__inner { gap: var(--s-2); }
}

/* --------------------------------------------------------------------------
   Mobile navigation sheet
   A full-height panel, not the desktop bar squeezed narrow.
   -------------------------------------------------------------------------- */
.mobile-nav {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: var(--z-drawer);
  width: min(400px, 88vw);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  padding: calc(var(--s-6) + env(safe-area-inset-top)) var(--s-5) calc(var(--s-6) + env(safe-area-inset-bottom));
  border-left: 1px solid var(--stroke-strong);
  background: #090d1a;
  box-shadow: var(--shadow-pop);
  transform: translateX(100%);
  visibility: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition:
    transform var(--dur-3) var(--ease-out),
    visibility var(--dur-3);
}

.mobile-nav.is-open { transform: none; visibility: visible; }

.mobile-nav__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--s-4);
}

.mobile-nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: 15px var(--s-4);
  border: 1px solid transparent;
  border-radius: var(--r-md);
  color: var(--text);
  font-size: 1.0625rem;
  font-weight: 500;
  text-decoration: none;
  transition: background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}

.mobile-nav__link:hover,
.mobile-nav__link:active { background: var(--surface-hover); border-color: var(--stroke); }

.mobile-nav__link[aria-current] { border-color: var(--stroke-accent); background: var(--accent-wash); }

.mobile-nav__acc-panel {
  display: grid;
  gap: var(--s-1);
  padding-left: var(--s-4);
  margin-block: var(--s-1);
}

.mobile-nav__sublink {
  padding: 11px var(--s-4);
  border-left: 1px solid var(--stroke-strong);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  text-decoration: none;
  transition: color var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}

.mobile-nav__sublink:hover { color: var(--text); border-color: var(--accent); }

.mobile-nav__foot { margin-top: auto; padding-top: var(--s-5); display: grid; gap: var(--s-3); }

.mobile-nav [aria-expanded="true"] .chev { transform: rotate(180deg); }
.mobile-nav .chev { width: 16px; height: 16px; transition: transform var(--dur-2) var(--ease-out); }

/* --------------------------------------------------------------------------
   Backdrop — shared by the mobile sheet, the cart and the lightbox.
   -------------------------------------------------------------------------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-backdrop);
  background: rgba(3, 5, 10, 0.62);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-3) var(--ease-out), visibility var(--dur-3);
}

.backdrop.is-open { opacity: 1; visibility: visible; }

/* --------------------------------------------------------------------------
   Cart drawer
   -------------------------------------------------------------------------- */
.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: var(--z-drawer);
  width: min(440px, 92vw);
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--stroke-strong);
  background: var(--bg-elev-1);
  box-shadow: var(--shadow-pop);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--dur-3) var(--ease-out), visibility var(--dur-3);
}

.drawer.is-open { transform: none; visibility: visible; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  padding: var(--s-5) var(--s-5) var(--s-4);
  padding-top: calc(var(--s-5) + env(safe-area-inset-top));
  border-bottom: 1px solid var(--stroke);
}

.drawer__title { font-family: var(--font-display); font-size: 1.75rem; line-height: 1; }

.drawer__body {
  flex: 1;
  min-height: 0;
  padding: var(--s-4) var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.drawer__foot {
  padding: var(--s-5);
  padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom));
  border-top: 1px solid var(--stroke);
  background: var(--bg-elev-2);
  display: grid;
  gap: var(--s-3);
}

.drawer__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
}

.drawer__total dt { color: var(--text-muted); font-size: var(--fs-sm); }

.drawer__total dd {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* Cart line ------------------------------------------------------------- */
.cart-line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: var(--s-3);
  align-items: center;
  padding: var(--s-3);
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--surface);
}

.cart-line__media {
  width: 64px;
  height: 48px;
  border-radius: var(--r-xs);
  object-fit: cover;
  background: var(--bg-sunken);
  border: 1px solid var(--stroke);
}

/* Services have no photograph, so they get an icon tile at the same size. */
.cart-line__media--icon {
  display: grid;
  place-items: center;
  background: var(--accent-wash);
  border-color: var(--stroke-accent);
  color: var(--accent);
}

.cart-line__media--icon svg { width: 22px; height: 22px; }

.cart-line__title { font-size: var(--fs-sm); font-weight: 700; line-height: var(--lh-snug); }

.cart-line__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.cart-line__side { display: grid; gap: var(--s-2); justify-items: end; }

.cart-line__price {
  font-family: var(--font-mono);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--stroke-strong);
  border-radius: var(--r-full);
  overflow: hidden;
}

.qty button {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  background: rgba(51, 162, 255, 0.025);
  color: var(--text-2);
  cursor: pointer;
  transition: background var(--dur-1) var(--ease-out), color var(--dur-1) var(--ease-out);
}

.qty button:hover { background: rgba(51, 162, 255, 0.09); color: #dcecff; }

.qty output {
  min-width: 30px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}

/* Empty state — an invitation to act, not an apology. */
.empty-state {
  margin: auto;
  padding: var(--s-6) var(--s-4);
  display: grid;
  gap: var(--s-3);
  justify-items: center;
  text-align: center;
  color: var(--text-muted);
}

.empty-state svg { width: 40px; height: 40px; color: var(--text-faint); }

.empty-state strong { color: var(--text); font-family: var(--font-display); font-size: 1.5rem; }

/* --------------------------------------------------------------------------
   Notices — used for honest "not connected yet" states.
   -------------------------------------------------------------------------- */
.notice {
  display: flex;
  gap: var(--s-3);
  padding: var(--s-4);
  border: 1px solid var(--stroke);
  border-radius: var(--r-md);
  background: var(--surface);
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--text-2);
}

.notice svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }

.notice--info    { border-color: var(--stroke-accent);            background: var(--accent-wash); }
.notice--info svg    { color: var(--accent); }
.notice--warning { border-color: rgba(255, 194, 75, 0.3);         background: var(--warning-wash); }
.notice--warning svg { color: var(--warning); }
.notice--danger  { border-color: rgba(255, 93, 107, 0.32);        background: var(--danger-wash); }
.notice--danger svg  { color: var(--danger); }

/* --------------------------------------------------------------------------
   Tabs — used by the store category switcher.
   -------------------------------------------------------------------------- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  padding: 5px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-full);
  background: var(--surface);
  width: fit-content;
  max-width: 100%;
}

.tab {
  padding: 9px 18px;
  border-radius: var(--r-full);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}

.tab:hover { color: #dcecff; background: rgba(51, 162, 255, 0.045); }

.tab[aria-selected="true"],
.tab[aria-pressed="true"] {
  background: var(--ios-blue-soft);
  color: #8dccff;
  box-shadow: inset 0 0 0 1px var(--ios-blue-border);
}

/* --------------------------------------------------------------------------
   Product card
   -------------------------------------------------------------------------- */
.product {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--stroke);
  border-radius: var(--r-lg);
  background: var(--surface);
  overflow: hidden;
  transition:
    border-color var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out),
    box-shadow var(--dur-3) var(--ease-out);
}

.product:hover {
  border-color: var(--stroke-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.product__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: var(--bg-sunken);
  overflow: hidden;
}

.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-4) var(--ease-out);
}

.product:hover .product__media img { transform: scale(1.045); }

/* Keeps the title legible over any car photograph. */
.product__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7, 10, 18, 0.75), transparent 55%);
  pointer-events: none;
}

.product__body {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  padding: var(--s-4);
  flex: 1;
}

.product__title { font-size: 1rem; font-weight: 700; line-height: var(--lh-snug); }

.product__note {
  font-size: var(--fs-sm);
  line-height: var(--lh-snug);
  color: var(--text-muted);
}

/* --- Text-led variant -----------------------------------------------------
   Used while there is no real product photography. The model name becomes the
   subject, set in the condensed display face, over a faint brand wash. */
.product--text { min-height: 210px; }

.product--text .product__body {
  padding: var(--s-5);
  gap: var(--s-4);
  background:
    radial-gradient(120% 90% at 100% 0%, var(--accent-wash), transparent 62%);
}

.product--text .badge { align-self: flex-start; }

.product--text .product__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.product--text .product__foot {
  padding-top: var(--s-4);
  border-top: 1px solid var(--stroke);
}

.product__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-top: auto;
}

.product__price {
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Back to top
   -------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: var(--gutter);
  bottom: calc(var(--gutter) + env(safe-area-inset-bottom));
  z-index: var(--z-sticky);
  background: var(--glass-strong);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-color: var(--stroke-strong);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition:
    opacity var(--dur-3) var(--ease-out),
    transform var(--dur-3) var(--ease-out),
    visibility var(--dur-3);
}

.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* While the cart is open the button would sit on top of the drawer. */
body.is-locked .to-top { opacity: 0; visibility: hidden; }

/* --------------------------------------------------------------------------
   CHIP — a filter toggle. Lighter than a tab: tabs switch views, chips narrow
   the view you are already in.
   -------------------------------------------------------------------------- */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid var(--stroke);
  border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background var(--dur-2) var(--ease-out),
    border-color var(--dur-2) var(--ease-out),
    color var(--dur-2) var(--ease-out);
}

.chip:hover { color: #dcecff; border-color: rgba(51, 162, 255, 0.16); background: rgba(51, 162, 255, 0.04); }

.chip[aria-pressed="true"] {
  background: var(--ios-blue-soft);
  border-color: var(--ios-blue-border);
  color: #8dccff;
  font-weight: 700;
}

/* --------------------------------------------------------------------------
   FIGURE — a single number with a label under it, for page-head asides.
   -------------------------------------------------------------------------- */
.figure { display: grid; gap: 2px; }

.figure__value {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.2rem);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.figure__label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-faint);
}

/* --------------------------------------------------------------------------
   Discord account state
   The top-right Discord CTA is replaced by this compact identity chip after
   a successful server-side OAuth login. It keeps the same visual weight as
   the existing iOS/milky header controls rather than adding a second panel.
   -------------------------------------------------------------------------- */
.account-slot {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.account-chip {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 7px 6px 8px;
  border: 1px solid rgba(51, 162, 255, 0.22);
  border-radius: var(--r-full);
  background: rgba(51, 162, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  color: var(--text-2);
}

.account-chip__avatar {
  width: 28px;
  height: 28px;
  flex: none;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid rgba(116, 197, 255, 0.26);
  background: rgba(51, 162, 255, 0.10);
}

.account-chip__avatar--fallback {
  display: grid;
  place-items: center;
  color: var(--accent-hi);
  font-size: 0.72rem;
  font-weight: 700;
}

.account-chip__name {
  max-width: 112px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
}

.account-chip__logout {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  flex: none;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-faint);
  cursor: pointer;
  transition:
    color var(--dur-2) var(--ease-out),
    background var(--dur-2) var(--ease-out),
    opacity var(--dur-2) var(--ease-out);
}

.account-chip__logout svg { width: 16px; height: 16px; }
.account-chip__logout:hover,
.account-chip__logout:focus-visible {
  color: var(--accent-hi);
  background: rgba(51, 162, 255, 0.09);
}
.account-chip__logout:disabled { opacity: 0.45; cursor: wait; }

.mobile-account-slot { width: 100%; }
.mobile-account-slot[hidden] { display: none; }

.account-chip--mobile {
  width: 100%;
  min-height: 54px;
  padding: 8px 9px 8px 10px;
  gap: 10px;
}

.account-chip--mobile .account-chip__avatar {
  width: 34px;
  height: 34px;
}

.account-chip__identity {
  min-width: 0;
  display: grid;
  gap: 1px;
  margin-right: auto;
}

.account-chip__identity strong,
.account-chip__identity small {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.account-chip__identity strong {
  color: var(--text);
  font-size: var(--fs-sm);
}

.account-chip__identity small {
  color: var(--text-faint);
  font-size: 0.72rem;
}

.mobile-discord-login {
  gap: 8px;
}

@media (max-width: 1040px) {
  .nav__actions > .account-slot { display: none !important; }
}

[data-discord-login][hidden],
.account-slot[hidden] {
  display: none !important;
}

/* Logged-in identity opens the private account center without changing the
   visual weight of the existing header chip. */
.account-chip__open {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.account-chip__open:hover .account-chip__name { color: var(--accent-hi); }
.account-chip__open--mobile { flex: 1; min-width: 0; gap: 10px; }

/* ========================================================================== 
   Public index header — clean final navigation
   ========================================================================== */
.discord-login-btn {
  min-height: 44px;
  padding-inline: 17px;
  gap: 8px;
  white-space: nowrap;
  background: rgba(51, 162, 255, 0.11);
  border-color: rgba(51, 162, 255, 0.28);
  color: #9fd5ff;
  box-shadow: none;
}
.discord-login-btn:hover,
.discord-login-btn:focus-visible {
  background: rgba(51, 162, 255, 0.16);
  border-color: rgba(51, 162, 255, 0.38);
  color: #c5e7ff;
  box-shadow: none;
}
.discord-login-btn svg { width: 17px; height: 17px; flex: none; }

.mobile-nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mobile-nav__brand img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
.mobile-nav__close {
  flex: none;
  width: 42px;
  height: 42px;
}
.mobile-nav__links {
  display: grid;
  gap: 5px;
}
.mobile-nav__link > svg {
  width: 17px;
  height: 17px;
  color: var(--text-faint);
  transition: transform var(--dur-2) var(--ease-out), color var(--dur-2) var(--ease-out);
}
.mobile-nav__link:hover > svg,
.mobile-nav__link:focus-visible > svg {
  transform: translateX(2px);
  color: var(--accent);
}
.mobile-nav__hint {
  margin: 0;
  color: var(--text-faint);
  font-size: 0.76rem;
  line-height: 1.45;
}

/* With Paslaugos and Krepšelis removed the desktop navigation has room to
   remain visible longer. Only switch to the dedicated sheet on compact widths. */
@media (min-width: 901px) {
  .site-header .nav { display: flex; }
  .site-header .burger { display: none; }
  .site-header .nav__actions > .discord-login-btn { display: inline-flex; }
}

@media (max-width: 900px) {
  :root { --header-space: 74px; }
  .site-header .nav { display: none; }
  .site-header .burger { display: inline-grid; }
  .site-header .nav__actions > .discord-login-btn { display: none; }
  .site-header__inner {
    height: 62px;
    margin-top: 10px;
    padding-inline: 13px;
    gap: 10px;
  }

  .mobile-nav {
    width: min(360px, 92vw);
    gap: 0;
    padding: calc(18px + env(safe-area-inset-top)) 16px calc(18px + env(safe-area-inset-bottom));
    border-left: 1px solid rgba(255,255,255,0.08);
    background: #080d15;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: -18px 0 50px rgba(0,0,0,0.34);
  }
  .mobile-nav__head {
    min-height: 50px;
    margin-bottom: 22px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--stroke);
  }
  .mobile-nav__link {
    min-height: 50px;
    padding: 12px 13px;
    border-radius: 12px;
    font-size: 0.98rem;
  }
  .mobile-nav__foot {
    padding-top: 20px;
    gap: 10px;
    border-top: 1px solid var(--stroke);
  }
  .mobile-discord-login {
    min-height: 48px;
    justify-content: center;
    border-radius: 13px;
  }
}

@media (max-width: 420px) {
  .site-header .container { padding-inline: 10px; }
  .site-header__inner { padding-inline: 11px; }
  .brand { gap: 8px; }
  .brand__mark { width: 32px; height: 32px; }
  .brand__name { font-size: 1.18rem; }
}


/* ==========================================================================
   Mobile header spacing v24
   Keep the existing header design; only use the free width correctly.
   ========================================================================== */
@media(max-width:900px){
  .site-header__inner{width:100%}
  .site-header .nav__actions{margin-left:auto}
  .site-header .burger{margin-left:auto;flex:0 0 auto}
}
@media(max-width:420px){
  .site-header .container{padding-inline:12px}
  .site-header__inner{padding-inline:13px}
}
