:root {
  --navy: #070716;
  --midnight: #120822;
  --purple: #2a1548;
  --plum: #3d1f6e;
  --lavender: #cbb6ef;
  --mist: #e4d7ff;
  --icy: #9fd4ea;
  --ice: #d7f0fa;
  --white: #f7f4ff;
  --silver: #c5cde6;
  --moon: #f3ecff;
  --glow: #8ec9ff;
  --orchid: #b48cff;
  --rose: #e8b4d4;
  --glass: rgba(18, 10, 38, 0.55);
  --glass-border: rgba(210, 190, 255, 0.28);
  --shadow: 0 24px 60px rgba(4, 2, 18, 0.45);
  --radius: 22px;
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "Outfit", system-ui, sans-serif;
  --font-script: "Great Vibes", cursive;
  --nav-h: 84px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--white);
  background: var(--navy);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #b48cff, #9fd4ea);
  border-radius: 99px;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul {
  list-style: none;
}

::selection {
  background: rgba(159, 212, 234, 0.35);
  color: #fff;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  background: var(--orchid);
  color: #0b0718;
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 10000;
}

.skip-link:focus {
  top: 12px;
}

/* Atmosphere */
.sky {
  position: fixed;
  inset: 0;
  z-index: -3;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(88, 40, 150, 0.45), transparent 55%),
    radial-gradient(900px 600px at 10% 20%, rgba(40, 70, 160, 0.28), transparent 50%),
    radial-gradient(800px 500px at 50% 110%, rgba(90, 30, 110, 0.35), transparent 50%),
    linear-gradient(180deg, #080714 0%, #140a28 42%, #0c1028 100%);
}

.aurora {
  position: fixed;
  inset: -10% 0 auto;
  height: 55vh;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(126, 200, 255, 0.18), transparent 55%),
    radial-gradient(ellipse at 70% 20%, rgba(180, 120, 255, 0.22), transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(232, 180, 212, 0.12), transparent 50%);
  filter: blur(18px);
  animation: auroraDrift 18s ease-in-out infinite alternate;
}

@keyframes auroraDrift {
  from { transform: translateX(-4%) scale(1); opacity: 0.75; }
  to { transform: translateX(5%) scale(1.08); opacity: 1; }
}

#starfield,
#snowfall {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
}

#snowfall {
  z-index: 1;
}

#site-header {
  position: relative;
  z-index: 50;
}

main {
  position: relative;
  z-index: 3;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.55'/%3E%3C/svg%3E");
}

.moon {
  position: fixed;
  top: 90px;
  right: 7vw;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, #fff 0%, #efe7ff 28%, #d5c4f8 62%, #9aa7d8 100%);
  box-shadow:
    0 0 40px rgba(243, 236, 255, 0.55),
    0 0 120px rgba(180, 140, 255, 0.28),
    inset -18px -10px 30px rgba(70, 50, 120, 0.18);
  z-index: -1;
  pointer-events: none;
  animation: moonPulse 8s ease-in-out infinite;
}

.moon::after {
  content: "";
  position: absolute;
  inset: 18% 22% auto auto;
  width: 22px;
  height: 18px;
  border-radius: 50%;
  background: rgba(170, 160, 210, 0.28);
}

@keyframes moonPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}

/* Layout helpers */
.wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.wrap-wide {
  width: min(1280px, calc(100% - 36px));
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 90px 0;
}

.kicker {
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--icy);
  margin-bottom: 12px;
}

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.12;
}

.script {
  font-family: var(--font-script);
  font-weight: 400;
}

/* Navbar */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav-glass {
  width: min(1280px, calc(100% - 24px));
  margin: 12px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 16px 10px 18px;
  border-radius: 999px;
  background:
    linear-gradient(120deg, rgba(70, 30, 120, 0.35), rgba(20, 30, 80, 0.28) 45%, rgba(80, 40, 130, 0.32)),
    rgba(10, 8, 28, 0.42);
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(18px) saturate(140%);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.logo-mark {
  width: 38px;
  height: 38px;
}

.logo-word {
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.logo-word span {
  color: var(--icy);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-links a {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 10px;
  border-radius: 999px;
  color: var(--silver);
  transition: color 0.25s, background 0.25s, box-shadow 0.25s;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(180, 140, 255, 0.18);
  box-shadow: 0 0 18px rgba(142, 201, 255, 0.18);
}

.nav-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--mist);
  position: relative;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: 0 0 16px rgba(159, 212, 234, 0.25);
}

.icon-btn svg {
  width: 19px;
  height: 19px;
}

.badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--orchid), var(--icy));
  color: #12081c;
  font-size: 0.62rem;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.menu-toggle {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.86rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.btn-glow {
  background: linear-gradient(135deg, #c9b6ff, #8ec9ff);
  color: #12081c;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2), 0 10px 30px rgba(142, 201, 255, 0.28);
}

.btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 28px rgba(180, 140, 255, 0.55);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-border);
  color: var(--white);
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(180, 140, 255, 0.16);
  box-shadow: 0 0 22px rgba(159, 212, 234, 0.22);
}

.btn-tiny {
  padding: 9px 14px;
  font-size: 0.7rem;
}

/* Cards */
.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.03));
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

/* Page transition */
.page-veil {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at 50% 40%, #2a1548, #070716 70%);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s ease;
}

.page-veil.on {
  opacity: 1;
  pointer-events: all;
}

/* Footer */
.footer {
  margin-top: 40px;
  padding: 56px 0 28px;
  border-top: 1px solid rgba(200, 180, 255, 0.12);
  background: linear-gradient(180deg, transparent, rgba(18, 8, 40, 0.75));
  position: relative;
  z-index: 3;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
  gap: 36px;
}

.footer h3 {
  font-size: 1.15rem;
  margin-bottom: 14px;
}

.footer p,
.footer a {
  color: var(--silver);
  font-size: 0.92rem;
}

.footer a:hover {
  color: var(--icy);
}

.footer-brand p {
  max-width: 280px;
  margin-top: 10px;
}

.foot-links {
  display: grid;
  gap: 8px;
}

.newsletter {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.newsletter input {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 10px 14px;
  color: #fff;
  outline: none;
}

.newsletter input:focus {
  box-shadow: 0 0 0 2px rgba(159, 212, 234, 0.35);
}

.copy {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #9aa3c4;
  font-size: 0.82rem;
}

/* Search overlay */
.search-layer,
.drawer,
.toast-wrap {
  z-index: 80;
}

.search-layer {
  position: fixed;
  inset: 0;
  background: rgba(6, 5, 18, 0.72);
  backdrop-filter: blur(16px);
  display: none;
  place-items: start center;
  padding-top: 12vh;
}

.search-layer.open {
  display: grid;
}

.search-box {
  width: min(640px, calc(100% - 32px));
  border-radius: 24px;
  padding: 22px;
}

.search-box input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--glass-border);
  color: #fff;
  font-size: 1.4rem;
  font-family: var(--font-display);
  padding: 8px 4px 14px;
  outline: none;
}

.search-results {
  margin-top: 16px;
  display: grid;
  gap: 10px;
  max-height: 50vh;
  overflow: auto;
}

.search-item {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.search-item img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 10px;
}

/* Cart drawer */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(400px, 100%);
  background: linear-gradient(180deg, #16102c, #0c0818);
  border-left: 1px solid var(--glass-border);
  transform: translateX(105%);
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.cart-items {
  flex: 1;
  overflow: auto;
  display: grid;
  gap: 12px;
  align-content: start;
}

.cart-row {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 10px;
  padding: 10px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.cart-row img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 12px;
}

.qty {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 0.85rem;
}

.qty button {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}

.cart-foot {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 14px;
  display: grid;
  gap: 10px;
}

.muted {
  color: var(--silver);
}

.price {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ice);
}

.stars {
  color: #f0d48a;
  letter-spacing: 1px;
  font-size: 0.82rem;
}

.toast-wrap {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  gap: 8px;
}

.toast {
  background: rgba(20, 12, 40, 0.9);
  border: 1px solid var(--glass-border);
  padding: 10px 16px;
  border-radius: 999px;
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.35s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* Product shared */
.product-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.wish {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  transition: 0.2s;
}

.wish.on,
.wish:hover {
  background: rgba(232, 180, 212, 0.2);
  color: #ffc3dc;
  box-shadow: 0 0 16px rgba(232, 180, 212, 0.3);
}

.empty-state {
  text-align: center;
  padding: 40px 16px;
  color: var(--silver);
}

/* Mobile */
@media (max-width: 1080px) {
  .nav-links {
    display: none;
  }

  .menu-toggle {
    display: grid;
  }

  .nav-links.open {
    display: flex;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 16px;
    border-radius: 24px;
    background: rgba(12, 8, 28, 0.94);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow);
  }

  .nav-glass {
    position: relative;
    border-radius: 28px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .moon {
    width: 90px;
    height: 90px;
    right: 16px;
    opacity: 0.7;
  }
}

@media (max-width: 640px) {
  :root { --nav-h: 76px; }

  .footer-grid,
  .copy {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .section {
    padding: 64px 0;
  }

  .btn {
    width: 100%;
  }
}
