/* ===================================
   WTech E-commerce - Modern Design
   Features: Dark/Light Mode, Animations, Mobile-First
   =================================== */

/* ===================================
   CSS Variables - Light & Dark Themes
   =================================== */
:root {
  /* Light Theme (Default) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-hover: #e2e8f0;
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.4);
  
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-glow: 0 0 30px var(--accent-glow);
  --shadow-inner: inset 0 2px 4px 0 rgb(0 0 0 / 0.05);
  
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --header-height: 72px;
  --max-width: 1400px;
  --content-padding: 24px;
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-tertiary: #1a1a25;
  --bg-card: #1e1e2e;
  --bg-hover: #252535;
  
  --text-primary: #f8fafc;
  --text-secondary: #a0a0b0;
  --text-muted: #606070;
  
  --accent-primary: #818cf8;
  --accent-secondary: #a78bfa;
  --accent-hover: #6366f1;
  --accent-glow: rgba(129, 140, 248, 0.5);
  
  --border-color: #2a2a3a;
  --border-light: #3a3a4a;
  
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.4);
}

/* ===================================
   Base & Reset Styles
   =================================== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Selection */
::selection {
  background: var(--accent-primary);
  color: white;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1rem, 2vw, 1.25rem); }

a {
  text-decoration: none;
  color: var(--accent-primary);
  transition: all var(--transition-fast);
  position: relative;
}

a:hover {
  color: var(--accent-hover);
}

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

ul {
  list-style: none;
}

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

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
  transition: all var(--transition-fast);
}

/* ===================================
   Animated Background Gradient
   =================================== */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: 
    radial-gradient(ellipse at 20% 20%, var(--accent-glow) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, var(--accent-glow) 0%, transparent 50%);
  opacity: 0.3;
  pointer-events: none;
  z-index: -1;
  animation: gradientShift 20s ease-in-out infinite;
}

@keyframes gradientShift {
  0%, 100% { 
    transform: translate(0, 0) scale(1);
    opacity: 0.3;
  }
  33% { 
    transform: translate(30px, -30px) scale(1.1);
    opacity: 0.4;
  }
  66% { 
    transform: translate(-20px, 20px) scale(0.9);
    opacity: 0.25;
  }
}

/* ===================================
   Container & Layout
   =================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  width: 100%;
}

/* ===================================
   Header Styles
   =================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(var(--bg-primary-rgb, 255, 255, 255), 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1000;
  transition: all var(--transition-normal);
}

[data-theme="dark"] .site-header {
  background: rgba(10, 10, 15, 0.8);
}

.header-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--content-padding);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo Animation */
.logo a {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo h1 {
  font-size: 1.75rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.2); }
}

.logo h1::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-full);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--transition-normal);
}

.logo:hover h1::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Navigation */
.main-navigation ul {
  display: flex;
  gap: 8px;
}

.main-navigation a {
  color: var(--text-secondary);
  font-weight: 500;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.main-navigation a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: all var(--transition-fast);
  transform: translateX(-50%);
}

.main-navigation a:hover {
  color: var(--accent-primary);
  background: var(--bg-secondary);
}

.main-navigation a:hover::before {
  width: 60%;
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Theme Toggle */
.theme-toggle {
  width: 48px;
  height: 26px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  position: relative;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid var(--border-color);
}

.theme-toggle::before {
  content: '☀️';
  position: absolute;
  top: 50%;
  left: 4px;
  transform: translateY(-50%);
  font-size: 14px;
  transition: all var(--transition-bounce);
}

[data-theme="dark"] .theme-toggle::before {
  content: '🌙';
  left: calc(100% - 20px);
}

.theme-toggle:hover {
  border-color: var(--accent-primary);
  box-shadow: 0 0 10px var(--accent-glow);
}

/* Cart Toggle */
.cart-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  border-radius: var(--radius-md);
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.cart-toggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-slow);
}

.cart-toggle:hover::before {
  left: 100%;
}

.cart-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.cart-count {
  background: white;
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: countPop 0.3s ease;
}

@keyframes countPop {
  0% { transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}

.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ===================================
   Breadcrumb Navigation
   =================================== */
.breadcrumb {
  padding: 100px 0 20px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.breadcrumb ul {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--text-muted);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

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

.breadcrumb .current {
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.875rem;
}

/* ===================================
   Shopping Cart Overlay
   =================================== */
.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.cart-panel {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  max-width: 420px;
  height: 100%;
  background: var(--bg-primary);
  border-left: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: right var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.cart-overlay.active .cart-panel {
  right: 0;
}

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

.cart-header h2 {
  font-size: 1.25rem;
}

.cart-close {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
  transition: all var(--transition-fast);
}

.cart-close:hover {
  background: var(--bg-secondary);
  color: var(--error);
}

.cart-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.empty-cart-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-cart-message p:first-child {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text-secondary);
}

/* Cart Items */
.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  animation: slideInRight 0.3s ease;
  transition: all var(--transition-fast);
}

.cart-item:hover {
  transform: translateX(-4px);
  box-shadow: var(--shadow-md);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

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

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

.cart-item-price {
  color: var(--accent-primary);
  font-weight: 700;
  margin-bottom: 12px;
}

.cart-item-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.quantity-control {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-primary);
  border-radius: var(--radius-md);
  padding: 4px;
  border: 1px solid var(--border-color);
}

.quantity-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.quantity-btn:hover {
  background: var(--accent-primary);
  color: white;
}

.quantity-input {
  width: 40px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-weight: 600;
  -moz-appearance: textfield;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.remove-item {
  color: var(--text-muted);
  font-size: 0.8125rem;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.remove-item:hover {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

/* Cart Footer */
.cart-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.total-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.total-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.checkout-button {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.checkout-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-slow);
}

.checkout-button:hover::before {
  left: 100%;
}

.checkout-button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.checkout-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ===================================
   Main Content & Hero
   =================================== */
.main-content {
  flex: 1;
  padding: 40px 0;
}

.hero-section {
  padding: 60px 0;
  text-align: center;
  position: relative;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h2 {
  margin-bottom: 16px;
  animation: fadeInUp 0.8s ease;
}

.hero-content p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  animation: fadeInUp 0.8s ease 0.2s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===================================
   Content Layout (Sidebar + Grid)
   =================================== */
.content-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  margin-top: 40px;
}

@media (max-width: 968px) {
  .content-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Sidebar Filter */
.sidebar-filter {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  height: fit-content;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.filter-section {
  margin-bottom: 28px;
}

.filter-section:last-child {
  margin-bottom: 0;
}

.filter-section h3 {
  font-size: 1rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.filter-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-list label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--text-secondary);
}

.filter-list label:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

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

/* Price Filter */
.price-filter {
  padding: 8px 0;
}

.price-filter label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-weight: 500;
}

#priceValue {
  color: var(--accent-primary);
  font-weight: 700;
}

input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  outline: none;
  -webkit-appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: all var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-glow);
}

/* ===================================
   Product Section
   =================================== */
.product-section {
  min-width: 0;
}

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

.section-header h2 {
  font-size: 1.5rem;
}

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

/* Product Grid */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  animation: fadeInUp 0.5s ease both;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.2s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.3s; }

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

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

.product-link {
  display: block;
  color: inherit;
}

.product-image {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg-secondary);
  position: relative;
}

.product-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.4));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.product-card:hover .product-image::after {
  opacity: 1;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.product-info {
  padding: 20px;
}

.product-name {
  font-size: 1.0625rem;
  font-weight: 600;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 12px;
}

.product-highlights {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.product-highlights li {
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.product-highlights li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
}

.product-actions {
  padding: 0 20px 20px;
}

.add-to-cart {
  width: 100%;
  padding: 12px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.add-to-cart:hover {
  background: var(--accent-primary);
  color: white;
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

/* Loading Spinner */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
  grid-column: 1 / -1;
}

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

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

/* Error Message */
.error-message {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  grid-column: 1 / -1;
}

.error-message h3 {
  color: var(--error);
  margin-bottom: 8px;
}

/* ===================================
   Product Detail Page
   =================================== */
.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  padding: 40px 0;
}

@media (max-width: 968px) {
  .product-detail {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* Product Images */
.product-images-section {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  height: fit-content;
}

.main-slider {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  margin-bottom: 16px;
  width: 100%;
  max-width: 600px;
}

.main-slider .swiper-wrapper {
  align-items: center;
}

.main-slider .swiper-slide {
  width: 100%;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-slider .swiper-slide img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.thumbnail-slider {
  border-radius: var(--radius-md);
  overflow: hidden;
  width: 100%;
  max-width: 600px;
}

.thumbnail-slider .swiper-slide {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 2px solid transparent;
  width: auto;
  height: auto;
}

.thumbnail-slider .swiper-slide img {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.thumbnail-slider .swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--accent-primary);
}

/* Product Detail Info */
.product-detail-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.product-detail-header h2 {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.product-detail-price {
  font-size: 2.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.product-description-section,
.product-specifications-section,
.product-features-section {
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.product-description-section h3,
.product-specifications-section h3,
.product-features-section h3 {
  font-size: 1.125rem;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}

.product-specifications-section ul,
.product-features-section ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-specifications-section li,
.product-features-section li {
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border-left: 3px solid var(--accent-primary);
  transition: all var(--transition-fast);
}

.product-specifications-section li:hover,
.product-features-section li:hover {
  transform: translateX(4px);
  background: var(--bg-tertiary);
}

.product-detail-actions {
  margin-top: auto;
}

.add-to-cart-large {
  width: 100%;
  padding: 18px 32px;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
  color: white;
  font-size: 1.125rem;
  font-weight: 700;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  transition: all var(--transition-fast);
}

.add-to-cart-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left var(--transition-slow);
}

.add-to-cart-large:hover::before {
  left: 100%;
}

.add-to-cart-large:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow);
}

/* ===================================
   About Page - Modern Design
   =================================== */
.about-hero {
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 600px;
  height: 600px;
  background: var(--accent-glow);
  border-radius: 50%;
  filter: blur(100px);
  transform: translate(-50%, -50%);
  opacity: 0.3;
  animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.3; }
  50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.5; }
}

.about-hero-content {
  position: relative;
  z-index: 1;
}

.about-hero h2 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 24px;
  animation: fadeInUp 0.8s ease;
}

.about-tagline {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* About Sections */
.about-story {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.about-story-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.about-story h3 {
  font-size: 2rem;
  margin-bottom: 32px;
  position: relative;
  display: inline-block;
}

.about-story h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  border-radius: var(--radius-full);
}

.about-story p {
  font-size: 1.125rem;
  margin-bottom: 24px;
  line-height: 1.8;
}

/* Stats Section */
.about-stats {
  padding: 80px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}

.stat-item {
  padding: 40px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-normal);
  animation: fadeInUp 0.5s ease both;
}

.stat-item:nth-child(1) { animation-delay: 0.1s; }
.stat-item:nth-child(2) { animation-delay: 0.2s; }
.stat-item:nth-child(3) { animation-delay: 0.3s; }
.stat-item:nth-child(4) { animation-delay: 0.4s; }

.stat-item:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  color: var(--text-secondary);
  font-weight: 500;
}

/* Values Section */
.about-values {
  padding: 80px 0;
  background: var(--bg-secondary);
}

.about-values h3 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 48px;
}

.values-list {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.values-list li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
  animation: slideInLeft 0.5s ease both;
}

.values-list li:nth-child(1) { animation-delay: 0.1s; }
.values-list li:nth-child(2) { animation-delay: 0.2s; }
.values-list li:nth-child(3) { animation-delay: 0.3s; }
.values-list li:nth-child(4) { animation-delay: 0.4s; }

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.values-list li:hover {
  transform: translateX(8px);
  border-color: var(--accent-primary);
}

.values-list li::before {
  content: '→';
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  color: white;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
  transition: all var(--transition-bounce);
}

.values-list li:hover::before {
  transform: rotate(360deg);
}

.values-list strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Contact Section */
.about-contact {
  padding: 80px 0;
  text-align: center;
}

.about-contact h3 {
  font-size: 2rem;
  margin-bottom: 32px;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  max-width: 800px;
  margin: 0 auto;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.contact-item:hover {
  transform: translateY(-4px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

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

/* ===================================
   Footer
   =================================== */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  margin-top: auto;
}

.footer-content {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ===================================
   Notification Toast
   =================================== */
.notification {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 16px 24px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 3000;
  animation: slideInRight 0.3s ease;
}

.notification.success {
  border-left: 4px solid var(--success);
}

.notification.error {
  border-left: 4px solid var(--error);
}

/* ===================================
   Responsive Design - Mobile First
   =================================== */
@media (max-width: 768px) {
  :root {
    --content-padding: 16px;
    --header-height: 64px;
  }
  
  /* Mobile Header */
  .mobile-menu-toggle {
    display: flex;
  }
  
  .main-navigation {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 16px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }
  
  .main-navigation.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 8px;
  }
  
  .cart-toggle .cart-icon-text {
    display: none;
  }
  
  .theme-toggle {
    width: 44px;
    height: 24px;
  }
  
  /* Mobile Breadcrumb */
  .breadcrumb {
    padding-top: 88px;
  }
  
  /* Mobile Hero */
  .hero-section {
    padding: 40px 0;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
  
  /* Mobile Sidebar */
  .sidebar-filter {
    position: static;
    order: -1;
  }
  
  /* Mobile Product Grid */
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .product-info {
    padding: 16px;
  }
  
  .product-name {
    font-size: 0.875rem;
  }
  
  .product-price {
    font-size: 1rem;
  }
  
  .product-highlights {
    display: none;
  }
  
  /* Mobile Product Detail */
  .product-detail {
    gap: 24px;
    padding: 20px 0;
  }
  
  .product-detail-header h2 {
    font-size: 1.5rem;
  }
  
  .product-detail-price {
    font-size: 1.75rem;
  }
  
  .product-description-section,
  .product-specifications-section,
  .product-features-section {
    padding: 16px;
  }
  
  /* Mobile About */
  .about-hero {
    padding: 100px 0 60px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .stat-item {
    padding: 24px 16px;
  }
  
  .stat-number {
    font-size: 2rem;
  }
  
  .values-list li {
    padding: 16px;
  }
  
  .contact-info {
    flex-direction: column;
    align-items: stretch;
  }
  
  .contact-item {
    justify-content: center;
  }
  
  /* Mobile Cart */
  .cart-panel {
    max-width: 100%;
  }
}

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

/* ===================================
   Print Styles
   =================================== */
@media print {
  .site-header,
  .cart-overlay,
  .sidebar-filter,
  .product-actions,
  .add-to-cart-large,
  .site-footer {
    display: none !important;
  }
  
  body {
    background: white;
    color: black;
  }
  
  .product-detail {
    grid-template-columns: 1fr;
  }
}
