/* ============ SHARED NAVIGATION STYLES (from index.css) ============ */
/* Load this file BEFORE page-specific CSS so pages can override if needed */

html {
  --util-bar: #000;
  --header: rgba(5,5,5,0.95);
}

/* Layout utilities required by navigation */
.container-main { max-width: 1440px; margin: 0 auto; padding: 0 20px; }
.text-accent { color: var(--accent); }
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar { -ms-overflow-style: none; scrollbar-width: none; }
html[data-theme="light"] {
  --util-bar: #f3f4f6;
  --header: rgba(255,255,255,0.95);
}

/* ============ TOP UTILITY BAR ============ */
.util-bar {
  background: var(--util-bar); color: var(--muted); font-size: 11px;
  border-bottom: 1px solid var(--line);
}

/* ============ MAIN HEADER ============ */
.header-main {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(12px);
  background: var(--header);
}

/* ============ MEGA MENU ============ */
#mega-menu {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 49;
  pointer-events: none;
  padding-top: 0;
}
.mega-inner {
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
  border-top: none;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 4px 18px rgba(230,0,0,0.08);
  transform: translateY(-8px);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(.22,.8,.28,1), opacity 0.24s ease;
  pointer-events: none;
}
html[data-theme="light"] .mega-inner {
  box-shadow: 0 24px 60px rgba(0,0,0,0.14), 0 4px 18px rgba(230,0,0,0.06);
}
#mega-menu.open {
  pointer-events: auto;
}
#mega-menu.open .mega-inner {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.mega-body {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  padding: 28px 20px 20px;
  max-width: 1440px;
  margin: 0 auto;
}
@media(max-width:1024px){ .mega-body { grid-template-columns: repeat(3,1fr); } }
@media(max-width:640px){ .mega-body { grid-template-columns: repeat(2,1fr); } }
.mega-col {
  padding: 0 20px 10px;
  border-right: 1px solid var(--line);
}
.mega-col:last-child { border-right: none; }
.mega-col-title {
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .1em;
  color: var(--accent);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 7px;
}
.mega-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 6px;
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13.5px; font-weight: 500;
  transition: all 0.18s;
  cursor: pointer;
  text-decoration: none;
}
.mega-link:hover {
  background: var(--hover-bg);
  color: var(--text);
  padding-left: 12px;
}
.mega-link i {
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--accent);
  flex: none;
}
.mega-link:hover i {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.mega-link .badge {
  margin-left: auto;
  background: var(--accent);
  color: #fff; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px;
}
.mega-brand-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  margin-top: 4px;
}
.mega-brand-chip {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.18s;
  text-align: center;
  min-height: 38px;
}
.mega-brand-chip:hover {
  border-color: var(--accent);
  background: var(--hover-bg);
  color: var(--text);
}
.mega-footer-bar {
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  padding: 12px 20px;
}
.mega-footer-bar-inner {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.mega-promo-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent); color: #fff;
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
}
.mega-promo-chip-ghost {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); color: var(--text-2);
  padding: 6px 14px; border-radius: 999px;
  font-size: 12px; font-weight: 500;
  background: transparent;
  cursor: pointer;
  transition: all .18s;
}
.mega-promo-chip-ghost:hover { border-color: var(--accent); color: var(--accent); }
.mega-overlay {
  position: fixed; inset: 0; z-index: 48;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.24s ease;
}
.mega-overlay.show { opacity: 1; pointer-events: auto; }
/* Trigger button active */
.cat-link.mega-active {
  background: var(--accent) !important;
  color: #fff !important;
}

/* ============ THEME TOGGLE ============ */
.theme-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 12px; font-weight: 600;
}
.theme-toggle:hover { background: var(--hover-bg); border-color: var(--accent); }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: inline; }
html[data-theme="light"] .theme-toggle .sun { display: inline; }
html[data-theme="light"] .theme-toggle .moon { display: none; }
.logo-wrap {
  display: flex; align-items: center; gap: 10px;
}
.logo-icon {
  width: 42px; height: 42px; border-radius: 8px;
  background: linear-gradient(135deg, #e60000 0%, #8b0000 100%);
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; color: white; font-size: 24px;
  box-shadow: 0 4px 18px rgba(230, 0, 0, 0.4);
  font-family: 'Bebas Neue', sans-serif;
  letter-spacing: 0.05em;
}
.logo-text {
  font-family: 'Inter', sans-serif;
  font-weight: 900; font-size: 20px; letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
}
.logo-text .red { color: #e60000; }
.site-logo { display:block; height:130px; width:auto; }
.logo-sub { font-size: 10px; color: #888; font-weight: 500; letter-spacing: 0.1em; }

/* Search */
.search-bar {
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  transition: all 0.2s;
}
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,59,47,0.15);
}
.search-input {
  background: transparent;
  color: var(--text);
  border: none;
  outline: none;
  width: 100%;
  padding: 13px 18px;
  font-size: 14px;
}
.search-input::placeholder { color: var(--muted); }
.search-btn {
  background: var(--accent);
  color: white;
  border-radius: 999px;
  padding: 9px 22px;
  font-weight: 500;
  font-size: 14px;
  margin: 4px;
  transition: all 0.2s;
}
.search-btn:hover {
  background: #e6271c;
  transform: scale(1.02);
}

.header-icon {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--text-2);
  transition: color 0.2s;
  position: relative;
  font-size: 11px;
}
.header-icon:hover { color: var(--accent); }
.header-icon .fa { font-size: 19px; margin-bottom: 1px; color: var(--text); transition: color 0.2s; }
.header-icon:hover .fa { color: var(--accent); }
.cart-badge {
  position: absolute;
  top: -4px; right: -8px;
  background: var(--accent);
  color: white;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 999px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
  animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Category nav (TAB BAR) */
.cat-nav {
  background: #0a0a0a;
  border-bottom: 1px solid #1a1a1a;
}
.cat-nav-inner {
  display: flex; align-items: center;
  gap: 4px;
  overflow-x: auto;
  padding: 10px 0;
}
.cat-link {
  padding: 8px 18px;
  color: #d0d0d0;
  font-size: 14px;
  white-space: nowrap;
  transition: all 0.2s;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.cat-link:hover { color: white; background: #1a1a1a; }
.cat-link.active { color: white; background: #1a1a1a; }
.platinum-btn {
  margin-left: auto;
  padding: 8px 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 8px;
  display: inline-flex; align-items: center; gap: 6px;
  box-shadow: 0 6px 18px rgba(230,0,0,0.14);
  transition: all 0.2s;
  white-space: nowrap;
}
.platinum-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(230,0,0,0.32); }

/* Login button — red bold style */
.btn-login {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 18px;
  background: linear-gradient(135deg, #e60000, #b30000);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(230,0,0,0.35);
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}
.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(230,0,0,0.5);
  filter: brightness(1.1);
}
.btn-login i { font-size: 14px; }

/* Light mode overrides */
html[data-theme="light"] .search-bar { background: var(--surface); border-color: var(--line); color: var(--text); }
html[data-theme="light"] .search-bar input { color: var(--text); }
html[data-theme="light"] .search-bar input::placeholder { color: var(--muted); }
html[data-theme="light"] .cat-nav { background: var(--surface); border-color: var(--line); }
html[data-theme="light"] .cat-link { color: var(--text-2); }
html[data-theme="light"] .cat-link:hover, html[data-theme="light"] .cat-link.active { background: var(--hover-bg); color: var(--text); }
