/* ============================================
   THE VISIONARY ART — Main Stylesheet
   Dark psychedelic / Chipibo aesthetic
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,300;1,400&family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg-deep:       #080810;
  --bg-dark:       #0d0d1a;
  --bg-card:       #12122a;
  --bg-hover:      #1a1a35;
  --gold:          #c9a84c;
  --gold-light:    #e8c96a;
  --teal:          #00c9b1;
  --teal-dim:      #007a6b;
  --purple:        #7c4fd4;
  --purple-dim:    #3d2570;
  --text-primary:  #f0ead8;
  --text-muted:    #8a8070;
  --text-dim:      #4a4438;
  --border:        rgba(201,168,76,0.15);
  --border-glow:   rgba(201,168,76,0.35);
  --radius:        8px;
  --radius-lg:     16px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

/* === CHIPIBO SVG BACKGROUND PATTERN === */
.chipibo-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Crect width='120' height='120' fill='none'/%3E%3Cpath d='M60 0 L120 60 L60 120 L0 60 Z' fill='none' stroke='%23c9a84c' stroke-width='1'/%3E%3Crect x='30' y='30' width='60' height='60' fill='none' stroke='%23c9a84c' stroke-width='0.8'/%3E%3Cpath d='M60 20 L100 60 L60 100 L20 60 Z' fill='none' stroke='%2300c9b1' stroke-width='0.6'/%3E%3Ccircle cx='60' cy='60' r='15' fill='none' stroke='%23c9a84c' stroke-width='0.8'/%3E%3Cpath d='M60 0 L60 20 M120 60 L100 60 M60 120 L60 100 M0 60 L20 60' stroke='%23c9a84c' stroke-width='0.5'/%3E%3Cpath d='M30 30 L30 0 M90 30 L120 0 M90 90 L120 120 M30 90 L0 120' stroke='%2300c9b1' stroke-width='0.4'/%3E%3C/svg%3E");
  background-size: 120px 120px;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4 { font-family: 'Cormorant Garamond', serif; font-weight: 300; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 3vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.8rem); }
p { line-height: 1.7; color: var(--text-muted); font-size: 0.95rem; }

.mono { font-family: 'Space Mono', monospace; }
.gold { color: var(--gold); }
.teal { color: var(--teal); }

/* === LAYOUT === */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }
section { padding: 80px 0; }

/* === NAVIGATION === */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 20px 0;
  background: linear-gradient(to bottom, rgba(8,8,16,0.95), transparent);
  backdrop-filter: blur(10px);
  border-bottom: 0.5px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem; font-weight: 300; letter-spacing: 0.12em;
  color: var(--text-primary); text-decoration: none;
}
.logo span { color: var(--gold); }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; transition: color 0.2s; }
.nav-links a:hover { color: var(--gold); }
.cart-icon {
  position: relative; cursor: pointer;
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 8px 16px; color: var(--text-primary); font-size: 0.85rem;
  letter-spacing: 0.06em; transition: border-color 0.2s, color 0.2s;
}
.cart-icon:hover { border-color: var(--gold-light); color: var(--gold-light); }
.cart-badge {
  position: absolute; top: -8px; right: -8px;
  background: var(--gold); color: var(--bg-deep);
  border-radius: 50%; width: 18px; height: 18px;
  font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; background: none; border: none; padding: 4px; }
.hamburger span { display: block; width: 24px; height: 1.5px; background: var(--text-muted); transition: 0.2s; }

/* === HERO === */
.hero {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 120px 24px 80px;
  position: relative; overflow: hidden;
}
.hero-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 600px; height: 600px;
  background: radial-gradient(ellipse, rgba(124,79,212,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-eyebrow {
  font-family: 'Space Mono', monospace; font-size: 0.72rem;
  color: var(--teal); letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 24px; display: block;
}
.hero h1 { margin-bottom: 24px; }
.hero h1 em { font-style: italic; color: var(--gold); }
.hero-sub { font-size: 1.05rem; max-width: 520px; margin: 0 auto 48px; color: var(--text-muted); line-height: 1.8; }
.hero-divider {
  width: 80px; height: 1px; background: linear-gradient(to right, transparent, var(--gold), transparent);
  margin: 0 auto 48px;
}
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 36px; border-radius: var(--radius);
  font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase;
  text-decoration: none; transition: all 0.25s; cursor: pointer; border: none;
}
.btn-primary {
  background: var(--gold); color: var(--bg-deep); font-weight: 600;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(201,168,76,0.25); }
.btn-outline {
  background: transparent; color: var(--text-primary); border: 1px solid var(--border-glow);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* === SECTION HEADERS === */
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  font-family: 'Space Mono', monospace; font-size: 0.68rem;
  color: var(--teal); letter-spacing: 0.2em; text-transform: uppercase;
  display: block; margin-bottom: 16px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p { max-width: 480px; margin: 0 auto; }

/* === PRODUCT GRID === */
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }

.product-card {
  background: var(--bg-card); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color 0.25s, transform 0.25s;
  cursor: pointer; text-decoration: none; color: inherit; display: block;
}
.product-card:hover { border-color: var(--border-glow); transform: translateY(-4px); }
.product-img {
  aspect-ratio: 1; overflow: hidden; background: var(--bg-hover);
  display: flex; align-items: center; justify-content: center; position: relative;
}
.product-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.product-card:hover .product-img img { transform: scale(1.04); }
.product-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--gold); color: var(--bg-deep);
  font-size: 10px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 4px;
}
.product-info { padding: 20px; }
.product-name { font-family: 'Cormorant Garamond', serif; font-size: 1.15rem; font-weight: 400; margin-bottom: 6px; color: var(--text-primary); }
.product-desc { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.6; }
.product-footer { display: flex; align-items: center; justify-content: space-between; }
.product-price { font-size: 1.1rem; font-weight: 500; color: var(--gold); }
.product-price-old { font-size: 0.8rem; color: var(--text-dim); text-decoration: line-through; margin-left: 6px; }
.add-to-cart-btn {
  background: none; border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text-muted); font-size: 0.75rem; padding: 6px 14px;
  cursor: pointer; transition: all 0.2s; letter-spacing: 0.06em;
}
.add-to-cart-btn:hover { border-color: var(--gold); color: var(--gold); }

/* === LOADING STATE === */
.loading-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.skeleton { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; animation: pulse 1.8s infinite; }
.skeleton-img { aspect-ratio: 1; background: var(--bg-hover); }
.skeleton-text { padding: 20px; }
.skeleton-line { height: 14px; background: var(--bg-hover); border-radius: 4px; margin-bottom: 10px; }
.skeleton-line.short { width: 60%; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* === MANIFESTO / ABOUT === */
.manifesto { background: var(--bg-dark); border-top: 0.5px solid var(--border); border-bottom: 0.5px solid var(--border); }
.manifesto-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.manifesto-text h2 { margin-bottom: 24px; }
.manifesto-text p { margin-bottom: 20px; }
.manifesto-quote {
  border-left: 2px solid var(--gold); padding-left: 24px; margin: 32px 0;
  font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-style: italic;
  color: var(--text-primary); line-height: 1.6;
}
.manifesto-visual {
  display: flex; align-items: center; justify-content: center;
}
.chipibo-mandala {
  width: 320px; height: 320px; opacity: 0.7;
}

/* === VALUES === */
.values-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.value-card {
  background: var(--bg-card); border: 0.5px solid var(--border);
  border-radius: var(--radius-lg); padding: 32px; text-align: center;
  transition: border-color 0.2s;
}
.value-card:hover { border-color: var(--border-glow); }
.value-icon { font-size: 2rem; margin-bottom: 16px; }
.value-card h3 { font-size: 1.15rem; margin-bottom: 12px; }

/* === NEWSLETTER === */
.newsletter { text-align: center; }
.newsletter-form { display: flex; gap: 12px; max-width: 440px; margin: 32px auto 0; }
.newsletter-form input {
  flex: 1; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 20px; color: var(--text-primary);
  font-size: 0.9rem; outline: none; transition: border-color 0.2s;
}
.newsletter-form input:focus { border-color: var(--gold); }
.newsletter-form input::placeholder { color: var(--text-dim); }

/* === FOOTER === */
footer {
  border-top: 0.5px solid var(--border); padding: 48px 0 32px;
  background: var(--bg-dark);
}
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
.footer-brand p { margin-top: 12px; font-size: 0.85rem; max-width: 260px; }
.footer-col h4 { font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: var(--text-muted); text-decoration: none; font-size: 0.85rem; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--text-primary); }
.footer-bottom { border-top: 0.5px solid var(--border); padding-top: 24px; display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { font-size: 0.78rem; }
.payment-icons { display: flex; gap: 8px; }
.pay-icon { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: 4px; padding: 4px 10px; font-size: 0.72rem; color: var(--text-muted); font-family: 'Space Mono', monospace; }

/* === CART DRAWER === */
.cart-overlay {
  position: fixed; inset: 0; background: rgba(8,8,16,0.7);
  z-index: 200; opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.cart-overlay.open { opacity: 1; pointer-events: all; }
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 420px; max-width: 100vw;
  background: var(--bg-card); border-left: 0.5px solid var(--border);
  z-index: 201; transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  display: flex; flex-direction: column;
}
.cart-drawer.open { transform: translateX(0); }
.cart-header { padding: 24px; border-bottom: 0.5px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.cart-header h3 { font-size: 1.2rem; }
.cart-close { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 1.4rem; padding: 4px; }
.cart-close:hover { color: var(--text-primary); }
.cart-items { flex: 1; overflow-y: auto; padding: 24px; }
.cart-item { display: flex; gap: 16px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 0.5px solid var(--border); }
.cart-item-img { width: 72px; height: 72px; border-radius: var(--radius); object-fit: cover; background: var(--bg-hover); flex-shrink: 0; }
.cart-item-info { flex: 1; }
.cart-item-name { font-family: 'Cormorant Garamond', serif; font-size: 1rem; margin-bottom: 4px; }
.cart-item-variant { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 8px; }
.cart-item-price { color: var(--gold); font-size: 0.9rem; font-weight: 500; }
.cart-item-qty { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.qty-btn { background: var(--bg-hover); border: 0.5px solid var(--border); border-radius: 4px; width: 26px; height: 26px; color: var(--text-primary); cursor: pointer; font-size: 0.9rem; }
.qty-val { font-size: 0.85rem; min-width: 20px; text-align: center; }
.cart-empty { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.cart-footer { padding: 24px; border-top: 0.5px solid var(--border); }
.cart-total { display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 1rem; }
.cart-total span:last-child { color: var(--gold); font-weight: 500; }
.cart-note { font-size: 0.75rem; color: var(--text-dim); text-align: center; margin-top: 12px; }

/* === TOAST === */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(80px);
  background: var(--bg-card); border: 0.5px solid var(--border-glow);
  border-radius: var(--radius); padding: 14px 24px; z-index: 300;
  font-size: 0.85rem; color: var(--text-primary); transition: transform 0.3s;
  display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); flex-shrink: 0; }

/* === PRODUCT DETAIL === */
.product-detail { padding-top: 120px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.detail-images .main-img { width: 100%; border-radius: var(--radius-lg); border: 0.5px solid var(--border); }
.detail-thumbs { display: flex; gap: 8px; margin-top: 12px; }
.detail-thumbs img { width: 72px; height: 72px; border-radius: var(--radius); border: 0.5px solid var(--border); cursor: pointer; object-fit: cover; }
.detail-thumbs img.active { border-color: var(--gold); }
.detail-info .price { font-size: 1.8rem; color: var(--gold); font-family: 'Cormorant Garamond', serif; margin: 16px 0; }
.detail-info .desc { margin-bottom: 32px; }
.variant-label { font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 12px; }
.size-grid { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.size-btn {
  background: var(--bg-card); border: 0.5px solid var(--border);
  border-radius: var(--radius); padding: 8px 18px; color: var(--text-muted);
  cursor: pointer; font-size: 0.85rem; transition: all 0.2s;
}
.size-btn:hover, .size-btn.active { border-color: var(--gold); color: var(--gold); }
.color-grid { display: flex; gap: 8px; margin-bottom: 32px; }
.color-swatch { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s; }
.color-swatch.active { border-color: var(--gold); }

/* === CHECKOUT === */
.checkout-section { padding-top: 120px; }
.checkout-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 48px; align-items: start; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.form-group input, .form-group select {
  width: 100%; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 12px 16px; color: var(--text-primary);
  font-size: 0.9rem; outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--gold); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.order-summary { background: var(--bg-card); border: 0.5px solid var(--border); border-radius: var(--radius-lg); padding: 32px; position: sticky; top: 100px; }
.order-summary h3 { margin-bottom: 24px; }
.summary-item { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 0.5px solid var(--border); font-size: 0.9rem; }
.summary-total { display: flex; justify-content: space-between; padding-top: 16px; font-size: 1.05rem; }
.summary-total span:last-child { color: var(--gold); font-weight: 500; }
#stripe-element { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px; }

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .manifesto-inner { grid-template-columns: 1fr; gap: 40px; }
  .values-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .newsletter-form { flex-direction: column; }
}
