/* ===================================
   GLOBAL STYLES & CSS VARIABLES — WALL SHIELDS™
   =================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  /* Wall Shields Logo Brand Colors */
  --primary: #00B4D8;
  --primary-dark: #0077B6;
  --primary-light: #38BDF8;
  --secondary: #0F172A;
  --secondary-light: #1E293B;
  --accent: #00F0FF; /* Electric Cyan */
  --accent-gold: #FFB800;
  --bg-dark: #070A12;
  --bg-card: #0F172A;
  --bg-card-hover: #1E293B;
  --text-primary: #FFFFFF;
  --text-secondary: #94A3B8;
  --text-muted: #64748B;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(0,180,216,0.5);
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;
  --info: #38BDF8;

  /* Shadows & Glows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.5);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.6);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.7);
  --shadow-cyan: 0 4px 24px rgba(0,180,216,0.35);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: all 0.25s ease;
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.4s ease;

  /* Typography */
  --font: 'Inter', sans-serif;

  /* Spacing */
  --container-max: 1280px;
  --header-height: 76px;
}

/* ===================================
   RESET & BASE
   =================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background-color: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-fast);
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

input, button, textarea, select {
  font-family: var(--font);
  outline: none;
  border: none;
}

button {
  cursor: pointer;
  background: none;
}

/* ===================================
   SCROLLBAR
   =================================== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--secondary);
}
::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 3px;
}

/* ===================================
   TYPOGRAPHY
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
}

h1 { font-size: clamp(1.8rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.6rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1rem; }

p { color: var(--text-secondary); }

.text-primary-color { color: var(--primary-light); }
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.text-white { color: var(--text-primary); }

/* ===================================
   LAYOUT
   =================================== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 60px 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  flex-wrap: wrap;
  gap: 12px;
}

.section-title {
  font-size: 1.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-title::before {
  content: '';
  display: block;
  width: 4px;
  height: 28px;
  background: var(--primary-light);
  border-radius: 2px;
  flex-shrink: 0;
}

.section-link {
  color: var(--primary-light);
  font-weight: 600;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-fast);
}

.section-link:hover {
  color: var(--accent);
  gap: 10px;
}

/* ===================================
   HEADER / NAVBAR — WALL SHIELDS™
   =================================== */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: rgba(7, 10, 18, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

#header.scrolled {
  background: rgba(7, 10, 18, 0.98);
  box-shadow: var(--shadow-md);
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

/* Official Logo Styling */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-img {
  height: 48px;
  width: auto;
  object-fit: contain;
}

.logo-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 900;
  color: #FFFFFF;
  letter-spacing: 0.5px;
}

.logo-title span {
  font-size: 0.65rem;
  vertical-align: super;
  font-weight: 700;
  color: var(--primary-light);
}

.logo-subtitle {
  font-size: 0.72rem;
  color: var(--primary-light);
  font-weight: 600;
  letter-spacing: 0.2px;
}

.nav-search {
  flex: 1;
  max-width: 580px;
  position: relative;
}

.nav-search input {
  width: 100%;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(30, 41, 59, 0.95));
  border: 2px solid rgba(56, 189, 248, 0.5);
  border-radius: 30px;
  padding: 12px 54px 12px 22px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.25);
}

.nav-search input:focus {
  border-color: #38bdf8;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(14, 116, 144, 0.3));
  box-shadow: 0 0 25px rgba(56, 189, 248, 0.6), inset 0 0 12px rgba(56, 189, 248, 0.2);
}

.nav-search input::placeholder { color: rgba(226, 232, 240, 0.65); font-weight: 500; }

.nav-search-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, #00b4d8 0%, #0077b6 100%);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 0.95rem;
  box-shadow: 0 0 12px rgba(0, 180, 216, 0.6);
  transition: all 0.25s ease;
}

.nav-search-btn:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.8);
}

/* Search Dropdown */
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  max-height: 320px;
  overflow-y: auto;
  z-index: 999;
  display: none;
  box-shadow: var(--shadow-lg);
}

.search-dropdown.active { display: block; }

.search-result-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  transition: var(--transition-fast);
  cursor: pointer;
}

.search-result-item:hover { background: var(--bg-card-hover); }

.search-result-img {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--secondary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.search-result-info { flex: 1; min-width: 0; }
.search-result-name { font-size: 0.88rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-price { font-size: 0.8rem; color: var(--primary-light); font-weight: 600; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.nav-action-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 1.1rem;
  transition: var(--transition-fast);
}

.nav-action-btn:hover {
  background: var(--bg-card);
  color: var(--primary-light);
}

.nav-action-btn .badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  background: var(--primary-dark);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: var(--transition);
  margin-left: 4px;
}

.nav-user-btn:hover {
  border-color: var(--primary-light);
  color: var(--text-primary);
}

.nav-user-avatar {
  width: 28px;
  height: 28px;
  background: var(--primary-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

/* Mobile menu toggle */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 1px;
  transition: var(--transition);
}

/* Modern Glassmorphic Navigation Bar */
.nav-categories {
  background: rgba(11, 17, 30, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: sticky;
  top: var(--header-height);
  z-index: 99;
}

.nav-categories-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 8px 12px;
}

.nav-categories-inner::-webkit-scrollbar { display: none; }

.nav-cat-link {
  white-space: nowrap;
  padding: 8px 18px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  font-weight: 600;
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: all 0.25s ease-in-out;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  text-decoration: none;
}

.nav-cat-link:hover {
  color: var(--text-primary);
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
}

.nav-cat-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, rgba(0, 180, 216, 0.85), rgba(0, 119, 182, 0.9));
  border-color: var(--accent);
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0, 180, 216, 0.35);
}

.nav-cat-badge {
  background: var(--accent);
  color: #000;
  font-size: 0.7rem;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 2px;
}

/* ===================================
   FOOTER
   =================================== */
footer {
  background: var(--secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-brand p {
  font-size: 0.9rem;
  margin: 16px 0 20px;
  max-width: 320px;
}

.footer-social {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 38px;
  height: 38px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}

.social-btn:hover {
  background: var(--primary-dark);
  color: white;
  border-color: var(--primary-light);
}

.footer-col h4 {
  font-size: 0.95rem;
  margin-bottom: 16px;
  color: var(--text-primary);
}

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

.footer-links a {
  font-size: 0.88rem;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--primary-light);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border: 2px solid transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
}
.btn-primary:hover {
  background: var(--primary);
  box-shadow: var(--shadow-cyan);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary-light);
  color: var(--primary-light);
  background: var(--bg-card-hover);
}

.btn-outline {
  background: transparent;
  color: var(--primary-light);
  border-color: var(--primary-light);
}
.btn-outline:hover {
  background: var(--primary-dark);
  color: white;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}
.btn-ghost:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.btn-danger {
  background: var(--error);
  color: white;
}
.btn-danger:hover {
  background: #c53030;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===================================
   FORMS & CARDS
   =================================== */
.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.form-control:focus {
  border-color: var(--primary-light);
  background: var(--bg-card-hover);
  box-shadow: 0 0 0 3px rgba(56,189,248,0.15);
}

.form-control::placeholder { color: var(--text-muted); }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-body {
  padding: 20px;
}

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.product-card-img {
  position: relative;
  background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}

.product-card-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.badge {
  padding: 3px 9px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-sale { background: var(--primary-dark); color: white; }
.badge-new { background: var(--primary-light); color: var(--bg-dark); }
.badge-out { background: var(--error); color: white; }

.product-card-wishlist {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  background: rgba(7,10,18,0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: var(--transition-fast);
  backdrop-filter: blur(4px);
  cursor: pointer;
}

.product-card-wishlist:hover,
.product-card-wishlist.active {
  background: var(--primary-light);
  color: var(--bg-dark);
}

.product-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-category {
  font-size: 0.75rem;
  color: var(--primary-light);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 5px;
}

.product-card-name {
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-card-rating {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
}

.stars {
  display: flex;
  gap: 2px;
  color: #F59E0B;
  font-size: 0.8rem;
}

.rating-count {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.product-card-price {
  display: flex;
  flex-direction: column;
}

.price-current {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.price-old {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-card-add {
  width: 38px;
  height: 38px;
  background: var(--primary-dark);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1rem;
  flex-shrink: 0;
  transition: var(--transition-fast);
  cursor: pointer;
}

.product-card-add:hover {
  background: var(--primary-light);
  color: var(--bg-dark);
  transform: scale(1.08);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

/* ===================================
   TOAST NOTIFICATIONS
   =================================== */
#toast-container {
  position: fixed;
  top: 85px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  pointer-events: all;
  animation: slideInRight 0.3s ease;
}

.toast.removing {
  animation: slideOutRight 0.3s ease forwards;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error { border-left: 3px solid var(--error); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-info { border-left: 3px solid var(--info); }

.toast-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.toast-success .toast-icon { background: rgba(16,185,129,0.15); color: var(--success); }
.toast-error .toast-icon { background: rgba(239,68,68,0.15); color: var(--error); }
.toast-warning .toast-icon { background: rgba(245,158,11,0.15); color: var(--warning); }
.toast-info .toast-icon { background: rgba(56,189,248,0.15); color: var(--info); }

.toast-content { flex: 1; min-width: 0; }
.toast-title { font-size: 0.88rem; font-weight: 600; }
.toast-msg { font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes slideOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

/* ===================================
   PAGE HEADER
   =================================== */
.page-header {
  padding: calc(var(--header-height) + 30px) 0 30px;
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 1.8rem;
  margin-bottom: 6px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text-secondary); }

/* ===================================
   EMPTY STATE & SPINNER
   =================================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-state h3 {
  margin-bottom: 8px;
  font-size: 1.2rem;
}

.empty-state p {
  margin-bottom: 24px;
  font-size: 0.9rem;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary-light);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
