/* Prototype 1: Sci-fi Futuristic Glass Morphism */
:root {
  --neon-blue: #00d4ff;
  --neon-pink: #ff0080;
  --neon-purple: #8000ff;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.37);
  --success: #22c55e;
  --danger: #ef4444;
  /* Design tokens */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --surface: rgba(0, 5, 16, 0.8);
  --text: rgba(255,255,255,0.92);
  --text-muted: rgba(255,255,255,0.7);
}

/* Theme variants using CSS variables */
[data-theme="neon"] {
  --neon-blue: #00d4ff;
  --neon-pink: #ff0080;
  --neon-purple: #8000ff;
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --surface: rgba(0, 5, 16, 0.8);
}

[data-theme="mono"] {
  --neon-blue: #7dd3fc; /* light blue accent */
  --neon-pink: #e5e7eb; /* neutral */
  --neon-purple: #9ca3af; /* gray accent */
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --surface: rgba(6, 8, 12, 0.9);
}

[data-theme="sunset"] {
  --neon-blue: #fb923c; /* orange */
  --neon-pink: #f472b6; /* pink */
  --neon-purple: #a78bfa; /* violet */
  --glass-bg: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.12);
  --surface: rgba(16, 6, 12, 0.85);
}

/* Animated geometric background */
.sci-fi-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: 
    radial-gradient(circle at 20% 30%, rgba(0, 212, 255, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255, 0, 128, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 40% 80%, rgba(128, 0, 255, 0.1) 0%, transparent 50%),
    linear-gradient(135deg, #000510 0%, #000815 50%, #001020 100%);
  overflow: hidden;
}

.sci-fi-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(90deg, transparent 0%, rgba(0, 212, 255, 0.03) 50%, transparent 100%),
    linear-gradient(0deg, transparent 0%, rgba(255, 0, 128, 0.03) 50%, transparent 100%);
  background-size: 100px 100px, 150px 150px;
  animation: geometricFlow 20s linear infinite;
}

@keyframes geometricFlow {
  0% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(-10px, -10px) rotate(180deg); }
  100% { transform: translate(0, 0) rotate(360deg); }
}

/* Hero Grid Layout */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.hero-title .holo {
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-muted);
  line-height: 1.6;
}


.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  min-height: 80px;
  aspect-ratio: 1;
  text-align: center;
  transition: all 0.3s ease;
}

.metric-value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--neon-blue);
  line-height: 1.2;
  white-space: nowrap;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-visual .glass-card {
  width: 100%;
  max-width: 500px;
  aspect-ratio: 3/2;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.glass-media {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero-visual .glass-card:hover .glass-media {
  transform: scale(1.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .metric {
    min-height: 70px;
    padding: var(--space-3);
  }
  
  .metric-value {
    font-size: 0.75rem;
  }
  
  .metric-label {
    font-size: 0.625rem;
  }
}

/* Larger screens: align as four uniform small squares */
@media (min-width: 1024px) {
  .metrics-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    max-width: 400px;
  }
  
  .metric {
    min-height: 70px;
    max-width: 90px;
  }
}

/* Floating geometric shapes */
.floating-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.shape {
  position: absolute;
  border: 1px solid rgba(0, 212, 255, 0.2);
  animation: float 15s ease-in-out infinite;
}

.shape:nth-child(1) {
  width: 60px;
  height: 60px;
  top: 20%;
  left: 10%;
  border-radius: 50%;
  animation-delay: 0s;
}

.shape:nth-child(2) {
  width: 40px;
  height: 40px;
  top: 60%;
  right: 15%;
  transform: rotate(45deg);
  animation-delay: 5s;
  border-color: rgba(255, 0, 128, 0.2);
}

.shape:nth-child(3) {
  width: 80px;
  height: 80px;
  bottom: 30%;
  left: 70%;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  animation-delay: 10s;
  border-color: rgba(128, 0, 255, 0.2);
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); opacity: 0.3; }
  50% { transform: translateY(-20px) rotate(180deg); opacity: 0.9; }
}

/* Glass morphism product cards - SIMPLIFIED VERSION */
.glass-card,
.c-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--glass-shadow);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.glass-card:hover,
.c-card:hover {
  transform: translateY(-4px);
  box-shadow: 
    var(--glass-shadow),
    0 8px 16px rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.2);
}

.glass-card .thumb,
.c-card .thumb {
  aspect-ratio: 4/3;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
}

/* Futuristic buttons - SIMPLIFIED VERSION */
.cyber-btn,
.c-button {
  position: relative;
  padding: 0.6rem 1.2rem;
  background: linear-gradient(135deg, var(--neon-blue), var(--neon-purple));
  border: none;
  border-radius: 8px;
  color: #000;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
}

.cyber-btn:hover,
.c-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.cyber-btn span,
.c-button span {
  position: relative;
  z-index: 1;
}

/* Holographic text effect */
.holo-text {
  background: linear-gradient(45deg, var(--neon-blue), var(--neon-pink), var(--neon-purple));
  background-size: 300% 300%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: holoShift 3s ease-in-out infinite;
}

@keyframes holoShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Neon glow effects */
.neon-glow {
  text-shadow: 
    0 0 5px currentColor,
    0 0 10px currentColor,
    0 0 15px currentColor,
    0 0 20px var(--neon-blue);
}

/* 3D lifted hero visual */
.hero-visual-3d {
  position: relative;
  perspective: 1000px;
}

.floating-cube {
  width: 200px;
  height: 200px;
  position: relative;
  transform-style: preserve-3d;
  animation: cube3D 12s linear infinite;
  margin: 0 auto;
  cursor: grab;
  transition: transform 0.1s ease-out;
}

.floating-cube:active {
  cursor: grabbing;
}

.floating-cube.interactive {
  animation-play-state: paused;
}

.cube-face {
  position: absolute;
  width: 200px;
  height: 200px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: 2px solid var(--glass-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--glass-shadow);
  opacity: 0.7;
}

.cube-face::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: opacity 0.3s ease;
  opacity: 0.6;
}

.cube-face::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, 
    rgba(0, 212, 255, 0.15) 0%, 
    transparent 50%, 
    rgba(255, 0, 128, 0.15) 100%);
  transition: opacity 0.3s ease;
  opacity: 0.3;
}

.floating-cube:hover .cube-face::before {
  opacity: 0.4;
}

.floating-cube:hover .cube-face::after {
  opacity: 0.6;
}

.cube-face.front { transform: rotateY(0deg) translateZ(100px); }
.cube-face.back { transform: rotateY(180deg) translateZ(100px); }
.cube-face.right { transform: rotateY(90deg) translateZ(100px); }
.cube-face.left { transform: rotateY(-90deg) translateZ(100px); }
.cube-face.top { transform: rotateX(90deg) translateZ(100px); }
.cube-face.bottom { transform: rotateX(-90deg) translateZ(100px); }

@keyframes cube3D {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  50% { transform: rotateX(180deg) rotateY(180deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

/* Sticky bar glass effect */
.glass-sticky-bar {
  background: rgba(0, 5, 16, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Cart/Checkout utility styles (BEM-like) */
.cart__summary { display: grid; gap: 0.5rem; }
.cart__actions { display: flex; gap: 0.75rem; justify-content: flex-end; }
.field { display: grid; gap: 0.4rem; }
.field input, .field textarea { color: #fff; }

/* Low-level utilities for prototyping */
.u-stack > * + * { margin-top: var(--space-4); }
.u-inline { display: inline-flex; align-items: center; gap: var(--space-2); }
.u-center { display: grid; place-items: center; }
.u-grid { display: grid; gap: var(--space-4); }
.u-round { border-radius: var(--radius-md); }
.u-border { border: 1px solid var(--glass-border); }

/* Trust badges row */
.trust-badges { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; opacity: 0.95; }
.trust-badges svg, .trust-badges img { height: 24px; width: auto; filter: drop-shadow(0 0 0 rgba(0,0,0,0)); }
.trust-badges .pill { padding: 4px 8px; border: 1px solid var(--glass-border); border-radius: 6px; background: var(--glass-bg); color: #fff; font-weight: 600; font-size: 12px; }

/* Pricing utilities */
.price { display: inline-flex; align-items: baseline; gap: 8px; }
.price-old { color: rgba(255,255,255,0.55); text-decoration: line-through; }
.price-new { color: var(--neon-blue); font-weight: 700; }
.badge-sale { display: inline-block; padding: 2px 8px; border-radius: 999px; background: rgba(255,0,128,0.15); border: 1px solid rgba(255,0,128,0.4); color: #fff; font-size: 12px; font-weight: 700; }

/* Form components */
.c-input { 
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text);
}
.c-input:focus { outline: none; border-color: var(--neon-blue); box-shadow: 0 0 0 2px rgba(0,212,255,0.15); }

/* Pills and badges */
.c-pill { 
  display: inline-flex; align-items: center; gap: 0.5rem; 
  padding: 0.35rem 0.75rem; border-radius: 999px; 
  background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.c-badge { font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 999px; background: var(--neon-blue); color: #000; }

/* Floating control */
.c-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 999998; display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }

/* Heart toggle button */
.c-fab__toggle {
  position: fixed;
  left: 1rem;
  bottom: 1.5rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 999999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: subtle-pulse 3s ease-in-out infinite;
}

@keyframes subtle-pulse {
  0%, 100% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(125, 167, 244, 0.4);
  }
  50% {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 15px 3px rgba(125, 167, 244, 0.2);
  }
}

.c-fab__toggle:hover {
  transform: scale(1.1);
  border-color: var(--neon-blue);
  box-shadow: 0 0 20px rgba(125, 167, 244, 0.4);
  animation: none;
}

.c-fab__toggle:active {
  transform: scale(0.95);
}

.c-fab__toggle svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: var(--neon-blue);
  transition: fill 0.3s ease;
}

.c-fab__toggle:hover svg {
  fill: var(--neon-purple);
}

@media (prefers-reduced-motion: reduce) {
  .c-fab__toggle {
    animation: none;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .c-fab__toggle {
    width: 2.5rem;
    height: 2.5rem;
    bottom: 1rem;
  }
  
  .c-fab__toggle svg {
    width: 1.25rem;
    height: 1.25rem;
  }
}

/* Control panel with animation */
.c-panel {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-lg);
  padding: 0.5rem;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-height: 0;
  overflow: hidden;
}

.c-panel.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
  max-height: 500px;
}

/* Theme editor controls */
.theme-editor { display: grid; gap: 0.75rem; }
.theme-editor__row { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 0.5rem; }
.theme-editor__label { font-size: 0.7rem; color: rgba(230, 234, 244, 0.65); }
.theme-editor__actions { display: flex; gap: 0.35rem; }
.theme-editor__slider { 
  display: grid; 
  gap: 0.35rem; 
  font-size: 0.7rem; 
  color: rgba(230, 234, 244, 0.65);
}
.theme-editor__slider input[type="range"] {
  width: 160px;
  accent-color: var(--accent-400, var(--neon-blue));
  cursor: pointer;
  pointer-events: auto;
  position: relative;
  z-index: 10;
}

/* Option pills futuristic style - SIMPLIFIED VERSION */
.cyber-option {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.cyber-option:hover {
  border-color: var(--neon-blue);
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 212, 255, 0.2);
}

.cyber-option[aria-checked="true"] {
  border-color: var(--neon-blue);
  color: #fff;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.3);
}

/* Holographic progress bar */
.holo-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.holo-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-blue), var(--neon-pink), var(--neon-purple));
  background-size: 200% 100%;
  animation: progressShine 2s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes progressShine {
  0%, 100% { background-position: 200% 0; }
  50% { background-position: -200% 0; }
}

/* Review rating picker highlight */
[data-rating-picker] label {
  transition: color 0.2s ease, transform 0.2s ease, text-shadow 0.2s ease;
}

[data-rating-picker] label[data-active="true"] {
  color: var(--neon-blue);
  transform: translateY(-2px) scale(1.05);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.45);
}

[data-rating-picker] label[data-active="true"] .text-2xl {
  color: var(--neon-blue);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

[data-rating-picker] label[data-active="true"] .text-xs {
  color: rgba(255, 255, 255, 0.85);
}

/* CSS fallbacks for rating picker when JS highlight fails */
[data-rating-picker] label:has(input:checked) {
  color: var(--neon-blue);
  transform: translateY(-2px) scale(1.05);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.45);
}

[data-rating-picker] label:has(input:checked) .text-2xl {
  color: var(--neon-blue);
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.6);
}

[data-rating-picker] label:has(input:checked) .text-xs {
  color: rgba(255, 255, 255, 0.85);
}

.free-shipping-progress {
  margin-top: 1rem;
}
.free-shipping-progress__track {
  position: relative;
  height: 0.5rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
  box-shadow: 0 0 12px rgba(125, 167, 244, 0.18);
}
.free-shipping-progress__bar {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(125, 167, 244, 0.85), rgba(125, 244, 214, 0.8));
  box-shadow: 0 0 18px rgba(125, 244, 214, 0.45);
  transition: width 200ms ease-in-out;
}
.free-shipping-progress__copy {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}
.free-shipping-progress.is-complete .free-shipping-progress__bar {
  background: linear-gradient(90deg, rgba(125, 244, 214, 0.95), rgba(125, 244, 214, 0.7));
  box-shadow: 0 0 22px rgba(125, 244, 214, 0.6);
}
.free-shipping-progress.is-complete .free-shipping-progress__copy {
  color: rgba(125, 244, 214, 0.9);
}

/* Fix for review pagination buttons - ensure they're clickable */
[data-review-pagination] {
  position: relative;
  z-index: 10;
}
[data-review-pagination] button {
  position: relative;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}
[data-review-pagination] button:disabled {
  cursor: not-allowed;
}

/* Fix for all interactive elements inside glass-card - ensure ::before doesn't block clicks */
.glass-card::before {
  pointer-events: none !important;
}
.glass-card button,
.glass-card a,
.glass-card input,
.glass-card select,
.glass-card textarea,
.glass-card [role="button"],
.glass-card [data-review-toggle] {
  position: relative;
  z-index: 10;
  pointer-events: auto;
  cursor: pointer;
}
