:root {
  --bg: #0d0d12;
  --text: #f0f0f0;
  --text-muted: #94a3b8;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --glass-bg: rgba(30, 41, 59, 0.4);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  --radius: 16px;
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

body {
  font-family: 'Outfit', -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Background animated blobs */
.blob {
  position: fixed;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.6;
  border-radius: 50%;
  animation: float 20s infinite ease-in-out alternate;
}
.blob-1 {
  top: -10%; left: -10%; width: 50vw; height: 50vw;
  background: radial-gradient(circle, #6366f1 0%, transparent 70%);
}
.blob-2 {
  bottom: -20%; right: -10%; width: 60vw; height: 60vw;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  animation-delay: -5s;
}
.blob-3 {
  top: 40%; left: 40%; width: 40vw; height: 40vw;
  background: radial-gradient(circle, #3b82f6 0%, transparent 70%);
  animation-delay: -10s;
}

@keyframes float {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(5%, 10%) scale(1.1); }
}

/* Typography */
h1, h2, h3 { font-weight: 600; line-height: 1.2; }
h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }
p { color: var(--text-muted); }
.muted { color: var(--text-muted); }
.amount { font-weight: 600; color: #fff; }

/* Layout */
.glass-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(to right, #fff, #a5b4fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo span { font-weight: 300; }

main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  min-height: calc(100vh - 80px);
}

.hero {
  text-align: center;
  padding: 4rem 0;
}
.shop-hero {
  text-align: left;
  padding: 2rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.shop-hero h1 { margin: 0; }

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

/* Glass Cards */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: var(--glass-shadow);
}
.card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 10px 40px rgba(0,0,0,0.4);
}
.card.product-card {
  padding: 0;
  overflow: hidden;
  cursor: default;
}
.product-image {
  width: 100%;
  height: 200px;
  background: rgba(0,0,0,0.2);
  object-fit: cover;
  display: block;
}
.product-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-title {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
}
.product-price {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 1rem;
}
.product-stock {
  font-size: 0.85rem;
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  background: rgba(255,255,255,0.1);
  margin-bottom: 1rem;
  align-self: flex-start;
}
.stock-AVAILABLE { color: #4ade80; background: rgba(74, 222, 128, 0.1); }
.stock-LIMITED { color: #fbbf24; background: rgba(251, 191, 36, 0.1); }
.stock-OUT_OF_STOCK { color: #f87171; background: rgba(248, 113, 113, 0.1); }

/* Buttons */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}
.btn-primary {
  background: var(--accent);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  width: 100%;
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.glass-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.glass-btn:hover { background: rgba(255,255,255,0.1); }
.small-btn {
  width: auto;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  gap: 0.5rem;
}
.icon-btn {
  background: transparent;
  color: var(--text-muted);
}
.icon-btn:hover { color: white; }

#cart-count {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ec4899;
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Overlays & Slide Panes */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
  opacity: 1;
  transition: opacity 0.3s ease;
}
.overlay.hidden {
  opacity: 0;
  pointer-events: none;
}
.slide-pane {
  width: 100%;
  max-width: 400px;
  height: 100%;
  background: #111827;
  border-left: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  transform: translateX(0);
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: -10px 0 30px rgba(0,0,0,0.5);
}
.overlay.hidden .slide-pane {
  transform: translateX(100%);
}
.pane-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pane-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
}
.pane-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--glass-border);
  background: rgba(0,0,0,0.2);
}

/* Cart Items */
.cart-item {
  display: flex;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1rem;
}
.cart-item-info { flex: 1; }
.cart-item-title { font-weight: 500; margin-bottom: 0.25rem; }
.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}
.qty-btn {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.total-row {
  display: flex;
  justify-content: space-between;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}
label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: white;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}
input:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0,0,0,0.4);
}
.checkout-summary {
  background: rgba(0,0,0,0.2);
  padding: 1rem;
  border-radius: 8px;
  margin-top: 2rem;
}
.error-msg {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  padding: 0.75rem;
  border-radius: 8px;
  margin-top: 1rem;
  font-size: 0.9rem;
}
.hidden { display: none !important; }

/* Success State */
.success-message {
  text-align: center;
  padding: 3rem 1rem;
}
.success-message svg {
  color: #4ade80;
  margin-bottom: 1rem;
}

/* Tabs */
.tab-btn {
  flex: 1;
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--glass-border);
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 500;
}
.tab-btn.active {
  background: var(--glass-bg);
  color: white;
  border-color: var(--accent);
}
.tab-btn:hover:not(.active) {
  background: rgba(255,255,255,0.05);
  color: white;
}
