/* Avalanche Store — dark sofisticado, dourado + ciano, cor sólida sempre */
:root {
  --bg0: #0b0b10;
  --bg1: #12121a;
  --bg2: #181822;
  --surface: #1e1e2b;
  --text: #f2f2ea;
  --mute: #a3a39a;
  --faint: #6f6f68;
  --gold: #e3b341;
  --gold-deep: #b98a22;
  --cyan: #4fd8e8;
  --line: rgba(242, 242, 234, .12);
  --line-soft: rgba(242, 242, 234, .07);
  --font-display: "Cormorant Garamond", Georgia, serif;
  --font-body: "DM Sans", -apple-system, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg0);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

button {
  font-family: var(--font-body);
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}

.container { max-width: 1240px; margin: 0 auto; padding: 0 20px; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(11, 11, 16, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 20px;
  max-width: 1240px;
  margin: 0 auto;
}

.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: .02em;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand em { color: var(--gold); font-style: normal; }

.main-nav {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar { display: none; }

.nav-link {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  white-space: nowrap;
  transition: color .25s var(--ease-out), background .25s var(--ease-out);
}

.nav-link:hover { color: var(--gold); background: var(--surface); }

.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  transition: border-color .25s var(--ease-out), color .25s var(--ease-out);
  white-space: nowrap;
}

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

.cart-badge {
  background: var(--gold);
  color: var(--bg0);
  font-weight: 700;
  font-size: .68rem;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.cart-badge[hidden] { display: none; }

/* ---------- hero ---------- */
.hero {
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line-soft);
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
  align-items: center;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 18px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -.01em;
  margin-bottom: 20px;
}

.hero h1 em { color: var(--gold); font-style: italic; }

.hero p {
  color: var(--mute);
  font-size: 1.05rem;
  max-width: 46ch;
  margin-bottom: 32px;
}

.hero-cta {
  display: inline-block;
  background: var(--gold);
  color: var(--bg0);
  font-weight: 700;
  font-size: .92rem;
  text-decoration: none;
  padding: 14px 30px;
  border-radius: 999px;
  transition: background .25s var(--ease-out), transform .25s var(--ease-out);
}

.hero-cta:hover { background: var(--gold-deep); transform: translateY(-2px); }

.hero-figure {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  background: var(--bg2);
}

.hero-figure img { width: 100%; height: auto; }

.hero-figure figcaption {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 12px 16px;
  border-top: 1px solid var(--line-soft);
}

/* ---------- seções de categoria ---------- */
.category-section { padding: 72px 0 24px; scroll-margin-top: 80px; }

.category-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
}

.category-head h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 700;
}

.category-price {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--cyan);
  text-transform: uppercase;
  white-space: nowrap;
}

/* ---------- grid de produtos ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.product-card {
  background: var(--bg1);
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color .3s var(--ease-out), transform .3s var(--ease-out);
}

.product-card:hover { border-color: var(--gold); transform: translateY(-4px); }

.card-media { position: relative; background: var(--bg2); }

.card-media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }

.var-picker {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: flex;
  gap: 6px;
}

.var-picker button {
  font-family: var(--font-mono);
  font-size: .62rem;
  letter-spacing: .06em;
  color: var(--mute);
  background: rgba(11, 11, 16, .85);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  transition: color .2s var(--ease-out), border-color .2s var(--ease-out);
}

.var-picker button:hover { color: var(--text); }

.var-picker button.is-active { color: var(--bg0); background: var(--cyan); border-color: var(--cyan); font-weight: 700; }

.card-body { padding: 18px 20px 20px; }

.card-body h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.card-price {
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--gold);
  margin-bottom: 14px;
}

.add-btn {
  width: 100%;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-weight: 700;
  font-size: .85rem;
  padding: 11px 0;
  border-radius: 999px;
  transition: background .25s var(--ease-out), color .25s var(--ease-out);
}

.add-btn:hover { background: var(--gold); color: var(--bg0); }

/* ---------- modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(11, 11, 16, .88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal[hidden] { display: none; }

.modal-box {
  background: var(--bg1);
  border: 1px solid var(--line);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
}

.modal-media { padding: 20px; }

.modal-media > img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  margin-bottom: 12px;
}

.modal-thumbs { display: flex; gap: 10px; }

.modal-thumb {
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  width: 76px;
  padding: 0;
  opacity: .55;
  transition: opacity .2s var(--ease-out), border-color .2s var(--ease-out);
}

.modal-thumb img { width: 100%; height: auto; }

.modal-thumb.is-active { opacity: 1; border-color: var(--gold); }

.modal-info { padding: 32px 28px; display: flex; flex-direction: column; }

.modal-close {
  align-self: flex-end;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--mute);
  transition: color .2s var(--ease-out);
}

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

.modal-info h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.modal-info .modal-desc { color: var(--mute); font-size: .95rem; margin-bottom: 20px; }

.modal-info .modal-price {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 24px;
}

.modal-var-label {
  font-family: var(--font-mono);
  font-size: .68rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 8px;
}

.modal-add {
  margin-top: auto;
  background: var(--gold);
  color: var(--bg0);
  font-weight: 700;
  font-size: .95rem;
  padding: 14px 0;
  border-radius: 999px;
  transition: background .25s var(--ease-out);
}

.modal-add:hover { background: var(--gold-deep); }

/* ---------- carrinho drawer ---------- */
.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(11, 11, 16, .7);
  display: flex;
  justify-content: flex-end;
}

.cart-drawer[hidden] { display: none; }

.cart-panel {
  background: var(--bg1);
  border-left: 1px solid var(--line);
  width: min(420px, 100%);
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 24px;
}

.cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.cart-head h2 { font-family: var(--font-display); font-size: 1.6rem; }

.cart-close { font-size: 1.6rem; color: var(--mute); }

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

.cart-items { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }

.cart-empty { color: var(--faint); font-size: .9rem; padding: 24px 0; }

.cart-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 12px 14px;
}

.cart-item-info { display: flex; flex-direction: column; gap: 2px; }

.cart-item-info strong { font-size: .92rem; }

.cart-item-info span { font-family: var(--font-mono); font-size: .72rem; color: var(--mute); }

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

.cart-item-controls button {
  border: 1px solid var(--line);
  border-radius: 8px;
  width: 28px;
  height: 28px;
  color: var(--text);
  font-size: .95rem;
  transition: border-color .2s var(--ease-out);
}

.cart-item-controls button:hover { border-color: var(--gold); color: var(--gold); }

.cart-item-controls .cart-item-remove {
  width: auto;
  padding: 0 8px;
  font-family: var(--font-mono);
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--faint);
}

.cart-item-controls .cart-item-remove:hover { color: #ff5a5a; border-color: #ff5a5a; }

.cart-foot { border-top: 1px solid var(--line); padding-top: 18px; margin-top: 16px; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

.cart-total-row span { font-family: var(--font-mono); font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }

.cart-total-row strong { font-family: var(--font-mono); font-size: 1.3rem; color: var(--gold); }

.checkout-btn {
  width: 100%;
  background: var(--gold);
  color: var(--bg0);
  font-weight: 700;
  font-size: .95rem;
  padding: 15px 0;
  border-radius: 999px;
  transition: background .25s var(--ease-out);
}

.checkout-btn:hover { background: var(--gold-deep); }

.checkout-btn:disabled { background: var(--surface); color: var(--faint); cursor: not-allowed; }

.checkout-note {
  font-family: var(--font-mono);
  font-size: .65rem;
  color: var(--faint);
  text-align: center;
  margin-top: 10px;
  letter-spacing: .04em;
}

/* ---------- rodapé ---------- */
.site-footer {
  margin-top: 80px;
  border-top: 1px solid var(--line);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-brand { font-family: var(--font-display); font-size: 1.2rem; font-weight: 700; }

.footer-brand em { color: var(--gold); font-style: normal; }

.footer-inner a {
  color: var(--cyan);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: .8rem;
  letter-spacing: .06em;
}

.footer-inner a:hover { color: var(--gold); }

.footer-note { font-family: var(--font-mono); font-size: .65rem; color: var(--faint); letter-spacing: .06em; }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 36px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .modal-box { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .header-inner { flex-wrap: wrap; }
  .main-nav { order: 3; width: 100%; }
  .hero { padding: 48px 0 40px; }
  .product-grid { grid-template-columns: 1fr; }
  .category-section { padding: 48px 0 16px; }
  .cart-panel { width: 100%; }
}
