:root {
  --bg-deep: #01121c;
  --ink: #eaf9ff;
  --ink-soft: rgba(234, 249, 255, .8);
  --ink-mute: rgba(180, 225, 240, .55);
  --cyan: #4fd2f2;
  --cyan-light: #7fe4ff;
  --cyan-pale: #9beaff;

  --glass-bg: linear-gradient(180deg, rgba(2, 17, 26, .88), rgba(2, 17, 26, .5));
  --glass-border: rgba(79, 210, 242, .18);

  --card-bg: rgba(255, 255, 255, .94);
  --card-bg-soft: rgba(255, 255, 255, .82);
  --card-border: rgba(255, 255, 255, .7);
  --card-shadow: 0 22px 46px -24px rgba(1, 15, 24, .55), 0 0 0 1px rgba(255, 255, 255, .4);
  --card-shadow-hover: 0 28px 54px -22px rgba(1, 15, 24, .6), 0 0 0 1px rgba(255, 255, 255, .55);

  --text: #0b2b3a;
  --text-soft: #3d5c69;
  --text-mute: #7c94a0;

  --accent: #0891b2;
  --accent-strong: #066a86;
  --cta-grad: linear-gradient(180deg, #41c6ea, #1584ac);
  --whats-grad: linear-gradient(180deg, #3ddc84, #1c9e57);
  --warn: #a6650a;
  --danger: #c9414f;

  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --serif: Cinzel, serif;
  --sans: Manrope, system-ui, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-deep);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--cyan-light); }
button { font-family: inherit; color: inherit; }
input, select { font-family: inherit; color: var(--text); }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible {
  outline: 2px solid rgba(79, 210, 242, .7);
  outline-offset: 2px;
}
input[type=range] { accent-color: var(--accent); }
::selection { background: rgba(79, 210, 242, .3); }
img { max-width: 100%; display: block; }

@keyframes swPulse { 0% { box-shadow: 0 0 0 0 rgba(79,210,242,.5) } 100% { box-shadow: 0 0 0 22px rgba(79,210,242,0) } }
@keyframes swSpin { to { transform: rotate(360deg) } }
@keyframes swUp { from { transform: translateY(18px); opacity: 0 } to { transform: translateY(0); opacity: 1 } }
/* Dedicada ao toast (nao reaproveita swUp): o toast fica centralizado com left:50% + translateX(-50%),
   e uma animacao de transform substitui a propriedade inteira, nao so o eixo que anima - usar swUp
   ali apagava o translateX(-50%) e o toast saia do centro assim que a animacao terminava. */
@keyframes swToastUp { from { transform: translateX(-50%) translateY(18px); opacity: 0 } to { transform: translateX(-50%) translateY(0); opacity: 1 } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
  html { scroll-behavior: auto; }
}

/* Fundo animado (canvas com sequencia de frames) - absoluto dentro do .hero-sticky (que ja e
   sticky por conta propria), entao gruda na tela junto com o texto do hero durante os 320vh do
   #dive-zone e sai de cena sozinho, via scroll normal, assim que o usuario passa da marca de
   1000m. Dali em diante nao ha canvas, nao ha frame para carregar, so o degrade em #dive-fade
   entregando pro fundo solido do body (--bg-deep). */
#dive-canvas {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background: var(--bg-deep);
}
#dive-overlay {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* Vinheta fixa (contraste extra atras do logo/titulo, que fica centralizado ali) somada a uma
     cor solida por baixo, controlada via JS (js/dive-bg.js) conforme a profundidade do scroll. A
     cor fica em background-color (nao em opacity do elemento) justamente para nao multiplicar
     por cima do alfa da vinheta e acabar mais clara do que o pretendido. */
  background-image: radial-gradient(55% 48% at 50% 42%, rgba(1, 6, 10, .45) 0%, rgba(1, 6, 10, .2) 50%, transparent 78%);
  background-color: rgba(1, 18, 28, .25);
}

/* Transicao entre o fim do hero (1000m) e o catalogo: um degrade azul visivel (nao so variacoes de
   preto) que entrega para o fundo solido do body (--bg-deep), sem imagem nem JS envolvidos. */
#dive-fade {
  height: 30vh;
  background: linear-gradient(180deg, rgba(6, 106, 134, .55) 0%, rgba(3, 46, 62, .9) 55%, var(--bg-deep) 100%);
}

/* Header */
.sw-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--glass-border);
  opacity: 1;
  transition: opacity .35s ease, transform .35s ease;
}
/* Na view shop, o header so faz sentido depois que a animacao de mergulho termina
   e o catalogo aparece (classe aplicada por js/dive-bg.js). Na view carrinho fica sempre visivel. */
body.route-shop:not(.at-catalog) .sw-header {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
}
.sw-logo { display: flex; align-items: center; flex: 0 0 auto; }
.sw-logo img { height: 40px; width: auto; filter: saturate(1.1); }
.sw-search { flex: 1 1 auto; max-width: 520px; position: relative; }
.sw-search input {
  width: 100%;
  padding: 11px 14px 11px 38px;
  border-radius: 999px;
  border: 1px solid rgba(79, 210, 242, .22);
  background: rgba(4, 26, 38, .72);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: .01em;
}
.sw-search input::placeholder { color: rgba(199, 231, 244, .45); }
.sw-search-icon {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 12px; height: 12px;
  border: 1.6px solid rgba(140, 225, 255, .75);
  border-radius: 50%;
  pointer-events: none;
}
.sw-header-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 0;
  white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s, transform .2s, filter .2s;
}
.pill-outline {
  border: 1px solid rgba(79, 210, 242, .28);
  background: rgba(4, 26, 38, .5);
  color: var(--ink-soft);
}
.pill-outline:hover { border-color: rgba(79, 210, 242, .6); background: rgba(8, 40, 56, .7); color: var(--ink); }
.pill-outline-light {
  border: 1px solid rgba(79, 210, 242, .35);
  background: rgba(2, 20, 30, .3);
  color: var(--ink);
}
.pill-outline-light:hover { border-color: var(--cyan-light); background: rgba(10, 50, 68, .5); }
.pill-cart {
  border: 1px solid rgba(79, 210, 242, .5);
  background: linear-gradient(180deg, rgba(20, 86, 113, .85), rgba(8, 44, 62, .85));
  color: var(--ink);
}
.pill-cart:hover { border-color: var(--cyan-light); background: linear-gradient(180deg, rgba(28, 110, 142, .95), rgba(10, 56, 78, .95)); }
.pill-cta {
  background: var(--cta-grad);
  color: #02171f;
  font-weight: 700;
  padding: 14px 30px;
}
.pill-cta:hover { filter: brightness(1.06); color: #02171f; }

.badge {
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px;
  background: rgba(79, 210, 242, .9);
  color: #02171f;
  font-size: 11px; font-weight: 700;
  display: grid; place-items: center;
}
.badge-cyan { min-width: 20px; height: 20px; font-size: 11px; font-weight: 800; background: var(--cyan); }

/* Medidor de profundidade */
.depth-gauge {
  position: fixed;
  right: clamp(10px, 2vw, 26px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 40;
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
}
.depth-readout { text-align: right; }
#depth-value {
  font-family: var(--mono); font-size: 13px; font-weight: 600;
  color: #8ce6ff; letter-spacing: .04em;
}
#depth-zone {
  font-size: 9px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-mute); margin-top: 3px;
}
.depth-track {
  position: relative; width: 2px; height: 190px;
  background: linear-gradient(180deg, rgba(140, 230, 255, .35), rgba(140, 230, 255, .06));
}
#depth-marker {
  position: absolute; left: -4px; top: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(79, 210, 242, .9);
}

/* Hero / zona de mergulho */
#dive-zone { position: relative; height: 320vh; }
.hero-sticky {
  position: sticky; top: 0; height: 100svh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: 120px clamp(20px, 5vw, 40px) 80px;
  text-shadow: 0 4px 24px rgba(0, 8, 14, .55);
}
.hero-logo {
  width: min(300px, 62vw); height: auto;
  filter: saturate(1.15) drop-shadow(0 0 26px rgba(79, 210, 242, .5));
}
.hero-sticky h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(30px, 5.4vw, 62px);
  line-height: 1.08; letter-spacing: .02em;
  margin: 34px 0 0; color: var(--ink);
  text-wrap: balance;
}
.hero-sticky h1 em { font-style: normal; color: var(--cyan-light); }
.hero-sticky p {
  max-width: 52ch; margin: 20px auto 0;
  font-size: clamp(14px, 1.6vw, 17px); line-height: 1.7;
  color: rgba(255, 255, 255, .82);
  text-wrap: pretty;
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 34px; }
.scroll-cue {
  margin-top: 64px; display: flex; flex-direction: column; align-items: center; gap: 9px;
  color: rgba(255, 255, 255, .7);
}
.scroll-cue span:first-child { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; }
.scroll-cue-ring {
  width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .4);
  display: grid; place-items: center;
  animation: swPulse 2.6s ease-out infinite;
}
.chevron {
  display: block; width: 6px; height: 6px;
  border-right: 1.5px solid var(--cyan-light);
  border-bottom: 1.5px solid var(--cyan-light);
  transform: rotate(45deg) translate(-1px, -1px);
}

/* Catalogo */
.catalog { max-width: 2000px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 56px) 40px; position: relative; }
.catalog-bar {
  position: sticky; top: 66px; z-index: 30;
  padding: 14px 16px;
  margin: 0 -16px;
  border-radius: 18px;
  background: var(--card-bg-soft);
  backdrop-filter: blur(10px);
  box-shadow: var(--card-shadow);
}
.catalog-bar-top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.catalog-label {
  font-family: var(--serif); font-size: 15px; letter-spacing: .1em;
  color: var(--accent-strong); margin-right: 6px;
}
.catalog-label small { font-family: var(--sans); font-weight: 500; letter-spacing: 0; color: var(--text-mute); text-transform: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 15px; border-radius: 999px;
  border: 1px solid rgba(8, 100, 130, .18);
  background: rgba(255, 255, 255, .6);
  color: var(--text-soft);
  font-size: 12.5px; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { border-color: var(--accent); }
.chip.is-active { border-color: var(--accent); background: var(--accent); color: #fff; }
.chips-compact .chip { border-radius: 8px; padding: 7px 13px; font-size: 12px; }
.catalog-sort { margin-left: auto; }
.catalog-sort select {
  padding: 9px 12px; border-radius: 999px;
  border: 1px solid rgba(8, 100, 130, .2);
  background: #fff; font-size: 12.5px; cursor: pointer;
}

.chip-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 13px; border-radius: 999px;
  border: 1px solid rgba(8, 100, 130, .2);
  background: transparent;
  color: var(--text-soft);
  font-size: 12px; font-weight: 600;
  cursor: pointer;
}
.chip-toggle:hover { border-color: var(--accent); color: var(--text); }
.chip-toggle-icon { display: inline-block; transition: transform .25s ease; font-size: 10px; }
.chip-toggle[aria-expanded="true"] .chip-toggle-icon { transform: rotate(180deg); }

.category-chips-wrap {
  overflow: hidden; max-height: 46px;
  transition: max-height .35s ease, margin-top .35s ease;
  margin-top: 12px;
}
.category-chips-wrap.is-expanded { max-height: 600px; }

.filters-panel {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 26px;
  padding: 24px; margin: 16px 0 24px;
  border-radius: 20px;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  animation: swUp .35s ease both;
}
.filter-label {
  font-size: 10px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--text-mute); margin-bottom: 12px; display: block;
}
.filter-label-spaced { margin: 18px 0 10px; }
.filter-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.range-label { font-size: 12.5px; font-weight: 600; color: var(--accent-strong); font-family: var(--mono); }
.filters-panel input[type=text], .filters-panel select {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(8, 100, 130, .2);
  background: #fff; font-size: 12.5px;
}
.filters-panel input[type=text] { font-family: var(--mono); text-transform: uppercase; }
.filters-panel input[type=text]::placeholder { color: var(--text-mute); }
#ncm-select { font-family: var(--mono); cursor: pointer; }
.filter-group-end { display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; }
.filter-count { font-size: 12.5px; color: var(--text-soft); line-height: 1.6; }
.filter-count strong { color: var(--text); font-size: 15px; }
.filter-group-end .pill-outline {
  border-color: rgba(8, 100, 130, .25); background: transparent; color: var(--text-soft);
}
.filter-group-end .pill-outline:hover { border-color: var(--accent); background: rgba(8, 145, 178, .08); color: var(--text); }

/* Grid de produtos */
.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 18px; margin-top: 8px;
}
.product-card {
  display: flex; flex-direction: column;
  border-radius: 18px; overflow: hidden;
  background: var(--card-bg);
  box-shadow: var(--card-shadow);
  transition: transform .3s cubic-bezier(.2,.7,.3,1), box-shadow .3s;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--card-shadow-hover); }
.product-media {
  position: relative; aspect-ratio: 4/3;
  display: grid; place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(8, 100, 130, .06) 0 7px, transparent 7px 14px),
    radial-gradient(70% 60% at 50% 30%, rgba(79, 210, 242, .12), transparent 70%),
    #eef8fb;
}
.product-media span.ph {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .16em;
  color: var(--text-mute); text-transform: uppercase;
}
.product-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.code-badge {
  position: absolute; top: 10px; left: 10px;
  padding: 4px 9px; border-radius: 6px;
  background: rgba(1, 12, 18, .72);
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  color: #8ce6ff;
}
.product-body { padding: 14px 15px 16px; display: flex; flex-direction: column; flex: 1; gap: 9px; }
.product-brand { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); }
.product-name { margin: 0; font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--text); text-wrap: pretty; }
.product-ncm { font-family: var(--mono); font-size: 10px; color: var(--text-mute); }
.product-price {
  margin-top: auto; padding-top: 6px;
  font-family: var(--serif); font-size: 20px; color: var(--accent); letter-spacing: .01em;
}
.btn-add {
  width: 100%; padding: 11px; border-radius: 999px;
  border: 1px solid rgba(8, 145, 178, .35);
  background: rgba(8, 145, 178, .08);
  color: var(--accent-strong);
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: background .2s, border-color .2s, color .2s;
}
.btn-add:hover { background: var(--cta-grad); border-color: var(--cyan-light); color: #02171f; }
.stepper {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 5px 6px; border-radius: 999px;
  border: 1px solid var(--accent);
  background: rgba(8, 145, 178, .1);
}
.stepper button {
  width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(8, 145, 178, .16);
  font-size: 16px; line-height: 1; cursor: pointer;
}
.stepper button:hover { background: rgba(8, 145, 178, .3); }
.stepper span { font-size: 13px; font-weight: 700; color: var(--text); }

/* Loading inicial do catalogo: ocupa a area onde os cards vao entrar enquanto a planilha (fetch
   ao vivo) ainda esta respondendo, pra nao dar a impressao de pagina vazia/quebrada pra quem rola
   rapido ate o fim antes dos produtos chegarem. Some assim que o catalogo real (ou a amostra local,
   em caso de falha) estiver pronto - ver js/app.js. */
.catalog-loading {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px;
  min-height: 50vh;
  padding: 60px 0;
}
.bubble-loader { position: relative; width: 64px; height: 90px; }
.bubble-loader span {
  position: absolute; bottom: 0; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, rgba(255, 255, 255, .9), rgba(79, 210, 242, .35) 60%, rgba(79, 210, 242, .12) 100%);
  border: 1px solid rgba(79, 210, 242, .5);
  opacity: 0;
  animation: swBubbleRise 2.6s ease-in infinite;
}
.bubble-loader span:nth-child(1) { left: 2px;  width: 10px; height: 10px; animation-delay: 0s; }
.bubble-loader span:nth-child(2) { left: 26px; width: 15px; height: 15px; animation-delay: .5s; }
.bubble-loader span:nth-child(3) { left: 48px; width: 8px;  height: 8px;  animation-delay: 1s; }
.bubble-loader span:nth-child(4) { left: 14px; width: 11px; height: 11px; animation-delay: 1.5s; }
.bubble-loader span:nth-child(5) { left: 38px; width: 9px;  height: 9px;  animation-delay: 2s; }
@keyframes swBubbleRise {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  15% { opacity: .9; }
  85% { opacity: .55; }
  100% { transform: translateY(-84px) scale(1.15); opacity: 0; }
}
.catalog-loading p {
  font-family: var(--mono); font-size: 10px; letter-spacing: .24em; text-transform: uppercase;
  color: rgba(255, 255, 255, .7);
}

/* Campo de quantidade (usado no card do catalogo e no modal): digitar direto ou usar as setas. */
.qty-field { display: flex; flex-direction: column; gap: 7px; }
.qty-field label {
  font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute);
}
.qty-control {
  display: flex; align-items: center;
  border: 1px solid rgba(8, 145, 178, .35);
  border-radius: 999px;
  background: rgba(8, 145, 178, .07);
  overflow: hidden;
}
.qty-btn {
  width: 36px; height: 38px; flex: 0 0 auto;
  border: 0; background: transparent;
  color: var(--accent-strong); font-size: 17px; line-height: 1;
  cursor: pointer; transition: background .18s;
}
.qty-btn:hover { background: rgba(8, 145, 178, .18); }
.qty-control input {
  width: 100%; min-width: 0; height: 38px;
  border: 0; background: transparent; text-align: center;
  font-size: 14px; font-weight: 700; color: var(--text);
  -moz-appearance: textfield;
}
.qty-control input::-webkit-outer-spin-button,
.qty-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-control input:focus { outline: 0; }
.qty-control:focus-within { border-color: var(--accent); background: rgba(8, 145, 178, .13); }

/* No card do catalogo o campo divide a linha com o botao Adicionar. */
.product-action .card-buy { display: flex; align-items: stretch; gap: 8px; }
.product-action .card-buy .qty-control { flex: 0 0 108px; }
.product-action .card-buy .btn-add { flex: 1 1 auto; width: auto; }

/* Modal de produto (clicar no card amplia a foto e permite escolher quantidade antes de adicionar). */
.product-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(1, 12, 20, .82); backdrop-filter: blur(6px); }
.modal-panel {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  width: min(1000px, 100%); max-height: min(88vh, 720px);
  border-radius: 22px; overflow: hidden;
  background: var(--card-bg);
  box-shadow: 0 40px 90px -30px rgba(0, 10, 18, .8), 0 0 0 1px rgba(255, 255, 255, .5);
  animation: swUp .28s cubic-bezier(.2,.7,.3,1);
}
.modal-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(1, 20, 30, .6); color: #eaf9ff;
  font-size: 22px; line-height: 1; cursor: pointer; transition: background .2s;
}
.modal-close:hover { background: rgba(1, 20, 30, .85); }
.modal-media {
  position: relative; display: grid; place-items: center; min-height: 260px;
  background:
    repeating-linear-gradient(135deg, rgba(8, 100, 130, .06) 0 7px, transparent 7px 14px),
    radial-gradient(70% 60% at 50% 30%, rgba(79, 210, 242, .14), transparent 70%),
    #eef8fb;
}
.modal-media img { width: 100%; height: 100%; max-height: min(88vh, 720px); object-fit: contain; }
.modal-ph {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  color: var(--text-mute); text-transform: uppercase;
}
.modal-info { padding: 44px 30px 30px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.modal-brand { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); }
.modal-name { margin: 0; font-size: 21px; line-height: 1.35; font-weight: 600; color: var(--text); text-wrap: pretty; }
.modal-desc { font-size: 13.5px; line-height: 1.6; color: var(--text-soft); }
.modal-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.modal-code, .modal-ncm {
  padding: 5px 10px; border-radius: 7px;
  background: rgba(8, 145, 178, .1);
  font-family: var(--mono); font-size: 10.5px; color: var(--accent-strong);
}
.modal-price { font-family: var(--serif); font-size: 30px; color: var(--accent); }
.modal-buy { display: flex; align-items: flex-end; gap: 12px; margin-top: auto; padding-top: 10px; }
.modal-buy .qty-field { flex: 0 0 132px; }
.btn-modal-add {
  flex: 1 1 auto; padding: 13px 18px; border-radius: 999px; border: 0;
  background: var(--cta-grad); color: #02171f;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: filter .2s;
}
.btn-modal-add:hover { filter: brightness(1.07); }
.modal-incart { font-size: 12.5px; color: var(--accent-strong); }
.product-card { cursor: pointer; }
.product-card .product-action { cursor: default; }
body.modal-open { overflow: hidden; }

@media (max-width: 780px) {
  .modal-panel { grid-template-columns: 1fr; max-height: 92vh; }
  .modal-media { min-height: 0; max-height: 42vh; }
  .modal-media img { max-height: 42vh; }
  .modal-info { padding: 20px 20px 24px; }
  .modal-buy { flex-direction: column; align-items: stretch; }
  .modal-buy .qty-field { flex: 0 0 auto; }
}

.sentinel { height: 1px; }
.loader {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  padding: 56px 0 20px;
}
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid rgba(79, 210, 242, .3);
  border-top-color: var(--cyan);
  animation: swSpin .9s linear infinite;
}
.loader span:last-child { font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: rgba(255,255,255,.7); }
.end-message {
  text-align: center; padding: 60px 0 24px;
  color: rgba(255,255,255,.65); font-size: 12px; letter-spacing: .2em; text-transform: uppercase;
}
.empty-state {
  text-align: center; padding: 60px 24px; margin: 16px 0;
  border-radius: 20px; background: var(--card-bg); box-shadow: var(--card-shadow);
}
.empty-title { font-family: var(--serif); font-size: 22px; color: var(--accent-strong); }
.empty-state p { color: var(--text-soft); font-size: 14px; margin: 12px 0 22px; }

/* Rodape */
.sw-footer {
  border-top: 1px solid var(--glass-border);
  margin-top: 40px;
  padding: 44px clamp(16px, 4vw, 44px);
  display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between;
  color: var(--ink-mute); font-size: 12.5px;
  background: linear-gradient(0deg, rgba(1, 9, 15, .55), transparent);
}
.sw-footer img { height: 44px; width: auto; opacity: .85; }
.sw-footer div { line-height: 1.8; }
.footer-right { text-align: right; }

/* Carrinho */
#view-cart { position: relative; max-width: 1500px; margin: 0 auto; padding: 110px clamp(16px, 4vw, 44px) 80px; animation: swUp .4s ease both; }
.cart-back {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid rgba(79, 210, 242, .3); background: rgba(4, 26, 38, .55);
  color: var(--ink); font-size: 12.5px; cursor: pointer; margin-bottom: 26px;
}
.cart-back:hover { border-color: var(--cyan-light); }
#view-cart h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 4vw, 42px); margin: 0 0 6px; color: var(--ink); }
.cart-sub { margin: 0 0 32px; color: rgba(255,255,255,.75); font-size: 14px; }
.cart-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 26px; align-items: start; }
.cart-items { display: flex; flex-direction: column; gap: 12px; }
.cart-line {
  display: grid; grid-template-columns: 78px minmax(0, 1fr) auto; gap: 16px; align-items: center;
  padding: 14px; border-radius: 16px;
  background: var(--card-bg); box-shadow: var(--card-shadow);
}
.cart-thumb {
  aspect-ratio: 1; border-radius: 11px; display: grid; place-items: center;
  background: repeating-linear-gradient(135deg, rgba(8,100,130,.07) 0 6px, transparent 6px 12px), #eef8fb;
  font-family: var(--mono); font-size: 9px; color: var(--text-mute); text-align: center; padding: 4px;
}
.cart-info { min-width: 0; }
.cart-brand { font-size: 9.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); }
.cart-name { font-size: 14px; font-weight: 600; color: var(--text); margin: 4px 0 6px; line-height: 1.4; }
.cart-meta { font-size: 12px; color: var(--text-soft); }
.cart-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.cart-side .stepper { border-color: rgba(8, 100, 130, .28); background: transparent; padding: 4px; }
.cart-side .stepper button { width: 28px; height: 28px; background: rgba(8, 145, 178, .12); font-size: 15px; }
.cart-line-price { font-family: var(--serif); font-size: 17px; color: var(--accent); }
.btn-remove {
  border: 0; background: none; font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-mute); cursor: pointer; padding: 0;
}
.btn-remove:hover { color: var(--danger); }

.cart-aside {
  position: sticky; top: 92px;
  display: flex; flex-direction: column; gap: 16px;
  padding: 22px; border-radius: 20px;
  background: var(--card-bg); box-shadow: var(--card-shadow);
}
.cart-aside-title { font-family: var(--serif); font-size: 15px; letter-spacing: .1em; color: var(--accent-strong); }
.cart-aside input {
  width: 100%; padding: 11px 13px; border-radius: 11px;
  border: 1px solid rgba(8, 100, 130, .2); background: #fff; font-size: 13px;
}
.divider { height: 1px; background: rgba(8, 100, 130, .16); margin: 2px 0; }
.summary-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-soft); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; }
.summary-total-label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-mute); }
.summary-total-value { font-family: var(--serif); font-size: 27px; color: var(--accent); }
.btn-whatsapp {
  width: 100%; padding: 16px; border-radius: 999px; border: 0;
  background: var(--whats-grad); color: #02170d;
  font-size: 14px; font-weight: 800; letter-spacing: .04em; cursor: pointer;
  transition: filter .2s, transform .2s;
}
.btn-whatsapp:hover { filter: brightness(1.08); transform: translateY(-2px); }
.cart-note { margin: 0; font-size: 11px; line-height: 1.6; color: var(--text-mute); text-align: center; }
.cart-empty {
  padding: 70px 24px; text-align: center; border-radius: 20px;
  background: var(--card-bg); box-shadow: var(--card-shadow);
}
.cart-empty-title { font-family: var(--serif); font-size: 20px; color: var(--accent-strong); }
.cart-empty p { color: var(--text-soft); font-size: 14px; margin: 12px 0 22px; }
.btn-primary {
  padding: 13px 26px; border-radius: 999px; border: 0;
  background: var(--cta-grad); color: #02171f; font-size: 13px; font-weight: 700; cursor: pointer;
}

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 80;
  display: flex; align-items: center; gap: 12px;
  max-width: min(400px, calc(100vw - 32px));
  padding: 13px 20px; border-radius: 999px;
  border: 1px solid rgba(79, 210, 242, .45);
  background: rgba(6, 40, 56, .96);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
  animation: swToastUp .3s ease both;
}
.toast-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 10px var(--cyan); flex: 0 0 auto; }
/* Texto sempre em uma linha so (com reticencias se o nome do produto for longo demais) - sem isso,
   o texto quebrava em varias linhas e o border-radius 999px (pilula, baseado na altura) virava uma
   forma estranha em vez de uma barra. */
#toast-text {
  font-size: 13px; color: var(--ink);
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.toast-link {
  font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--cyan-light);
  flex: 0 0 auto; white-space: nowrap;
}

/* Responsivo */
@media (max-width: 720px) {
  .sw-search { display: none; }
  .sw-header { gap: 12px; }
  .catalog-bar { top: 60px; }
  /* No mobile, o hero e a barra de header disputam o mesmo espaco vertical do medidor
     centralizado (title/paragrafo do hero encostam nele). Sobe pro vao livre logo abaixo do
     header e some com a barra vertical (track/marcador), que nao cabe nesse espaco menor. */
  .depth-gauge {
    top: 68px;
    bottom: auto;
    transform: none;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
  }
  .depth-track { display: none; }
}
@media (max-width: 860px) {
  .cart-layout { grid-template-columns: 1fr; }
  .cart-aside { position: static; }
}
@media (max-width: 480px) {
  .stepper button, .cart-side .stepper button { width: 36px; height: 36px; }
  .btn-add { padding: 13px; }
}
