/* ============================================================
   BARG CLUB — PIT-LANE RADIO CHAT & CAFE VAULT (2026)
   ============================================================ */
.cafe-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
}
@media (min-width: 900px) {
  .cafe-layout { grid-template-columns: minmax(0, 1fr) 350px; }
}
.cafe-cats {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 6px;
  scrollbar-width: none;
  max-width: 100%;
}
.cafe-cats::-webkit-scrollbar { display: none; }
.cat-btn {
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(14,22,18,0.78), rgba(7,12,10,0.88));
  border: 1px solid var(--border-2);
  color: var(--muted);
  padding: 9px 18px;
  min-height: 42px;
  border-radius: 999px;
  font-size: 0.81rem;
  font-weight: 800;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--dur-2) var(--ease);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.cat-btn:hover { color: var(--text); border-color: var(--border-3); transform: translateY(-1px); }
.cat-btn:active { transform: scale(0.96); }
.cat-btn.active {
  background: linear-gradient(135deg, var(--emerald) 0%, var(--emerald-2) 100%);
  border-color: var(--emerald);
  color: #03110a;
  box-shadow: 0 6px 20px rgba(24,246,162,0.36), inset 0 1px 0 rgba(255,255,255,0.35);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
@media (min-width: 640px) {
  .menu-grid { grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: 14px; }
}
.menu-tile {
  background: linear-gradient(145deg, rgba(14,23,19,0.78), rgba(7,12,10,0.9));
  border: 1px solid var(--border-2);
  border-radius: var(--r-3);
  padding: 14px;
  display: flex; flex-direction: column;
  gap: 10px;
  justify-content: space-between;
  transition: all var(--dur-2) var(--ease);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.05);
}
.menu-tile::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(24,246,162,0.45), transparent);
  opacity: 0;
  transition: opacity var(--dur-3) var(--ease);
}
.menu-tile:hover {
  border-color: var(--emerald-line);
  transform: translateY(-3px);
  box-shadow: 0 14px 35px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}
.menu-tile:hover::before { opacity: 1; }
.menu-name {
  font-size: 0.9rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  min-height: 2.5em;
}
.menu-cat {
  font-size: 0.68rem;
  color: var(--muted);
  margin-top: 2px;
}
.menu-price {
  font-family: 'Teko', sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  direction: ltr;
  text-shadow: 0 0 14px var(--gold-glow);
}
.btn-add {
  background: var(--emerald-soft);
  border: 1px solid var(--emerald-line);
  color: var(--emerald);
  padding: 10px;
  min-height: 42px;
  border-radius: var(--r-2);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
  gap: 6px;
  transition: all var(--dur-1) var(--ease);
  width: 100%;
}
.btn-add:hover {
  background: var(--emerald);
  color: #03110a;
  box-shadow: 0 6px 20px rgba(24,246,162,0.35);
}
.btn-add:active { transform: scale(0.96); }

/* ---------- CART PANEL ---------- */
.cart-panel {
  display: none;
  background: linear-gradient(145deg, rgba(14,24,20,0.85), rgba(7,13,10,0.95));
  border: 1px solid var(--border-3);
  border-radius: var(--r-4);
  padding: 20px;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  position: sticky;
  top: calc(var(--safe-t) + 80px);
  box-shadow: 0 20px 55px rgba(0,0,0,0.55), inset 0 1px 0 rgba(255,255,255,0.06);
}
@media (min-width: 900px) {
  .cart-panel { display: flex; flex-direction: column; }
}
.cart-title {
  font-size: 0.98rem; font-weight: 900;
  display: flex; align-items: center; gap: 8px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-2);
  margin-bottom: 14px;
}
.cart-items {
  display: flex; flex-direction: column;
  gap: 10px;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 14px;
}
.cart-line {
  display: flex; justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
}
.cart-summary {
  display: flex; flex-direction: column;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border-2);
}
.cart-row {
  display: flex; justify-content: space-between;
  align-items: center;
  font-size: 0.86rem;
}
.cart-row.total b {
  color: var(--gold);
  font-family: 'Teko', sans-serif;
  font-size: 1.45rem;
  font-weight: 600;
  text-shadow: 0 0 14px var(--gold-glow);
}

@media (max-width: 899px) {
  .cart-panel {
    display: flex; flex-direction: column;
    position: fixed;
    inset-inline: 0; bottom: 0; top: auto;
    max-height: 90dvh;
    border-radius: 28px 28px 0 0;
    border-inline: none; border-bottom: none;
    padding: 28px 18px calc(24px + var(--safe-b));
    transform: translateY(105%);
    transition: transform 440ms var(--ease-spring);
    z-index: var(--z-sheet);
    box-shadow: 0 -25px 80px rgba(0,0,0,0.85);
  }
  .cart-panel.mobile-open { transform: translateY(0); }
  .cart-panel::before {
    content: '';
    position: absolute;
    top: 10px; left: 50%; transform: translateX(-50%);
    width: 42px; height: 4px;
    border-radius: 2px;
    background: rgba(255,255,255,0.22);
  }
}
.cart-backdrop {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.78);
  z-index: var(--z-backdrop);
  opacity: 0; visibility: hidden;
  transition: opacity 280ms var(--ease), visibility 280ms var(--ease);
}
.cart-backdrop.show { opacity: 1; visibility: visible; }

.floating-cart {
  display: none;
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + var(--safe-b) + 14px);
  left: 50%; transform: translateX(-50%);
  z-index: var(--z-floating);
  background: linear-gradient(135deg, #1af8a5 0%, #0db876 100%);
  color: #03110a;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.9rem;
  align-items: center;
  gap: 10px;
  box-shadow: 0 18px 45px rgba(24,246,162,0.45), inset 0 1px 0 rgba(255,255,255,0.4);
  cursor: pointer;
  min-height: 52px;
}
.floating-cart.show { display: inline-flex; animation: cartPopIn 360ms var(--ease-spring); }
@keyframes cartPopIn {
  from { opacity: 0; transform: translate(-50%, 18px) scale(0.9); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}
@media (min-width: 900px) { .floating-cart { display: none !important; } }

/* ---------- PIT-LANE RADIO CHAT ---------- */
.chat-shell {
  display: flex; flex-direction: column;
  background: linear-gradient(145deg, rgba(14,23,19,0.78), rgba(7,12,10,0.92));
  border: 1px solid var(--border-2);
  border-radius: var(--r-4);
  overflow: hidden;
  height: min(72vh, 670px);
  min-height: 420px;
  position: relative;
  box-shadow: 0 16px 45px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.05);
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 18px;
  border-bottom: 1px solid var(--border-2);
  background: rgba(255,255,255,0.02);
}
.chat-head h3 {
  font-size: 0.96rem; font-weight: 900;
  color: var(--emerald);
  display: flex; align-items: center; gap: 8px;
  text-shadow: 0 0 12px rgba(24,246,162,0.4);
}
.chat-live {
  font-size: 0.74rem;
  color: var(--cyan);
  display: inline-flex; align-items: center; gap: 6px;
  font-weight: 800;
}
.chat-live .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulseBeacon 1.6s ease-in-out infinite;
}
.chat-stream {
  flex: 1;
  padding: 18px;
  overflow-y: auto;
  display: flex; flex-direction: column;
  gap: 12px;
}
.chat-msg {
  display: flex; align-items: flex-start;
  gap: 10px;
  max-width: 88%;
  animation: chatMsgIn 240ms var(--ease-out);
}
@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.chat-msg.me { align-self: flex-start; }
.chat-msg.other { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble {
  padding: 10px 14px;
  border-radius: var(--r-2);
  background: rgba(22, 33, 27, 0.94);
  border: 1px solid var(--border-2);
  display: flex; flex-direction: column;
  gap: 5px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}
.chat-msg.me .chat-bubble {
  background: linear-gradient(135deg, rgba(24,246,162,0.16), rgba(24,246,162,0.06));
  border-color: var(--emerald-line);
}
.chat-text {
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
}
.chat-time {
  font-size: 0.64rem;
  color: var(--dim);
  align-self: flex-end;
  font-family: 'Teko', sans-serif;
}
.chat-input {
  padding: 12px 14px;
  border-top: 1px solid var(--border-2);
  background: rgba(6,10,9,0.75);
  display: flex; align-items: center;
  gap: 8px;
}
.chat-input input[type="text"] {
  flex: 1;
  padding: 11px 16px;
  border-radius: var(--r-2);
  background: rgba(22, 33, 27, 0.9);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 0.88rem;
  outline: none;
  min-height: 46px;
  transition: all var(--dur-2) var(--ease);
}
.chat-input input[type="text"]:focus {
  border-color: var(--emerald-line);
  box-shadow: 0 0 0 3px rgba(24,246,162,0.12), 0 0 20px rgba(24,246,162,0.16);
}