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

:root {
  --bg: #0e0e12;
  --bg-card: #16161d;
  --bg-elevated: #1e1e28;
  --text: #eee8e0;
  --text-muted: #9a9490;
  --accent: #c084fc;
  --accent-hover: #a855f7;
  --accent-glow: rgba(192, 132, 252, 0.25);
  --warm: #f59e0b;
  --success: #4ade80;
  --radius: 12px;
  --radius-lg: 20px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

input, textarea {
  font-family: inherit;
  font-size: 1rem;
}

/* ===== Typography ===== */
h1, h2, h3 {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  line-height: 1.15;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--accent);
  color: #0e0e12;
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-2px);
}

.btn-full {
  width: 100%;
  text-align: center;
}

/* ===== Navbar ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 40px;
  background: rgba(14, 14, 18, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--text);
}

.cart-btn {
  position: relative;
  color: var(--text);
  transition: color 0.3s;
}

.cart-btn:hover {
  color: var(--accent);
}

.cart-count {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--accent);
  color: #0e0e12;
  font-size: 0.7rem;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 120px 40px 80px;
  overflow: hidden;
  text-align: center;
}

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

.hero-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.8rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 24px;
}

.hero h1 {
  font-size: clamp(3rem, 8vw, 6.5rem);
  font-weight: 900;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero h1 em {
  font-style: italic;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto 40px;
}

/* Hero animated canvas */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* ===== Categories ===== */
.categories {
  padding: 20px 0 40px;
}

.category-grid {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.category-pill {
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  color: var(--text-muted);
  transition: all 0.3s;
}

.category-pill:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.15);
}

.category-pill.active {
  background: var(--accent);
  color: #0e0e12;
  border-color: var(--accent);
}

/* ===== Shop / Product Grid ===== */
.shop {
  padding: 40px 0 100px;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 48px;
}

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

.product-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.04);
  transition: all 0.4s ease;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(192, 132, 252, 0.2);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px var(--accent-glow);
}

.product-image {
  aspect-ratio: 1;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.product-image svg {
  color: var(--text-muted);
  opacity: 0.3;
}

.product-image .category-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: rgba(14, 14, 18, 0.7);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 50px;
  color: var(--accent);
}

.product-info {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-name {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.product-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.product-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.product-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.add-to-cart {
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(192, 132, 252, 0.15);
  color: var(--accent);
  border: 1px solid rgba(192, 132, 252, 0.3);
  transition: all 0.3s;
}

.add-to-cart:hover {
  background: var(--accent);
  color: #0e0e12;
}

.add-to-cart.added {
  background: var(--success);
  color: #0e0e12;
  border-color: var(--success);
}

/* ===== About ===== */
.about {
  padding: 100px 0;
  background: var(--bg-card);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-placeholder {
  aspect-ratio: 1;
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border: 1px solid rgba(255,255,255,0.04);
}

.about-text h2 {
  font-size: 2.2rem;
  margin-bottom: 20px;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 1.05rem;
}

/* ===== Contact ===== */
.contact {
  padding: 100px 0;
}

.contact-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 40px;
}

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

.form-row {
  display: flex;
  gap: 16px;
}

.form-row input {
  flex: 1;
}

.contact-form input,
.contact-form textarea {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 14px 18px;
  color: var(--text);
  font-size: 0.95rem;
  transition: border-color 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.contact-form .btn {
  align-self: flex-start;
}

/* ===== Footer ===== */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255,255,255,0.04);
  text-align: center;
}

.footer .logo {
  display: inline-block;
  margin-bottom: 8px;
}

.footer p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== Cart Sidebar ===== */
.cart-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

.cart-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 400px;
  max-width: 90vw;
  background: var(--bg-elevated);
  z-index: 201;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.4s ease;
}

.cart-sidebar.open {
  transform: translateX(0);
}

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

.cart-header h3 {
  font-size: 1.3rem;
}

.cart-close {
  font-size: 1.8rem;
  color: var(--text-muted);
  transition: color 0.3s;
}

.cart-close:hover {
  color: var(--text);
}

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

.cart-empty {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 0;
}

.cart-item {
  display: flex;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  align-items: center;
}

.cart-item-thumb {
  width: 60px;
  height: 60px;
  background: var(--bg-card);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.cart-item-thumb svg {
  opacity: 0.3;
}

.cart-item-details {
  flex: 1;
}

.cart-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.cart-item-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--accent);
}

.cart-item-qty {
  display: flex;
  align-items: center;
  gap: 8px;
}

.qty-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cart-item-qty span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  min-width: 20px;
  text-align: center;
}

.cart-footer {
  padding: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

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

.cart-total span:last-child {
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 24px;
}

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

.modal {
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  padding: 40px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  border: 1px solid rgba(255,255,255,0.06);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 1.8rem;
  color: var(--text-muted);
}

.modal-close:hover {
  color: var(--text);
}

.modal h3 {
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.modal h4 {
  font-size: 1rem;
  margin: 20px 0 12px;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.8rem;
}

.checkout-summary {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 8px;
}

.checkout-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.9rem;
}

.checkout-line.total {
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  font-size: 1rem;
}

.checkout-line.total span:last-child {
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
}

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkout-form input {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.9rem;
}

.checkout-form input:focus {
  outline: none;
  border-color: var(--accent);
}

.checkout-form .form-row {
  display: flex;
  gap: 12px;
}

.checkout-form .form-row input {
  flex: 1;
}

.payment-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius);
  padding: 12px 16px;
}

.modal-confirm {
  text-align: center;
  padding: 60px 40px;
}

.modal-confirm h3 {
  margin-top: 20px;
}

.modal-confirm p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .navbar {
    padding: 16px 20px;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: 0.8rem;
  }

  .hero {
    padding: 120px 24px 60px;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .form-row {
    flex-direction: column;
  }

  .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 480px) {
  .nav-links a:not(:last-child) {
    display: none;
  }

  .product-grid {
    grid-template-columns: 1fr;
  }
}
