@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #18151f;
  --surface: #221d2b;
  --border: #362f42;
  --ink: #efe9f7;
  --ink-soft: #a89bc0;
  --purple: #b48eff;
  --purple-dark: #6b46c1;
  --purple-soft: #2c2438;
  --on-purple: #18151f;
  --white: #ffffff;
}

* { box-sizing: border-box; }

.install-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--purple);
  color: var(--on-purple);
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.install-banner strong {
  font-weight: 700;
}

.install-banner button {
  cursor: pointer;
  border-radius: 4px;
  padding: 0.3rem 0.9rem;
  font-size: 0.85rem;
}

#install-banner-btn {
  background: var(--on-purple);
  color: var(--purple);
  border: none;
}

#install-banner-close {
  background: transparent;
  color: var(--on-purple);
  border: none;
  font-size: 1.1rem;
  line-height: 1;
  padding: 0 0.3rem;
}

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.6;
}

h1, h2, h3, .wordmark {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  margin: 0;
  color: var(--purple-dark);
}

a { color: inherit; }
.hidden { display: none !important; }

/* ---------- Research banner ---------- */

.research-banner {
  background: var(--purple-dark);
  color: #fff;
  text-align: center;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* ---------- Nav ---------- */

#site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(24, 21, 31, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wordmark-lockup { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.crest-icon { width: 30px; height: 30px; color: var(--purple); flex-shrink: 0; }
.wordmark { font-size: 1.4rem; letter-spacing: 0.02em; }

.nav-links { display: flex; align-items: center; gap: 1.75rem; }
.nav-links a { text-decoration: none; font-size: 0.9rem; color: var(--ink-soft); }
.nav-links a:hover { color: var(--purple); }
.nav-cta { border: 1px solid var(--purple); padding: 0.5rem 1.1rem; border-radius: 6px; color: var(--purple) !important; }
.nav-cta:hover { background: var(--purple); color: var(--on-purple) !important; }

/* ---------- Hero ---------- */

.hero { max-width: 900px; margin: 0 auto; padding: 5rem 1.5rem 3.5rem; text-align: center; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: 0.2em; font-size: 0.75rem; color: var(--purple); margin-bottom: 1.2rem; display: block; }
.hero h1 { font-size: 2.9rem; line-height: 1.2; margin-bottom: 1.2rem; }
.hero p.lede { color: var(--ink-soft); font-size: 1.1rem; max-width: 60ch; margin: 0 auto 2rem; }

.btn {
  display: inline-block; padding: 0.8rem 1.8rem; border-radius: 6px; font-weight: 600; font-size: 0.95rem;
  text-decoration: none; border: none; cursor: pointer; font-family: 'Inter', sans-serif;
}
.btn-primary { background: var(--purple); color: var(--on-purple); }
.btn-primary:hover { background: var(--purple-dark); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--ink); }
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }
.btn-disabled { background: var(--purple-soft); color: var(--ink-soft); cursor: not-allowed; border: 1px dashed var(--border); }

/* ---------- Sections ---------- */

section { max-width: 1100px; margin: 0 auto; padding: 3.5rem 1.5rem; }
section.tight { padding-top: 0; }
.section-heading { text-align: center; margin-bottom: 2.5rem; }
.section-heading .eyebrow { text-transform: uppercase; letter-spacing: 0.15em; font-size: 0.75rem; color: var(--purple); display: block; margin-bottom: 0.6rem; }
.section-heading h2 { font-size: 1.9rem; }
.section-heading p { color: var(--ink-soft); margin-top: 0.8rem; }

/* ---------- Category filter ---------- */

.category-filter { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 2.5rem; }
.category-pill {
  background: transparent; border: 1px solid var(--border); color: var(--ink-soft); font-family: 'Inter', sans-serif;
  font-size: 0.85rem; padding: 0.45rem 1rem; border-radius: 20px; cursor: pointer;
}
.category-pill:hover { border-color: var(--purple); color: var(--purple); }
.category-pill.active { background: var(--purple); border-color: var(--purple); color: var(--on-purple); }

/* ---------- Product grid ---------- */

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

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 1.5rem;
  display: flex; flex-direction: column; text-align: center;
}
.card-image { width: 80px; height: 120px; margin: 0 auto 1rem; position: relative; }
.card-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.card-image svg { width: 100%; height: 100%; object-fit: contain; }
.card-category { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.7rem; color: var(--purple); margin: 0 0 0.3rem; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.2rem; }
.card .unit { color: var(--ink-soft); font-size: 0.85rem; margin: 0 0 0.6rem; }
.card .description { color: var(--ink-soft); font-size: 0.88rem; flex-grow: 1; margin-bottom: 1rem; }
.card .price { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--purple-dark); margin-bottom: 1rem; }

.actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* ---------- Sale ---------- */

.sale-sticker {
  position: absolute; top: -6px; left: -10px; background: #b8453a; color: #fdf3ec;
  font-family: 'Playfair Display', serif; font-style: italic; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.15rem 0.6rem; border-radius: 2px; transform: rotate(-8deg);
  box-shadow: 0 2px 6px rgba(0,0,0,0.4); z-index: 1;
}
.price-block { display: flex; align-items: baseline; justify-content: center; gap: 0.6rem; margin: 0 0 0.3rem; }
.price-original { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--ink-soft); text-decoration: line-through; }
.price-sale { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: #d4685a; font-weight: 600; }
.sale-countdown { font-size: 0.75rem; color: #d4685a; text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 1rem; }
.detail-info .price-block { justify-content: flex-start; }
.detail-info .price-sale { font-size: 1.5rem; }

/* ---------- Product detail ---------- */

.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; padding-top: 2rem; }
.detail-image { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; padding: 2rem; position: relative; }
.detail-image img, .detail-image svg { max-width: 100%; border-radius: 8px; }
.detail-info .category { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.78rem; color: var(--purple); display: block; margin-bottom: 0.6rem; }
.detail-info h1 { font-size: 2rem; margin-bottom: 0.3rem; }
.detail-info .unit { color: var(--ink-soft); margin-bottom: 1rem; }
.detail-info .price { font-size: 1.5rem; color: var(--purple-dark); margin-bottom: 1.2rem; }
.detail-info .description { color: var(--ink-soft); margin-bottom: 1.75rem; }
.detail-back { margin-top: 1.5rem; font-size: 0.9rem; }
.detail-back a { text-decoration: none; color: var(--ink-soft); }
.detail-back a:hover { color: var(--purple); }

/* ---------- Prose ---------- */

.prose { max-width: 65ch; margin: 0 auto; color: var(--ink-soft); }
.prose p { margin: 0 0 1.2rem; }

/* ---------- Forms ---------- */

.form-section { max-width: 520px; margin: 0 auto; }
.site-form { display: flex; flex-direction: column; gap: 1rem; }
.site-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.9rem; color: var(--ink-soft); }
.site-form input, .site-form textarea, .site-form select {
  font-family: 'Inter', sans-serif; font-size: 1rem; padding: 0.65rem 0.8rem; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink); border-radius: 6px;
}
.site-form input:focus, .site-form textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 0 0 3px rgba(75,44,143,0.12); }
.error { color: #e2685a; font-size: 0.9rem; margin: 0; min-height: 1.2em; }
.hint { color: #4ade80; font-size: 0.9rem; margin: 0; min-height: 1.2em; }

/* ---------- Footer ---------- */

#site-footer { border-top: 1px solid var(--border); margin-top: 3rem; background: var(--purple-soft); }
.footer-inner { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem; text-align: center; color: var(--ink-soft); font-size: 0.88rem; }
.footer-inner .wordmark { display: block; margin-bottom: 0.6rem; font-size: 1.15rem; }
.footer-links { display: flex; justify-content: center; gap: 1.5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-links a { text-decoration: none; color: var(--ink-soft); font-size: 0.85rem; }
.footer-links a:hover { color: var(--purple); }
.footer-disclaimer { max-width: 640px; margin: 0 auto; font-size: 0.78rem; color: var(--ink-soft); opacity: 0.85; }

/* ---------- Nav: sale link, cart link, badge ---------- */

.nav-sale-link { color: #d4685a !important; }
.nav-sale-link:hover { color: #e07a63 !important; }

.currency-switcher {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink-soft);
  font-size: 0.85rem;
  padding: 0.3rem 0.5rem;
  border-radius: 3px;
  cursor: pointer;
}

.currency-switcher:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.currency-switcher option {
  background: var(--surface);
  color: var(--ink);
}

.cart-link { text-decoration: none; font-size: 0.9rem; color: var(--ink-soft); display: flex; align-items: center; gap: 0.4rem; }
.cart-link:hover { color: var(--purple); }

.badge {
  background: var(--purple); color: var(--on-purple, #fff); font-size: 0.7rem; padding: 0.1rem 0.4rem;
  border-radius: 10px; min-width: 1.2em; text-align: center; display: inline-block;
}

/* ---------- Cart page ---------- */

.cart-list { max-width: 800px; margin: 0 auto; display: flex; flex-direction: column; gap: 1rem; }
.cart-row {
  display: grid; grid-template-columns: 50px 1fr auto auto auto; align-items: center; gap: 1rem;
  padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
}
.cart-row-image { width: 50px; height: 75px; }
.cart-row-image img, .cart-row-image svg { width: 100%; height: 100%; object-fit: contain; }
.cart-row-info a { text-decoration: none; color: var(--ink); font-family: 'Playfair Display', serif; font-size: 1.05rem; }
.cart-row-info a:hover { color: var(--purple); }
.cart-row-price { color: var(--ink-soft); font-size: 0.85rem; margin: 0.2rem 0 0; }
.cart-qty { width: 56px; padding: 0.4rem; background: var(--bg); border: 1px solid var(--border); color: var(--ink); text-align: center; border-radius: 4px; }
.cart-row-total { color: var(--purple); font-family: 'Playfair Display', serif; font-size: 1.05rem; min-width: 65px; text-align: right; }
.cart-remove { background: transparent; border: none; color: var(--ink-soft); font-size: 1.3rem; cursor: pointer; line-height: 1; }
.cart-remove:hover { color: #d4685a; }
.cart-checkout { max-width: 800px; margin: 2rem auto 0; padding-top: 1.5rem; border-top: 1px solid var(--border); }
.cart-subtotal-row { display: flex; justify-content: space-between; font-family: 'Playfair Display', serif; font-size: 1.25rem; color: var(--purple); margin-bottom: 1rem; }

@media (max-width: 640px) {
  .hero h1 { font-size: 2.1rem; }
  .nav-links { gap: 1rem; font-size: 0.85rem; }
  .detail { grid-template-columns: 1fr; }
  .cart-row { grid-template-columns: 40px 1fr auto; row-gap: 0.5rem; }
  .cart-row-total { grid-column: 1 / -1; text-align: left; }
}
