:root {
  /* Colors - Violet & Black Theme */
  --color-bg: #05000a; /* Deep black with a hint of purple */
  --color-surface: #10021c; /* Dark surface for cards */
  --color-surface-hover: #1a0533;
  
  --color-primary: #a322ff; /* Vibrant Violet */
  --color-primary-glow: rgba(163, 34, 255, 0.5);
  --color-secondary: #c975ff; /* Lighter violet for text highlights */
  
  --color-text: #ffffff;
  --color-text-muted: #a491b8;
  
  --color-border: rgba(163, 34, 255, 0.15);
  --color-border-strong: rgba(163, 34, 255, 0.4);
  
  --color-success: #00e676;
  --color-error: #ff3b3b;

  /* Typography */
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  
  /* Radii & Shadows */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  
  --shadow-glow: 0 0 20px var(--color-primary-glow);
  --shadow-card: 0 10px 30px rgba(0, 0, 0, 0.5);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-family);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  overflow-x: hidden;
  /* subtle animated gradient background */
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(163, 34, 255, 0.08), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(163, 34, 255, 0.05), transparent 25%);
  background-attachment: fixed;
  animation: pageFadeIn 0.4s ease forwards;
}

body.fade-out {
  animation: pageFadeOut 0.3s ease forwards;
}

@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes pageFadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

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

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

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 0, 10, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #fff, var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.brand-icon {
  width: 32px;
  height: 32px;
  background: var(--color-primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
  color: var(--color-text);
  text-shadow: 0 0 10px rgba(255,255,255,0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Cart Button */
.cart-btn {
  position: relative;
  color: var(--color-text);
  padding: 0.5rem;
  border-radius: var(--radius-full);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cart-btn:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-primary);
}

.cart-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 10px var(--color-primary);
}

/* Hero Section */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(163,34,255,0.15) 0%, rgba(0,0,0,0) 70%);
  z-index: -1;
  pointer-events: none;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.hero h1 span {
  color: var(--color-primary);
  text-shadow: 0 0 20px var(--color-primary-glow);
}

.hero p {
  color: var(--color-text-muted);
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--transition-normal);
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 15px rgba(163, 34, 255, 0.4);
}

.btn-primary:hover {
  background: #b13dff;
  box-shadow: 0 0 25px rgba(163, 34, 255, 0.6);
  transform: translateY(-2px);
}

/* Categories */
.categories {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.category-btn {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.category-btn:hover, .category-btn.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
  box-shadow: 0 0 15px var(--color-primary-glow);
}

/* Product Grid */
.products {
  padding: 2rem 0 6rem;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
}

.product-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.product-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
  pointer-events: none;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--color-border-strong);
  box-shadow: var(--shadow-card), 0 0 20px rgba(163,34,255,0.1);
}

.product-icon {
  width: 60px;
  height: 60px;
  background: rgba(163, 34, 255, 0.1);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
  color: var(--color-primary);
}

.product-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.product-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.product-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1rem;
}

.product-price {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--color-primary);
}

.product-price span {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 400;
}

.btn-add {
  background: rgba(255,255,255,0.05);
  color: var(--color-text);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.btn-add:hover {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 0 10px var(--color-primary-glow);
}

/* Cart Drawer */
.cart-drawer {
  position: fixed;
  top: 0;
  right: -400px;
  width: 400px;
  max-width: 100vw;
  height: 100vh;
  background: rgba(10, 2, 28, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-left: 1px solid var(--color-border);
  z-index: 100;
  transition: right var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}

.cart-drawer.open {
  right: 0;
}

.cart-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(2px);
  z-index: 99;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.cart-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.cart-header {
  padding: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.close-cart {
  color: var(--color-text-muted);
  font-size: 1.5rem;
  transition: color var(--transition-fast);
}
.close-cart:hover { color: var(--color-text); }

.cart-items {
  flex-grow: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cart-item {
  display: flex;
  gap: 1rem;
  background: rgba(255,255,255,0.03);
  padding: 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.05);
}

.cart-item-icon {
  width: 48px;
  height: 48px;
  background: rgba(163, 34, 255, 0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--color-primary);
}

.cart-item-info {
  flex-grow: 1;
}

.cart-item-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.cart-item-price {
  color: var(--color-primary);
  font-size: 0.9rem;
  font-weight: 700;
  margin-top: 0.25rem;
}

.cart-item-remove {
  color: var(--color-error);
  font-size: 0.8rem;
  margin-top: 0.5rem;
  opacity: 0.7;
}
.cart-item-remove:hover { opacity: 1; }

.cart-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  background: rgba(0,0,0,0.2);
}

.cart-total {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
  font-weight: 700;
}

.btn-checkout {
  width: 100%;
  padding: 1rem;
  font-size: 1.1rem;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  background: var(--color-surface);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
}

.filter-controls {
  display: flex;
  gap: 1rem;
}

.filter-select {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
}

.search-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-wrapper i {
  position: absolute;
  left: 1rem;
  color: var(--color-text-muted);
}

.filter-search {
  background: var(--color-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border-radius: var(--radius-sm);
  outline: none;
  font-family: inherit;
  width: 250px;
}

.search-autocomplete {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #110522;
  border: 1px solid rgba(163,34,255,0.3);
  border-radius: 12px;
  margin-top: 0.5rem;
  z-index: 100;
  max-height: 300px;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}
.search-autocomplete::-webkit-scrollbar {
  width: 6px;
}
.search-autocomplete::-webkit-scrollbar-thumb {
  background: rgba(163,34,255,0.5);
  border-radius: 10px;
}
.autocomplete-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: background 0.2s;
  color: #fff;
  text-decoration: none;
}
.autocomplete-item:last-child {
  border-bottom: none;
}
.autocomplete-item:hover {
  background: rgba(163,34,255,0.15);
}
.autocomplete-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
}
.autocomplete-info h4 {
  margin: 0 0 0.2rem;
  font-size: 0.9rem;
}
.autocomplete-info p {
  margin: 0;
  font-size: 0.8rem;
  color: #a322ff;
  font-weight: 600;
}

/* Footer */
footer {
  border-top: 1px solid var(--color-border);
  padding: 3rem 0;
  text-align: center;
  color: var(--color-text-muted);
  background: #030005;
}

/* Notification Toast */
.toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateX(120%);
  animation: slideIn 0.3s forwards, fadeOut 0.3s forwards 2.7s;
}

@keyframes slideIn {
  to { transform: translateX(0); }
}
@keyframes fadeOut {
  to { opacity: 0; transform: translateY(-10px); }
}

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

/* Variants List UI */
.variants-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.variant-box {
  display: flex;
  align-items: center;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
  transition: all 0.2s ease;
}

.variant-box:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.2);
}

.variant-box.selected {
  background: rgba(163, 34, 255, 0.05);
  border-color: var(--color-primary);
}

.variant-radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  margin-right: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.variant-box.selected .variant-radio {
  border-color: var(--color-primary);
}

.variant-radio-inner {
  width: 10px;
  height: 10px;
  background-color: var(--color-primary);
  border-radius: 50%;
  transition: opacity 0.2s ease;
}

.variant-info {
  flex-grow: 1;
}

.variant-name {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  margin-bottom: 0.2rem;
}

.variant-desc-text {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.3rem;
}

.variant-stock {
  font-size: 0.75rem;
  color: var(--color-success);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.variant-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: #fff;
  margin-left: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links { display: none; }
  .hero h1 { font-size: 2.5rem; }
  .cart-drawer { width: 100%; right: -100%; }
  
  .product-split {
    gap: 1.5rem;
  }
  
  .variant-box {
    align-items: flex-start;
  }
  
  .variant-price {
    font-size: 1rem;
    margin-left: 0.5rem;
  }
  
  .payment-methods {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
  
  .detail-price-row {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Currency Toggle */
.currency-toggle {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 0.25rem;
  gap: 0.25rem;
}
.currency-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.3rem 0.6rem;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.currency-btn:hover {
  color: white;
}
.currency-btn.active {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 0 10px rgba(163, 34, 255, 0.4);
}
