/**
 * Glaxfy Modern Premium Theme
 * Glass-morphism + Gradient Design System
 */

/* ========== CSS Variables ========== */
:root {
  /* Primary Colors - Vibrant Purple/Blue Gradient */
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-light: #818cf8;
  --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  
  /* Accent Colors */
  --accent: #f59e0b;
  --accent-gradient: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --success: #10b981;
  --danger: #ef4444;
  
  /* Neutral Colors */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.8);
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
  
  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --glass-blur: blur(10px);
  
  /* Shadows - Standardized Depth Scale */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.3);
  --shadow-glow-sm: 0 0 20px rgba(99, 102, 241, 0.2);
  --shadow-inner: inset 0 2px 4px rgba(0, 0, 0, 0.06);
  
  /* Spacing */
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  
  /* Border Radius - Standardized Scale (8px, 12px, 16px, 24px) */
  --radius-xs: 4px;      /* Extra small - subtle rounding */
  --radius-sm: 8px;      /* Small - badges, tags, small buttons */
  --radius-md: 12px;     /* Medium - cards, inputs, buttons */
  --radius-lg: 16px;     /* Large - modals, panels, large cards */
  --radius-xl: 24px;     /* Extra large - hero sections, banners */
  --radius-2xl: 32px;    /* 2X large - special containers */
  --radius-full: 9999px; /* Full - pills, avatars, circular elements */
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Dark Mode */
[data-theme="dark"] {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-card: rgba(30, 41, 59, 0.8);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --border: rgba(148, 163, 184, 0.1);
  --glass-bg: rgba(30, 41, 59, 0.7);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* ========== Base Styles ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

/* Animated Background */
.gx-page {
  position: relative;
  overflow-x: hidden;
}

.gx-page::before {
  content: '';
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(168, 85, 247, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(245, 158, 11, 0.05) 0%, transparent 40%);
  z-index: -1;
  animation: bgFloat 20s ease-in-out infinite;
}

@keyframes bgFloat {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(2%, 2%) rotate(1deg); }
  66% { transform: translate(-1%, 1%) rotate(-1deg); }
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.gx-heading-xl { font-size: clamp(2rem, 5vw, 3.5rem); }
.gx-heading-lg { font-size: clamp(1.5rem, 4vw, 2.5rem); }
.gx-heading-md { font-size: clamp(1.25rem, 3vw, 1.75rem); }
.gx-heading-sm { font-size: 1.125rem; }

.gx-text-gradient {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Container ========== */
.gx-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ========== Header ========== */
.gx-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition-base);
}

.gx-header.scrolled {
  box-shadow: var(--shadow-lg);
}

.gx-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  gap: var(--space-lg);
}

.gx-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 800;
}

.gx-logo-icon {
  width: 40px;
  height: 40px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.gx-logo-text {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Search Bar */
.gx-search {
  flex: 1;
  max-width: 600px;
  position: relative;
}

.gx-search-input {
  width: 100%;
  padding: 12px 20px 12px 50px;
  border: 2px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  font-size: 0.95rem;
  color: var(--text-primary);
  transition: var(--transition-base);
}

.gx-search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.gx-search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 20px;
  height: 20px;
}

/* Header Actions */
.gx-header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.gx-header-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
}

.gx-header-btn:hover {
  background: var(--border);
  color: var(--primary);
}

.gx-header-btn svg {
  width: 22px;
  height: 22px;
}

.gx-cart-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 18px;
  height: 18px;
  background: var(--accent-gradient);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.gx-user-btn {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 16px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
}

.gx-user-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}


/* ========== Hero Section ========== */
.gx-hero {
  padding: 120px 0 60px;
  position: relative;
  overflow: hidden;
}

.gx-hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.gx-hero-text h1 {
  margin-bottom: var(--space-lg);
}

.gx-hero-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 500px;
}

.gx-hero-cta {
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
}

/* Buttons */
.gx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-base);
  text-decoration: none;
  border: none;
}

.gx-btn-icon {
  width: 20px;
  height: 20px;
}

/* ========== Standardized Button States ========== */
/* Base button state transitions */
.gx-btn {
  position: relative;
  overflow: hidden;
  transition: 
    transform 0.2s var(--ease-out-expo),
    box-shadow 0.2s var(--ease-out-expo),
    background-color 0.2s ease,
    border-color 0.2s ease,
    opacity 0.2s ease;
}

/* Focus state - visible focus ring for accessibility */
.gx-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Active/pressed state */
.gx-btn:active:not(:disabled) {
  transform: translateY(1px) scale(0.98);
}

/* Disabled state */
.gx-btn:disabled,
.gx-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
  transform: none !important;
  box-shadow: none !important;
}

/* Primary button states */
.gx-btn-primary {
  background: var(--primary-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.gx-btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg), var(--shadow-glow-sm);
}

.gx-btn-primary:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: var(--shadow-sm);
}

.gx-btn-primary:focus-visible {
  box-shadow: var(--focus-ring), var(--shadow-md);
}

/* Secondary button states */
.gx-btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 2px solid var(--border);
}

.gx-btn-secondary:hover:not(:disabled) {
  background: var(--bg-primary);
  border-color: var(--primary-light);
  color: var(--primary);
}

.gx-btn-secondary:active:not(:disabled) {
  background: var(--border);
}

.gx-btn-secondary:focus-visible {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

/* Outline button states */
.gx-btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.gx-btn-outline:hover:not(:disabled) {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.gx-btn-outline:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: none;
}

.gx-btn-outline:focus-visible {
  box-shadow: var(--focus-ring);
}

/* Ghost button states */
.gx-btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: none;
}

.gx-btn-ghost:hover:not(:disabled) {
  background: var(--border);
  color: var(--primary);
}

.gx-btn-ghost:active:not(:disabled) {
  background: rgba(99, 102, 241, 0.1);
}

.gx-btn-ghost:focus-visible {
  box-shadow: var(--focus-ring);
}

/* Danger button states */
.gx-btn-danger {
  background: var(--danger);
  color: white;
  border: none;
}

.gx-btn-danger:hover:not(:disabled) {
  background: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.gx-btn-danger:active:not(:disabled) {
  background: #b91c1c;
  transform: translateY(1px);
}

.gx-btn-danger:focus-visible {
  box-shadow: var(--focus-ring-error);
}

/* Success button states */
.gx-btn-success {
  background: var(--success);
  color: white;
  border: none;
}

.gx-btn-success:hover:not(:disabled) {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.gx-btn-success:active:not(:disabled) {
  background: #047857;
  transform: translateY(1px);
}

.gx-btn-success:focus-visible {
  box-shadow: var(--focus-ring-success);
}

/* Warning button states */
.gx-btn-warning {
  background: var(--toast-warning);
  color: white;
  border: none;
}

.gx-btn-warning:hover:not(:disabled) {
  background: #d97706;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.gx-btn-warning:active:not(:disabled) {
  background: #b45309;
  transform: translateY(1px);
}

/* Info button states */
.gx-btn-info {
  background: var(--toast-info);
  color: white;
  border: none;
}

.gx-btn-info:hover:not(:disabled) {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.gx-btn-info:active:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(1px);
}

/* Button sizes with consistent states */
.gx-btn-sm {
  padding: 8px 16px;
  font-size: 0.875rem;
  min-height: 36px;
}

.gx-btn-lg {
  padding: 16px 32px;
  font-size: 1.125rem;
  min-height: 52px;
}

.gx-btn-xl {
  padding: 20px 40px;
  font-size: 1.25rem;
  min-height: 60px;
}

/* Icon-only button */
.gx-btn-icon-only {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-md);
}

.gx-btn-icon-only.gx-btn-sm {
  width: 36px;
  height: 36px;
}

.gx-btn-icon-only.gx-btn-lg {
  width: 52px;
  height: 52px;
}

/* Button with loading state */
.gx-btn.loading {
  color: transparent !important;
  pointer-events: none;
}

.gx-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

.gx-btn-primary.loading::after,
.gx-btn-danger.loading::after,
.gx-btn-success.loading::after,
.gx-btn-warning.loading::after,
.gx-btn-info.loading::after {
  border-top-color: white;
}

/* Reduced motion support for buttons */
@media (prefers-reduced-motion: reduce) {
  .gx-btn {
    transition: opacity 0.2s ease, background-color 0.2s ease;
  }
  
  .gx-btn:hover,
  .gx-btn:active {
    transform: none !important;
  }
}

/* Hero Visual */
.gx-hero-visual {
  position: relative;
}

.gx-hero-image {
  width: 100%;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
}

.gx-floating-card {
  position: absolute;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  box-shadow: var(--shadow-lg);
  animation: float 3s ease-in-out infinite;
}

.gx-floating-card:nth-child(1) {
  top: 10%;
  left: -10%;
  animation-delay: 0s;
}

.gx-floating-card:nth-child(2) {
  bottom: 20%;
  right: -5%;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ========== Categories Section ========== */
.gx-section {
  padding: var(--space-2xl) 0;
}

.gx-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-xl);
}

.gx-section-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.gx-section-link {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition-base);
}

.gx-section-link:hover {
  gap: var(--space-sm);
}

/* Category Cards */
.gx-categories {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: var(--space-lg);
}

.gx-category-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space-xl) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  text-decoration: none;
  transition: var(--transition-base);
  cursor: pointer;
}

.gx-category-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}

.gx-category-icon {
  width: 60px;
  height: 60px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: var(--space-md);
  transition: var(--transition-base);
}

.gx-category-card:hover .gx-category-icon {
  transform: scale(1.1) rotate(5deg);
}

.gx-category-name {
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}

/* ========== Product Grid ========== */
.gx-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--space-lg);
}

/* Ensure minimum 3 products per row on larger screens */
@media (min-width: 900px) {
  .gx-products {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1200px) {
  .gx-products {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Product Card - Premium Glass Design */
.gx-product-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
              box-shadow 0.3s ease,
              border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.gx-product-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-2xl), 0 0 30px rgba(99, 102, 241, 0.15);
  border-color: var(--primary-light);
}

.gx-product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--primary-gradient);
  opacity: 0;
  transition: var(--transition-base);
  z-index: 0;
}

.gx-product-card:hover::before {
  opacity: 0.03;
}

/* Product Image */
.gx-product-image-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.gx-product-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: var(--space-md);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.gx-product-card:hover .gx-product-image {
  transform: scale(1.12);
}

/* Product Badges */
.gx-product-badges {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  z-index: 2;
}

.gx-badge {
  padding: 4px 10px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.gx-badge-sale {
  background: var(--accent-gradient);
  color: white;
}

.gx-badge-new {
  background: var(--success);
  color: white;
}

.gx-badge-out {
  background: var(--danger);
  color: white;
}

.gx-badge-soon {
  background: #f97316;
  color: white;
}

.gx-badge-low {
  background: #eab308;
  color: white;
}

/* Out of stock product card */
.gx-product-card.out-of-stock {
  opacity: 0.7;
}

.gx-product-card.out-of-stock .gx-product-image {
  filter: grayscale(30%);
}

/* Wishlist Button */
.gx-wishlist-btn {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 36px;
  height: 36px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.25s ease,
              background 0.2s ease,
              color 0.2s ease;
  z-index: 2;
  opacity: 0;
  transform: scale(0.8) translateY(-10px);
}

.gx-product-card:hover .gx-wishlist-btn {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.gx-wishlist-btn:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
  transform: scale(1.1);
}

.gx-wishlist-btn:active {
  transform: scale(0.95);
}

.gx-wishlist-btn.active {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.gx-wishlist-btn.active svg {
  fill: currentColor;
}

.gx-wishlist-btn svg {
  width: 18px;
  height: 18px;
}

/* Quick Add Button */
.gx-quick-add {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-md);
  background: linear-gradient(to top, rgba(0,0,0,0.85), rgba(0,0,0,0.4) 60%, transparent);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.3s ease;
  z-index: 2;
  opacity: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.gx-product-card:hover .gx-quick-add {
  transform: translateY(0);
  opacity: 1;
}

.gx-quick-add-btn {
  width: 100%;
  padding: 10px;
  background: white;
  color: var(--text-primary);
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  transition: var(--transition-base);
}

.gx-quick-add-btn:hover {
  background: var(--primary);
  color: white;
}

/* Buy Now Button - Secondary Variant */
.gx-btn-buy-now {
  background: var(--primary-gradient);
  color: white;
  margin-top: var(--space-sm);
}

.gx-btn-buy-now:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Quick Add Container - Stack buttons */
.gx-quick-add {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

/* Product Info */
.gx-product-info {
  padding: var(--space-lg);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.gx-product-brand {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-xs);
}

.gx-product-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

/* Rating */
.gx-product-rating {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.gx-stars {
  display: flex;
  gap: 2px;
}

.gx-star {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.gx-star.empty {
  color: var(--border);
}

.gx-rating-count {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Price */
.gx-product-price {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  margin-top: auto;
}

.gx-price-current {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.gx-price-original {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: line-through;
}

.gx-price-discount {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--success);
}


/* ========== Banner/Promo Section ========== */
.gx-promo-banner {
  position: relative;
  background: var(--primary-gradient);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  overflow: hidden;
  color: white;
}

.gx-promo-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: rgba(255,255,255,0.1);
  transform: rotate(15deg);
}

.gx-promo-content {
  position: relative;
  z-index: 1;
  max-width: 500px;
}

.gx-promo-tag {
  display: inline-block;
  padding: 6px 14px;
  background: rgba(255,255,255,0.2);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: var(--space-md);
}

.gx-promo-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
}

.gx-promo-text {
  opacity: 0.9;
  margin-bottom: var(--space-lg);
}

.gx-btn-white {
  background: white;
  color: var(--primary);
}

.gx-btn-white:hover {
  background: rgba(255,255,255,0.9);
  transform: translateY(-3px);
}

/* ========== Features Section ========== */
.gx-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.gx-feature-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  padding: var(--space-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: var(--transition-base);
}

.gx-feature-card:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-md);
}

.gx-feature-icon {
  width: 48px;
  height: 48px;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.gx-feature-title {
  font-weight: 600;
  margin-bottom: var(--space-xs);
}

.gx-feature-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* ========== Footer ========== */
.gx-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0 var(--space-lg);
  margin-top: var(--space-2xl);
}

.gx-footer-grid {
  display: grid;
  grid-template-columns: 2fr repeat(3, 1fr);
  gap: var(--space-2xl);
  margin-bottom: var(--space-2xl);
}

.gx-footer-brand {
  max-width: 300px;
}

.gx-footer-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: var(--space-md);
  text-decoration: none;
}

.gx-footer-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: var(--space-lg);
}

.gx-social-links {
  display: flex;
  gap: var(--space-sm);
}

.gx-social-link {
  width: 40px;
  height: 40px;
  background: var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: var(--transition-base);
}

.gx-social-link:hover {
  background: var(--primary);
  color: white;
}

/* Footer Column */
.gx-footer-column {
  /* Default for desktop */
}

.gx-footer-title {
  font-weight: 600;
  margin-bottom: var(--space-lg);
  color: var(--text-primary);
}

/* Footer Toggle Button (for mobile) */
.gx-footer-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-size: inherit;
  font-weight: 600;
  color: var(--text-primary);
  text-align: left;
}

.gx-footer-arrow {
  display: none;
  transition: transform 0.2s ease;
}

.gx-footer-toggle[aria-expanded="true"] .gx-footer-arrow {
  transform: rotate(180deg);
}

.gx-footer-links {
  list-style: none;
}

.gx-footer-links li {
  margin-bottom: var(--space-sm);
}

.gx-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  transition: var(--transition-base);
}

.gx-footer-links a:hover {
  color: var(--primary);
}

/* Mobile Footer Accordion */
@media (max-width: 768px) {
  .gx-footer-column {
    border-bottom: 1px solid var(--border);
    padding: var(--space-sm) 0;
  }
  
  .gx-footer-column:last-child {
    border-bottom: none;
  }
  
  .gx-footer-toggle {
    padding: var(--space-sm) 0;
  }
  
  .gx-footer-arrow {
    display: block;
  }
  
  .gx-footer-title {
    margin-bottom: 0;
  }
  
  .gx-footer-links {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
  }
  
  .gx-footer-toggle[aria-expanded="true"] + .gx-footer-links {
    max-height: 200px;
    padding: var(--space-sm) 0;
  }
}

/* Newsletter Section */
.gx-newsletter-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-xl);
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: var(--space-xl) 0;
}

.gx-newsletter-content {
  flex: 1;
}

.gx-newsletter-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
}

.gx-newsletter-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.gx-newsletter-form {
  flex: 1;
  max-width: 400px;
}

.gx-newsletter-input-wrap {
  display: flex;
  gap: var(--space-sm);
}

.gx-newsletter-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.gx-newsletter-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.gx-newsletter-input.invalid {
  border-color: var(--danger);
}

.gx-newsletter-btn {
  padding: 12px 24px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  white-space: nowrap;
}

.gx-newsletter-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.gx-newsletter-btn .gx-btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

.gx-newsletter-btn.loading .gx-btn-spinner {
  display: block;
}

.gx-newsletter-btn.loading .gx-btn-text {
  display: none;
}

.gx-newsletter-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: var(--space-xs);
  min-height: 20px;
}

.gx-newsletter-success {
  color: var(--success);
}

/* Payment Methods Section */
.gx-payment-methods-section {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-md) 0;
}

.gx-payment-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.gx-payment-icons {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.gx-payment-icon {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.gx-payment-icon:hover {
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.gx-payment-icon svg {
  display: block;
}

.gx-footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .gx-newsletter-section {
    flex-direction: column;
    text-align: center;
  }
  
  .gx-newsletter-form {
    max-width: 100%;
    width: 100%;
  }
  
  .gx-newsletter-input-wrap {
    flex-direction: column;
  }
  
  .gx-payment-methods-section {
    flex-direction: column;
    text-align: center;
  }
  
  .gx-payment-icons {
    justify-content: center;
  }
}

/* ========== Mobile Bottom Nav ========== */
.gx-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border-top: 1px solid var(--glass-border);
  padding: 6px 0;
  padding-bottom: calc(6px + env(safe-area-inset-bottom, 0px));
  z-index: 1000;
}

.gx-bottom-nav-items {
  display: flex;
  justify-content: space-around;
}

.gx-bottom-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.6rem;
  font-weight: var(--font-medium, 500);
  transition: var(--transition-base);
}

/* Active state indicator - top bar */
.gx-bottom-nav-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 20px;
  height: 2px;
  background: var(--primary-gradient, var(--primary));
  border-radius: 0 0 2px 2px;
  transition: transform var(--duration-200, 200ms) var(--ease-out, ease-out);
}

.gx-bottom-nav-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

/* Active and hover states */
.gx-bottom-nav-item.active,
.gx-bottom-nav-item:hover {
  color: var(--primary);
}

/* Active state - icon highlight */
.gx-bottom-nav-item.active .gx-bottom-nav-icon svg {
  transform: scale(1.1);
}

/* Touch feedback */
.gx-bottom-nav-item:active {
  transform: scale(0.95);
}

.gx-bottom-nav-icon {
  position: relative;
  transition: transform var(--duration-150, 150ms) var(--ease-out, ease-out);
}

.gx-bottom-nav-icon svg {
  width: 20px;
  height: 20px;
  transition: transform var(--duration-200, 200ms) var(--ease-out-back, cubic-bezier(0.34, 1.56, 0.64, 1));
}

/* Badge on bottom nav */
.gx-bottom-nav-badge {
  position: absolute;
  top: -3px;
  right: -6px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  background: var(--accent-gradient, var(--accent));
  color: white;
  font-size: 0.55rem;
  font-weight: var(--font-bold, 700);
  border-radius: var(--radius-full, 9999px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gx-bottom-nav-badge:empty,
.gx-bottom-nav-badge.hidden {
  display: none;
}

/* Bottom nav label */
.gx-bottom-nav-label {
  font-size: 0.55rem;
  font-weight: var(--font-semibold, 600);
  letter-spacing: 0.01em;
  transition: color var(--duration-150, 150ms) var(--ease-out, ease-out);
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  .gx-hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .gx-hero-subtitle {
    margin: 0 auto var(--space-xl);
  }
  
  .gx-hero-cta {
    justify-content: center;
  }
  
  .gx-hero-visual {
    display: none;
  }
  
  .gx-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gx-header-inner {
    height: 56px;
  }
  
  .gx-search {
    display: none;
  }
  
  .gx-user-btn span {
    display: none;
  }
  
  .gx-user-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
  }
  
  .gx-header-btn {
    width: 40px;
    height: 40px;
  }
  
  .gx-header-btn svg {
    width: 20px;
    height: 20px;
  }
  
  .gx-hero {
    padding: 80px 0 30px;
  }
  
  .gx-hero-text h1 {
    font-size: 1.5rem;
  }
  
  .gx-hero-subtitle {
    font-size: 0.9rem;
  }
  
  .gx-section {
    padding: var(--space-lg) 0;
  }
  
  .gx-section-title {
    font-size: 1.125rem;
  }
  
  .gx-products {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
  
  .gx-product-info {
    padding: var(--space-sm);
  }
  
  .gx-product-brand {
    font-size: 0.65rem;
  }
  
  .gx-product-name {
    font-size: 0.8rem;
    margin-bottom: var(--space-xs);
  }
  
  .gx-price-current {
    font-size: 0.95rem;
  }
  
  .gx-price-original {
    font-size: 0.75rem;
  }
  
  .gx-product-rating {
    margin-bottom: var(--space-xs);
  }
  
  .gx-star {
    width: 11px;
    height: 11px;
  }
  
  .gx-rating-count {
    font-size: 0.7rem;
  }
  
  .gx-categories {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }
  
  .gx-category-card {
    padding: var(--space-md) var(--space-sm);
  }
  
  .gx-category-icon {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
  }
  
  .gx-category-name {
    font-size: 0.75rem;
  }
  
  .gx-btn {
    padding: 10px 20px;
    font-size: 0.875rem;
  }
  
  .gx-promo-banner {
    padding: var(--space-lg);
  }
  
  .gx-promo-title {
    font-size: 1.25rem;
  }
  
  .gx-promo-text {
    font-size: 0.85rem;
  }
  
  .gx-feature-card {
    padding: var(--space-md);
  }
  
  .gx-feature-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .gx-feature-title {
    font-size: 0.9rem;
  }
  
  .gx-feature-text {
    font-size: 0.8rem;
  }
  
  .gx-footer-grid {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 0;
  }
  
  .gx-footer-brand {
    max-width: none;
    text-align: center;
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
    margin-bottom: var(--space-sm);
  }
  
  .gx-footer-title {
    font-size: 0.9rem;
    margin-bottom: 0;
  }
  
  .gx-footer-links a {
    font-size: 0.85rem;
  }
  
  .gx-social-links {
    justify-content: center;
  }
  
  .gx-social-link {
    width: 36px;
    height: 36px;
  }
  
  .gx-footer-bottom {
    flex-direction: column;
    gap: var(--space-md);
    text-align: center;
  }
  
  .gx-bottom-nav {
    display: block;
  }
  
  .gx-footer {
    padding-bottom: 80px;
  }
}

@media (max-width: 480px) {
  .gx-container {
    padding: 0 var(--space-sm);
  }
  
  .gx-products {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
  
  /* Compact product cards for mobile */
  .gx-product-info {
    padding: 8px;
  }
  
  .gx-product-name {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    margin-bottom: 4px;
  }
  
  .gx-product-brand {
    font-size: 0.6rem;
    margin-bottom: 2px;
  }
  
  .gx-price-current {
    font-size: 0.85rem;
  }
  
  .gx-price-original {
    font-size: 0.7rem;
  }
  
  .gx-price-discount {
    font-size: 0.65rem;
  }
  
  .gx-product-rating {
    margin-bottom: 4px;
  }
  
  .gx-stars {
    gap: 1px;
  }
  
  .gx-star {
    width: 10px;
    height: 10px;
  }
  
  .gx-rating-count {
    font-size: 0.65rem;
  }
  
  .gx-categories {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  
  .gx-category-card {
    padding: 10px 6px;
  }
  
  .gx-category-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    margin-bottom: 6px;
  }
  
  .gx-category-name {
    font-size: 0.7rem;
  }
  
  .gx-section-header {
    margin-bottom: var(--space-md);
  }
  
  .gx-section-title {
    font-size: 1rem;
  }
  
  .gx-section-link {
    font-size: 0.8rem;
  }
  
  .gx-badge {
    padding: 2px 6px;
    font-size: 0.6rem;
  }
  
  .gx-wishlist-btn {
    width: 28px;
    height: 28px;
  }
  
  .gx-wishlist-btn svg {
    width: 14px;
    height: 14px;
  }
  
  .gx-quick-add {
    padding: 8px;
  }
  
  .gx-quick-add-btn {
    padding: 8px;
    font-size: 0.75rem;
  }
  
  .gx-hero-text h1 {
    font-size: 1.25rem;
  }
  
  .gx-hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: var(--space-md);
  }
  
  .gx-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }
  
  .gx-promo-banner {
    padding: var(--space-md);
    border-radius: var(--radius-md);
  }
  
  .gx-promo-tag {
    padding: 4px 10px;
    font-size: 0.7rem;
  }
  
  .gx-promo-title {
    font-size: 1.1rem;
    margin-bottom: var(--space-sm);
  }
  
  .gx-promo-text {
    font-size: 0.8rem;
    margin-bottom: var(--space-md);
  }
  
  .gx-features {
    gap: var(--space-sm);
  }
  
  .gx-feature-card {
    padding: var(--space-sm);
    gap: var(--space-sm);
  }
  
  .gx-feature-icon {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }
  
  .gx-feature-title {
    font-size: 0.85rem;
  }
  
  .gx-feature-text {
    font-size: 0.75rem;
  }
}

/* ========== Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gx-animate-in {
  animation: fadeInUp 0.5s ease forwards;
}

.gx-animate-delay-1 { animation-delay: 0.1s; }
.gx-animate-delay-2 { animation-delay: 0.2s; }
.gx-animate-delay-3 { animation-delay: 0.3s; }

/* ========== Dark Mode Toggle ========== */
.gx-theme-toggle {
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gx-theme-toggle:hover {
  background: var(--border);
  color: var(--primary);
}

.gx-theme-toggle svg {
  width: 22px;
  height: 22px;
}

.gx-theme-toggle .sun { display: none; }
.gx-theme-toggle .moon { display: block; }

[data-theme="dark"] .gx-theme-toggle .sun { display: block; }
[data-theme="dark"] .gx-theme-toggle .moon { display: none; }

/* ========== Loading Skeleton ========== */
.gx-skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}


/* ========== ADVANCED UI/UX ENHANCEMENTS ========== */

/* ========== Enhanced Animation Variables ========== */
:root {
  /* Advanced Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out-circ: cubic-bezier(0.85, 0, 0.15, 1);
  
  /* Toast Colors */
  --toast-success: #10b981;
  --toast-error: #ef4444;
  --toast-warning: #f59e0b;
  --toast-info: #3b82f6;
  
  /* Focus Ring */
  --focus-ring: 0 0 0 3px rgba(99, 102, 241, 0.3);
  --focus-ring-error: 0 0 0 3px rgba(239, 68, 68, 0.3);
  --focus-ring-success: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

/* ========== Accessibility - Skip Link ========== */
.gx-skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  z-index: 9999;
  transition: top 0.3s ease;
}

.gx-skip-link:focus {
  top: 10px;
  outline: none;
}

/* ========== Enhanced Focus States ========== */
*:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ========== Reduced Motion ========== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .gx-page::before {
    animation: none;
  }
}

/* ========== Toast Notification System ========== */
.gx-toast-container {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  pointer-events: none;
  max-width: 90vw;
}

@media (min-width: 768px) {
  .gx-toast-container {
    bottom: 24px;
    left: auto;
    right: 24px;
    transform: none;
    align-items: flex-end;
  }
}

.gx-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  pointer-events: auto;
  min-width: 280px;
  max-width: 400px;
  animation: toastSlideIn 0.4s var(--ease-out-back);
  position: relative;
  overflow: hidden;
}

.gx-toast.removing {
  animation: toastSlideOut 0.3s var(--ease-in-out-circ) forwards;
}

@keyframes toastSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastSlideOut {
  to {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

.gx-toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}

.gx-toast.success .gx-toast-icon { background: rgba(16, 185, 129, 0.15); color: var(--toast-success); }
.gx-toast.error .gx-toast-icon { background: rgba(239, 68, 68, 0.15); color: var(--toast-error); }
.gx-toast.warning .gx-toast-icon { background: rgba(245, 158, 11, 0.15); color: var(--toast-warning); }
.gx-toast.info .gx-toast-icon { background: rgba(59, 130, 246, 0.15); color: var(--toast-info); }

.gx-toast-content {
  flex: 1;
  min-width: 0;
}

.gx-toast-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.gx-toast-message {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

.gx-toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  margin: -4px -4px -4px 0;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.gx-toast-close:hover {
  background: var(--border);
  color: var(--text-primary);
}

.gx-toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--primary);
  animation: toastProgress 3s linear forwards;
}

.gx-toast.success .gx-toast-progress { background: var(--toast-success); }
.gx-toast.error .gx-toast-progress { background: var(--toast-error); }
.gx-toast.warning .gx-toast-progress { background: var(--toast-warning); }
.gx-toast.info .gx-toast-progress { background: var(--toast-info); }

@keyframes toastProgress {
  from { width: 100%; }
  to { width: 0%; }
}

.gx-toast-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.gx-toast-action {
  padding: 6px 12px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
  border: none;
}

.gx-toast-action.primary {
  background: var(--primary);
  color: white;
}

.gx-toast-action.secondary {
  background: var(--border);
  color: var(--text-primary);
}

/* ========== Cart Badge Animation (Enhanced) ========== */
@keyframes badgeBounce {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.1); }
}

/* Enhanced bounce-in animation for when items are added */
@keyframes badgeBounceIn {
  0% { 
    transform: scale(0.5);
    opacity: 0.5;
  }
  40% { 
    transform: scale(1.4);
    opacity: 1;
  }
  60% { 
    transform: scale(0.85);
  }
  80% { 
    transform: scale(1.15);
  }
  100% { 
    transform: scale(1);
  }
}

/* Bounce-out animation for when items are removed */
@keyframes badgeBounceOut {
  0% { 
    transform: scale(1);
  }
  30% { 
    transform: scale(1.2);
  }
  60% { 
    transform: scale(0.8);
  }
  100% { 
    transform: scale(1);
  }
}

/* Pop animation with glow effect */
@keyframes badgePop {
  0% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }
  50% { 
    transform: scale(1.3);
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0);
  }
  100% { 
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

.gx-cart-badge.animate {
  animation: badgeBounce 0.5s var(--ease-out-back);
}

.gx-cart-badge.gx-badge-bounce-in,
[data-badge="cart"].gx-badge-bounce-in,
.cart-badge.gx-badge-bounce-in,
#cart-count.gx-badge-bounce-in {
  animation: badgeBounceIn 0.6s var(--ease-out-back);
}

.gx-cart-badge.gx-badge-bounce-out,
[data-badge="cart"].gx-badge-bounce-out,
.cart-badge.gx-badge-bounce-out,
#cart-count.gx-badge-bounce-out {
  animation: badgeBounceOut 0.4s var(--ease-out-back);
}

/* Badge glow effect on update */
.gx-cart-badge.gx-badge-glow {
  animation: badgePop 0.5s var(--ease-out-back);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .gx-cart-badge.animate,
  .gx-cart-badge.gx-badge-bounce-in,
  .gx-cart-badge.gx-badge-bounce-out,
  .gx-cart-badge.gx-badge-glow,
  [data-badge="cart"].gx-badge-bounce-in,
  [data-badge="cart"].gx-badge-bounce-out {
    animation: none !important;
  }
}

/* ========== Wishlist Heart Animation (Enhanced) ========== */
@keyframes heartPop {
  0% { transform: scale(1); }
  25% { transform: scale(1.2); }
  50% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Enhanced heart pop with scale bounce */
@keyframes heartPopEnhanced {
  0% { 
    transform: scale(1);
  }
  15% { 
    transform: scale(0.8);
  }
  30% { 
    transform: scale(1.3);
  }
  45% { 
    transform: scale(0.9);
  }
  60% { 
    transform: scale(1.15);
  }
  75% { 
    transform: scale(0.95);
  }
  100% { 
    transform: scale(1);
  }
}

/* Heart shrink animation for removing from wishlist */
@keyframes heartShrink {
  0% { 
    transform: scale(1);
  }
  50% { 
    transform: scale(0.7);
  }
  100% { 
    transform: scale(1);
  }
}

/* Heart fill animation */
@keyframes heartFill {
  0% {
    fill: transparent;
    stroke: currentColor;
  }
  50% {
    fill: currentColor;
    stroke: currentColor;
    transform: scale(1.2);
  }
  100% {
    fill: currentColor;
    stroke: currentColor;
    transform: scale(1);
  }
}

.gx-wishlist-btn.active {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.gx-wishlist-btn.active svg {
  fill: white;
  animation: heartPop 0.4s var(--ease-out-back);
}

/* Enhanced pop animation class */
.gx-wishlist-btn.gx-heart-pop {
  animation: heartPopEnhanced 0.6s var(--ease-out-back);
}

.gx-wishlist-btn.gx-heart-pop svg {
  animation: heartFill 0.4s var(--ease-out-back) forwards;
}

/* Shrink animation for removing */
.gx-wishlist-btn.gx-heart-shrink {
  animation: heartShrink 0.2s ease-out;
}

/* Heart burst particles */
.gx-heart-particle {
  position: fixed;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--particle-color, #ef4444);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  animation: heartParticleBurst 0.6s var(--ease-out-expo) forwards;
}

@keyframes heartParticleBurst {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 1;
  }
  100% {
    transform: 
      translate(-50%, -50%) 
      translateX(calc(cos(var(--particle-angle)) * 30px))
      translateY(calc(sin(var(--particle-angle)) * 30px))
      scale(0);
    opacity: 0;
  }
}

/* Fallback for browsers without cos/sin support */
@supports not (transform: translateX(calc(cos(0) * 1px))) {
  .gx-heart-particle:nth-child(1) { animation: heartParticle1 0.6s var(--ease-out-expo) forwards; }
  .gx-heart-particle:nth-child(2) { animation: heartParticle2 0.6s var(--ease-out-expo) forwards; }
  .gx-heart-particle:nth-child(3) { animation: heartParticle3 0.6s var(--ease-out-expo) forwards; }
  .gx-heart-particle:nth-child(4) { animation: heartParticle4 0.6s var(--ease-out-expo) forwards; }
  .gx-heart-particle:nth-child(5) { animation: heartParticle5 0.6s var(--ease-out-expo) forwards; }
  .gx-heart-particle:nth-child(6) { animation: heartParticle6 0.6s var(--ease-out-expo) forwards; }
  
  @keyframes heartParticle1 {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + 30px), -50%) scale(0); opacity: 0; }
  }
  @keyframes heartParticle2 {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + 15px), calc(-50% - 26px)) scale(0); opacity: 0; }
  }
  @keyframes heartParticle3 {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% - 15px), calc(-50% - 26px)) scale(0); opacity: 0; }
  }
  @keyframes heartParticle4 {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% - 30px), -50%) scale(0); opacity: 0; }
  }
  @keyframes heartParticle5 {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% - 15px), calc(-50% + 26px)) scale(0); opacity: 0; }
  }
  @keyframes heartParticle6 {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
    100% { transform: translate(calc(-50% + 15px), calc(-50% + 26px)) scale(0); opacity: 0; }
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .gx-wishlist-btn.active svg,
  .gx-wishlist-btn.gx-heart-pop,
  .gx-wishlist-btn.gx-heart-pop svg,
  .gx-wishlist-btn.gx-heart-shrink,
  .gx-heart-particle {
    animation: none !important;
  }
}

/* ========== Button Loading State ========== */
.gx-btn.loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}

.gx-btn.loading::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

.gx-btn-primary.loading::after { border-top-color: white; }
.gx-btn-outline.loading::after { border-top-color: var(--primary); }

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

.gx-btn.success {
  background: var(--success) !important;
  border-color: var(--success) !important;
}

/* ========== Enhanced Skeleton Screens ========== */
.gx-skeleton-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  pointer-events: none;
}

.gx-skeleton-image {
  aspect-ratio: 1;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--bg-primary) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.gx-skeleton-content {
  padding: var(--space-lg);
}

.gx-skeleton-text {
  height: 14px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}

.gx-skeleton-text.short { width: 60%; }
.gx-skeleton-text.medium { width: 80%; }
.gx-skeleton-text.price { width: 40%; height: 20px; margin-top: 16px; }

/* Product Card Skeleton */
.gx-product-skeleton {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  pointer-events: none;
}

.gx-product-skeleton .skeleton-image {
  aspect-ratio: 1;
  background: linear-gradient(90deg, var(--bg-secondary) 25%, rgba(99, 102, 241, 0.05) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

.gx-product-skeleton .skeleton-content {
  padding: var(--space-lg);
}

.gx-product-skeleton .skeleton-brand {
  width: 50px;
  height: 10px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.1s;
  border-radius: var(--radius-xs);
  margin-bottom: var(--space-sm);
}

.gx-product-skeleton .skeleton-title {
  width: 100%;
  height: 16px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.2s;
  border-radius: var(--radius-xs);
  margin-bottom: var(--space-xs);
}

.gx-product-skeleton .skeleton-title-2 {
  width: 70%;
  height: 16px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.25s;
  border-radius: var(--radius-xs);
  margin-bottom: var(--space-md);
}

.gx-product-skeleton .skeleton-rating {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-md);
}

.gx-product-skeleton .skeleton-stars {
  width: 80px;
  height: 14px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.3s;
  border-radius: var(--radius-xs);
}

.gx-product-skeleton .skeleton-count {
  width: 40px;
  height: 14px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.35s;
  border-radius: var(--radius-xs);
}

.gx-product-skeleton .skeleton-price {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.gx-product-skeleton .skeleton-price-current {
  width: 70px;
  height: 22px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.4s;
  border-radius: var(--radius-xs);
}

.gx-product-skeleton .skeleton-price-original {
  width: 50px;
  height: 14px;
  background: linear-gradient(90deg, var(--border) 25%, var(--bg-secondary) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  animation-delay: 0.45s;
  border-radius: var(--radius-xs);
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Skeleton fade out when content loads */
.gx-product-skeleton.loaded {
  animation: skeletonFadeOut 0.3s ease forwards;
}

@keyframes skeletonFadeOut {
  from { opacity: 1; }
  to { opacity: 0; visibility: hidden; }
}

/* ========== Form Enhancements ========== */
.gx-form-group {
  position: relative;
  margin-bottom: var(--space-lg);
}

.gx-form-input {
  width: 100%;
  padding: 16px;
  padding-right: 44px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition-base);
}

.gx-form-input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.gx-form-input.valid {
  border-color: var(--success);
}

.gx-form-input.valid:focus {
  box-shadow: var(--focus-ring-success);
}

.gx-form-input.invalid {
  border-color: var(--danger);
}

.gx-form-input.invalid:focus {
  box-shadow: var(--focus-ring-error);
}

.gx-form-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: var(--transition-base);
  background: var(--bg-secondary);
  padding: 0 4px;
}

.gx-form-input:focus + .gx-form-label,
.gx-form-input:not(:placeholder-shown) + .gx-form-label {
  top: 0;
  font-size: 0.8rem;
  color: var(--primary);
}

.gx-form-input.valid + .gx-form-label { color: var(--success); }
.gx-form-input.invalid + .gx-form-label { color: var(--danger); }

.gx-form-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: var(--transition-base);
}

.gx-form-input.valid ~ .gx-form-icon.check { opacity: 1; color: var(--success); }
.gx-form-input.invalid ~ .gx-form-icon.error { opacity: 1; color: var(--danger); }

.gx-form-error {
  display: none;
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 6px;
  padding-left: 4px;
}

.gx-form-input.invalid ~ .gx-form-error {
  display: block;
  animation: fadeInUp 0.2s ease;
}

/* Password Toggle */
.gx-password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.gx-password-toggle:hover {
  color: var(--text-primary);
}

/* ========== Enhanced Product Card Hover ========== */
.gx-product-card {
  will-change: transform, box-shadow;
}

.gx-product-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* ========== Empty States ========== */
.gx-empty-state {
  text-align: center;
  padding: var(--space-2xl);
  max-width: 400px;
  margin: 0 auto;
}

.gx-empty-illustration {
  width: 200px;
  height: 200px;
  margin: 0 auto var(--space-xl);
  background: var(--bg-secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
}

.gx-empty-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--text-primary);
}

.gx-empty-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

/* ========== Live Region for Screen Readers ========== */
.gx-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gx-live-region {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== Image Lazy Loading ========== */
.gx-lazy-image {
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gx-lazy-image.loaded {
  opacity: 1;
}

.gx-image-placeholder {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--border) 100%);
  position: relative;
  overflow: hidden;
}

.gx-image-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 1.5s infinite;
}

/* ========== Success Checkmark Animation (Enhanced) ========== */
@keyframes checkmark {
  0% { stroke-dashoffset: 50; }
  100% { stroke-dashoffset: 0; }
}

.gx-checkmark {
  width: 60px;
  height: 60px;
}

.gx-checkmark-circle {
  stroke: var(--success);
  stroke-width: 2;
  fill: none;
  animation: checkmark 0.5s ease forwards;
}

.gx-checkmark-check {
  stroke: var(--success);
  stroke-width: 3;
  fill: none;
  stroke-dasharray: 50;
  stroke-dashoffset: 50;
  animation: checkmark 0.3s ease 0.3s forwards;
}

/* ========== Button Success State Animation ========== */
.gx-btn-success-state {
  background: var(--success) !important;
  border-color: var(--success) !important;
  color: white !important;
}

.gx-btn-success-state .gx-success-check {
  display: inline-flex;
  align-items: center;
  margin-right: var(--space-xs);
}

.gx-btn-success-state .gx-success-circle {
  stroke: white;
  stroke-dasharray: 63;
  stroke-dashoffset: 63;
  animation: successCircleDraw 0.4s ease forwards;
}

.gx-btn-success-state .gx-success-tick {
  stroke: white;
  stroke-dasharray: 20;
  stroke-dashoffset: 20;
  animation: successTickDraw 0.3s ease 0.3s forwards;
}

@keyframes successCircleDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes successTickDraw {
  to { stroke-dashoffset: 0; }
}

/* ========== Form Success Overlay ========== */
.gx-form-success-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  z-index: 10;
  border-radius: inherit;
}

[data-theme="dark"] .gx-form-success-overlay {
  background: rgba(15, 23, 42, 0.95);
}

.gx-form-success-overlay.gx-form-success-visible {
  opacity: 1;
  visibility: visible;
}

.gx-form-success-content {
  text-align: center;
  transform: scale(0.8);
  opacity: 0;
  transition: transform 0.4s var(--ease-out-back), opacity 0.3s ease;
}

.gx-form-success-visible .gx-form-success-content {
  transform: scale(1);
  opacity: 1;
}

.gx-success-checkmark {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
}

.gx-success-checkmark .gx-checkmark-circle {
  stroke: var(--success);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: formSuccessCircle 0.6s ease forwards;
}

.gx-success-checkmark .gx-checkmark-check {
  stroke: var(--success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: formSuccessCheck 0.4s ease 0.4s forwards;
}

@keyframes formSuccessCircle {
  to { stroke-dashoffset: 0; }
}

@keyframes formSuccessCheck {
  to { stroke-dashoffset: 0; }
}

.gx-form-success-message {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--success);
  margin: 0;
}

/* ========== Order Success Animation ========== */
.gx-order-success-animation {
  text-align: center;
  padding: var(--space-2xl);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s var(--ease-out-back);
}

.gx-order-success-animation.gx-order-success-visible {
  opacity: 1;
  transform: translateY(0);
}

.gx-order-success-icon {
  width: 100px;
  height: 100px;
  margin: 0 auto var(--space-xl);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.2) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: orderIconPulse 2s ease-in-out infinite;
}

@keyframes orderIconPulse {
  0%, 100% { 
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
  }
  50% { 
    box-shadow: 0 0 0 20px rgba(16, 185, 129, 0);
  }
}

.gx-order-checkmark {
  width: 56px;
  height: 56px;
}

.gx-order-checkmark-circle {
  stroke: var(--success);
  stroke-width: 2;
  fill: none;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: orderCircleDraw 0.8s ease 0.2s forwards;
}

.gx-order-checkmark-check {
  stroke: var(--success);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: orderCheckDraw 0.5s ease 0.8s forwards;
}

@keyframes orderCircleDraw {
  to { stroke-dashoffset: 0; }
}

@keyframes orderCheckDraw {
  to { stroke-dashoffset: 0; }
}

.gx-order-success-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
  opacity: 0;
  animation: orderTextFadeIn 0.5s ease 1s forwards;
}

.gx-order-success-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin: 0;
  opacity: 0;
  animation: orderTextFadeIn 0.5s ease 1.2s forwards;
}

@keyframes orderTextFadeIn {
  to { opacity: 1; }
}

/* ========== Inline Success Indicator ========== */
.gx-inline-success {
  position: relative;
}

.gx-inline-success-indicator {
  position: absolute;
  right: -24px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--success);
  opacity: 0;
  animation: inlineSuccessPop 0.4s var(--ease-out-back) forwards;
}

@keyframes inlineSuccessPop {
  0% {
    opacity: 0;
    transform: translateY(-50%) scale(0);
  }
  50% {
    transform: translateY(-50%) scale(1.2);
  }
  100% {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

/* Reduced motion support for success animations */
@media (prefers-reduced-motion: reduce) {
  .gx-btn-success-state .gx-success-circle,
  .gx-btn-success-state .gx-success-tick,
  .gx-success-checkmark .gx-checkmark-circle,
  .gx-success-checkmark .gx-checkmark-check,
  .gx-order-success-animation,
  .gx-order-success-icon,
  .gx-order-checkmark-circle,
  .gx-order-checkmark-check,
  .gx-order-success-title,
  .gx-order-success-subtitle,
  .gx-inline-success-indicator,
  .gx-form-success-content {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* ========== Pull to Refresh Indicator ========== */
.gx-pull-indicator {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: transform 0.3s ease;
  z-index: 100;
}

.gx-pull-indicator.visible {
  transform: translateX(-50%) translateY(10px);
}

.gx-pull-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

/* ========== Confetti Animation ========== */
@keyframes confettiFall {
  0% { transform: translateY(-100vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

.gx-confetti {
  position: fixed;
  width: 10px;
  height: 10px;
  top: 0;
  pointer-events: none;
  z-index: 9999;
  animation: confettiFall 3s ease-out forwards;
}

/* ========== Fly to Cart Animation (Enhanced) ========== */
.gx-fly-item {
  position: fixed;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  box-shadow: var(--shadow-xl), 0 0 20px rgba(99, 102, 241, 0.3);
  z-index: 9999;
  pointer-events: none;
  will-change: transform, opacity;
}

.gx-fly-item img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-md);
}

/* Enhanced fly animation with arc path */
.gx-fly-item--animating {
  animation: flyToCartArc 0.6s var(--ease-out-expo) forwards;
}

@keyframes flyToCartArc {
  0% {
    transform: scale(1) translateX(0) translateY(0);
    opacity: 1;
  }
  30% {
    transform: scale(1.1) translateX(calc(var(--fly-end-x) * 0.3)) translateY(calc(var(--fly-end-y) * 0.1 - 40px));
    opacity: 1;
  }
  100% {
    transform: scale(0.2) translateX(var(--fly-end-x)) translateY(var(--fly-end-y));
    opacity: 0;
  }
}

/* Pulse ripple effect at source */
.gx-add-ripple {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary);
  transform: translate(-50%, -50%) scale(0);
  opacity: 0.6;
  pointer-events: none;
  z-index: 9998;
  animation: addRippleExpand 0.6s var(--ease-out-expo) forwards;
}

@keyframes addRippleExpand {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0.6;
  }
  100% {
    transform: translate(-50%, -50%) scale(4);
    opacity: 0;
  }
}

/* Cart icon pulse after item added */
.gx-cart-pulse {
  animation: cartIconPulse 0.4s var(--ease-out-back);
}

@keyframes cartIconPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

/* Button success flash */
.gx-btn-success-flash {
  background: var(--success) !important;
  border-color: var(--success) !important;
  color: white !important;
  animation: successFlash 0.3s ease;
}

@keyframes successFlash {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

/* Card success flash */
.gx-card-success-flash {
  animation: cardSuccessFlash 0.5s ease;
}

@keyframes cardSuccessFlash {
  0% { box-shadow: var(--shadow-lg); }
  50% { box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.3), var(--shadow-lg); }
  100% { box-shadow: var(--shadow-lg); }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .gx-fly-item,
  .gx-fly-item--animating,
  .gx-add-ripple,
  .gx-cart-pulse,
  .gx-btn-success-flash,
  .gx-card-success-flash {
    animation: none !important;
    transition: none !important;
  }
}

/* ========== Interactive Star Rating ========== */
.gx-star-input {
  display: flex;
  gap: 4px;
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.gx-star-input input {
  display: none;
}

.gx-star-input label {
  cursor: pointer;
  font-size: 2rem;
  color: var(--border);
  transition: var(--transition-fast);
}

.gx-star-input label:hover,
.gx-star-input label:hover ~ label,
.gx-star-input input:checked ~ label {
  color: #fbbf24;
}

.gx-star-input label:hover {
  transform: scale(1.2);
}

/* ========== Rating Bar Chart ========== */
.gx-rating-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.gx-rating-bar-label {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-width: 50px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gx-rating-bar-track {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.gx-rating-bar-fill {
  height: 100%;
  background: var(--primary-gradient);
  border-radius: var(--radius-full);
  transition: width 0.5s var(--ease-out-expo);
}

.gx-rating-bar-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  min-width: 40px;
  text-align: right;
}

/* ========== Verified Purchase Badge ========== */
.gx-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
}

.gx-verified-badge svg {
  width: 14px;
  height: 14px;
}

/* ========== Review Eligibility Message ========== */
.gx-review-eligibility {
  padding: var(--space-lg);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  text-align: center;
  margin-bottom: var(--space-xl);
}

.gx-review-eligibility.eligible {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.gx-review-eligibility.ineligible {
  background: rgba(245, 158, 11, 0.05);
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.gx-review-eligibility-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.gx-review-eligibility-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ========== CSS Containment for Performance ========== */
.gx-product-card,
.gx-category-card,
.gx-feature-card {
  contain: layout style paint;
}


/* ========== Enhanced Floating Label Form ========== */
.gx-floating-field {
  position: relative;
  margin-bottom: var(--space-lg);
}

.gx-floating-input {
  width: 100%;
  padding: 20px 16px 8px;
  padding-right: 44px;
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  color: var(--text-primary);
  transition: var(--transition-base);
}

.gx-floating-input:focus {
  border-color: var(--primary);
  box-shadow: var(--focus-ring);
}

.gx-floating-input.valid {
  border-color: var(--success);
}

.gx-floating-input.valid:focus {
  box-shadow: var(--focus-ring-success);
}

.gx-floating-input.invalid {
  border-color: var(--danger);
}

.gx-floating-input.invalid:focus {
  box-shadow: var(--focus-ring-error);
}

.gx-floating-label {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  pointer-events: none;
  transition: all 0.2s var(--ease-out-expo);
  background: transparent;
  padding: 0 4px;
}

.gx-floating-input:focus ~ .gx-floating-label,
.gx-floating-input:not(:placeholder-shown) ~ .gx-floating-label,
.gx-floating-input.has-value ~ .gx-floating-label {
  top: 8px;
  transform: translateY(0);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.gx-floating-input.valid ~ .gx-floating-label { color: var(--success); }
.gx-floating-input.invalid ~ .gx-floating-label { color: var(--danger); }

/* Validation Icons */
.gx-field-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  opacity: 0;
  transition: var(--transition-base);
  pointer-events: none;
}

.gx-floating-input.valid ~ .gx-field-icon.icon-valid { 
  opacity: 1; 
  color: var(--success); 
}

.gx-floating-input.invalid ~ .gx-field-icon.icon-invalid { 
  opacity: 1; 
  color: var(--danger); 
}

/* Error Message */
.gx-field-error {
  display: none;
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 6px;
  padding-left: 4px;
  animation: slideDown 0.2s ease;
}

.gx-floating-input.invalid ~ .gx-field-error {
  display: block;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Password Field with Toggle */
.gx-password-field {
  position: relative;
}

.gx-password-field .gx-floating-input {
  padding-right: 80px;
}

.gx-password-toggle-btn {
  position: absolute;
  right: 44px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gx-password-toggle-btn:hover {
  color: var(--text-primary);
  background: var(--border);
}

.gx-password-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.gx-password-toggle-btn .icon-hide { display: none; }
.gx-password-toggle-btn.showing .icon-show { display: none; }
.gx-password-toggle-btn.showing .icon-hide { display: block; }

/* Phone Input with Formatting */
.gx-phone-field {
  position: relative;
}

.gx-phone-prefix {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.95rem;
  pointer-events: none;
  opacity: 0;
  transition: var(--transition-base);
}

.gx-phone-field .gx-floating-input:focus ~ .gx-phone-prefix,
.gx-phone-field .gx-floating-input.has-value ~ .gx-phone-prefix {
  opacity: 1;
}

.gx-phone-field .gx-floating-input {
  padding-left: 56px;
}

.gx-phone-field .gx-floating-input:focus ~ .gx-floating-label,
.gx-phone-field .gx-floating-input.has-value ~ .gx-floating-label {
  left: 16px;
}

/* Form Submit Button States */
.gx-form-submit {
  position: relative;
  overflow: hidden;
}

.gx-form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.gx-form-submit.submitting {
  color: transparent !important;
  pointer-events: none;
}

.gx-form-submit.submitting::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid transparent;
  border-top-color: white;
  border-radius: 50%;
  animation: btnSpin 0.6s linear infinite;
}

.gx-form-submit.success {
  background: var(--success) !important;
  border-color: var(--success) !important;
}

.gx-form-submit.success::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.2rem;
  color: white;
  animation: none;
}

/* Inline Validation Feedback */
.gx-validation-feedback {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  margin-top: 6px;
  padding-left: 4px;
}

.gx-validation-feedback.valid {
  color: var(--success);
}

.gx-validation-feedback.invalid {
  color: var(--danger);
}

.gx-validation-feedback svg {
  width: 14px;
  height: 14px;
}

/* Form Helper Text */
.gx-field-helper {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 6px;
  padding-left: 4px;
}

/* Input Group (for prefix/suffix) */
.gx-input-group {
  display: flex;
  align-items: stretch;
}

.gx-input-addon {
  display: flex;
  align-items: center;
  padding: 0 14px;
  background: var(--bg-primary);
  border: 2px solid var(--border);
  color: var(--text-secondary);
  font-weight: 500;
}

.gx-input-addon:first-child {
  border-right: none;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.gx-input-addon:last-child {
  border-left: none;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.gx-input-group .gx-floating-input {
  border-radius: 0;
}

.gx-input-group .gx-floating-input:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.gx-input-group .gx-floating-input:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}


/* ========== MOBILE ENHANCEMENTS ========== */

/* ========== Gallery Swipe & Indicator Dots ========== */
.gx-gallery-dots {
  display: none;
  justify-content: center;
  gap: 8px;
  padding: var(--space-md) 0;
}

@media (max-width: 768px) {
  .gx-gallery-dots {
    display: flex;
  }
  
  /* Hide thumbnails on mobile, show dots instead */
  .gx-thumbnail-gallery {
    display: none;
  }
}

.gx-gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.gx-gallery-dot.active {
  width: 24px;
  border-radius: 4px;
  background: var(--primary);
}

.gx-gallery-dot:hover:not(.active) {
  background: var(--text-muted);
}

/* Swipe hint animation for first-time users */
@keyframes swipeHint {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-10px); }
}

.gx-main-image-wrap {
  touch-action: pan-y pinch-zoom;
  user-select: none;
  -webkit-user-select: none;
}

.gx-main-image-wrap.swipe-hint .gx-main-image {
  animation: swipeHint 1s ease-in-out 2;
}

/* ========== Touch Target Enhancements (44px minimum) ========== */
/* Ensure all interactive elements meet 44px minimum touch target */

/* Buttons */
.gx-btn {
  min-height: 44px;
  min-width: 44px;
}

.gx-btn-sm {
  min-height: 44px;
  padding: 10px 16px;
}

/* Header buttons */
.gx-header-btn,
.gx-theme-toggle {
  min-width: 44px;
  min-height: 44px;
}

/* Wishlist button */
.gx-wishlist-btn {
  min-width: 44px;
  min-height: 44px;
  width: 44px;
  height: 44px;
}

/* Quick add button */
.gx-quick-add-btn {
  min-height: 44px;
  padding: 12px 16px;
}

/* Bottom navigation items */
.gx-bottom-nav-item {
  min-width: 44px;
  min-height: 44px;
  padding: var(--space-sm) var(--space-md);
}

/* Filter tabs */
.gx-filter-tab {
  min-height: 44px;
  padding: 12px 20px;
}

/* Rating options */
.gx-rating-option {
  min-height: 44px;
}

/* Brand options */
.gx-brand-option {
  min-height: 44px;
  padding: 10px 0;
}

/* Social links */
.gx-social-link {
  min-width: 44px;
  min-height: 44px;
}

/* Category cards - ensure touch-friendly */
.gx-category-card {
  min-height: 44px;
}

/* Form inputs */
.gx-form-input,
.gx-floating-input,
.gx-search-input,
.gx-price-input,
.gx-sort-select {
  min-height: 44px;
}

/* Helpful buttons in reviews */
.gx-helpful-btn {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
}

/* Toast close button */
.gx-toast-close {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Toast action buttons */
.gx-toast-action {
  min-height: 44px;
  padding: 10px 16px;
}

/* Mobile filter button */
.gx-mobile-filter-btn {
  min-height: 44px;
}

/* Password toggle */
.gx-password-toggle,
.gx-password-toggle-btn {
  min-width: 44px;
  min-height: 44px;
}

/* Star rating input labels */
.gx-star-rating-input label,
.gx-star-input label {
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Thumbnail gallery items */
.gx-thumbnail {
  min-width: 44px;
  min-height: 44px;
}

/* Links in footer */
.gx-footer-links a {
  display: inline-block;
  min-height: 44px;
  line-height: 44px;
}

/* Active filter remove button */
.gx-active-filter-remove {
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
}

/* Ensure adequate spacing between touch targets */
@media (max-width: 768px) {
  .gx-header-actions {
    gap: var(--space-sm);
  }
  
  .gx-product-cta {
    flex-direction: column;
  }
  
  .gx-product-cta .gx-btn {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
  }
  
  .gx-helpful-btns {
    flex-wrap: wrap;
    gap: var(--space-sm);
  }
  
  .gx-review-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }
}

/* ========== Pull to Refresh Styles ========== */
.gx-pull-indicator {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 12px 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: transform 0.3s var(--ease-out-expo);
  z-index: 100;
  pointer-events: none;
}

.gx-pull-indicator.visible {
  transform: translateX(-50%) translateY(20px);
}

.gx-pull-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: btnSpin 0.8s linear infinite;
}

.gx-pull-text {
  white-space: nowrap;
}

/* Pull indicator on mobile only */
@media (min-width: 769px) {
  .gx-pull-indicator {
    display: none !important;
  }
}

/* ========== Mobile-Specific Optimizations ========== */
@media (max-width: 768px) {
  /* Improve scroll performance */
  .gx-products,
  .gx-review-list {
    -webkit-overflow-scrolling: touch;
  }
  
  /* Larger tap areas for product cards */
  .gx-product-card {
    position: relative;
  }
  
  /* Make entire card tappable */
  .gx-product-card::after {
    content: '';
    position: absolute;
    inset: -4px;
    z-index: 1;
  }
  
  /* Ensure buttons are above the tap area */
  .gx-wishlist-btn,
  .gx-quick-add {
    z-index: 2;
  }
  
  /* Improve gallery touch experience */
  .gx-main-image-wrap {
    cursor: grab;
  }
  
  .gx-main-image-wrap:active {
    cursor: grabbing;
  }
  
  /* Smooth momentum scrolling for filter tabs */
  .gx-filter-tabs {
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  
  .gx-filter-tab {
    scroll-snap-align: start;
  }
}

/* ========== Swipe Gesture Visual Feedback ========== */
.gx-main-image {
  transition: transform 0.3s ease, opacity 0.3s ease;
  will-change: transform;
}

/* Prevent image dragging */
.gx-main-image {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: none;
}

.gx-main-image-wrap {
  overflow: hidden;
}

/* ========== Accessibility for Touch ========== */
@media (hover: none) and (pointer: coarse) {
  /* Show wishlist button always on touch devices */
  .gx-wishlist-btn {
    opacity: 1;
    transform: scale(1);
  }
  
  /* Show quick add always on touch devices */
  .gx-quick-add {
    transform: translateY(0);
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  }
  
  /* Disable hover effects that don't work on touch */
  .gx-product-card:hover {
    transform: none;
  }
  
  .gx-product-card:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
  }
}


/* ========== NETWORK ERROR HANDLING ========== */

/* Offline Banner */
.gx-offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  padding: 12px 16px;
  display: none;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 99999;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
  box-sizing: border-box;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.gx-offline-banner.visible {
  display: flex !important;
}

.gx-offline-banner-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  animation: pulse 2s ease-in-out infinite;
}

.gx-offline-banner-icon svg {
  width: 20px;
  height: 20px;
}

.gx-offline-banner-text {
  flex: 1;
  text-align: center;
  line-height: 1.4;
}

.gx-offline-banner-dismiss {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 28px;
  height: 28px;
  min-width: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}

.gx-offline-banner-dismiss:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Adjust header position when offline banner is visible */
body.offline .gx-header {
  top: 48px;
}

body.offline .gx-skip-link:focus {
  top: 58px;
}

/* Network Error Card */
.gx-network-error {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  text-align: center;
  background: var(--bg-card);
  border: 2px dashed var(--border);
  border-radius: var(--radius-xl);
  margin: var(--space-xl) auto;
  max-width: 400px;
}

.gx-network-error.visible {
  display: flex;
}

.gx-network-error-icon {
  width: 80px;
  height: 80px;
  background: rgba(239, 68, 68, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.gx-network-error-icon svg {
  width: 40px;
  height: 40px;
  color: var(--danger);
}

.gx-network-error-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.gx-network-error-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  line-height: 1.6;
}

.gx-retry-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--primary-gradient);
  color: white;
  border: none;
  border-radius: var(--radius-full);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
  min-height: 44px;
}

.gx-retry-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
}

.gx-retry-btn:active {
  transform: translateY(0);
}

.gx-retry-btn.loading {
  pointer-events: none;
  opacity: 0.8;
}

.gx-retry-btn.loading .gx-retry-icon {
  animation: btnSpin 0.8s linear infinite;
}

.gx-retry-icon {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
}

.gx-retry-btn:hover .gx-retry-icon {
  transform: rotate(180deg);
}

/* Inline Network Error (for AJAX failures) */
.gx-inline-error {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: var(--radius-lg);
  margin: var(--space-md) 0;
}

.gx-inline-error.visible {
  display: flex;
}

.gx-inline-error-icon {
  color: var(--danger);
  flex-shrink: 0;
}

.gx-inline-error-icon svg {
  width: 20px;
  height: 20px;
}

.gx-inline-error-content {
  flex: 1;
}

.gx-inline-error-title {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.9rem;
}

.gx-inline-error-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.gx-inline-retry-btn {
  padding: 8px 16px;
  background: var(--danger);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  min-height: 44px;
}

.gx-inline-retry-btn:hover {
  background: #dc2626;
}

/* Connection Status Indicator */
.gx-connection-status {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9998;
  transition: transform 0.4s var(--ease-out-expo);
  pointer-events: none;
}

.gx-connection-status.visible {
  transform: translateX(-50%) translateY(0);
}

.gx-connection-status.online {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.1);
}

.gx-connection-status.offline {
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
}

.gx-connection-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

.gx-connection-status.online .gx-connection-dot {
  background: var(--success);
}

.gx-connection-status.offline .gx-connection-dot {
  background: var(--danger);
}

.gx-connection-status.online .gx-connection-text {
  color: var(--success);
}

.gx-connection-status.offline .gx-connection-text {
  color: var(--danger);
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .gx-offline-banner {
    padding: 10px 12px;
    font-size: 0.8rem;
    gap: 8px;
  }
  
  .gx-offline-banner-text {
    font-size: 0.75rem;
  }
  
  .gx-offline-banner-icon {
    width: 20px;
    height: 20px;
  }
  
  .gx-offline-banner-icon svg {
    width: 16px;
    height: 16px;
  }
  
  .gx-offline-banner-dismiss {
    width: 24px;
    height: 24px;
    min-width: 24px;
  }
  
  body.offline .gx-header {
    top: 40px;
  }
  
  .gx-connection-status {
    bottom: 80px;
  }
  
  .gx-network-error {
    margin: var(--space-lg);
    padding: var(--space-xl);
  }
  
  .gx-network-error-icon {
    width: 64px;
    height: 64px;
  }
  
  .gx-network-error-icon svg {
    width: 32px;
    height: 32px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .gx-offline-banner,
  .gx-connection-status,
  .gx-retry-btn,
  .gx-retry-icon {
    transition: none;
  }
  
  .gx-offline-banner-icon,
  .gx-connection-dot {
    animation: none;
  }
}
