/* ============================================
   ELECTROSHOP - Global Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=DM+Sans:ital,wght@0,300;0,400;0,500;0,600;1,400&display=swap');

:root {
  --bg-primary: #07070d;
  --bg-secondary: #0e0e1a;
  --bg-card: #13131f;
  --bg-card-hover: #1a1a2e;
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.15);
  --accent-2: #7c3aed;
  --accent-3: #f59e0b;
  --text-primary: #f0f0f8;
  --text-secondary: #8888aa;
  --text-muted: #4a4a6a;
  --border: rgba(255,255,255,0.07);
  --border-accent: rgba(0, 212, 255, 0.3);
  --success: #22c55e;
  --danger: #ef4444;
  --warning: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-accent: 0 0 40px rgba(0, 212, 255, 0.12);
  --transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: 'Rajdhani', sans-serif;
  --font-body: 'DM Sans', sans-serif;
  --nav-height: 72px;
}

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

html { scroll-behavior: smooth; }

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

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 4px; }

/* ---- Selection ---- */
::selection { background: rgba(0, 212, 255, 0.3); color: #fff; }

/* ---- Typography ---- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
}

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

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

/* ---- Layout ---- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 24px; }

.section { padding: 80px 0; }

.section-header { text-align: center; margin-bottom: 56px; }
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-glow);
  border: 1px solid var(--border-accent);
  padding: 6px 16px; border-radius: 100px; margin-bottom: 16px;
}
.section-title { font-size: clamp(2rem, 4vw, 3rem); color: var(--text-primary); }
.section-title span { color: var(--accent); }
.section-desc { font-size: 1.05rem; color: var(--text-secondary); max-width: 580px; margin: 12px auto 0; }

/* ---- NAVBAR ---- */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(7, 7, 13, 0.85);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}
.navbar.scrolled { background: rgba(7, 7, 13, 0.97); border-color: var(--border-accent); }

.nav-inner {
  height: 100%; display: flex; align-items: center; justify-content: space-between;
  max-width: 1280px; margin: 0 auto; padding: 0 24px;
}

.nav-logo { display: flex; align-items: center; gap: 10px; }
.nav-logo-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
}
.nav-logo-text { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; }
.nav-logo-text span { color: var(--accent); }

.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
  transition: var(--transition); position: relative;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary); background: rgba(255,255,255,0.05);
}
.nav-link.active { color: var(--accent); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 20px; height: 2px; background: var(--accent); border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 12px; }

.nav-cart {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: var(--accent-glow); border: 1px solid var(--border-accent);
  color: var(--accent); font-size: 0.875rem; font-weight: 600;
  transition: var(--transition); cursor: pointer;
}
.nav-cart:hover { background: var(--accent); color: var(--bg-primary); }

.nav-admin-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-2), #4c1d95);
  color: #fff; font-size: 0.875rem; font-weight: 600;
  border: none; cursor: pointer; transition: var(--transition);
}
.nav-admin-btn:hover { opacity: 0.85; transform: translateY(-1px); }

.hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.hamburger span {
  display: block; width: 24px; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-menu {
  display: none; position: fixed; top: var(--nav-height); left: 0; right: 0;
  background: var(--bg-secondary); border-bottom: 1px solid var(--border);
  padding: 16px; z-index: 999; flex-direction: column; gap: 4px;
}
.mobile-menu.open { display: flex; }
.mobile-menu .nav-link { width: 100%; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-family: var(--font-body); font-size: 0.9rem; font-weight: 600;
  cursor: pointer; border: none; transition: var(--transition);
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #0099bb);
  color: var(--bg-primary); box-shadow: 0 4px 20px rgba(0, 212, 255, 0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(0, 212, 255, 0.5); }

.btn-outline {
  background: transparent; color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }

.btn-accent2 {
  background: linear-gradient(135deg, var(--accent-2), #4c1d95);
  color: #fff;
}
.btn-accent2:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(124, 58, 237, 0.4); }

.btn-sm { padding: 8px 18px; font-size: 0.8rem; }
.btn-lg { padding: 16px 36px; font-size: 1rem; }

/* ---- Cards ---- */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: var(--transition);
}
.card:hover { border-color: var(--border-accent); transform: translateY(-4px); box-shadow: var(--shadow-accent); }

/* ---- Badge ---- */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 100px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
}
.badge-accent { background: rgba(0, 212, 255, 0.15); color: var(--accent); border: 1px solid rgba(0, 212, 255, 0.3); }
.badge-sale { background: rgba(239, 68, 68, 0.15); color: #ef4444; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-new { background: rgba(34, 197, 94, 0.15); color: #22c55e; border: 1px solid rgba(34, 197, 94, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-purple { background: rgba(124, 58, 237, 0.15); color: #a78bfa; border: 1px solid rgba(124, 58, 237, 0.3); }

/* ---- Stars ---- */
.stars { display: flex; align-items: center; gap: 2px; color: var(--warning); font-size: 13px; }
.stars-count { font-size: 12px; color: var(--text-secondary); margin-left: 4px; }

/* ---- Price ---- */
.price-current { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; color: var(--accent); }
.price-original { font-size: 0.9rem; color: var(--text-muted); text-decoration: line-through; }
.price-discount { font-size: 0.8rem; font-weight: 700; color: var(--success); }

/* ---- Grid ---- */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ---- Product Image Placeholder ---- */
.product-img-wrap {
  width: 100%; aspect-ratio: 4/3;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.product-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.product-img-placeholder {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  color: var(--text-muted); font-size: 13px;
}
.product-img-placeholder .icon-wrap {
  width: 64px; height: 64px; border-radius: 16px;
  background: var(--bg-card); display: flex; align-items: center; justify-content: center;
  color: var(--accent); font-size: 28px;
}

/* ---- Footer ---- */
footer {
  background: var(--bg-secondary); border-top: 1px solid var(--border);
  padding: 64px 0 24px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { color: var(--text-secondary); font-size: 0.9rem; margin: 12px 0 20px; line-height: 1.7; }
.footer-socials { display: flex; gap: 10px; }
.social-btn {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); transition: var(--transition); cursor: pointer;
}
.social-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.footer-col h4 { font-family: var(--font-display); font-size: 1rem; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
.footer-links { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { color: var(--text-secondary); font-size: 0.875rem; transition: var(--transition); display: flex; align-items: center; gap: 6px; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 24px; display: flex; align-items: center; justify-content: space-between; }
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  transform: translateY(100px); opacity: 0; transition: all 0.3s ease;
  max-width: 360px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(34, 197, 94, 0.4); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-color: rgba(239, 68, 68, 0.4); }
.toast.error .toast-icon { color: var(--danger); }
.toast-msg { font-size: 0.875rem; color: var(--text-primary); }

/* ---- Utility ---- */
.text-accent { color: var(--accent); }
.text-muted { color: var(--text-secondary); }
.text-center { text-align: center; }
.mt-auto { margin-top: auto; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }

/* ---- Page Top Padding ---- */
.page-content { padding-top: var(--nav-height); }

/* ---- Divider ---- */
.divider { height: 1px; background: var(--border); margin: 48px 0; }

/* ---- Loading Skeleton ---- */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(0, 212, 255, 0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

.animate-fade-up { animation: fadeInUp 0.6s ease forwards; }
.animate-fade { animation: fadeIn 0.5s ease forwards; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .nav-menu { display: none; }
  .hamburger { display: flex; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .section { padding: 56px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .nav-admin-btn span { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .btn-lg { padding: 13px 24px; font-size: 0.9rem; }
}
