/* ================================================================
   PIXEL PLAY — Premium Design System
   Dark luxury e-commerce theme
   ================================================================ */

/* ================= DESIGN TOKENS ================= */

:root {
  /* Backgrounds */
  --black:      #05050c;
  --bg:         #08080f;
  --bg-soft:    #0c0c18;
  --bg-card:    #101020;
  --bg-elevated:#141428;

  /* Purple spectrum */
  --purple-deep:   #1e0e4a;
  --purple-mid:    #6d28d9;
  --purple-bright: #7c3aed;
  --purple-light:  #a78bfa;
  --purple-glow:   rgba(109, 40, 217, 0.4);

  /* Gold accent */
  --gold:       #f59e0b;
  --gold-light: #fcd34d;
  --gold-dark:  #d97706;

  /* Text */
  --text:       #f0f0ff;
  --text-soft:  rgba(240, 240, 255, 0.72);
  --muted:      rgba(240, 240, 255, 0.42);

  /* Borders */
  --border:        rgba(255, 255, 255, 0.07);
  --border-bright: rgba(255, 255, 255, 0.13);
  --border-purple: rgba(124, 58, 237, 0.35);

  /* Radius */
  --radius-sm: 10px;
  --radius:    16px;
  --radius-lg: 22px;
  --radius-xl: 30px;

  /* Layout */
  --maxw: 1240px;

  /* Motion */
  --ease:   cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ================= RESET ================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { cursor: pointer; font-family: inherit; }

main { min-height: 60vh; }

/* Hero pulls up to cover nav for full-screen effect */
.hero { margin-top: -76px; }

/* Non-hero pages: first section gets extra padding for fixed nav */
main > .section:first-child,
main > form:first-child { padding-top: 120px; }

/* ================= LAYOUT ================= */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
}

@media (max-width: 600px) {
  .wrap { padding: 0 20px; }
}

/* ================= TYPOGRAPHY UTILITIES ================= */

.gradient-text {
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--gold-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.muted { color: var(--muted); }

/* Generic card + pad utilities */
.card { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.pad  { padding: 20px 24px; }

/* ================= NAVIGATION ================= */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 32px;
  transition: background 0.5s var(--ease),
              backdrop-filter 0.5s var(--ease),
              border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(5, 5, 12, 0.88);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 76px;
}

/* Logo */
.logo {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(124, 58, 237, 0.45);
  flex-shrink: 0;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}

.logo:hover {
  border-color: var(--purple-bright);
  box-shadow: 0 0 24px var(--purple-glow);
  transform: scale(1.05);
}

.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Nav links */
.nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-soft);
  padding: 8px 14px;
  border-radius: 10px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s var(--ease);
}

.nav-link:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.nav-link:hover::after { transform: scaleX(1); }

.nav-button {
  background: transparent;
  border: none;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav-button:hover { color: var(--text); background: rgba(255,255,255,0.06); }

/* Cart pill */
.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--gold);
  color: #000;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.25s var(--ease);
  letter-spacing: 0.2px;
  margin-left: 8px;
}
.cart-pill:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
  color: #000;
}

/* Mobile hamburger */
.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s;
}
.menu-toggle:hover { background: rgba(255,255,255,0.07); }
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all 0.35s var(--ease);
}
.menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 768px) {
  .nav { padding: 0 20px; }
  .menu-toggle { display: flex; }

  .nav-links {
    display: none;
    position: fixed;
    inset: 0;
    top: 76px;
    flex-direction: column;
    background: rgba(5, 5, 12, 0.97);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    padding: 32px 24px 48px;
    gap: 6px;
    align-items: flex-start;
    border-top: 1px solid var(--border);
    overflow-y: auto;
  }
  .nav-links.open {
    display: flex;
    animation: menuSlideDown 0.3s var(--ease);
  }
  .nav-link, .nav-button { font-size: 18px; padding: 14px 16px; width: 100%; }
  .cart-pill { margin-left: 0; margin-top: 12px; width: 100%; justify-content: center; padding: 14px 24px; font-size: 16px; }
}

@keyframes menuSlideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ================= HERO SECTION ================= */

.hero {
  position: sticky;
  top: -76px;          /* nav height — hero top hides behind the fixed nav */
  z-index: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--black);
}

/* Every sibling after the hero slides on top of it */
.hero ~ * {
  position: relative;
  z-index: 5;
  background: var(--bg);
}

/* Video background */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(124, 58, 237, 0.2), transparent 38%),
    radial-gradient(circle at 82% 14%, rgba(245, 158, 11, 0.14), transparent 32%),
    var(--black);
}

.hero-poster,
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* scale up slightly so blur edges don't bleed */
  transform: scale(1.08);
  filter: blur(4px) brightness(0.45) saturate(1.2);
}

.hero-poster {
  opacity: 1;
}

.hero-video {
  opacity: 0;
  transition: opacity 0.7s var(--ease);
  will-change: opacity;
}

.hero-bg.hero-media-ready .hero-video {
  opacity: 1;
}

html.hero-poster-mode .hero-video {
  display: none;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(8, 8, 15, 0.45) 0%,
    rgba(8, 8, 15, 0.25) 40%,
    rgba(8, 8, 15, 0.6) 100%
  );
  z-index: 1;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video {
    display: none;
  }
}

/* Hero content */
.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 120px 0 100px;
  will-change: opacity, transform; /* GPU layer for scroll fade */
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.32);
  border-radius: 999px;
  padding: 7px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 32px;
  animation: heroFadeUp 0.8s var(--ease) 0.1s both;
}

.eyebrow-dot {
  width: 6px;
  height: 6px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  animation: eyebrowPulse 2s ease-in-out infinite;
}

@keyframes eyebrowPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.hero-title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(22px, 4.5vw, 58px);
  line-height: 1.25;
  margin-bottom: 28px;
  animation: heroFadeUp 0.8s var(--ease) 0.2s both;
}

.hero-title .line1 {
  display: block;
  color: var(--text);
}

.hero-title .line2 {
  display: block;
  background: linear-gradient(135deg, var(--purple-light) 0%, var(--gold-light) 70%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 40px rgba(167, 139, 250, 0.4));
}

.hero-sub {
  max-width: 540px;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text-soft);
  margin-bottom: 52px;
  animation: heroFadeUp 0.8s var(--ease) 0.3s both;
}

.hero-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  animation: heroFadeUp 0.8s var(--ease) 0.4s both;
}

/* Hero stats row */
.hero-stats {
  display: flex;
  gap: 56px;
  margin-top: 80px;
  padding-top: 48px;
  border-top: 1px solid var(--border);
  animation: heroFadeUp 0.8s var(--ease) 0.55s both;
}

@media (max-width: 600px) {
  .hero-stats { gap: 28px; flex-wrap: wrap; margin-top: 56px; padding-top: 36px; }
}

.hero-stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--gold-light);
  letter-spacing: -1px;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 5px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

@media (max-width: 768px) {
  .hero-title { font-size: clamp(18px, 6vw, 36px); }
  .hero-sub { font-size: 16px; margin-bottom: 40px; }
  .hero-content { padding: 110px 0 80px; }
}

/* Hero keyframes */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(32px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes heroFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}


/* ================= SCROLL REVEAL ================= */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

/* ================= BUTTONS ================= */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  font-family: inherit;
  transition: all 0.25s var(--ease);
  letter-spacing: 0.2px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
}

/* Primary: gold */
.btn.primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #000;
  box-shadow: 0 4px 18px rgba(245, 158, 11, 0.3);
}
.btn.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(245, 158, 11, 0.5);
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}
.btn.primary:active { transform: translateY(-1px); }

/* Ghost / secondary */
.btn:not(.primary):not(.danger) {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  border: 1px solid var(--border-bright);
}
.btn:not(.primary):not(.danger):hover {
  background: rgba(255, 255, 255, 0.13);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
}

/* Danger */
.btn.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.25);
  border: none;
}
.btn.danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(239, 68, 68, 0.4);
}

/* ================= SECTIONS ================= */

.section { padding: 100px 0; }

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.section-eyebrow::before {
  content: '';
  display: block;
  width: 20px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-soft);
  max-width: 520px;
  margin-bottom: 56px;
  line-height: 1.75;
}

.section-header { margin-bottom: 60px; }

@media (max-width: 600px) { .section { padding: 70px 0; } }

/* ================= PRODUCT GRID & CARDS ================= */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: transform 0.4s var(--ease),
              box-shadow 0.4s var(--ease),
              border-color 0.4s var(--ease);
  display: block;
  position: relative;
}

.product-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 28px 64px rgba(0,0,0,0.55), 0 0 0 1px rgba(124,58,237,0.25);
  border-color: rgba(124,58,237,0.25);
}

.product-card-img-wrap {
  aspect-ratio: 4/3;
  background: var(--bg-elevated);
  position: relative;
  background: var(--bg-elevated);
}

.img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transition: transform 0.4s var(--ease);
}
.product-card:hover .img { transform: scale(1.04); }

.product-card-content {
  padding: 18px 20px 22px;
}

.product-card-category {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 8px;
}

.product-card-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 10px;
  color: var(--text);
}

/* for home.ejs .product-title and .price classes */
.product-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.4;
  margin-bottom: 8px;
}
.price, .product-card-price {
  font-weight: 700;
  font-size: 16px;
  color: var(--gold-light);
}

.pad { padding: 18px 20px 22px; }

/* ================= ARCADE FEATURE SECTIONS ================= */

.arcade-list {
  display: flex;
  flex-direction: column;
  gap: 110px;
}

.arcade-item {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: center;
}

/* alternate image sides */
.arcade-item:nth-child(even) .arcade-image { order: 2; }
.arcade-item:nth-child(even) .arcade-content { order: 1; }

@media (max-width: 900px) {
  .arcade-item { grid-template-columns: 1fr; gap: 36px; }
  .arcade-item:nth-child(even) .arcade-image,
  .arcade-item:nth-child(even) .arcade-content { order: unset; }
}

.arcade-image {
  position: relative;
}

.arcade-image::before {
  content: '';
  position: absolute;
  inset: -30px;
  background: radial-gradient(ellipse at center, rgba(109, 40, 217, 0.2), transparent 70%);
  border-radius: var(--radius-xl);
  z-index: 0;
  pointer-events: none;
}

.arcade-image img {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: 0 36px 90px rgba(0,0,0,0.65), 0 0 0 1px var(--border);
  position: relative;
  z-index: 1;
  transition: transform 0.6s var(--ease);
}
.arcade-item:hover .arcade-image img { transform: translateY(-10px) scale(1.01); }

.arcade-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(109, 40, 217, 0.12);
  border: 1px solid rgba(109, 40, 217, 0.3);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 22px;
}

.arcade-title {
  font-size: clamp(26px, 3.5vw, 46px);
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.arcade-price {
  font-size: 30px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 18px;
}

.arcade-description {
  font-size: 15px;
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 32px;
}

.arcade-cta { margin-top: 8px; }

/* ================= SECTION DIVIDER ================= */

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(124,58,237,0.3), transparent);
}

/* ================= SHOP PAGE ================= */

.shop-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 52px;
  flex-wrap: wrap;
  gap: 20px;
}

.shop-title {
  font-size: clamp(30px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -1px;
}

.shop-filters {
  display: flex;
  gap: 4px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
}

.shop-tab {
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.25s var(--ease);
  cursor: pointer;
}
.shop-tab:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.shop-tab.active {
  background: linear-gradient(135deg, var(--purple-bright), var(--purple-mid));
  color: white;
  box-shadow: 0 4px 16px rgba(109, 40, 217, 0.4);
}

/* ================= PRODUCT PAGE ================= */

.product-layout {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 80px;
}
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; gap: 40px; } }

.product-images {
  position: sticky;
  top: 96px;
  align-self: start;
}

.product-main-img {
  width: 100%;
  border-radius: var(--radius-xl);
  aspect-ratio: 4/3;
  object-fit: contain;
  background: var(--bg-elevated);
  box-shadow: 0 28px 70px rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  display: block;
}

.product-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.product-thumbs img {
  width: 78px;
  height: 78px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 2px solid var(--border);
  cursor: pointer;
  opacity: 0.65;
  transition: all 0.22s var(--ease);
}
.product-thumbs img:hover { border-color: var(--purple-bright); opacity: 1; }

.product-category {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--purple-light);
  margin-bottom: 12px;
}

.product-title-main {
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 800;
  margin-bottom: 18px;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

.product-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 24px;
}

.product-description {
  font-size: 15px;
  line-height: 1.85;
  color: var(--text-soft);
  margin-bottom: 32px;
  white-space: pre-wrap;
}

.product-purchase { margin-top: 8px; }

.purchase-actions {
  margin-top: 20px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ================= FORMS ================= */

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.3px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border-bright);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 15px;
  font-family: inherit;
  transition: all 0.22s var(--ease);
  -webkit-appearance: none;
}

.field input::placeholder, .field textarea::placeholder { color: var(--muted); }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--purple-bright);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
  background: var(--bg-soft);
}

input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0px 1000px var(--bg-elevated) inset;
  -webkit-text-fill-color: var(--text);
}
select option { background: var(--bg-elevated); color: var(--text); }

.notice {
  background: rgba(124, 58, 237, 0.08);
  border: 1px solid rgba(124, 58, 237, 0.22);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.6;
}

/* Alert states */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.5;
}
.alert-error   { background: rgba(239,68,68,0.1);   border: 1px solid rgba(239,68,68,0.3);   color: #fca5a5; }
.alert-success { background: rgba(16,185,129,0.1);  border: 1px solid rgba(16,185,129,0.3);  color: #6ee7b7; }

/* ================= CART ================= */

.cart-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 60px;
}
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }

.cart-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.cart-item img {
  width: 96px;
  height: 96px;
  border-radius: var(--radius);
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.cart-item-title { font-weight: 700; font-size: 16px; margin-bottom: 6px; }
.cart-item-opts  { font-size: 13px; color: var(--muted); margin-top: 4px; }
.cart-item-price { margin-left: auto; font-weight: 700; font-size: 17px; color: var(--gold-light); flex-shrink: 0; padding-top: 4px; }

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.qty-stepper {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.qty-btn {
  background: var(--bg-elevated);
  border: none;
  color: var(--text);
  font-size: 18px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}
.qty-btn:hover { background: var(--purple); }

.qty-input {
  width: 44px;
  height: 36px;
  background: var(--bg);
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button,
.qty-input::-webkit-outer-spin-button { -webkit-appearance: none; }

.cart-remove {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}
.cart-remove:hover { color: #ef4444; }

.cart-summary {
  background: var(--bg-elevated);
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  position: sticky;
  top: 96px;
  align-self: start;
}

.cart-total {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 24px;
  color: var(--gold-light);
}

/* ================= CHECKOUT ================= */

.checkout-layout {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 60px;
}
@media (max-width: 900px) { .checkout-layout { grid-template-columns: 1fr; } }

.checkout-summary {
  background: var(--bg-elevated);
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  position: sticky;
  top: 96px;
  align-self: start;
}

/* ================= PAYMENT QR ================= */

.payment-wrap { max-width: 1120px; }

.payment-page {
  display: grid;
  grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 940px) {
  .payment-page { grid-template-columns: 1fr; }
}

.payment-summary-card,
.payment-qr-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: 0 28px 80px rgba(0,0,0,0.35);
}

.payment-summary-card {
  padding: 34px 30px;
  position: sticky;
  top: 96px;
}

@media (max-width: 940px) {
  .payment-summary-card { position: static; }
}

.payment-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.payment-title {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 0.95;
  margin-bottom: 16px;
}

.payment-lead {
  color: var(--text-soft);
  line-height: 1.8;
  margin-bottom: 24px;
}

.payment-order-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}

.payment-order-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
}

.payment-summary-note {
  border-top: 1px solid var(--border);
  padding-top: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.payment-qr-card { padding: 18px; }

.payment-qr-box {
  border-radius: calc(var(--radius-xl) - 6px);
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top left, rgba(124,58,237,0.16), transparent 40%),
    radial-gradient(circle at bottom right, rgba(245,158,11,0.08), transparent 35%),
    rgba(8,8,10,0.92);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}

.payment-qr-media {
  width: min(100%, 360px);
  min-height: 320px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.payment-qr-media.clean-qr { background: #ffffff; }
.payment-qr-media.flyer-qr { background: rgba(255,255,255,0.04); }

.payment-qr-media img {
  display: block;
  width: 100%;
  max-width: 320px;
  border-radius: 10px;
}

.payment-qr-amount {
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 800;
  color: var(--gold-light);
}

.payment-qr-actions,
.payment-link-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.payment-inline-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text-soft);
  background: rgba(255,255,255,0.03);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}

.payment-inline-link:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}

.payment-hint,
.payment-note {
  max-width: 420px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.8;
}

.payment-status {
  width: min(100%, 420px);
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
}

.payment-status[data-state="pending"] { color: #fcd34d; border-color: rgba(245,158,11,0.24); background: rgba(245,158,11,0.08); }
.payment-status[data-state="success"] { color: #6ee7b7; border-color: rgba(16,185,129,0.28); background: rgba(16,185,129,0.08); }
.payment-status[data-state="warn"]    { color: #fcd34d; border-color: rgba(245,158,11,0.28); background: rgba(245,158,11,0.08); }
.payment-status[data-state="danger"]  { color: #fca5a5; border-color: rgba(239,68,68,0.28); background: rgba(239,68,68,0.08); }

.payment-cancel-btn { min-width: 190px; }

.payment-external-panel {
  display: none;
  width: min(100%, 420px);
  text-align: left;
  border-radius: 14px;
  border: 1px solid rgba(245,158,11,0.22);
  background: rgba(245,158,11,0.08);
  padding: 16px;
  color: var(--text-soft);
}

.payment-external-panel.visible { display: block; }

.payment-external-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--gold-light);
  margin-bottom: 8px;
}

.payment-external-panel p {
  margin-bottom: 10px;
  line-height: 1.7;
  font-size: 13px;
}

.payment-external-steps {
  padding-left: 18px;
  margin-bottom: 14px;
  font-size: 13px;
  line-height: 1.7;
}

/* ================= SUCCESS ================= */

.success-wrap { max-width: 720px; }

.success-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 34px;
  text-align: center;
  box-shadow: 0 28px 80px rgba(0,0,0,0.35);
}

.success-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.success-title {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 12px;
}

.success-lead {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 24px;
}

.success-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 26px;
}

.success-meta-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 14px 16px;
  text-align: left;
}

.success-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 640px) {
  .success-card { padding: 32px 22px; }
  .success-meta-row { flex-direction: column; align-items: flex-start; }
}

/* ================= FOOTER ================= */

.footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 80px 0 0;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
}
@media (max-width: 900px)  { .footer-inner { grid-template-columns: 1fr 1fr; gap: 40px; } }
@media (max-width: 500px)  { .footer-inner { grid-template-columns: 1fr; gap: 32px; } }

.footer-brand { max-width: 280px; }

.footer-logo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(124,58,237,0.4);
  margin-bottom: 18px;
  overflow: hidden;
}
.footer-logo img { width: 100%; height: 100%; object-fit: cover; }

.footer-brand-name {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 10px;
}

.footer-brand-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 20px;
}

.footer-links { display: flex; flex-direction: column; gap: 12px; }

.footer-link {
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s var(--ease);
}
.footer-link:hover { color: var(--text); }

.footer-bottom {
  max-width: var(--maxw);
  margin: 60px auto 0;
  padding: 24px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-legal {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
}

/* ================= STATUS BADGES ================= */

.status-badge {
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.status-badge.paid      { background: rgba(16,185,129,0.14); color: #34d399; border: 1px solid rgba(16,185,129,0.28); }
.status-badge.pending   { background: rgba(245,158,11,0.14); color: #fcd34d; border: 1px solid rgba(245,158,11,0.28); }
.status-badge.packed    { background: rgba(99,102,241,0.14); color: #a5b4fc; border: 1px solid rgba(99,102,241,0.28); }
.status-badge.shipped   { background: rgba(59,130,246,0.14); color: #93c5fd; border: 1px solid rgba(59,130,246,0.28); }
.status-badge.delivered { background: rgba(16,185,129,0.2);  color: #6ee7b7; border: 1px solid rgba(16,185,129,0.38); }
.status-badge.cancelled { background: rgba(239,68,68,0.14);  color: #fca5a5; border: 1px solid rgba(239,68,68,0.28); }

/* ================= AUTH PAGES ================= */

.auth-wrap { max-width: 480px; }

.auth-form {
  background: var(--bg-elevated);
  padding: 40px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-actions { margin-top: 6px; display: flex; flex-direction: column; gap: 12px; }

.auth-link {
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  transition: color 0.2s;
}
.auth-link:hover { color: var(--text); }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
  margin: 8px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  color: #3c4043;
  font-weight: 600;
  font-size: 15px;
  padding: 12px 24px;
  border-radius: var(--radius);
  width: 100%;
  border: none;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
  font-family: inherit;
}
.google-btn:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transform: translateY(-2px);
  color: #3c4043;
  text-decoration: none;
}

/* ================= ADMIN LOGIN ================= */

.admin-login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at top left, rgba(109,40,217,0.4) 0%, transparent 55%),
    radial-gradient(ellipse at bottom right, rgba(245,158,11,0.12) 0%, transparent 50%),
    var(--black);
}

.admin-login-wrap {
  width: 100%;
  max-width: 440px;
  padding: 48px 40px;
  background: var(--bg-elevated);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: 0 48px 110px rgba(0,0,0,0.55);
}

.admin-login-title { text-align: center; margin-bottom: 34px; font-size: 24px; font-weight: 800; }
.admin-login-form  { display: flex; flex-direction: column; gap: 18px; }
.admin-login-actions { margin-top: 6px; display: flex; flex-direction: column; gap: 12px; }
.admin-back-link { text-align: center; font-size: 14px; color: var(--muted); }
.admin-back-link:hover { color: var(--text); }

/* ================= ADMIN PANEL ================= */

.admin-container {
  max-width: 1200px;
  margin: 110px auto 60px;
  padding: 0 24px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
  gap: 16px;
}

.admin-title { font-size: 32px; font-weight: 800; letter-spacing: -0.5px; }
.admin-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.admin-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 48px;
}
@media (max-width: 1000px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }

.admin-stat-card {
  background: var(--bg-elevated);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}
.admin-stat-card:hover { border-color: var(--border-purple); transform: translateY(-4px); box-shadow: 0 16px 40px rgba(0,0,0,0.3); }
.admin-stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.8px; font-weight: 600; }
.admin-stat-value { font-size: 32px; font-weight: 800; margin-top: 10px; color: var(--gold-light); }

.admin-card {
  background: var(--bg-elevated);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td {
  text-align: left;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.admin-table th {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 700;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }

.admin-muted { color: var(--muted); }

.admin-wrap {
  max-width: 1000px;
  margin: auto;
  padding: 40px 20px;
}

/* ================= ACCOUNT PAGE ================= */

.account-wrap { max-width: 900px; }

.account-box {
  background: var(--bg-elevated);
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.account-profile {
  background: var(--bg-elevated);
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 56px;
}
@media (max-width: 700px) { .account-profile { grid-template-columns: 1fr; } }

.account-label { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.account-value { font-weight: 700; font-size: 16px; margin-top: 6px; color: var(--text); }

.account-orders-title { margin-bottom: 28px; }
.account-orders { display: flex; flex-direction: column; gap: 16px; }

.account-order-card {
  background: var(--bg-elevated);
  padding: 24px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  transition: all 0.3s var(--ease);
}
.account-order-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-purple);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
}

.account-order-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.account-order-no { font-weight: 800; font-size: 15px; }
.account-order-date { font-size: 13px; color: var(--muted); margin-top: 4px; }
.account-order-bottom { display: flex; justify-content: space-between; align-items: center; }
.account-order-total { font-weight: 700; font-size: 18px; color: var(--gold-light); }

.account-empty {
  background: var(--bg-elevated);
  padding: 48px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

/* ================= ORDER / TRACK ================= */

.order-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.track-wrap { max-width: 720px; }

.track-form {
  background: var(--bg-elevated);
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.track-message { margin-top: 24px; }

.track-result {
  margin-top: 40px;
  background: var(--bg-elevated);
  padding: 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
}

.track-result-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.track-order-no { font-weight: 800; font-size: 18px; }

.track-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

.track-address { margin-top: 20px; color: var(--text-soft); font-size: 14px; line-height: 1.7; }
