/* ============================================
   GSM STORE - CSS DESIGN SYSTEM
   Premium dark theme with glassmorphism
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  /* Colors - VIBRANT DARK MODE */
  --primary: #818cf8;
  --primary-light: #a5b4fc;
  --primary-dark: #6366f1;
  --secondary: #c084fc;
  --accent: #fb7185;
  --accent-cyan: #22d3ee;
  --accent-emerald: #34d399;
  --accent-amber: #fbbf24;
  --accent-rose: #f472b6;

  /* Semantic Colors - Brighter for dark mode */
  --success: #34d399;
  --warning: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;

  /* Dark Theme - Richer, less flat */
  --bg-dark: #0a0e1a;
  --bg-darker: #060912;
  --bg-card: rgba(30, 41, 70, 0.5);
  --bg-card-hover: rgba(45, 60, 100, 0.6);
  --bg-glass: rgba(129, 140, 248, 0.05);

  /* Text - Warmer white tones */
  --text-primary: #f8fafc;
  --text-secondary: rgba(248, 250, 252, 0.75);
  --text-muted: rgba(248, 250, 252, 0.5);

  /* Borders - Subtle color tint */
  --border-color: rgba(129, 140, 248, 0.15);
  --border-color-hover: rgba(129, 140, 248, 0.4);

  /* Shadows - Colored shadows for depth */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3), 0 0 20px rgba(129, 140, 248, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 30px rgba(129, 140, 248, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5), 0 0 50px rgba(129, 140, 248, 0.1);
  --shadow-primary: 0 8px 32px rgba(129, 140, 248, 0.35);

  /* Spacing */
  --container-width: 1400px;
  --container-padding: 1.5rem;
  --section-padding: 5rem;

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

  /* Transitions */
  --transition-fast: calc(0.15s * var(--anim-speed, 1)) ease;
  --transition-base: calc(0.3s * var(--anim-speed, 1)) ease;
  --transition-slow: calc(0.5s * var(--anim-speed, 1)) ease;
  --transition-bounce: calc(0.4s * var(--anim-speed, 1)) cubic-bezier(0.175, 0.885, 0.32, 1.275);

  /* Typography */
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
  /* Transition Properties */
  --theme-transition: 0.3s ease;
}

/* Light Theme Variables - VIBRANT */
html.light-mode {
  /* Background - Subtle gradient base */
  --bg-dark: #fafbff;
  --bg-darker: #f0f4ff;
  --bg-card: rgba(255, 255, 255, 0.75);
  --bg-card-hover: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(99, 102, 241, 0.04);

  /* Text with better contrast */
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;

  /* Borders with subtle color */
  --border-color: rgba(99, 102, 241, 0.12);
  --border-color-hover: rgba(99, 102, 241, 0.5);

  /* Enhanced shadows with color tint */
  --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.08);
  --shadow-md: 0 8px 24px rgba(99, 102, 241, 0.1);
  --shadow-lg: 0 16px 48px rgba(99, 102, 241, 0.15);
  --shadow-primary: 0 8px 32px rgba(99, 102, 241, 0.25);

  /* Header with glass effect */
  --header-bg: rgba(255, 255, 255, 0.7);
  
  /* Vibrant accent colors for light mode */
  --primary: #6366f1;
  --primary-light: #818cf8;
  --primary-dark: #4f46e5;
  --secondary: #a855f7;
  --accent: #f43f5e;
  --accent-cyan: #0891b2;
  --accent-emerald: #059669;
}

/* Default Dark Theme Header BG */
:root {
  --header-bg: rgba(15, 23, 42, 0.85);
}

/* ============================================
   LIGHT MODE COMPONENT OVERRIDES - VIBRANT
   ============================================ */
html.light-mode .title-line {
  background: linear-gradient(135deg, #1e293b 0%, #6366f1 50%, #a855f7 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: titleShimmer 4s ease infinite;
}

@keyframes titleShimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

html.light-mode .hero-gradient {
  background:
    radial-gradient(ellipse at 20% 30%, rgba(99, 102, 241, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.15) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 80%, rgba(244, 63, 94, 0.1) 0%, transparent 40%),
    radial-gradient(ellipse at 10% 70%, rgba(6, 182, 212, 0.12) 0%, transparent 35%);
  animation: heroGradientMove 15s ease-in-out infinite;
}

@keyframes heroGradientMove {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}

html.light-mode .dropdown-menu,
html.light-mode .search-bar,
html.light-mode .mobile-nav,
html.light-mode .cart-sidebar {
  background: rgba(255, 255, 255, 0.95);
}

html.light-mode .btn-outline {
  color: var(--text-primary);
  border: 2px solid transparent;
  background-image: linear-gradient(white, white), linear-gradient(135deg, var(--primary), var(--secondary));
  background-origin: border-box;
  background-clip: padding-box, border-box;
}

html.light-mode .btn-outline:hover {
  background-image: linear-gradient(rgba(99, 102, 241, 0.05), rgba(99, 102, 241, 0.05)), linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.2);
  transform: translateY(-2px);
}

html.light-mode .btn-glass {
  background: rgba(99, 102, 241, 0.12);
  color: var(--text-primary);
  border-color: rgba(99, 102, 241, 0.15);
}

html.light-mode .btn-glass:hover {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--primary);
  transform: translateY(-2px);
}

html.light-mode .category-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

html.light-mode .category-card:hover {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 
    var(--shadow-md),
    0 0 30px rgba(99, 102, 241, 0.1);
  border-color: var(--primary);
  transform: translateY(-8px) scale(1.02);
}

html.light-mode .product-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(99, 102, 241, 0.08);
}

html.light-mode .product-card:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 
    0 20px 40px rgba(99, 102, 241, 0.15),
    0 0 0 1px var(--primary);
}

/* Light mode section backgrounds */
html.light-mode .products-section {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(168, 85, 247, 0.02) 100%);
}

html.light-mode .trust-section {
  background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.03) 100%);
}

/* Light mode input focus */
html.light-mode input:focus,
html.light-mode select:focus,
html.light-mode textarea:focus {
  box-shadow: 
    0 0 0 3px rgba(99, 102, 241, 0.15),
    0 0 20px rgba(99, 102, 241, 0.08);
}

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

/* ============================================
   INSTANT IMAGE LOADING - BLUR-UP TECHNIQUE
   ============================================ */
/* Base image wrapper for blur-up effect */
.img-wrapper {
  position: relative;
  overflow: hidden;
  background: var(--bg-card);
}

/* Placeholder - tiny blurred image shown instantly */
.img-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px);
  transform: scale(1.1);
  z-index: 1;
  transition: opacity 0.4s ease-out;
}

/* Main image - fades in over placeholder */
.img-main {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  z-index: 2;
  transition: opacity 0.4s ease-out;
}

.img-main.loaded {
  opacity: 1;
}

.img-main.loaded + .img-placeholder,
.img-wrapper.loaded .img-placeholder {
  opacity: 0;
  pointer-events: none;
}

/* Skeleton loading animation for images without placeholder */
.img-skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    var(--bg-glass) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Product card specific instant loading */
.phone-card .card-image {
  background: var(--bg-card);
}

.phone-card .card-image img {
  transition: opacity 0.3s ease-out, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.phone-card .card-image img.loading {
  opacity: 0;
}

.phone-card .card-image img.loaded {
  opacity: 1;
}

/* Gallery instant switching */
.product-gallery .main-image-container img {
  transition: opacity 0.15s ease-out !important;
}

.product-gallery .main-image-container img.switching {
  opacity: 0.3;
}

/* Search results instant images */
.search-result-img {
  background: var(--bg-card);
  transition: opacity 0.2s ease-out;
}

.search-result-img.loading {
  opacity: 0.5;
}

.search-result-img.loaded {
  opacity: 1;
}

/* Global overflow prevention */
html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  transition: background-color 0.5s ease, color 0.5s ease;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

/* Dark mode gradient background */
html:not(.light-mode) body {
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(129, 140, 248, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(192, 132, 252, 0.12) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 80%, rgba(251, 113, 133, 0.08) 0%, transparent 40%),
    radial-gradient(ellipse at 10% 70%, rgba(34, 211, 238, 0.1) 0%, transparent 35%),
    var(--bg-dark);
  background-attachment: fixed;
}

/* Light mode gradient background */
html.light-mode body {
  background: 
    radial-gradient(ellipse at 20% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 45%),
    radial-gradient(ellipse at 60% 80%, rgba(244, 63, 94, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 10% 60%, rgba(6, 182, 212, 0.08) 0%, transparent 35%),
    radial-gradient(ellipse at 90% 90%, rgba(16, 185, 129, 0.05) 0%, transparent 40%),
    var(--bg-dark);
  background-attachment: fixed;
}

/* Global Theme Transition - Removed to improve performance */
/* Individual elements now handle their own transitions */

/* Prevent transition on initial load if needed, but for now we want everything to be smooth */


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

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

/* Ensure tables are responsive */
table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

/* Prevent pre and code from causing overflow */
pre, code {
  max-width: 100%;
  overflow-x: auto;
  word-wrap: break-word;
  box-sizing: border-box;
}

/* Ensure all form elements are contained */
input, select, textarea, button {
  max-width: 100%;
  box-sizing: border-box;
}

/* Image lazy loading with blur placeholder fade-in */
.product-img-lazy,
.gallery-img-lazy {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

.product-img-lazy.loaded,
.gallery-img-lazy.loaded {
  opacity: 1;
}

/* Ensure images have proper aspect ratio during load */
.product-card-image {
  position: relative;
  background-color: var(--bg-darker);
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  overflow: hidden;
}

.product-card-image img {
  position: relative;
  z-index: 1;
}

/* Prevent flex containers from overflowing */
.flex, [class*="flex-"], [class*="grid"] {
  max-width: 100%;
  box-sizing: border-box;
}

/* Ensure all sections are contained */
section, article, nav, header, footer, main {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Aside needs overflow visible for sticky to work */
aside {
  max-width: 100%;
  box-sizing: border-box;
  /* No overflow hidden - breaks sticky positioning */
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Typography - Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  line-height: 1.2;
  font-weight: 700;
  color: var(--text-primary);
}

/* ============================================
   LAYOUT
   ============================================ */
html {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  box-sizing: border-box;
  overflow-x: hidden;
}

.main-content {
  min-height: 100vh;
  padding-top: 80px;
  /* Header height */
  width: 100%;
  max-width: 100vw;
  position: relative;
  z-index: 1;
  overflow-x: hidden;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* Optional glassmorphic content wrapper */
.main-content.glass-content {
  margin: 0 auto;
  background: var(--bg-card);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
}

/* ============================================
   HEADER - SPECTACULAR GLASSMORPHISM DESIGN
   ============================================ */
.store-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: transparent;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: auto;
  overflow: visible;
}

.store-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border-color);
  opacity: 0.95;
  transition: opacity 0.3s ease;
  z-index: -1;
}

/* Rainbow glow effect at top */
.header-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%,
    var(--primary) 15%, 
    var(--secondary) 30%,
    var(--accent) 45%,
    var(--accent-cyan) 60%,
    var(--accent-emerald) 75%,
    var(--accent-amber) 90%,
    transparent 100%
  );
  background-size: 200% 100%;
  opacity: 0.8;
  filter: blur(0.5px);
  animation: headerGlowMove 8s linear infinite, headerGlowPulse 4s ease-in-out infinite;
}

@keyframes headerGlowMove {
  0% { background-position: 0% center; }
  100% { background-position: 200% center; }
}

@keyframes headerGlowPulse {
  0%, 100% { opacity: 0.5; width: 60%; filter: blur(1px); }
  50% { opacity: 1; width: 95%; filter: blur(0); }
}

/* Scrolled state */
.store-header.scrolled::before {
  opacity: 0.98;
}

.store-header.scrolled {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.store-header.scrolled .header-glow {
  opacity: 1;
}

/* Hidden on scroll down */
.store-header.hidden {
  transform: translateY(-100%);
}

.header-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

/* Logo with hover animation */
.header-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.35rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.3s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.header-logo:hover {
  transform: scale(1.02);
}

.logo-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
}

/* Logo imagine: container adaptat la orice aspect ratio, fără chenar fix */
.logo-icon:has(img) {
  width: auto;
  min-width: 44px;
  max-width: 180px;
  height: 44px;
  padding: 6px 10px;
  background: transparent;
}

.logo-icon:has(img)::before {
  display: none;
}

.header-logo:hover .logo-icon:has(img) {
  transform: none;
  box-shadow: none;
}

.logo-icon img {
  width: auto;
  height: auto;
  max-width: 160px;
  max-height: 32px;
  object-fit: contain;
  display: block;
  vertical-align: middle;
}

.logo-icon::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 70%
  );
  transform: rotate(45deg) translateY(100%);
  transition: transform 0.6s ease;
}

.header-logo:hover .logo-icon {
  transform: rotate(-5deg);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.header-logo:hover .logo-icon:not(:has(img))::before {
  transform: rotate(45deg) translateY(-100%);
}

.logo-text {
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navigation with animated underlines */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-weight: 500;
  transition: transform 0.3s ease, opacity 0.3s ease;
  position: relative;
  text-decoration: none;
  white-space: nowrap;
}

.nav-link-text {
  position: relative;
  z-index: 1;
}

/* No underline/line under nav links – active state is pill only */

.nav-link:hover,
.nav-link.active {
  color: var(--text-primary);
}

/* Pill background: subtle on hover, stronger for active */
.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-glass);
  border-radius: var(--radius-full);
  opacity: 0;
  transition: opacity 0.3s ease, background 0.3s ease;
}

.nav-link:hover::before {
  opacity: 1;
}

.nav-link.active::before {
  opacity: 1;
  background: linear-gradient(135deg,
    rgba(99, 102, 241, 0.18),
    rgba(168, 85, 247, 0.12)
  );
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.nav-arrow {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
  margin-left: 0.25rem;
}

.nav-item.active .nav-arrow,
.nav-item:hover .nav-arrow {
  transform: rotate(180deg);
}

/* Mega dropdown */
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1001;
}

.nav-item.active .nav-dropdown,
.nav-item:hover .nav-dropdown {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mega-dropdown {
  min-width: 320px;
  padding: 1rem;
}

.mega-dropdown-inner {
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.mega-brands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.mega-brand-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  text-decoration: none;
  background: var(--bg-glass);
  border: 1px solid transparent;
}

.mega-brand-item:hover {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--primary);
  transform: translateX(4px);
}

.mega-brand-item i {
  opacity: 0;
  transform: translateX(-5px);
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  font-size: 0.75rem;
  color: var(--primary);
}

.mega-brand-item:hover i {
  opacity: 1;
  transform: translateX(0);
}

.mega-view-all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem;
  margin-top: 0.75rem;
  color: var(--primary-light);
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  border-top: 1px solid var(--border-color);
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.mega-view-all:hover {
  color: var(--primary);
}

.mega-view-all i {
  transition: transform 0.2s ease;
}

.mega-view-all:hover i {
  transform: translateX(4px);
}

/* Mega Menu */
.nav-mega-menu {
  position: relative;
}

.nav-link-mega {
  cursor: pointer;
}

.nav-chevron {
  font-size: 0.75rem !important;
  margin-left: 0.25rem;
  transition: transform var(--transition-base);
}

.nav-mega-menu:hover .nav-chevron,
.nav-mega-menu.open .nav-chevron {
  transform: rotate(180deg);
}

.nav-mega-menu:hover .nav-link-mega,
.nav-mega-menu.open .nav-link-mega {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.mega-menu-dropdown {
  position: fixed;
  top: 80px;
  left: 0;
  margin-top: 0.5rem;
  min-width: 600px;
  width: fit-content;
  max-width: 900px;
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  box-shadow: var(--shadow-xl);
  z-index: 9002 !important;
  pointer-events: none;
  display: block !important;
}

.mega-menu-dropdown.open {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
}

.mega-menu-content {
  width: 100%;
}

.mega-menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.75rem;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

/* Scrollbar styling for mega menu */
.mega-menu-grid::-webkit-scrollbar {
  width: 6px;
}

.mega-menu-grid::-webkit-scrollbar-track {
  background: var(--bg-card);
  border-radius: var(--radius-full);
}

.mega-menu-grid::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-full);
}

.mega-menu-grid::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.mega-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  background: var(--bg-card);
  border: 1px solid transparent;
}

.mega-menu-item:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
  border-color: var(--primary);
  transform: translateX(4px);
}

.mega-menu-brand {
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mega-menu-emoji {
  font-size: 1.2rem;
  line-height: 1;
  display: inline-block;
}

.mega-menu-arrow {
  font-size: 0.75rem;
  opacity: 0;
  transform: translateX(-4px);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.mega-menu-item:hover .mega-menu-arrow {
  opacity: 1;
  transform: translateX(0);
}

@media (max-width: 1023px) {
  .mega-menu-dropdown {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    min-width: auto;
    max-width: none;
    width: 100%;
    border-radius: 0;
    border-left: none;
    border-right: none;
    margin-top: 0;
  }
  
  .mega-menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    max-height: calc(100vh - 200px);
  }
  
  .nav-mega-menu.open .mega-menu-dropdown {
    display: block;
  }
}

/* Header Actions - Spectacular Design */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.header-btn {
  position: relative;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: transform 0.3s ease, opacity 0.3s ease;
  background: transparent;
  border: none;
  cursor: pointer;
  overflow: hidden;
}

.header-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  opacity: 0;
  transform: scale(0.8);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.header-btn:hover::before {
  opacity: 1;
  transform: scale(1);
}

.header-btn:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.header-btn:active {
  transform: translateY(0) scale(0.95);
}

.header-btn i {
  position: relative;
  z-index: 1;
  font-size: 1.1rem;
}

/* Let cart badge extend outside the icon (avoid clipping) */
.header-btn.cart-toggle {
  overflow: visible;
}

/* Cart badge — red pill, top-right of icon (mobile + desktop) */
.cart-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ef4444;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 9999px;
  border: 2px solid var(--bg-darker, #0f172a);
  transform: scale(0);
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  z-index: 3;
  box-shadow: 0 1px 4px rgba(239, 68, 68, 0.5);
}

html.light-mode .cart-badge {
  border-color: #fff;
}

.cart-badge.visible {
  transform: scale(1);
}

/* Theme toggle with flip animation */
/* Theme toggle styles moved to header.ejs inline styles for better encapsulation */

/* Search wrapper with expanding animation */
.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-expanded {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
  width: 0;
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
  pointer-events: none;
}

.search-wrapper.expanded .search-expanded {
  width: 280px;
  opacity: 1;
  pointer-events: auto;
}

.search-wrapper.expanded .search-toggle {
  opacity: 0;
  pointer-events: none;
}

.search-expanded .search-input {
  flex: 1;
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: 0.9rem;
  width: 100%;
}

.search-expanded .search-input:focus {
  outline: none;
}

.search-expanded .search-submit {
  padding: 0.75rem 1rem;
  background: transparent;
  border: none;
  color: var(--primary);
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.search-expanded .search-submit:hover {
  color: var(--primary-light);
  background: var(--bg-glass);
}

/* User avatar button */
.user-btn .user-avatar {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
}

.user-btn:hover .user-avatar {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* User dropdown */
.header-dropdown {
  position: relative;
}

.header-dropdown .dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 240px;
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px) scale(0.95);
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1001;
}

.header-dropdown.active .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  margin-bottom: 0.25rem;
}

.dropdown-avatar {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.dropdown-user-info {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.dropdown-user-info .user-name {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.dropdown-user-info .user-email {
  font-size: 0.8rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.dropdown-item i {
  width: 16px;
  text-align: center;
  font-size: 0.875rem;
}

.dropdown-item:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.dropdown-item.admin-link {
  color: var(--primary-light);
}

.dropdown-item.admin-link:hover {
  background: rgba(99, 102, 241, 0.1);
}

.dropdown-item.logout-item {
  color: var(--danger);
}

.dropdown-item.logout-item:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Login button */
.login-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 500;
  font-size: 0.9rem;
  border-radius: var(--radius-full);
  text-decoration: none;
  width: auto;
  height: auto;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
  color: white;
}

.login-btn i {
  font-size: 0.8rem;
  transition: transform 0.3s ease;
}

.login-btn:hover i {
  transform: translateX(3px);
}

/* Mobile menu toggle with morphing hamburger */
.mobile-menu-toggle {
  display: none;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 22px;
}

.hamburger-line {
  width: 100%;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-darker);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px);
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  overflow-y: auto;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-nav-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
  background: var(--bg-glass);
  border: 1px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
  color: var(--text-primary);
  background: var(--bg-card);
  border-color: var(--primary);
}

.mobile-nav-link i {
  width: 20px;
  text-align: center;
  font-size: 1.1rem;
}

.mobile-nav-section {
  padding: 1rem 0;
}

.mobile-nav-section-title {
  display: block;
  padding: 0.5rem 0.5rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.mobile-brands-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.mobile-brand-chip {
  padding: 0.5rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.mobile-brand-chip:hover {
  background: var(--bg-card);
  border-color: var(--primary);
  color: var(--text-primary);
}

.mobile-nav-cta {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

body.nav-open {
  overflow: hidden;
}

/* Responsive - Show mobile toggle on smaller screens */
@media (max-width: 1024px) {
  .header-nav {
    display: none !important;
  }
  
  .mobile-menu-toggle,
  .mobile-toggle {
    display: flex !important;
  }
}

@media (min-width: 1025px) {
  .header-nav {
    display: flex !important;
  }
  
  .mobile-menu-toggle,
  .mobile-toggle {
    display: none !important;
  }
}
  
  .login-btn .btn-text {
    display: none;
  }
  
  .login-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    justify-content: center;
  }
  
  .login-btn i {
    font-size: 1.1rem;
  }
}

/* Header Dropdown */
.header-dropdown {
  position: relative;
  z-index: 9002;
}

.dropdown-menu {
  position: fixed;
  top: 80px;
  right: auto;
  margin-top: 0.5rem;
  min-width: 220px;
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  box-shadow: var(--shadow-lg);
  z-index: 9002;
  pointer-events: none;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
}

/* Desktop: Use absolute positioning relative to dropdown container */
@media (min-width: 1024px) {
  .header-dropdown {
    position: relative;
  }
  
  .dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: auto;
    /* Remove fixed positioning styles that JS might add */
    margin-top: 0;
  }
}

.header-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.header-dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

@media (max-width: 1023px) {
  /* Hide user button on mobile - user menu is in hamburger menu */
  .header-dropdown {
    display: none !important;
  }
  
  /* Disable hover on mobile, only use click */
  .header-dropdown:hover .dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    pointer-events: none;
  }
  
  .header-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
}

.dropdown-header {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 0.5rem;
}

.user-name {
  display: block;
  font-weight: 600;
}

.user-email {
  display: block;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.dropdown-item:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.dropdown-item.text-danger {
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.5rem 0;
}

/* Search Bar */
.search-bar {
  position: fixed;
  top: 80px;
  left: 0;
  right: 0;
  background: var(--bg-darker);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  z-index: 9001 !important; /* above header, below mobile nav - force with !important */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block !important; /* Ensure it's always displayed */
}

.search-bar.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  display: block !important;
}

.search-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  display: flex;
  gap: 1rem;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.search-form {
  flex: 1;
  display: flex;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.search-input {
  flex: 1;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-primary);
  outline: none;
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-submit {
  padding: 0.75rem 1.25rem;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.search-submit:hover {
  color: var(--primary-light);
}

.search-close {
  padding: 0.75rem;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.search-close:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* Improve tap responsiveness on mobile (avoid double-tap quirks) */
.search-toggle {
  touch-action: manipulation;
}

/* When search is open, keep header stable */
body.search-open .store-header {
  will-change: transform;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 9003;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Mobile Navigation */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  max-width: 360px;
  background: var(--bg-darker);
  border-right: 1px solid var(--border-color);
  z-index: 9004;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-100%);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: none;
}

.mobile-nav.active {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
  pointer-events: auto;
}

/* Mobile Nav Header */
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-card);
  position: sticky;
  top: 0;
  z-index: 10;
}

.mobile-nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.mobile-nav-logo:hover {
  color: var(--text-primary);
}

.mobile-nav-logo .logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: white;
  flex-shrink: 0;
}

.mobile-nav-logo .logo-icon:has(img) {
  width: auto;
  min-width: 36px;
  max-width: 140px;
  height: 36px;
  padding: 4px 8px;
  background: transparent;
}

.mobile-nav-logo .logo-icon img {
  max-width: 128px;
  max-height: 28px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.mobile-nav-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  font-size: 1.25rem;
}

.mobile-nav-close:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

/* Mobile Nav Body */
.mobile-nav-body {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.mobile-nav-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: var(--text-secondary);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  border-left: 3px solid transparent;
  position: relative;
}

.mobile-nav-link i {
  width: 24px;
  text-align: center;
  font-size: 1.125rem;
  color: var(--text-muted);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.mobile-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
  border-left-color: var(--primary);
}

.mobile-nav-link:hover i {
  color: var(--primary-light);
  transform: scale(1.1);
}

.mobile-nav-link.active {
  color: var(--primary-light);
  background: rgba(99, 102, 241, 0.1);
  border-left-color: var(--primary);
}

.mobile-nav-link.active i {
  color: var(--primary-light);
}

/* Mobile Nav Brands Section */
.mobile-nav-section {
  margin-bottom: 1rem;
}

.mobile-nav-section-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.5rem 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mobile-nav-section-title i {
  color: var(--primary-light);
  font-size: 1rem;
}

.mobile-nav-brands {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  padding: 0 1.5rem 1rem;
}

.mobile-nav-brand-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.mobile-nav-brand-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
  border-color: var(--primary);
}

.mobile-nav-brand-link i {
  font-size: 0.75rem;
  opacity: 0.5;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.mobile-nav-brand-link:hover i {
  opacity: 1;
  transform: translateX(2px);
}

.mobile-nav-link-admin {
  color: var(--primary-light) !important;
}

.mobile-nav-link-admin i {
  color: var(--primary-light) !important;
}

.mobile-nav-link-danger {
  color: var(--danger) !important;
}

.mobile-nav-link-danger:hover {
  background: rgba(239, 68, 68, 0.1) !important;
  border-left-color: var(--danger) !important;
}

.mobile-nav-link-danger i {
  color: var(--danger) !important;
}

/* Mobile Nav User Section */
.mobile-nav-user {
  padding: 1rem 1.5rem;
  margin-bottom: 0.5rem;
}

.mobile-nav-user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.mobile-nav-user-info i {
  font-size: 2rem;
  color: var(--primary-light);
}

.mobile-nav-user-name {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.mobile-nav-user-email {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.mobile-nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.75rem 1.5rem;
}

/* Mobile Nav Footer */
.mobile-nav-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-card);
}

.mobile-nav-social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.mobile-nav-social-link {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 1.25rem;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.mobile-nav-social-link:hover {
  color: var(--text-primary);
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

/* Mobile Theme Toggle – sits in mobile-nav-header */
.mobile-theme-switch {
  position: relative;
  width: 50px;
  height: 28px;
  padding: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  outline: none;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  margin-left: auto;
  margin-right: 0.5rem;
}

.mobile-theme-track {
  display: block;
  width: 100%;
  height: 100%;
  background: #1a1a2e;
  border-radius: 20px;
  position: relative;
  transition: background 0.3s ease;
  overflow: hidden;
}

html.light-mode .mobile-theme-track {
  background: #74b9ff;
}

.mobile-theme-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #f8f9fa;
  border-radius: 50%;
  transition: left 0.3s ease;
  z-index: 2;
}

html.light-mode .mobile-theme-thumb {
  left: 25px;
  background: #ffeaa7;
}

.mobile-theme-icon-moon,
.mobile-theme-icon-sun {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.7rem;
  z-index: 1;
  transition: opacity 0.3s ease;
}

.mobile-theme-icon-moon {
  right: 8px;
  color: #cbd5e1;
  opacity: 1;
}

.mobile-theme-icon-sun {
  left: 8px;
  color: #f39c12;
  opacity: 0;
}

html.light-mode .mobile-theme-icon-moon { opacity: 0; }
html.light-mode .mobile-theme-icon-sun { opacity: 1; }

.mobile-theme-switch:active .mobile-theme-track {
  filter: brightness(0.85);
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

@media (max-width: 640px) {
  .mobile-nav {
    max-width: 100%;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  cursor: pointer;
  border: none;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

/* Accessory detail: quantity stepper + add to cart row */
.acc-actions-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.acc-qty-stepper {
  display: inline-flex;
  align-items: stretch;
  background: var(--bg-darker, #1e293b);
  border: 1px solid var(--border-color, rgba(255,255,255,0.1));
  border-radius: var(--radius-md, 10px);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.acc-qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.06);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  flex-shrink: 0;
}

.acc-qty-btn:hover {
  background: rgba(255,255,255,0.12);
  color: var(--primary);
}

.acc-qty-btn:active {
  background: rgba(255,255,255,0.1);
}

.acc-qty-value {
  width: 3rem;
  min-width: 3rem;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  background: transparent;
  border: none;
  border-left: 1px solid var(--border-color, rgba(255,255,255,0.1));
  border-right: 1px solid var(--border-color, rgba(255,255,255,0.1));
  -moz-appearance: textfield;
  appearance: textfield;
}

.acc-qty-value::-webkit-outer-spin-button,
.acc-qty-value::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

html.light-mode .acc-qty-stepper {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

html.light-mode .acc-qty-btn {
  background: rgba(0,0,0,0.04);
  color: #334155;
}

html.light-mode .acc-qty-btn:hover {
  background: rgba(0,0,0,0.08);
  color: var(--primary);
}

html.light-mode .acc-qty-value {
  border-color: #e2e8f0;
  color: #0f172a;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  background-size: 200% 200%;
  color: white;
  box-shadow: var(--shadow-primary);
  position: relative;
  overflow: hidden;
  animation: btnGradient 3s ease infinite;
}

@keyframes btnGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Shine effect on button */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 
    0 12px 40px rgba(99, 102, 241, 0.4),
    0 0 20px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

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

.btn-outline:hover {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

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

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

.btn-glass {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: white;
  box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(16, 185, 129, 0.4);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  min-height: 50vh;
  max-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem var(--container-padding);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(129, 140, 248, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(192, 132, 252, 0.2) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 80%, rgba(251, 113, 133, 0.15) 0%, transparent 40%),
    radial-gradient(ellipse at 10% 70%, rgba(34, 211, 238, 0.15) 0%, transparent 35%);
  animation: heroGradientPulse 8s ease-in-out infinite;
}

@keyframes heroGradientPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.85; transform: scale(1.02); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

.badge-pulse {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(1.5);
    opacity: 0.5;
  }
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.title-line {
  display: block;
  background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.95) 50%, rgba(200, 200, 255, 0.9) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: titleLineShift 5s ease infinite;
}

@keyframes titleLineShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

.title-highlight {
  display: block;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--secondary) 40%, var(--accent) 70%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 300% auto;
  animation: titleHighlightShift 4s ease infinite;
}

@keyframes titleHighlightShift {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 300% center; }
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border-color);
}

/* ============================================
   SECTIONS - ANIMATED HEADERS
   ============================================ */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-header.with-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary) 50%, var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: titleGradient 4s linear infinite;
  position: relative;
  display: inline-block;
}

@keyframes titleGradient {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

/* Animated underline */
.section-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
  border-radius: 2px;
  animation: underlineExpand 3s ease-in-out infinite;
}

@keyframes underlineExpand {
  0%, 100% { width: 60px; opacity: 1; }
  50% { width: 120px; opacity: 0.8; }
}

.section-header.with-link .section-title::after {
  left: 0;
  transform: none;
}

.section-subtitle {
  color: var(--text-muted);
}

.section-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-light);
  font-weight: 600;
  transition: transform 0.3s ease, opacity 0.3s ease, box-shadow 0.3s ease;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  background: transparent;
}

.section-link:hover {
  gap: 0.75rem;
  background: rgba(99, 102, 241, 0.1);
  color: var(--primary);
}

.section-link i {
  transition: transform 0.3s ease;
}

.section-link:hover i {
  transform: translateX(4px);
}

/* Categories Section */
.categories-section {
  padding: var(--section-spacing, var(--section-padding)) 0;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

@media (min-width: 769px) {
  .categories-section .categories-grid {
    max-width: 960px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
  }
}

.category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  position: relative;
  overflow: hidden;
}

/* Gradient overlay */
.category-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}

.category-card > * {
  position: relative;
  z-index: 1;
}

.category-card:hover {
  transform: translateY(-10px) scale(1.05);
  border-color: var(--primary);
  background: var(--bg-card-hover);
  box-shadow: 
    var(--shadow-lg),
    0 0 40px rgba(99, 102, 241, 0.15);
}

.category-card:hover::before {
  opacity: 0.08;
}

.category-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  font-size: 1.5rem;
  transition: transform 0.4s ease, opacity 0.4s ease;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.category-card:hover .category-icon {
  transform: scale(1.15) rotate(-8deg);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.category-name {
  font-weight: 600;
  transition: color 0.3s ease;
}

.category-card:hover .category-name {
  color: var(--primary-light);
}

.category-all {
  border-style: dashed;
  border-color: var(--primary);
}

/* Products Section */
.products-section {
  padding: var(--section-spacing, var(--section-padding)) 0;
  overflow: visible;
  position: relative;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--grid-gap, 1.5rem);
  width: 100%;
  max-width: 100%;
  overflow: visible;
  box-sizing: border-box;
}

/* ============================================
   PRODUCT CARD - ENHANCED 3D EFFECTS
   ============================================ */
.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  overflow: visible;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  max-width: 350px;
  width: 100%;
  margin: 0 auto;
  position: relative;
}

/* Product card overlays - DISABLED (was making cards unreadable)
.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
  pointer-events: none;
}

.product-card::after {
  content: '';
  position: absolute;
  top: -100%;
  left: -100%;
  width: 300%;
  height: 300%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 70%
  );
  transform: rotate(45deg);
  transition: transform 0.8s ease;
  pointer-events: none;
  z-index: 10;
}
*/

.product-card:hover {
  transform: translateY(-12px) rotateX(3deg) scale(1.02);
  border-color: var(--primary);
  box-shadow: 
    var(--shadow-lg),
    0 0 40px rgba(99, 102, 241, 0.15),
    0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Hover states for overlays - DISABLED
.product-card:hover::before {
  opacity: 0.05;
}

.product-card:hover::after {
  transform: rotate(45deg) translate(50%, 50%);
}
*/

.product-card {
  position: relative;
}

.btn-wishlist-card {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-wishlist-card:hover {
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  transform: scale(1.1);
}

.btn-wishlist-card.active,
.btn-wishlist-card:hover.active {
  background: rgba(239, 68, 68, 0.9);
  color: #fff;
}

.btn-wishlist-card i {
  font-size: 1rem;
}

.product-card-image {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-darker);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

/* Blur-up placeholder - loads instantly */
.product-card-image .img-placeholder {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(15px);
  transform: scale(1.1);
  z-index: 1;
  transition: opacity 0.3s ease-out;
}

/* Main product image - fades in over placeholder */
.product-card-image .product-img-main {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.3s ease-out, transform var(--transition-slow);
}

.product-card-image .product-img-main.loaded {
  opacity: 1;
}

.product-card:hover .product-card-image .product-img-main {
  transform: scale(1.05);
}

.product-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 3rem;
}

.product-condition {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  z-index: 2;
}

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

.condition-excellent {
  background: var(--info);
  color: white;
}

.condition-good {
  background: var(--warning);
  color: #000;
}

.condition-fair {
  background: var(--text-muted);
  color: white;
}

.product-savings {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  padding: 0.25rem 0.75rem;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: var(--radius-full);
}

.product-card-body {
  padding: var(--card-padding, 1.25rem);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card-title {
  display: block;
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  transition: color var(--transition-fast);
}

.product-card-title:hover {
  color: var(--primary-light);
}

/* Specs subtitle: Color, Storage, Condition */
.product-card-specs-line {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0 0 0.5rem;
  line-height: 1.4;
}

/* Delivery estimate */
.product-card-delivery {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.product-card-delivery i {
  color: var(--success);
  font-size: 0.75rem;
}

/* Financing rate */
.product-card-rate {
  font-size: 0.8rem;
  color: var(--primary-light);
  margin: 0 0 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 500;
}

.product-card-rate i {
  font-size: 0.75rem;
}

/* Savings vs new */
.product-card-savings {
  font-size: 0.8rem;
  color: var(--success);
  margin: 0 0 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 600;
}

.product-card-savings i {
  font-size: 0.75rem;
}

.product-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  background: var(--bg-darker);
  border-radius: var(--radius-sm);
}

.spec-item i {
  font-size: 0.75rem;
}

.product-card-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.product-card-price {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.25rem;
}

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

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

.product-card-actions {
  display: flex;
  align-items: stretch;
  gap: 0.5rem;
  width: 100%;
}

.product-card-actions .btn-add-cart,
.product-card-actions .btn-buy-now {
  flex: 1;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  white-space: nowrap;
  min-width: 0;
  padding: 0 0.75rem;
  max-width: 100%;
  box-sizing: border-box;
}

.btn-add-cart-text {
  display: none;
}

@media (min-width: 640px) {
  .btn-add-cart-text {
    display: inline;
  }
}

.btn-add-cart {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-add-cart:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  transform: translateY(-2px);
}

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

.btn-buy-now {
  background: var(--primary);
  color: white;
  border: none;
}

.btn-buy-now:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
  padding: var(--section-spacing, var(--section-padding)) var(--container-padding);
}

.cta-container {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding: 3rem;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: var(--radius-xl);
}

@media (max-width: 768px) {
  .cta-container {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .cta-visual {
    display: none;
  }
}

.cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 1rem;
}

.cta-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
}

.cta-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.cta-visual {
  display: flex;
  justify-content: center;
}

.phone-stack {
  position: relative;
  width: 200px;
  height: 200px;
}

.phone-card {
  position: absolute;
  width: 100px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  font-size: 2rem;
  box-shadow: var(--shadow-md);
}

.phone-1 {
  top: 0;
  left: 0;
  transform: rotate(-10deg);
  z-index: 1;
}

.phone-2 {
  top: 20px;
  left: 50px;
  transform: rotate(5deg);
  z-index: 2;
}

.phone-3 {
  top: 40px;
  left: 100px;
  transform: rotate(-5deg);
  z-index: 3;
}

/* ============================================
   TRUST SECTION - ANIMATED
   ============================================ */
.trust-section {
  padding: var(--section-spacing, var(--section-padding)) 0;
  border-top: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
}

.trust-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary), var(--secondary), var(--accent), transparent);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.trust-item {
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.trust-item:hover {
  transform: translateY(-12px) scale(1.05);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.trust-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-lg);
  font-size: 1.5rem;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.trust-item:hover .trust-icon {
  transform: scale(1.15) rotate(-5deg);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.4);
}

.trust-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.trust-text {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   FOOTER - GLASSMORPHIC WITH GRADIENT BORDER
   ============================================ */
.store-footer {
  background: var(--bg-darker);
  border-top: none;
  padding-top: 4rem;
  position: relative;
}

/* Static gradient border at top */
.store-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    var(--primary), 
    var(--secondary), 
    var(--accent), 
    var(--accent-cyan)
  );
}

.footer-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding);
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.footer-logo .logo-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  font-size: 1.25rem;
  color: white;
  flex-shrink: 0;
}

.footer-logo .logo-icon:has(img) {
  width: auto;
  min-width: 44px;
  max-width: 180px;
  height: 44px;
  padding: 6px 10px;
  background: transparent;
}

.footer-logo .logo-icon img {
  max-width: 160px;
  max-height: 32px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

.footer-store-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.footer-tagline {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* Date firma - mici, frumos aranjate sub numele magazinului */
.footer-company-info {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-company-name {
  font-weight: 600;
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin: 0 0 0.5rem 0;
}

.footer-company-details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-company-details span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.footer-company-details i {
  font-size: 0.7rem;
  opacity: 0.8;
  min-width: 14px;
}

.footer-company-details a {
  color: inherit;
  text-decoration: none;
}

.footer-company-details a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* Legal pages - Date Firmă box (evidențiat, frumos aranjat) */
.legal-company-box {
  background: rgba(99, 102, 241, 0.12) !important;
  border: 1px solid rgba(99, 102, 241, 0.35) !important;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 1.5rem 0;
}

.company-box-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-light);
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.company-box-title i {
  font-size: 1.1rem;
}

.legal-company-box .info-row {
  display: flex;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border-color);
  gap: 0.75rem;
}

.legal-company-box .info-row:last-child {
  border-bottom: none;
}

.legal-company-box .info-label {
  flex: 0 0 120px;
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.legal-company-box .info-value {
  color: var(--text-primary);
  font-weight: 500;
}

.legal-company-box .info-value a {
  color: var(--primary-light);
  text-decoration: none;
}

.legal-company-box .info-value a:hover {
  text-decoration: underline;
}

@media (max-width: 640px) {
  .legal-company-box .info-row {
    flex-direction: column;
    gap: 0.25rem;
  }
  .legal-company-box .info-label {
    flex: none;
  }
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  transition: transform 0.4s ease;
  position: relative;
  overflow: hidden;
}

.social-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-link i {
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}

.social-link:hover {
  color: white;
  border-color: var(--primary);
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.social-link:hover::before {
  opacity: 1;
}

.social-link:hover i {
  transform: scale(1.2);
}

.footer-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 640px) {
  .footer-links {
    grid-template-columns: repeat(2, 1fr);
  }
}

.footer-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  color: var(--text-muted);
}

.footer-list {
  list-style: none;
}

.footer-list li {
  margin-bottom: 0.5rem;
}

.footer-list a {
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-list a:hover {
  color: var(--primary-light);
}

.footer-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--border-color);
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.feature-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border-radius: var(--radius-md);
  color: var(--primary-light);
}

.feature-text strong {
  display: block;
  font-size: 0.875rem;
}

.feature-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 640px) {
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}

.powered-by a {
  color: var(--primary-light);
}

/* Cookie Settings Button in Footer */
.cookie-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

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

.cookie-settings-btn i {
  font-size: 0.875rem;
}

/* ============================================
   CART SIDEBAR
   ============================================ */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9005;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  pointer-events: none;
}

.cart-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 400px;
  background: var(--bg-darker);
  border-left: 1px solid var(--border-color);
  z-index: 9006;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--transition-base);
  box-sizing: border-box;
  overflow-x: hidden;
  pointer-events: none;
}

.cart-sidebar.active {
  transform: translateX(0);
  pointer-events: auto;
}

.cart-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.cart-sidebar-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.cart-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-md);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.cart-close:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.cart-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}

.cart-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.cart-item-image {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.cart-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cart-item-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-dark);
  color: var(--text-muted);
}

.cart-item-details {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-specs {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.cart-item-battery {
  display: block;
  font-size: 0.7rem;
  color: var(--success);
  margin-bottom: 0.2rem;
}

.cart-item-battery-icon,
.item-battery-icon {
  color: var(--success);
  font-size: 1.5rem;
}

.cart-item-price {
  font-weight: 700;
  color: var(--primary-light);
}

.cart-item-remove {
  color: var(--text-muted);
  transition: color var(--transition-fast);
}

.cart-item-remove:hover {
  color: var(--danger);
}

.cart-item-ghost {
  opacity: 0.75;
  background: var(--bg-darker);
}
.cart-item-ghost .cart-item-image img,
.cart-item-ghost .cart-item-placeholder {
  filter: grayscale(0.6);
}
.cart-item-ghost .cart-item-name,
.cart-item-ghost .cart-item-price {
  color: var(--text-muted);
}
.ghost-badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.15rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  background: var(--danger, #dc2626);
  border-radius: var(--radius-sm, 4px);
  white-space: nowrap;
}

.cart-empty {
  text-align: center;
  padding: 3rem 1rem;
}

.cart-empty-icon {
  font-size: 3rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.cart-empty-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.cart-sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.cart-subtotal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-size: 1.125rem;
}

.cart-sidebar-footer .btn {
  margin-bottom: 0.5rem;
}

.cart-sidebar-footer .btn:last-child {
  margin-bottom: 0;
}

/* ============================================
   PRODUCTS PAGE
   ============================================ */
.products-page {
  padding: 2rem 0 var(--section-spacing, var(--section-padding));
}

/* Sticky sidebar pe desktop: overflow visible pe toți strămoșii */
body.page-products .main-content,
body.page-products .container,
body.page-products .products-page,
body.page-products section {
  overflow: visible !important;
  overflow-x: visible !important;
}

body.page-products {
  overflow-x: visible !important;
}

html:has(body.page-products) {
  overflow-x: visible !important;
}

.page-header {
  margin-bottom: 2rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.page-subtitle {
  color: var(--text-muted);
}

.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1023px) {
  .products-layout {
    grid-template-columns: 1fr;
  }
}

/* Wrapper sticky – copil direct al grid-ului, pe desktop rămâne sub navbar */
.filters-sidebar-sticky-wrap {
  position: sticky;
  top: 88px;
  align-self: start;
  height: fit-content;
}

.filters-sidebar {
  height: fit-content;
}

@media (max-width: 1023px) {
  .filters-sidebar-sticky-wrap {
    position: static;
    height: 0;
    min-height: 0;
    overflow: visible;
  }

  .filters-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    left: auto;
    bottom: 0;
    width: 100%;
    max-width: 320px;
    background: var(--bg-darker);
    z-index: 1100;
    transform: translateX(100%);
    transition: transform var(--transition-base);
    padding: 0;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.4);
    border-left: 1px solid var(--border-color);
  }

  .filters-sidebar.active {
    transform: translateX(0);
  }
}

.filters-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

@media (max-width: 1023px) {
  .filters-header {
    display: flex;
  }
}

.filters-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.filters-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: var(--radius-md);
}

.filters-form {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

@media (max-width: 1023px) {
  .filters-form {
    border: none;
    border-radius: 0;
  }
}

.filter-group {
  margin-bottom: 1.5rem;
}

.filter-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.filter-input:focus,
.filter-select:focus {
  border-color: var(--primary);
}

.filter-input::placeholder {
  color: var(--text-muted);
}

.filter-select {
  cursor: pointer;
}

.filter-price-range {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-input-sm {
  flex: 1;
}

.filter-separator {
  color: var(--text-muted);
}

.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* Products Main */
.products-main {
  min-width: 0;
}

.products-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.filters-toggle {
  display: none;
}

@media (max-width: 1023px) {
  .filters-toggle {
    display: flex;
  }
}

/* Mobile: săgeată fixă dreapta + overlay (ca navigarea din paginile legale) */
.filters-fab {
  display: none;
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 36px;
  height: 72px;
  background: var(--primary);
  border: none;
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  color: white;
  font-size: 1.1rem;
  cursor: pointer;
  z-index: 1101;
  align-items: center;
  justify-content: center;
  box-shadow: -2px 0 15px rgba(0, 0, 0, 0.3);
  transition: right 0.3s ease, background 0.2s ease;
}

.filters-fab:hover {
  background: var(--primary-dark, var(--secondary));
}

.filters-fab i {
  transition: transform 0.3s ease;
}

.filters-fab.active {
  right: min(320px, 85vw);
}

.filters-fab.active i {
  transform: rotate(180deg);
}

.filters-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1099;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.filters-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 1023px) {
  .filters-fab {
    display: flex;
  }
}

.sort-select {
  padding: 0.5rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  cursor: pointer;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--primary-light);
}

.filter-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  color: var(--primary-light);
  transition: color var(--transition-fast);
}

.filter-chip-remove:hover {
  color: var(--danger);
}

.filter-clear {
  color: var(--text-muted);
  font-size: 0.875rem;
  align-self: center;
}

.filter-clear:hover {
  color: var(--danger);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination-btn,
.pagination-page {
  min-width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.pagination-btn:hover,
.pagination-page:hover {
  color: var(--text-primary);
  border-color: var(--primary);
}

.pagination-btn.active,
.pagination-page.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination-pages {
  display: flex;
  gap: 0.25rem;
}

.pagination-ellipsis {
  padding: 0 0.5rem;
  color: var(--text-muted);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}

.empty-icon {
  font-size: 4rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.empty-text {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* ============================================
   TOAST NOTIFICATIONS - ANIMATED
   ============================================ */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-darker);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: toastSlideIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
  overflow: hidden;
}

/* Progress bar animation */
.toast::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  width: 100%;
  animation: toastProgress 3s linear forwards;
}

.toast-success::after {
  background: linear-gradient(90deg, var(--success), var(--accent-cyan));
}

.toast-error::after {
  background: linear-gradient(90deg, var(--danger), var(--accent));
}

@keyframes toastSlideIn {
  from {
    transform: translateX(120%) scale(0.8);
    opacity: 0;
  }
  to {
    transform: translateX(0) scale(1);
    opacity: 1;
  }
}

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

.toast-success {
  border-color: var(--success);
  box-shadow: 
    var(--shadow-lg),
    0 0 20px rgba(52, 211, 153, 0.2);
}

.toast-error {
  border-color: var(--danger);
  box-shadow: 
    var(--shadow-lg),
    0 0 20px rgba(248, 113, 113, 0.2);
}

.toast-icon {
  font-size: 1.25rem;
  animation: toastIconBounce 0.5s ease 0.2s;
}

@keyframes toastIconBounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.1); }
}

.toast-success .toast-icon {
  color: var(--success);
}

.toast-error .toast-icon {
  color: var(--danger);
}

.toast-message {
  font-weight: 500;
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center {
  text-align: center;
}

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

.text-danger {
  color: var(--danger);
}

.mt-1 {
  margin-top: 0.5rem;
}

.mt-2 {
  margin-top: 1rem;
}

.mb-1 {
  margin-bottom: 0.5rem;
}

.mb-2 {
  margin-bottom: 1rem;
}

/* ============================================
   RESPONSIVE - MOBILE OVERFLOW PREVENTION
   ============================================ */
@media (max-width: 640px) {
  :root {
    --container-padding: 1rem;
    --section-padding: 3rem;
  }

  /* Prevent horizontal overflow */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    position: relative;
  }

  /* Ensure all elements respect container width */
  * {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Exception for specific elements that need to scroll */
  pre, code, .scrollable {
    max-width: 100%;
    overflow-x: auto;
  }

  .container,
  .main-content,
  .header-container,
  .store-header {
    max-width: 100vw;
    overflow-x: hidden;
  }

  /* Header adjustments */
  .header-container {
    gap: 0.5rem;
    padding: 0 1rem;
  }

  .header-logo .logo-text {
    display: none;
  }

  .header-nav {
    display: none;
  }

  .header-actions {
    gap: 0.25rem;
  }

  /* Hero adjustments */
  .hero-title {
    font-size: 2rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .stat-divider {
    display: none;
  }

  /* Products grid */
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 100%;
  }

  .product-card {
    max-width: 100%;
    overflow: hidden;
  }

  .product-card-body {
    padding: 0.75rem;
  }

  .product-card-title {
    font-size: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .product-card-specs {
    display: none;
  }

  /* Product card actions */
  .product-card-actions {
    flex-wrap: wrap;
  }

  .product-card-actions .btn-add-cart,
  .product-card-actions .btn-buy-now {
    min-width: 0;
    font-size: 0.75rem;
    padding: 0 0.5rem;
  }

  /* Sections */
  .section-header {
    padding: 0 1rem;
  }

  .section-title {
    font-size: 1.5rem;
    word-wrap: break-word;
  }

  /* Categories */
  .categories-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  /* Footer */
  .footer-top {
    padding: 0 1rem;
  }

  .footer-links {
    grid-template-columns: 1fr;
  }

  /* Tables */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  /* Forms */
  input, select, textarea {
    max-width: 100%;
    box-sizing: border-box;
  }

  /* Buttons */
  .btn {
    white-space: normal;
    word-wrap: break-word;
  }

  /* Cart sidebar */
  .cart-sidebar {
    max-width: 100vw;
  }

  /* Search bar */
  .search-container {
    padding: 0 1rem;
  }

  /* CTA section */
  .cta-container {
    padding: 2rem 1rem;
  }

  /* Trust section */
  .trust-grid {
    grid-template-columns: 1fr;
  }

  /* Products page */
  .products-layout {
    padding: 0 1rem;
  }

  .products-toolbar {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
  }

  .pagination-btn,
  .pagination-page {
    min-width: 36px;
    height: 36px;
    font-size: 0.875rem;
  }
}

/* ============================================
   AUTH PAGES (Login/Register)
   ============================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background:
    radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(139, 92, 246, 0.08) 0%, transparent 35%),
    var(--bg-dark);
}

.auth-container {
  width: 100%;
  max-width: 440px;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.auth-logo .logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.auth-logo .logo-icon:has(img) {
  width: auto;
  min-width: 36px;
  max-width: 160px;
  height: 44px;
  padding: 6px 10px;
  background: transparent;
}

.auth-logo .logo-icon img {
  max-width: 148px;
  max-height: 32px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.auth-subtitle {
  color: var(--text-muted);
}

.auth-form .form-group {
  margin-bottom: 1.25rem;
}

.auth-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.input-icon {
  position: relative;
}

.input-icon i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.input-icon input {
  width: 100%;
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.input-icon input:focus {
  border-color: var(--primary);
}

.input-icon input::placeholder {
  color: var(--text-muted);
}

.auth-form input:not([type="checkbox"]),
.auth-form select,
.auth-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.auth-form input:focus,
.auth-form select:focus,
.auth-form textarea:focus {
  border-color: var(--primary);
}

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

.auth-form .btn {
  margin-top: 0.5rem;
}

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

@media (max-width: 480px) {
  .form-row {
    grid-template-columns: 1fr;
  }
}

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.auth-footer p {
  margin-bottom: 0.75rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--primary-light);
}

.back-link {
  font-size: 0.875rem;
  color: var(--text-muted) !important;
}

/* ============================================
   BUYBACK PAGE (Sell Your Phone)
   ============================================ */
.buyback-page {
  padding: 2rem 0 5rem;
}

.buyback-header {
  text-align: center;
  margin-bottom: 3rem;
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1.125rem;
}

.success-message {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
}

.success-icon {
  font-size: 5rem;
  color: var(--success);
  margin-bottom: 1.5rem;
}

.success-message h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.success-message p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.buyback-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 1023px) {
  .buyback-layout {
    grid-template-columns: 1fr;
  }

  .buyback-info {
    order: -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}

@media (max-width: 640px) {
  .buyback-info {
    grid-template-columns: 1fr;
  }
}

.buyback-form .form-section {
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.buyback-form .form-section h3 {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  font-size: 1.125rem;
}

.buyback-form .form-section h3 i {
  color: var(--primary-light);
}

.buyback-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 640px) {
  .buyback-form .form-grid {
    grid-template-columns: 1fr;
  }
}

.buyback-form .form-group {
  margin-bottom: 1rem;
}

.buyback-form .form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.buyback-form input,
.buyback-form select,
.buyback-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
  transition: border-color var(--transition-fast);
}

.buyback-form input:focus,
.buyback-form select:focus,
.buyback-form textarea:focus {
  border-color: var(--primary);
}

.condition-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (max-width: 640px) {
  .condition-options {
    grid-template-columns: 1fr;
  }
}

.condition-option input {
  display: none;
}

.condition-option .option-card {
  display: block;
  padding: 1rem;
  background: var(--bg-glass);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.condition-option input:checked+.option-card {
  border-color: var(--primary);
  background: rgba(99, 102, 241, 0.1);
}

.condition-option .option-card strong {
  display: block;
  margin-bottom: 0.25rem;
}

.condition-option .option-card span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.checkbox-group {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
}

.buyback-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-card {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  text-align: center;
}

.info-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  font-size: 1.25rem;
}

.info-card h4 {
  margin-bottom: 0.25rem;
}

.info-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ============================================
   STATIC PAGES (About, Contact, Terms, Privacy)
   ============================================ */
.static-page {
  padding: 2rem 0 5rem;
}

.page-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 800px;
}

.content-card h2 {
  font-size: 1.25rem;
  margin: 1.5rem 0 0.75rem;
}

.content-card h2:first-child,
.content-card h2:first-of-type {
  margin-top: 0;
}

.content-card p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1rem;
}

.content-card ul {
  margin: 1rem 0;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.content-card li {
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.content-card strong {
  color: var(--text-primary);
}

.content-card.legal .updated {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Contact Page Grid */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

@media (max-width: 768px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-form .form-group {
  margin-bottom: 1.25rem;
}

.contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--primary);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ============================================
   ACCOUNT PAGES
   ============================================ */
.account-page {
  padding: 2rem 0 5rem;
}

.account-header {
  margin-bottom: 2rem;
}

.account-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.account-header p {
  color: var(--text-muted);
}

.account-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .account-grid {
    grid-template-columns: 1fr;
  }
}

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

.account-nav .nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-color);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.account-nav .nav-item:last-child {
  border-bottom: none;
}

.account-nav .nav-item:hover,
.account-nav .nav-item.active {
  color: var(--text-primary);
  background: var(--bg-glass);
}

.account-nav .nav-item.active {
  border-left: 3px solid var(--primary);
}

.account-nav .nav-item.logout {
  color: var(--danger);
}

.account-content h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.dashboard-cards {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.dash-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: var(--radius-md);
  font-size: 1.25rem;
}

.card-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
}

.card-label {
  color: var(--text-muted);
  font-size: 0.875rem;
}

.recent-orders h2 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.order-item:hover {
  border-color: var(--primary);
}

.order-info {
  flex: 1;
}

.order-number {
  font-weight: 600;
}

.order-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.order-status {
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-glass);
}

.order-total {
  font-weight: 600;
  color: var(--primary-light);
}

.order-card {
  display: block;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition-fast);
}

.order-card:hover {
  border-color: var(--primary);
}

.order-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.order-body {
  display: flex;
  gap: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.order-body strong {
  color: var(--primary-light);
}

.profile-form {
  max-width: 500px;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
}

.profile-form .form-group {
  margin-bottom: 1.25rem;
}

.profile-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

.profile-form input {
  width: 100%;
  padding: 0.875rem 1rem;
  background: var(--bg-glass);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
}

.profile-form input:focus {
  border-color: var(--primary);
  outline: none;
}

.profile-form input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.profile-form small {
  display: block;
  margin-top: 0.25rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

/* Alerts */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: var(--danger);
}

.alert ul {
  margin: 0.25rem 0 0 1rem;
}

/* ============================================
   GLASSMORPHISM OVERRIDES
   ============================================ */
body.glass-enabled {
  /* Recalculate card background with configured opacity */
  --bg-card: rgba(30, 41, 59, var(--glass-opacity, 0.5));
  --bg-card-hover: rgba(30, 41, 59, calc(var(--glass-opacity, 0.5) + 0.1));
  --bg-darker: rgba(15, 23, 42, 0.85);
  /* Slightly transparent for backdrop */
}

html.light-mode body.glass-enabled {
  --bg-card: rgba(255, 255, 255, var(--glass-opacity, 0.6));
  --bg-card-hover: rgba(255, 255, 255, calc(var(--glass-opacity, 0.6) + 0.1));
}

/* Glass effect simulated with opacity - no blur for performance */
body.glass-enabled .product-card,
body.glass-enabled .category-card,
body.glass-enabled .store-header,
body.glass-enabled .filters-sidebar,
body.glass-enabled .cart-sidebar,
body.glass-enabled .banner-controls button,
body.glass-enabled .dropdown-menu,
body.glass-enabled .mobile-nav {
  /* Blur removed for performance - using opacity instead */
}

/* Ensure header is always glassy if enabled, even if not scrolling */
body.glass-enabled .store-header {
  background: rgba(15, 23, 42, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

html.light-mode body.glass-enabled .store-header {
  background: rgba(248, 250, 252, 0.92);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* Glassy form elements - no blur */
body.glass-enabled .form-control,
body.glass-enabled .search-form {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.glass-enabled .product-card:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  border-color: rgba(99, 102, 241, 0.4);
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */

.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 9999;
  animation: whatsapp-float 3s ease-in-out infinite;
}

.whatsapp-button {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #25D366 0%, #20BA5A 50%, #128C7E 100%);
  background-size: 200% 200%;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 
    0 8px 24px rgba(37, 211, 102, 0.4),
    0 0 0 0 rgba(37, 211, 102, 0.5);
  transition: transform 0.3s ease, opacity 0.3s ease;
  text-decoration: none;
  color: white;
  font-size: 32px;
  position: relative;
  overflow: hidden;
  animation: whatsappGradient 3s ease infinite, whatsappPulseRing 2s ease-in-out infinite;
}

@keyframes whatsappGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@keyframes whatsappPulseRing {
  0%, 100% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 0 rgba(37, 211, 102, 0.5); }
  50% { box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4), 0 0 0 15px rgba(37, 211, 102, 0); }
}

.whatsapp-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.whatsapp-button:hover::before {
  width: 120px;
  height: 120px;
}

.whatsapp-button:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 32px rgba(37, 211, 102, 0.5);
}

.whatsapp-button:active {
  transform: scale(0.95);
}

.whatsapp-button i {
  position: relative;
  z-index: 1;
  animation: whatsapp-icon 2s ease-in-out infinite;
}

@keyframes whatsapp-float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-12px);
  }
}

@keyframes whatsapp-icon {
  0%, 100% {
    transform: scale(1) rotate(0deg);
  }
  25% {
    transform: scale(1.1) rotate(-5deg);
  }
  75% {
    transform: scale(1.1) rotate(5deg);
  }
}

/* Pulse animation on page load */
@keyframes whatsapp-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 20px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-button.pulse {
  animation: whatsapp-pulse 2s infinite;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 1.5rem;
    right: 1.5rem;
  }

  .whatsapp-button {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 1rem;
    right: 1rem;
  }

  .whatsapp-button {
    width: 52px;
    height: 52px;
    font-size: 26px;
  }
}

/* Ensure button doesn't interfere with cart sidebar or mobile menu */
@media (max-width: 1024px) {
  .whatsapp-float {
    bottom: calc(1rem + 60px); /* Space for mobile nav bar if exists */
  }
}

/* ============================================
   BRAND LOGOS - Transparent Background
   ============================================ */
/* Ensure brand logos have transparent background for light/dark mode compatibility */
img[src*="/images/Apple-Logosu.png"],
img[src*="/images/samsung-brand-logo"],
img[src*="/images/xiaomi-logo"],
img[src*="/images/huawei-logo"],
img[src*="/images/OPPO-LOGO"],
img[src*="/images/honor-logo"],
img[src*="/images/motorola-logo"],
img[src*="/images/google-pixel-logo"],
.selection-card-image,
.category-card img[alt*="logo"],
.product-card-title img,
.mega-menu-brand img,
.breadcrumb img[alt*="logo"] {
  background: transparent !important;
  background-color: transparent !important;
  mix-blend-mode: normal;
}

/* Ensure logos work well in both light and dark modes */
.light-mode img[src*="/images/"],
.light-mode .selection-card-image,
.light-mode .category-card img[alt*="logo"],
.light-mode .product-card-title img,
.light-mode .mega-menu-brand img {
  background: transparent !important;
  opacity: 1;
}

/* ============================================
   MEGA MENU FIX - HIGHEST PRIORITY
   ============================================ */
.store-header {
  overflow: visible !important;
}

.header-container {
  overflow: visible !important;
}

.header-nav {
  overflow: visible !important;
}

.nav-item {
  position: relative !important;
}

.nav-item.has-mega {
  position: relative !important;
}

/* Force mega dropdown visibility on hover */
.nav-item.has-mega:hover > .mega-dropdown,
.nav-item.has-mega:focus-within > .mega-dropdown,
#nav-brands:hover > .mega-dropdown,
#nav-brands:hover > #brands-dropdown,
.nav-item.has-mega.active > .mega-dropdown {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  display: block !important;
  z-index: 99999 !important;
}

.mega-dropdown,
#brands-dropdown {
  position: absolute !important;
  z-index: 99999 !important;
}

/* ============================================
   FINAL OVERRIDES - DESKTOP/MOBILE NAVIGATION
   ============================================ */
@media screen and (min-width: 1025px) {
  header.store-header .header-container nav.header-nav,
  #main-header .header-nav,
  .header-nav#header-nav {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  header.store-header .header-container .mobile-toggle,
  #main-header .mobile-toggle,
  .mobile-toggle#mobile-toggle {
    display: none !important;
  }
}

@media screen and (max-width: 1024px) {
  header.store-header .header-container nav.header-nav,
  #main-header .header-nav,
  .header-nav#header-nav {
    display: none !important;
  }
  
  header.store-header .header-container .mobile-toggle,
  #main-header .mobile-toggle,
  .mobile-toggle#mobile-toggle {
    display: flex !important;
  }
}

/* ============================================
   LEGAL PAGES - STICKY TOC SUPPORT
   ============================================ */

/* Override overflow on ALL ancestors for legal pages */
/* Using :has() to target parent based on child */
.main-content:has(.legal-page),
.main-content:has(.legal-toc),
body:has(.legal-page),
html:has(.legal-page) {
  overflow: visible !important;
  overflow-x: visible !important;
  overflow-y: visible !important;
}

.legal-page {
  overflow: visible !important;
}

.legal-page .container {
  overflow: visible !important;
}

.legal-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2rem;
  align-items: start;
  overflow: visible !important;
}

.legal-toc {
  position: sticky !important;
  top: 100px !important;
  align-self: start !important;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  z-index: 10;
}

/* Scrollbar for TOC */
.legal-toc::-webkit-scrollbar {
  width: 4px;
}

.legal-toc::-webkit-scrollbar-track {
  background: transparent;
}

.legal-toc::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

@media (max-width: 1024px) {
  .legal-layout {
    grid-template-columns: 1fr;
    position: relative;
  }
  
  /* Mobile TOC - Slide from left, below action bar (126px = 80 header + 46 action bar) */
  .legal-toc {
    position: fixed !important;
    top: 126px !important;
    left: 0 !important;
    bottom: 0 !important;
    width: 280px !important;
    max-width: 85vw !important;
    max-height: none !important;
    height: calc(100vh - 126px) !important;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 10002 !important;
    background: var(--bg-dark, #0f172a) !important;
    border-right: 1px solid var(--border-color);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.5);
    overflow-y: auto !important;
    padding: 1rem;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  .legal-toc.mobile-open {
    transform: translateX(0) !important;
  }
  
  /* Ensure TOC content is visible on mobile */
  .legal-toc .toc-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: var(--bg-card) !important;
    position: relative !important;
    z-index: 1 !important;
  }
  
  .legal-toc .toc-title,
  .legal-toc .toc-nav,
  .legal-toc .toc-link {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }
  
  /* Mobile TOC Toggle Button */
  .legal-toc-toggle {
    display: flex !important;
    position: fixed;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 36px;
    height: 72px;
    background: var(--primary);
    border: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    color: white;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 10003;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    transition: left 0.3s ease, background 0.2s ease;
  }
  
  .legal-toc-toggle:hover {
    background: var(--secondary);
  }
  
  .legal-toc-toggle i {
    transition: transform 0.3s ease;
  }
  
  .legal-toc-toggle.active {
    left: min(280px, 85vw);
  }
  
  .legal-toc-toggle.active i {
    transform: rotate(180deg);
  }
  
  /* Mobile TOC Overlay - above header and action bar so TOC integrates seamlessly */
  .legal-toc-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
  }
  
  .legal-toc-overlay.active {
    display: block;
    opacity: 1;
  }
  
  /* Adjust content when TOC is open */
  .legal-content {
    transition: opacity 0.3s ease;
  }
}

/* Hide toggle on desktop */
.legal-toc-toggle {
  display: none;
}

.legal-toc-overlay {
  display: none;
}

/* ============================================
   LEGAL PAGES - ANDROID MOBILE FIX
   Prevents zoom issues and content overflow
   ============================================ */

/* Mobile-specific overflow prevention for legal pages */
@media (max-width: 1024px) {
  .legal-page {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }
  
  .legal-page > .container {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  
  .legal-layout {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  
  .legal-content {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  
  .content-card {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }
  
  /* Make cookie flow responsive on mobile */
  .cookie-visual {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
  }
  
  .cookie-flow {
    min-width: 0 !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  
  .cookie-flow .flow-arrow {
    display: none;
  }
  
  .cookie-flow .flow-step {
    flex: 0 0 auto;
    min-width: 100px;
  }
  
  /* Make legal tables responsive */
  .cookie-table-wrapper,
  .legal-table-wrapper {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100% !important;
    margin-left: -0.5rem;
    margin-right: -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
  
  .cookie-table,
  .legal-table {
    min-width: 0 !important;
    font-size: 0.8rem;
  }
  
  .cookie-table th,
  .cookie-table td,
  .legal-table th,
  .legal-table td {
    padding: 0.625rem 0.5rem;
    white-space: nowrap;
  }
  
  /* Responsive info boxes */
  .info-box.company-info .info-row {
    flex-direction: column;
    gap: 0.25rem;
  }
  
  .info-box.company-info .info-label {
    flex: none;
    font-size: 0.8rem;
  }
  
  /* Responsive contact options */
  .contact-options {
    flex-direction: column;
  }
  
  .contact-option {
    width: 100%;
    justify-content: flex-start;
  }
  
  /* Prevent data category cards from overflowing */
  .data-category {
    flex-direction: column;
    text-align: left;
  }
  
  .data-category .data-icon {
    align-self: flex-start;
  }
  
  /* Responsive purpose grid */
  .purpose-grid {
    grid-template-columns: 1fr;
  }
  
  /* Responsive rights grid */
  .rights-grid {
    grid-template-columns: 1fr;
  }
  
  /* Responsive security measures */
  .security-measures {
    grid-template-columns: 1fr;
  }
  
  /* Responsive cookie types grid */
  .cookie-types-grid {
    grid-template-columns: 1fr;
  }
  
  /* Third party items */
  .third-party-item {
    flex-direction: column;
  }
  
  .third-party-item .tp-logo {
    align-self: flex-start;
  }
  
  /* Browser links wrap properly */
  .browser-links {
    flex-direction: column;
  }
  
  .browser-link {
    width: 100%;
    justify-content: flex-start;
  }
  
  /* Recipients list */
  .recipient {
    flex-direction: column;
  }
  
  .recipient .recipient-icon {
    align-self: flex-start;
  }
  
  /* Payment methods */
  .payment-method {
    flex-direction: column;
    text-align: left;
  }
  
  .payment-method .payment-icon {
    align-self: flex-start;
  }
  
  /* Regulatory info boxes */
  .regulatory-info-boxes {
    grid-template-columns: 1fr;
  }
}