/* ── Codi Customs — Design Tokens ── */
:root {
  /* Background */
  --bg-base:        #000000;
  --bg-surface:     #080808;
  --bg-elevated:    #111111;

  /* Borders */
  --border-subtle:  #0f0f0f;
  --border-default: #141414;
  --border-strong:  #222222;

  /* Text */
  --text-primary:   #ffffff;
  --text-secondary: #D4D4D4;
  --text-muted:     #C8C8C8;
  --text-faint:     #999999;
  --text-dim:       #888888;

  /* Accent (Purple) */
  --accent:         #c840ff;
  --accent-bright:  #cc00ff;
  --accent-soft:    #cc44ff;
  --accent-glow:    rgba(204, 68, 255, 0.5);

  /* Status */
  --badge-new-bg:   #cc00ff;
  --badge-new-text: #ffffff;

  /* Font Families */
  --font-body:      'Inter', sans-serif;
  --font-heading:   'Space Grotesk', sans-serif;
  --font-display:   'Barlow Condensed', sans-serif;
  --font-mono:      'Space Mono', monospace;

  /* Font Sizes */
  --text-xs:   13px;
  --text-sm:   15px;
  --text-base: 16px;
  --text-md:   17px;
  --text-lg:   19px;
  --text-xl:   22px;

  /* Spacing */
  --nav-height: 64px;
}

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #000; color: var(--text-secondary); font-family: var(--font-body); font-weight: 300; line-height: 1.7; }
h1,h2,h3,h4 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1; color: #fff; }
a { text-decoration: none; }

/* ── Nav ── */
@property --glow-angle { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes navGlowRotate { to { --glow-angle: 360deg; } }

.nav-wrap { position: fixed; top: 0; left: 0; right: 0; z-index: 200; display: flex; justify-content: center; padding: 0; transition: padding 0.4s ease; pointer-events: none; overflow: visible; }
.nav-wrap.scrolled { padding: 12px 20px; }
nav { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 10px 40px; height: 90px; overflow: visible; background: rgba(0,0,0,0.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid #0f0f0f; transition: all 0.4s ease; pointer-events: auto; }
nav.scrolled { background: linear-gradient(rgba(5,5,5,0.9),rgba(5,5,5,0.9)) padding-box, conic-gradient(from var(--glow-angle),rgba(255,255,255,0.04) 0%,rgba(255,255,255,0.12) 50%,rgba(255,255,255,0.04) 100%) border-box; border: 1px solid transparent; border-radius: 14px; backdrop-filter: blur(20px); box-shadow: 0 4px 32px rgba(0,0,0,0.6); padding: 12px 32px; animation: navGlowRotate 3s linear infinite; }
nav:not(.scrolled) { animation: none; }
.nav-left { display: flex; align-items: center; }
.logo { display: flex; justify-content: center; }
.nav-right { display: flex; align-items: center; gap: 20px; justify-content: flex-end; }
.nav-links { display: flex; gap: 36px; list-style: none; align-items: center; }
.nav-links a { color: #ccc; font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; transition: color 0.2s, text-shadow 0.2s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: var(--accent-soft); transition: width 0.25s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-soft); text-shadow: 0 0 10px var(--accent-glow); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-links li { display: flex; align-items: center; }
.nav-links .has-dropdown { position: relative; }
.nav-links .has-dropdown > a { display: flex; align-items: center; gap: 6px; }
.nav-links .has-dropdown > a::after { display: none; }
.chevron { display: inline-flex; align-items: center; transition: transform 0.25s ease; transform: rotate(180deg); }
.has-dropdown:hover .chevron { transform: rotate(0deg); }
.dropdown { position: absolute; top: 100%; left: 0; padding-top: 14px; min-width: 140px; opacity: 0; pointer-events: none; transform: translateY(-6px); transition: opacity 0.2s, transform 0.2s; z-index: 100; }
.dropdown::before { content: ''; position: absolute; top: 14px; left: 0; right: 0; bottom: 0; background: rgba(10,10,10,0.97); backdrop-filter: blur(12px); border: 1px solid #222; border-radius: 4px; z-index: -1; }
.has-dropdown:hover .dropdown { opacity: 1; pointer-events: auto; transform: translateY(0); }
.dropdown-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; font-size: 14px; letter-spacing: 1.5px; color: var(--text-muted); border-bottom: 1px solid #1a1a1a; transition: color 0.2s, background 0.2s; cursor: default; position: relative; white-space: nowrap; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown > a { display: block; padding: 10px 16px; font-size: 14px; letter-spacing: 1.5px; color: #aaa; border-bottom: 1px solid #1a1a1a; transition: color 0.2s, background 0.2s; white-space: nowrap; position: relative; z-index: 1; }
.dropdown > a:last-child { border-bottom: none; }
.dropdown > a:hover { color: #cc44ff; background: #111; }
.dropdown-item:hover { color: #fff; background: #111; }
.dropdown-item .sub-arrow { font-size: 10px; color: #555; margin-left: 10px; }
.has-subdropdown { position: relative; }
.subdropdown { position: absolute; left: 100%; top: 0; min-width: 140px; opacity: 0; pointer-events: none; transition: opacity 0.2s; z-index: 101; padding-left: 6px; }
.subdropdown::before { content: ''; position: absolute; top: 0; left: 6px; right: 0; bottom: 0; background: rgba(10,10,10,0.97); backdrop-filter: blur(12px); border: 1px solid #222; border-radius: 4px; z-index: -1; }
.subdropdown a { display: block; padding: 10px 16px; font-size: 14px; letter-spacing: 1.5px; color: var(--text-muted); border-bottom: 1px solid #1a1a1a; transition: color 0.2s, background 0.2s; white-space: nowrap; }
.subdropdown a:last-child { border-bottom: none; }
.subdropdown a:hover { color: var(--accent-soft); background: #111; }
.has-subdropdown:hover .subdropdown { opacity: 1; pointer-events: auto; }
.nav-icon { color: #ccc; cursor: pointer; transition: color 0.2s, filter 0.2s; }
.nav-icon:hover { color: var(--accent-soft); filter: drop-shadow(0 0 6px var(--accent-glow)); }
.cart-wrap { position: relative; cursor: pointer; display: flex; }
.cart-badge { position: absolute; top: -6px; right: -7px; background: var(--accent-bright); color: #fff; font-size: 10px; font-weight: 700; width: 17px; height: 17px; border-radius: 50%; display: none; align-items: center; justify-content: center; }
.cart-badge.visible { display: flex; }
.currency-select { background: transparent; border: 1px solid #333; color: #ccc; font-size: 14px; padding: 4px 8px; border-radius: 4px; cursor: pointer; outline: none; transition: border-color 0.2s; }
.currency-select:hover { border-color: var(--accent-soft); }
.currency-select option { background: #111; }
.mobile-menu-btn { display: none; background: none; border: 1px solid #333; color: #ccc; cursor: pointer; padding: 6px; border-radius: 8px; transition: all 0.2s; align-items: center; justify-content: center; width: 36px; height: 36px; }
.mobile-menu-btn:hover { border-color: var(--accent-soft); color: var(--accent-soft); }
.mobile-nav { display: none; position: fixed; inset: 0; z-index: 199; background: rgba(3,3,3,0.97); backdrop-filter: blur(16px); flex-direction: column; justify-content: center; align-items: center; pointer-events: auto; }
.mobile-nav.open { display: flex; animation: mobileNavIn 0.25s ease; }
@keyframes mobileNavIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }
.mobile-nav a { color: #bbb; font-size: 22px; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; padding: 18px 40px; transition: color 0.2s; text-align: center; width: 100%; }
.mobile-nav a:hover { color: var(--accent-soft); }

/* ── Cart Sidebar ── */
.cart-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(4px); z-index: 500; opacity: 0; pointer-events: none; transition: opacity 0.3s; }
.cart-backdrop.open { opacity: 1; pointer-events: auto; }
.cart-sidebar { position: fixed; top: 0; right: 0; width: 380px; height: 100vh; background: var(--bg-surface); border-left: 1px solid var(--border-default); z-index: 600; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1); }
.cart-sidebar.open { transform: translateX(0); }
.cart-header { display: flex; align-items: center; justify-content: space-between; padding: 24px 28px; border-bottom: 1px solid #111; }
.cart-header h3 { font-family: var(--font-body); font-size: 14px; font-weight: 500; letter-spacing: 3px; text-transform: uppercase; color: #fff; }
.cart-close { background: none; border: none; color: #444; cursor: pointer; transition: color 0.2s; padding: 4px; }
.cart-close:hover { color: var(--accent-soft); }
.cart-items { flex: 1; overflow-y: auto; padding: 16px 28px; }
.cart-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 10px; color: #1e1e1e; }
.cart-empty p { font-size: 14px; letter-spacing: 1.5px; }
.cart-item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid #0d0d0d; }
.cart-item-img { width: 60px; height: 60px; flex-shrink: 0; background: #0d0d0d; border: 1px solid var(--border-default); display: flex; align-items: center; justify-content: center; font-size: 8px; letter-spacing: 1.5px; color: rgba(255,255,255,0.1); overflow: hidden; }
.cart-item-details { flex: 1; }
.cart-item-name { font-size: 14px; font-weight: 500; color: #ddd; margin-bottom: 8px; }
.cart-item-row-controls { display: flex; align-items: center; gap: 10px; }
.cart-qty-ctrl { display: flex; align-items: center; border: 1px solid #1a1a1a; }
.cart-qty-ctrl button { background: none; border: none; color: #555; width: 28px; height: 28px; cursor: pointer; font-size: 16px; transition: color 0.2s; }
.cart-qty-ctrl button:hover { color: var(--accent-soft); }
.cart-qty-ctrl span { width: 28px; text-align: center; font-size: 13px; color: #fff; }
.cart-item-price { font-size: 13px; font-weight: 700; color: #fff; margin-left: auto; }
.cart-item-remove { background: none; border: none; color: #222; cursor: pointer; font-size: 16px; line-height: 1; transition: color 0.2s; }
.cart-item-remove:hover { color: var(--accent-soft); }
.cart-footer { padding: 16px 28px; border-top: 1px solid #0d0d0d; }
.cart-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cart-total span { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: #333; }
.cart-total strong { font-size: 20px; font-weight: 700; color: #fff; }
.checkout-btn { width: 100%; padding: 13px; background: var(--accent-bright); border: none; color: #fff; font-size: 14px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; cursor: pointer; transition: background 0.2s, box-shadow 0.2s; }
.checkout-btn:hover { background: #aa00dd; box-shadow: 0 0 20px rgba(204,0,255,0.4); }

/* ── Chat Button ── */
.chat-btn { position: fixed; bottom: 28px; right: 28px; width: 54px; height: 54px; background: var(--accent-bright); border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 0 16px rgba(204,0,255,0.5); transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s; z-index: 499; border: none; }
.chat-btn:hover { transform: scale(1.1); box-shadow: 0 0 28px rgba(204,0,255,0.8); }
.cart-sidebar.open ~ .chat-btn, .cart-backdrop.open ~ .chat-btn { opacity: 0; pointer-events: none; }

/* ── Toast ── */
.toast { position: fixed; bottom: 96px; right: 28px; background: #0d0d0d; border: 1px solid rgba(204,68,255,0.3); color: #fff; font-size: 14px; letter-spacing: 1px; padding: 14px 20px; transform: translateY(12px); opacity: 0; transition: all 0.3s; z-index: 9999; pointer-events: none; white-space: nowrap; }
.toast.show { transform: translateY(0); opacity: 1; }

/* ── Footer ── */
footer { position: relative; border-radius: 32px 32px 0 0; max-width: 1200px; margin: 80px auto 0; padding: 56px 60px 36px; border: 1px solid transparent; border-bottom: none; background: radial-gradient(35% 128px at 50% 0%, rgba(255,255,255,0.05), transparent) padding-box, linear-gradient(#000,#000) padding-box, conic-gradient(from var(--glow-angle), rgba(255,255,255,0.04) 0%, rgba(255,255,255,0.12) 50%, rgba(255,255,255,0.04) 100%) border-box; animation: navGlowRotate 6s linear infinite; }
footer::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%) translateY(-50%); width: 33%; height: 1px; background: rgba(255,255,255,0.15); filter: blur(2px); border-radius: 100px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer-brand img { height: 44px; margin-bottom: 16px; display: block; }
.footer-brand p { font-family: 'Inter', sans-serif; font-size: 13px; color: #C8C8C8; line-height: 1.8; margin-top: 12px; }
.footer-col h4 { font-family: 'Inter', sans-serif; font-size: 13px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: #fff; margin-bottom: 16px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-family: 'Inter', sans-serif; font-size: 14px; color: #C8C8C8; text-decoration: none; letter-spacing: 0.3px; display: inline-flex; align-items: center; gap: 6px; transition: color 0.2s, transform 0.2s; }
.footer-col ul a:hover { color: #fff; transform: translateX(2px); }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid #0f0f0f; padding-top: 24px; }
.footer-bottom p { font-family: 'Inter', sans-serif; font-size: 14px; color: #333; letter-spacing: 0.5px; }
.footer-socials { display: flex; gap: 16px; }
.footer-socials a { color: #444; transition: color 0.2s, filter 0.2s; }
.footer-socials a:hover { color: #cc44ff; filter: drop-shadow(0 0 6px rgba(204,68,255,0.5)); }
.footer-anim { opacity: 0; filter: blur(4px); transform: translateY(-8px); transition: opacity 0.8s ease, filter 0.8s ease, transform 0.8s ease; }
.footer-anim.visible { opacity: 1; filter: blur(0px); transform: translateY(0); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .logo { padding-left: 110px; }
}
@media (max-width: 600px) {
  .mobile-menu-btn { display: flex; }
  .nav-left { display: none; }
  .nav-right > *:not(.mobile-menu-btn):not(.cart-wrap) { display: none; }
  nav { grid-template-columns: auto 1fr auto; padding: 12px 20px; }
  .cart-sidebar { width: 100%; }
  footer { padding: 40px 20px 28px; border-radius: 20px 20px 0 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand { grid-column: 1 / -1; }
}
