/* ============================================
   SKCOMPUTER – Main Stylesheet
   Minimal Dark Theme | Inter
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Siemreap&display=swap');

@font-face {
  font-family: 'Khmer OS Kangrey';
  src: url('../font/Khmer OS Kangrey.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ---------- CSS Variables ---------- */
:root {
  /* Dark mode (default) */
  --primary: #0A0C10;
  --secondary: #12141B;
  --accent: #00B4D8;
  --accent-hover: #2BC6E8;
  --accent-light: rgba(0, 180, 216, 0.08);
  --surface: #14171F;
  --surface-hover: #1A1E28;
  --card-bg: #101319;
  --text-primary: #F2F4F7;
  --text-secondary: #9096A5;
  --text-muted: #5B6272;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 180, 216, 0.35);
  --success: #00C853;
  --warning: #FFB300;
  --danger: #FF5252;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.35);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-btn: 10px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --header-height: 72px;
  --nav-height: 45px;
}

/* Khmer language mode (see js/i18n.js, which sets <html lang="km">) —
   Siemreap is Google Fonts' open equivalent of "Khmer OS Siemreap",
   since the original proprietary font isn't redistributable here. */
html[lang="km"] {
  --font: 'Siemreap', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Khmer script stacks vowel marks and subscript consonants vertically, so it
   reads as visually larger/taller than Latin text at the same font-size and
   needs more line-height to avoid lines crowding into each other. */
html[lang="km"] .hero h1 {
  font-size: 2.1rem;
  line-height: 1.45;
  font-family: 'Khmer OS Kangrey', 'Siemreap', sans-serif;
}

html[lang="km"] .promo-content h2 {
  font-size: 1.7rem;
  line-height: 1.4;
}

/* Khmer nav labels run noticeably wider than their English equivalents
   (e.g. "Keyboards & Mice" → "ក្តារចុច និង កណ្ដុរ") — trimming size/padding
   here keeps the full nav fitting without needing to horizontally scroll. */
html[lang="km"] .nav-list {
  gap: 0;
}

html[lang="km"] .nav-list a {
  padding: 9px 14px;
  font-size: 1rem;
}

/* Light mode */
[data-theme="light"] {
  --primary: #FFFFFF;
  --secondary: #F5F7FA;
  --accent: #0084D4;
  --accent-hover: #0066B2;
  --accent-light: rgba(0, 132, 212, 0.08);
  --surface: #F0F2F7;
  --surface-hover: #E8ECF2;
  --card-bg: #FFFFFF;
  --text-primary: #0A0C10;
  --text-secondary: #5B6272;
  --text-muted: #9096A5;
  --border: rgba(0, 0, 0, 0.08);
  --border-accent: rgba(0, 132, 212, 0.35);
  --success: #00C853;
  --warning: #FFB300;
  --danger: #FF5252;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.12);
}

/* Dark mode - explicit for overriding system preferences */
[data-theme="dark"] {
  --primary: #0A0C10;
  --secondary: #12141B;
  --accent: #00B4D8;
  --accent-hover: #2BC6E8;
  --accent-light: rgba(0, 180, 216, 0.08);
  --surface: #14171F;
  --surface-hover: #1A1E28;
  --card-bg: #101319;
  --text-primary: #F2F4F7;
  --text-secondary: #9096A5;
  --text-muted: #5B6272;
  --border: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(0, 180, 216, 0.35);
  --success: #00C853;
  --warning: #FFB300;
  --danger: #FF5252;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.35);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

html {
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: var(--font);
  background-color: var(--primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  letter-spacing: -0.02em;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol { list-style: none; }

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  border: none;
  outline: none;
  background: none;
  color: inherit;
}

button { cursor: pointer; }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 80px 0; }

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 40px;
}

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-accent {
  background: var(--accent-light);
  color: var(--accent);
}

.badge-success {
  background: rgba(0, 200, 83, 0.15);
  color: var(--success);
}

.badge-warning {
  background: rgba(255, 179, 0, 0.15);
  color: var(--warning);
}

.badge-danger {
  background: rgba(255, 82, 82, 0.15);
  color: var(--danger);
}

/* ---------- Skeleton Loading ---------- */
.skeleton {
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-hover) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ---------- Toast Notification ---------- */
.toast-container {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 16px 24px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.4s ease, fadeOut 0.4s ease 2.6s forwards;
  min-width: 300px;
}

.toast i { font-size: 1.2rem; color: var(--accent); }

.toast-success { border-left-color: var(--success); }
.toast-success i { color: var(--success); }

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(50px); }
}

/* ============================================
   HEADER
   ============================================ */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 12, 16, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition);
}

[data-theme="light"] .header {
  background: rgba(255, 255, 255, 0.85);
}

.header.scrolled {
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  gap: 32px;
}

/* The header spans the full window width — unlike page content below it,
   which stays capped at 1280px — so the logo and header actions (cart,
   account, etc.) sit flush against the real browser edges on wide screens. */
#siteHeader .container {
  max-width: none;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: translateY(-2px);
}

.logo-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  font-size: 1.1rem;
  letter-spacing: -1px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  overflow: hidden;
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.logo:hover .logo-badge {
  box-shadow: 0 4px 12px rgba(0, 180, 216, 0.35);
  transform: scale(1.08);
}

.logo-text {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  white-space: nowrap;
}

.logo-text span {
  color: var(--accent);
}

.logo span { color: var(--accent); }

.logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #0077B6);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: #fff;
}

/* Search */
.search-bar {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.search-bar input {
  width: 100%;
  padding: 10px 20px 10px 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-btn);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.search-bar input::placeholder { color: var(--text-muted); }

.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.search-bar i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-btn {
  position: relative;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
  font-size: 1.05rem;
}

.header-btn:hover {
  background: var(--surface-hover);
  color: var(--accent);
  border-color: var(--border-accent);
}

/* Admin header "Back to Store" — a labeled pill instead of a bare icon,
   so it reads clearly at a glance rather than relying on a hover tooltip. */
.back-to-store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border-radius: var(--radius-btn);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: var(--transition);
}

.back-to-store-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--border-accent);
}

.back-to-store-btn i {
  font-size: 0.9rem;
}

.header-btn .count {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 18px;
  height: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Account dropdown — shown instead of linking straight to login.html once
   the customer is signed in (see initAccountMenu() in main.js). */
.account-menu {
  position: relative;
}

.account-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 220px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  z-index: 100;
}

.account-dropdown.open {
  display: block;
}

.account-dropdown-info {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.account-dropdown-info strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text-primary);
}

.account-dropdown-info span {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
  word-break: break-all;
}

.account-dropdown-logout {
  width: 100%;
  padding: 9px;
  border-radius: 8px;
  background: var(--secondary);
  color: var(--text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
}

.account-dropdown-logout:hover {
  background: var(--danger);
  color: #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.2rem;
  cursor: pointer;
}

/* Theme toggle */
.theme-toggle {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.theme-toggle:hover {
  background: var(--surface-hover);
  color: var(--accent);
  border-color: var(--border-accent);
}

.theme-toggle i {
  transition: transform 0.3s ease;
}

.lang-toggle {
  height: 42px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-btn);
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.lang-toggle:hover {
  background: var(--surface-hover);
  color: var(--accent);
  border-color: var(--border-accent);
}

.theme-toggle:hover i {
  transform: rotate(20deg);
}

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  background: var(--secondary);
  border-bottom: 1px solid var(--border);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
}

.nav-list::-webkit-scrollbar {
  display: none; /* Chromium/Vivaldi/Edge/Safari — still scrollable, just no visible bar */
}

.nav-list a {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap;
  transition: var(--transition);
}

.nav-list a:hover,
.nav-list a.active {
  background: var(--accent-light);
  color: var(--text-primary);
}

.nav-list a.active { color: var(--accent); }

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  position: relative;
  padding: 120px 0;
  overflow: hidden;
  background: var(--primary);
}

.hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -15%;
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.10) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(10px);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -40%;
  left: -15%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 119, 182, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(10px);
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  position: relative;
  z-index: 1;
}

.hero-content { max-width: 560px; }

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-light);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 28px;
}

.hero h1 {
  font-size: 3.75rem;
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero h1 span {
  background: linear-gradient(135deg, var(--accent) 0%, #5EE7F5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 40px;
  line-height: 1.65;
  max-width: 480px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* Slideshow styles */
.hero-slideshow {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.hero-slideshow::before {
  content: '';
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.18) 0%, transparent 70%);
  filter: blur(30px);
  z-index: 0;
}

.slideshow-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.slideshow-slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  inset: 0;
}

.slideshow-slide.active {
  opacity: 1;
}

.slideshow-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Navigation buttons */
.slideshow-prev,
.slideshow-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.slideshow-prev:hover,
.slideshow-next:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.4);
}

.slideshow-prev {
  left: 16px;
}

.slideshow-next {
  right: 16px;
}

/* Dot indicators */
.slideshow-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
}

.slideshow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.slideshow-dot.active {
  background: white;
  width: 24px;
  border-radius: 4px;
  border-color: white;
}

.slideshow-dot:hover {
  background: rgba(255, 255, 255, 0.8);
}

/* Floating stats */
.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
}

.hero-stat {
  text-align: left;
}

.hero-stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.hero-stat-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--accent);
  color: #04141C;
  box-shadow: none;
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--surface-hover);
  border-color: var(--border-accent);
  color: var(--text-primary);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: var(--accent);
  color: #fff;
}

.btn-danger {
  background: rgba(255, 82, 82, 0.15);
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--danger);
  color: #fff;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 16px 36px;
  font-size: 1rem;
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}

/* ============================================
   CATEGORIES
   ============================================ */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.category-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 24px;
  text-align: center;
  transition: var(--transition);
  cursor: pointer;
}

.category-card:hover {
  border-color: var(--border-accent);
  background: var(--surface);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* Categories with no products yet — de-emphasized so "Coming soon" reads as
   intentional roadmap, not a broken/empty card. */
.category-card-empty {
  opacity: 0.55;
}

.category-card-empty:hover {
  opacity: 0.85;
}

.category-card-empty .category-icon {
  background: var(--secondary);
  color: var(--text-muted);
}

.category-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.6rem;
  color: var(--accent);
  transition: var(--transition);
}

.category-card:hover .category-icon {
  background: var(--accent);
  color: #fff;
}

.category-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.category-card p {
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  position: relative;
}

.product-card-out-of-stock .product-image img,
.product-card-out-of-stock .product-image i {
  opacity: 0.45;
}

.product-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.product-image {
  position: relative;
  aspect-ratio: 4/3;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.product-image i {
  font-size: 3rem;
  color: var(--text-muted);
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  z-index: 2;
}

.product-badge.sale {
  background: var(--danger);
  color: #fff;
}

.product-badge.new {
  background: var(--accent);
  color: #fff;
}

.product-badge.secondhand {
  background: var(--warning);
  color: #1a1a1a;
}

.product-wishlist {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(13, 27, 42, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  z-index: 2;
  border: none;
}

.product-wishlist:hover {
  background: var(--danger);
  color: #fff;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.product-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-rating {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 12px;
}

.product-rating i {
  font-size: 0.75rem;
  color: var(--warning);
}

.product-rating span {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-left: 4px;
}

.product-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.product-price {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent);
}

.product-price .old-price {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: line-through;
  margin-left: 8px;
  font-weight: 400;
}

.product-add-btn {
  width: 40px;
  height: 40px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.product-add-btn:hover {
  background: var(--accent-hover);
  transform: scale(1.1);
}

/* ============================================
   PROMOTION / FLASH SALE
   ============================================ */
.promo-banner {
  background: var(--secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  position: relative;
  overflow: hidden;
}

.promo-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 180, 216, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.promo-content { position: relative; z-index: 1; }

.promo-tag {
  display: inline-block;
  background: var(--danger);
  color: #fff;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.promo-content h2 {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.promo-content p {
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.countdown {
  display: flex;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.countdown-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  text-align: center;
  min-width: 80px;
}

.countdown-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.countdown-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--secondary);
  border-top: 1px solid var(--border);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-about p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin: 16px 0;
  line-height: 1.7;
}

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition);
}

.footer-social a:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.footer h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.footer-links a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 6px 0;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ============================================
   PRODUCT LIST PAGE – Sidebar Filters
   ============================================ */
.page-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  padding: 40px 0;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--nav-height) + 60px);
  align-self: start;
}

.filter-group {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
}

.filter-group h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-group h3 i { color: var(--accent); font-size: 0.85rem; }

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.filter-option:hover { color: var(--text-primary); }

.filter-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.filter-option span.count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Price Range Slider */
.price-range {
  margin-top: 12px;
}

.price-range input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
  margin-bottom: 8px;
}

.price-values {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Star Rating Filter */
.rating-filter {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 0;
  cursor: pointer;
}

.rating-filter i { color: var(--warning); font-size: 0.85rem; }
.rating-filter i.empty { color: var(--text-muted); }
.rating-filter span {
  margin-left: 8px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Page Toolbar */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.page-toolbar .results-count {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.page-toolbar .sort-select {
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.85rem;
}

/* ============================================
   PRODUCT DETAIL PAGE
   ============================================ */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  padding: 40px 0;
}

.product-gallery {
  position: sticky;
  top: calc(var(--header-height) + var(--nav-height) + 24px);
  align-self: start;
}

.gallery-main {
  aspect-ratio: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  overflow: hidden;
}

.gallery-main img,
.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-thumbs {
  display: flex;
  gap: 12px;
}

.gallery-thumb {
  width: 80px;
  height: 80px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  font-size: 1.5rem;
  color: var(--text-muted);
}

.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: var(--accent);
}

.detail-info h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.detail-price {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}

.detail-price .old-price {
  font-size: 1.2rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
  margin-left: 12px;
}

.stock-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.stock-status.in-stock {
  background: rgba(0, 200, 83, 0.1);
  color: var(--success);
}

.stock-status.out-of-stock {
  background: rgba(255, 82, 82, 0.1);
  color: var(--danger);
}

.detail-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.8;
  margin-bottom: 28px;
  white-space: pre-wrap; /* keep the admin's line breaks and indentation as typed */
}

.quantity-selector {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 28px;
}

.quantity-selector button {
  width: 44px;
  height: 44px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  cursor: pointer;
}

.quantity-selector button:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.quantity-selector button:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }

.quantity-selector button:hover {
  background: var(--accent);
  color: #fff;
}

.quantity-selector input {
  width: 60px;
  height: 44px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  color: var(--text-primary);
  font-weight: 600;
}

.detail-buttons {
  display: flex;
  gap: 16px;
  margin-bottom: 32px;
}

/* Tabs */
.tabs {
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0;
  margin-bottom: 24px;
}

.tab-btn {
  padding: 14px 24px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn:hover { color: var(--text-primary); }

.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr:nth-child(even) { background: var(--surface); }

.spec-table td {
  padding: 12px 16px;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

.spec-table td:first-child {
  font-weight: 600;
  color: var(--text-primary);
  width: 40%;
}

.spec-table td:last-child { color: var(--text-secondary); }

/* Reviews */
.review {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.review-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  background: var(--accent-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-weight: 700;
}

.review-meta h4 { font-size: 0.9rem; font-weight: 600; }
.review-meta span { font-size: 0.8rem; color: var(--text-muted); }

.review p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

/* ============================================
   CART PAGE
   ============================================ */
.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 32px;
  padding: 40px 0;
}

.cart-items { display: flex; flex-direction: column; gap: 16px; }

.cart-item {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 20px;
  transition: var(--transition);
}

.cart-item:hover { border-color: var(--border-accent); }

.cart-item-image {
  width: 100px;
  height: 100px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--text-muted);
  flex-shrink: 0;
  overflow: hidden;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.cart-item-info { flex: 1; }
.cart-item-info h3 { font-size: 1rem; font-weight: 600; margin-bottom: 4px; }
.cart-item-info p { font-size: 0.82rem; color: var(--text-muted); }

.cart-item-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 100px;
  text-align: right;
}

.cart-item-remove {
  width: 36px;
  height: 36px;
  background: rgba(255, 82, 82, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--danger);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.cart-item-remove:hover {
  background: var(--danger);
  color: #fff;
}

/* Cart Summary */
.cart-summary {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  position: sticky;
  top: calc(var(--header-height) + var(--nav-height) + 24px);
  align-self: start;
}

.cart-summary h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 0.95rem;
}

.summary-row.total {
  border-top: 1px solid var(--border);
  margin-top: 12px;
  padding-top: 16px;
  font-weight: 700;
  font-size: 1.15rem;
}

.summary-row.total span:last-child { color: var(--accent); }

.cart-summary .btn { width: 100%; margin-top: 20px; }

/* ============================================
   CHECKOUT PAGE
   ============================================ */
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 32px;
  padding: 40px 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.form-group textarea { min-height: 100px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
}

.form-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-section h2 i { color: var(--accent); }

/* Payment Options */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payment-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.payment-option:hover,
.payment-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
}

.payment-option input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.payment-option i { font-size: 1.3rem; color: var(--accent); }
.payment-option span { font-weight: 500; }

/* ============================================
   LOGIN / REGISTER PAGE
   ============================================ */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - var(--nav-height));
  padding: 40px 24px;
}

.auth-container {
  width: 100%;
  max-width: 900px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.auth-form-section {
  padding: 48px 40px;
}

.auth-form-section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-form-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.auth-banner {
  background: linear-gradient(135deg, var(--accent), #0077B6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px;
  text-align: center;
}

.auth-banner i { font-size: 4rem; margin-bottom: 24px; opacity: 0.9; }

.auth-banner h3 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.auth-banner p { font-size: 0.9rem; opacity: 0.85; }

.auth-toggle {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-toggle a {
  color: var(--accent);
  font-weight: 600;
}

.auth-toggle a:hover { text-decoration: underline; }

/* ============================================
   SETTINGS PAGE
   ============================================ */
.settings-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  padding: 40px 0;
}

.settings-nav {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  position: sticky;
  top: calc(var(--header-height) + var(--nav-height) + 24px);
  align-self: start;
}

.settings-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.settings-nav a:hover { background: var(--surface); color: var(--text-primary); }

.settings-nav a.active {
  background: var(--accent-light);
  color: var(--accent);
}

.settings-nav a i { font-size: 1rem; width: 20px; text-align: center; }

.settings-section {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.settings-section h2 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 32px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent), #0077B6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #fff;
  font-weight: 700;
}

.profile-avatar-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

/* Toggle Switch */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.toggle-row:last-child { border-bottom: none; }

.toggle-label h4 { font-size: 0.95rem; font-weight: 500; }
.toggle-label p { font-size: 0.82rem; color: var(--text-muted); }

.toggle-switch {
  position: relative;
  width: 50px;
  height: 28px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--surface);
  border-radius: 50px;
  border: 1px solid var(--border);
  transition: var(--transition);
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background: var(--text-secondary);
  border-radius: 50%;
  transition: var(--transition);
}

.toggle-switch input:checked + .toggle-slider {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(22px);
  background: #fff;
}

/* Order History */
.order-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.order-item .order-id { font-weight: 600; font-size: 0.95rem; }
.order-item .order-date { font-size: 0.82rem; color: var(--text-muted); }

/* ============================================
   PAGE HEADER / BREADCRUMB
   ============================================ */
.page-header {
  background: var(--secondary);
  padding: 32px 0;
  border-bottom: 1px solid var(--border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb .sep { color: var(--text-muted); }

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}

.pagination a,
.pagination span {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition);
}

.pagination a:hover { border-color: var(--accent); color: var(--accent); }

.pagination .active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ============================================
   FLOATING CART BUTTON (Mobile)
   ============================================ */
.floating-cart {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--accent), #0096C7);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: #fff;
  box-shadow: 0 4px 20px rgba(0, 180, 216, 0.4);
  z-index: 999;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.floating-cart:hover { transform: scale(1.1); }

.floating-cart .count {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 22px;
  height: 22px;
  background: var(--danger);
  border-radius: 50%;
  font-size: 0.7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--primary); }
::-webkit-scrollbar-thumb {
  background: var(--surface-hover);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
  opacity: 0;
}

.animate-in:nth-child(1) { animation-delay: 0.1s; }
.animate-in:nth-child(2) { animation-delay: 0.2s; }
.animate-in:nth-child(3) { animation-delay: 0.3s; }
.animate-in:nth-child(4) { animation-delay: 0.4s; }
.animate-in:nth-child(5) { animation-delay: 0.5s; }
.animate-in:nth-child(6) { animation-delay: 0.6s; }

/* Scroll-reveal: elements fade/slide in once as they enter the viewport (see initScrollReveal in main.js) */
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate-in, [data-reveal] {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}
