:root {
  --bg: #0e0e14;
  --bg-deep: #08080d;
  --surface: #17171f;
  --surface-2: #1f1f29;
  --surface-3: #272732;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f5f5f7;
  --muted: #a8adbb;
  --dim: #7a7f8c;
  --red: #ff1f2e;
  --red-soft: #ff4755;
  --red-glow: rgba(255, 31, 46, 0.35);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.35);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Space Grotesk", "Inter", sans-serif;
  --body: "Inter", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(900px 500px at 85% -10%, rgba(255, 31, 46, 0.12), transparent 60%),
    radial-gradient(700px 400px at -10% 20%, rgba(255, 255, 255, 0.04), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

main, header, footer { position: relative; z-index: 1; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.02em; line-height: 1.1; margin: 0; }
h1 { font-size: clamp(2rem, 5vw, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.2rem); font-weight: 600; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; line-height: 1.65; }

.container { width: min(1200px, 92%); margin-inline: auto; }

a.btn, button.btn { text-decoration: none; }

/* Header */
.site-header {
  position: sticky; top: 14px; z-index: 80;
  padding: 0 0 10px;
}
.nav-pill {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px;
  padding: 8px 10px 8px 14px;
  background: rgba(23, 23, 31, 0.78);
  border: 1px solid var(--border);
  border-radius: 999px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: var(--shadow-sm);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 600; font-size: 0.98rem;
  letter-spacing: -0.01em;
}
.brand-logo {
  width: 36px; height: 36px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff 0%, #f3f3f5 40%, #cfcfd3 100%);
  display: grid; place-items: center;
  overflow: hidden;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.brand-logo img { width: 82%; height: 82%; object-fit: contain; }
.brand:hover .brand-logo { transform: rotate(-10deg) scale(1.05); box-shadow: 0 0 0 2px var(--red), 0 10px 30px var(--red-glow); }
.brand:hover .brand-text { color: var(--red-soft); }
.brand-text { transition: color .3s var(--ease); }

.menu { display: none; list-style: none; padding: 0; margin: 0; gap: 4px; }
.menu a {
  display: inline-flex; padding: 8px 14px; border-radius: 999px;
  color: var(--muted); font-weight: 500; font-size: 0.92rem;
  transition: color .25s var(--ease), background .25s var(--ease);
}
.menu a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.menu a.active { color: #fff; background: rgba(255, 31, 46, 0.16); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-copyright {
  width: 26px; height: 26px;
  border: 1px solid var(--border);
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted);
  font-size: 0.8rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.03);
}

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px; color: var(--text);
  transition: background .25s var(--ease), border-color .25s var(--ease);
  position: relative;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--border-strong); }
.cart-count {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 999px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
  box-shadow: 0 0 0 2px var(--bg);
}

.menu-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border: 0; cursor: pointer;
  border-radius: 999px; background: var(--red); color: #fff;
  box-shadow: 0 6px 18px var(--red-glow);
  transition: transform .25s var(--ease);
}
.menu-toggle:hover { transform: scale(1.05); }

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 74px; left: 10px; right: 10px;
  background: rgba(15, 15, 20, 0.98);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  transform: translateY(-12px) scale(0.98);
  opacity: 0; visibility: hidden;
  transition: transform .3s var(--ease), opacity .3s var(--ease), visibility .3s var(--ease);
  backdrop-filter: blur(20px);
  z-index: 70;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.mobile-menu.open { transform: none; opacity: 1; visibility: visible; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.mobile-menu a {
  display: block; padding: 14px 16px; border-radius: 12px;
  color: var(--text); font-family: var(--display); font-size: 1.05rem;
  transition: background .2s var(--ease), color .2s var(--ease);
}
.mobile-menu a:hover, .mobile-menu a.active {
  background: rgba(255, 31, 46, 0.12); color: var(--red-soft);
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px;
  font-family: var(--display); font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .3s var(--ease), background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(135deg, #ff1f2e 0%, #d10f1c 100%);
  color: #fff;
  box-shadow: 0 10px 26px var(--red-glow), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
.btn-primary:hover { box-shadow: 0 14px 34px var(--red-glow); }
.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border-strong);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.06); }
.btn-dark { background: var(--surface-2); color: #fff; border-color: var(--border); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; }

/* Profile */
.auth-zone { position: relative; }
.profile-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 12px 4px 4px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  color: #fff; cursor: pointer; font-weight: 500; font-family: var(--body); font-size: 0.92rem;
  transition: background .25s var(--ease);
}
.profile-chip:hover { background: rgba(255, 255, 255, 0.08); }
.profile-chip img { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; }
.profile-menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: 230px;
  background: rgba(20, 20, 26, 0.98); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 6px;
  transform: translateY(-6px); opacity: 0; visibility: hidden;
  transition: transform .25s var(--ease), opacity .25s var(--ease), visibility .25s var(--ease);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  z-index: 90;
}
.profile-menu.open { transform: none; opacity: 1; visibility: visible; }
.profile-menu a, .profile-menu button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; border: 0; color: var(--text);
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  font-size: 0.92rem; font-family: var(--body);
}
.profile-menu a:hover, .profile-menu button:hover { background: rgba(255, 255, 255, 0.06); }
.profile-menu .danger { color: var(--red-soft); }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.input, .textarea, .select {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 12px 14px;
  border-radius: 12px;
  font-family: var(--body); font-size: 0.95rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease);
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 31, 46, 0.18);
}
.textarea { min-height: 120px; resize: vertical; }

/* Modals */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 16px;
  background: rgba(5, 5, 10, 0.65);
  backdrop-filter: blur(8px);
  animation: fadeIn .25s var(--ease);
}
.modal.hidden { display: none; }
.modal-content {
  width: min(560px, 100%);
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow);
  animation: popIn .35s var(--ease);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.modal-close {
  width: 34px; height: 34px; border-radius: 999px;
  border: 1px solid var(--border); background: transparent; color: var(--text);
  cursor: pointer; font-size: 15px;
}
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

/* Footer */
.site-footer {
  margin-top: 80px; padding: 60px 0 30px;
  background: linear-gradient(180deg, transparent 0%, var(--bg-deep) 60%);
  border-top: 1px solid var(--border);
}
.footer-top {
  display: grid; gap: 28px; margin-bottom: 32px;
}
.footer-brand p { color: var(--muted); max-width: 320px; margin-top: 12px; font-size: 0.92rem; }
.footer-col h4 { font-family: var(--display); font-size: 0.95rem; margin-bottom: 12px; color: #fff; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-col a { color: var(--muted); font-size: 0.9rem; transition: color .2s var(--ease); }
.footer-col a:hover { color: var(--red-soft); }
.socials { display: flex; gap: 8px; margin-top: 14px; }
.socials a {
  width: 36px; height: 36px; border-radius: 999px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
  transition: background .25s var(--ease), transform .25s var(--ease);
}
.socials a:hover { background: rgba(255, 31, 46, 0.14); transform: translateY(-2px); }
.socials img { width: 16px; height: 16px; filter: brightness(0) invert(1); }
.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding-top: 20px; border-top: 1px solid var(--border);
  color: var(--dim); font-size: 0.82rem;
}

/* Utilities */
.eyebrow {
  display: none;
  align-items: center; gap: 8px;
  font-family: var(--display); font-size: 0.78rem; font-weight: 500;
  color: var(--red-soft); text-transform: uppercase; letter-spacing: 0.18em;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(255, 31, 46, 0.08); border: 1px solid rgba(255, 31, 46, 0.22);
}
.dot {
  display: none;
  width: 6px; height: 6px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 10px var(--red);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.text-muted { color: var(--muted); }
.text-red { color: var(--red-soft); }

.accent-underline { position: relative; display: inline-block; white-space: nowrap; }
.accent-underline::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 10px;
  background: linear-gradient(90deg, var(--red), transparent);
  z-index: -1; border-radius: 2px;
  transform-origin: left;
  animation: underlineIn 1s var(--ease) 0.2s both;
}
@keyframes underlineIn { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.75rem; padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
}
.tag.red { color: var(--red-soft); background: rgba(255, 31, 46, 0.1); border-color: rgba(255, 31, 46, 0.3); }

/* Cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  transition: border-color .3s var(--ease), transform .3s var(--ease);
}

/* Reveal animations */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: none; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.98); } to { opacity: 1; transform: none; } }

.auth-switch {
  display: flex; background: var(--surface); border: 1px solid var(--border);
  padding: 4px; border-radius: 999px; gap: 4px; margin-bottom: 14px;
}
.auth-switch button {
  flex: 1; border: 0; background: transparent; color: var(--muted);
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  font-family: var(--display); font-weight: 500;
}
.auth-switch button.active { background: var(--red); color: #fff; box-shadow: 0 6px 16px var(--red-glow); }

.divider-or {
  display: flex; align-items: center; gap: 12px; color: var(--dim);
  font-size: 0.78rem; margin: 14px 0; text-transform: uppercase; letter-spacing: 0.14em;
}
.divider-or::before, .divider-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.static-page { padding: 50px 0 40px; }
.static-page .card { max-width: 820px; margin: 0 auto; padding: 32px; }
.static-page .card h2 { margin-top: 24px; font-size: 1.2rem; }
.static-page .card p { color: var(--muted); margin-top: 8px; }

/* Orders tabs */
.chip-tab {
  background: var(--surface); border: 1px solid var(--border); color: var(--muted);
  padding: 10px 18px; border-radius: 999px; cursor: pointer;
  font-family: var(--display); font-weight: 500; font-size: 0.9rem;
  transition: border-color .2s var(--ease), color .2s var(--ease), background .2s var(--ease);
}
.chip-tab:hover { color: var(--text); border-color: var(--border-strong); }
.chip-tab.active { background: var(--red); border-color: var(--red); color: #fff; box-shadow: 0 6px 16px var(--red-glow); }

.order-history-row {
  display: flex; justify-content: space-between; align-items: center;
  text-align: left; gap: 14px; width: 100%;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  cursor: pointer; font-family: var(--body);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.order-history-row:hover { transform: translateY(-2px); border-color: rgba(255, 31, 46, 0.4); }
.order-history-row .status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.82rem; font-weight: 500;
}
.order-history-row .status.paid { color: #70e895; }
.order-history-row .status.pending { color: #ffcf70; }
.order-history-row .status.cancelled { color: #ff7078; }
.order-history-row .status .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor; display: inline-block;
}

/* Mobile auth block inside hamburger */
.mobile-auth {
  padding: 6px 6px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}
.mobile-auth .btn,
.mobile-auth .profile-chip { width: 100%; justify-content: center; }
.mobile-auth .mobile-profile {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.04); border: 1px solid var(--border);
}
.mobile-auth .mobile-profile img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.mobile-auth .mobile-links { display: grid; gap: 2px; margin-top: 8px; }
.mobile-auth .mobile-links a,
.mobile-auth .mobile-links button {
  display: block; width: 100%; text-align: left;
  background: transparent; border: 0; color: var(--text);
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
  font-family: var(--body); font-size: 0.95rem;
}
.mobile-auth .mobile-links a:hover,
.mobile-auth .mobile-links button:hover { background: rgba(255, 255, 255, 0.06); }
.mobile-auth .mobile-links .danger { color: var(--red-soft); }

/* Responsive */
@media (max-width: 819px) {
  #authZone { display: none; }
  .nav-pill { padding: 6px 8px 6px 10px; gap: 8px; }
}
@media (max-width: 520px) {
  .brand-text { display: none; }
}

@media (min-width: 820px) {
  .menu { display: flex; }
  .menu-toggle { display: none; }
  .mobile-auth { display: none; }
  .footer-top { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}
