@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@600;700;800&display=swap');

:root {
  --bg-0: #15243f;
  --bg-1: #1e3358;
  --bg-2: #2c497f;
  --surface: rgba(255, 255, 255, 0.92);
  --surface-solid: #f3f5f9;
  --ink: #15243f;
  --ink-soft: #3d4f6b;
  --muted: #6b7a90;
  --line: rgba(44, 73, 127, 0.12);
  --brand: #2C497F;
  --brand-deep: #20365e;
  --accent: #e8a23a;
  --danger: #c0453a;
  --ok: #2C497F;
  --shadow: 0 18px 50px rgba(21, 36, 63, 0.14);
  --radius: 18px;
  --nav-h: 68px;
  --font: 'Manrope', system-ui, sans-serif;
  --display: 'Sora', 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(232, 162, 58, 0.16), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(44, 73, 127, 0.18), transparent 50%),
    linear-gradient(165deg, #eef1f7 0%, #f7f8fb 45%, #e8edf5 100%);
  min-height: 100vh;
}

a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
img { max-width: 100%; display: block; }

.app-shell { min-height: 100vh; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0 1.25rem;
  background: rgba(243, 245, 249, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 0.75rem;
  font-family: var(--display); font-weight: 700; letter-spacing: -0.04em;
}
.brand img { width: 42px; height: 42px; object-fit: contain; }
.brand span { font-size: 1.15rem; }
.nav-links { display: flex; gap: 0.35rem; align-items: center; flex-wrap: wrap; }
.nav-links a {
  padding: 0.45rem 0.8rem; border-radius: 999px;
  color: var(--ink-soft); font-weight: 600; font-size: 0.92rem;
}
.nav-links a.active, .nav-links a:hover {
  background: rgba(44, 73, 127, 0.12); color: var(--brand-deep);
}
.nav-actions { display: flex; align-items: center; gap: 0.6rem; }
.filial-slot { min-width: 0; }
.filial-switch {
  display: flex; align-items: center; gap: 0.45rem;
  min-width: 0;
}
.filial-switch span {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--ink-soft); white-space: nowrap;
}
.filial-switch select {
  max-width: min(280px, 42vw);
  border: 1px solid var(--line); border-radius: 999px;
  background: #fff; color: var(--ink);
  font: inherit; font-size: 0.82rem; font-weight: 650;
  padding: 0.4rem 0.75rem;
}
.cart-pill {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: var(--ink); color: #fff; border-radius: 999px;
  padding: 0.45rem 0.85rem; font-weight: 700; font-size: 0.85rem;
}
.cart-pill b {
  background: var(--accent); color: var(--ink);
  min-width: 1.35rem; height: 1.35rem; border-radius: 999px;
  display: inline-grid; place-items: center; font-size: 0.75rem;
}
.nav-toggle {
  display: none;
  width: 42px; height: 42px; padding: 0;
  border-radius: 12px; border: 1px solid var(--line);
  background: #fff; cursor: pointer;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block; width: 18px; height: 2px; border-radius: 2px;
  background: var(--brand-deep);
  transition: transform .2s ease, opacity .2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.nav-logout-mobile { display: none; }
.nav-backdrop {
  position: fixed; inset: 0; top: var(--nav-h);
  background: rgba(15, 23, 42, 0.35); z-index: 35;
}
.nav-backdrop[hidden] { display: none !important; }

.page { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: 1.5rem 0 3rem; flex: 1; }

.hero-home {
  display: grid; gap: 1.25rem;
  padding: 1.6rem 0 0.5rem;
}
h1, h2, h3,
.hero-home h1,
.login-copy .logo,
.login-card h1,
.product .price,
.summary .total {
  font-family: var(--display);
}

.hero-home h1 {
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  line-height: 1.08; letter-spacing: -0.045em; margin: 0;
  font-weight: 700;
}
.hero-home p { margin: 0.4rem 0 0; color: var(--ink-soft); max-width: 42rem; font-size: 1.05rem; }
.home-trust {
  display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem;
  margin-top: 1rem; padding: 0.85rem 0 0.15rem;
  border-top: 1px solid var(--line);
  max-width: 42rem;
}
.home-trust-item { display: grid; gap: 0.15rem; min-width: 8.5rem; }
.home-trust-item span {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--muted);
}
.home-trust-item strong {
  font-family: var(--display); font-size: 0.98rem; font-weight: 700;
  color: var(--ink); line-height: 1.25;
}
.home-cutoff {
  margin: 0.65rem 0 0 !important;
  max-width: 42rem;
  font-size: 0.92rem !important;
  color: var(--brand-deep) !important;
  font-weight: 600;
}
.quick-row { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 1rem; }

.btn {
  appearance: none; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  border-radius: 999px; padding: 0.75rem 1.2rem; font-weight: 700;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-deep); }
.btn-secondary { background: rgba(44, 73, 127, 0.1); color: var(--ink); }
.btn-ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: rgba(192, 69, 58, 0.12); color: var(--danger); }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.88rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow);
}
.panel + .panel { margin-top: 1rem; }

.grid-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.9rem;
}

/*
 * Catálogo mobile — teste 2 colunas
 * Ativo quando #catalog-grid tem a classe `catalog-mobile-2col`.
 * Para voltar a 1 coluna: remova essa classe em pages/catalogo.php
 */
@media (max-width: 640px) {
  .grid-products.catalog-mobile-2col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
  }
  .grid-products.catalog-mobile-2col .product {
    padding: 0.55rem;
    min-height: 0;
    gap: 0.35rem;
    border-radius: 12px;
  }
  .grid-products.catalog-mobile-2col .product:hover {
    transform: none;
  }
  .grid-products.catalog-mobile-2col .product-media {
    border-radius: 10px;
  }
  .grid-products.catalog-mobile-2col .product-media > img {
    inset: 0.45rem;
    width: calc(100% - 0.9rem);
    height: calc(100% - 0.9rem);
  }
  .grid-products.catalog-mobile-2col .product-media .media-ph,
  .grid-products.catalog-mobile-2col .product-media .ph {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 10px;
    font-size: 0.9rem;
  }
  .grid-products.catalog-mobile-2col .product-media .brand-badge {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    left: 0.3rem;
    top: 0.3rem;
  }
  .grid-products.catalog-mobile-2col .bought-badge {
    font-size: 0.58rem;
    padding: 0.16rem 0.38rem;
    right: 0.3rem;
    top: 0.3rem;
    max-width: calc(100% - 2.2rem);
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .grid-products.catalog-mobile-2col .promo-flash {
    left: 0.25rem;
    right: 0.25rem;
    bottom: 0.25rem;
    padding: 0.2rem 0.35rem;
    border-radius: 8px;
  }
  .grid-products.catalog-mobile-2col .product .meta {
    font-size: 0.68rem;
    letter-spacing: 0.02em;
  }
  .grid-products.catalog-mobile-2col .product .meta .meta-bought {
    display: none;
  }
  .grid-products.catalog-mobile-2col .product h3 {
    --product-title-size: 0.78rem;
    font-size: var(--product-title-size);
    line-height: 1.25;
    height: calc(0.78rem * 1.25 * 2);
    min-height: calc(0.78rem * 1.25 * 2);
    max-height: calc(0.78rem * 1.25 * 2);
    overflow: hidden;
    display: block;
  }
  .grid-products.catalog-mobile-2col .product .price {
    font-size: 1.05rem;
  }
  .grid-products.catalog-mobile-2col .price-promo-de {
    font-size: 0.75rem;
  }
  .grid-products.catalog-mobile-2col .price-promo-por {
    font-size: 1.05rem;
  }
  .grid-products.catalog-mobile-2col .price-promo-tag {
    font-size: 0.62rem;
    padding: 0.08rem 0.35rem;
  }
  .grid-products.catalog-mobile-2col .product .stock {
    font-size: 0.72rem;
  }
  .grid-products.catalog-mobile-2col .product .actions {
    gap: 0.3rem;
  }
  .grid-products.catalog-mobile-2col .product .actions .btn-ghost {
    display: none; /* Detalhes: oculta no 2-col para caber Adicionar */
  }
  .grid-products.catalog-mobile-2col .product .actions .qty {
    margin-right: 0;
    transform: scale(0.86);
    transform-origin: left center;
  }
  .grid-products.catalog-mobile-2col .product .actions .btn-primary,
  .grid-products.catalog-mobile-2col .product .actions .btn-primary[disabled] {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.4rem 0.45rem;
    font-size: 0.78rem;
  }
}
.product {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.85rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  min-height: 280px;
  transition: border-color .2s ease, transform .2s ease;
}
.product:hover { border-color: rgba(44, 73, 127, 0.45); transform: translateY(-2px); }
.product-media {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: grid; place-items: center;
  color: inherit;
}
a.product-media:focus-visible {
  outline: 2px solid rgba(44, 73, 127, 0.45);
  outline-offset: 2px;
}
/* Enquadra todas as fotos no mesmo retângulo (evita “estouro” por proporção nativa) */
.product-media > img {
  position: absolute;
  inset: 0.9rem;
  width: calc(100% - 1.8rem);
  height: calc(100% - 1.8rem);
  max-width: none;
  object-fit: contain;
  object-position: center;
  padding: 0;
}
.product-media .media-ph,
.product-media .ph {
  position: relative; z-index: 0;
  width: 4.25rem; height: 4.25rem; border-radius: 14px;
  display: grid; place-items: center;
  background: #eef1f6;
  color: var(--brand-deep); font-weight: 800; font-family: var(--display); font-size: 1.15rem;
  letter-spacing: .02em;
}
.product-media .media-ph[hidden],
.product-media .ph[hidden] { display: none !important; }
.product-media .brand-badge {
  position: absolute; left: 0.45rem; top: 0.45rem; z-index: 2;
  width: 34px; height: 34px; border-radius: 10px;
  background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.product-media .brand-badge img {
  position: static; inset: auto;
  width: 100%; height: 100%; max-width: 100%;
  object-fit: contain; padding: 3px;
}
.product-media .brand-badge .badge-ph {
  font-size: .68rem; font-weight: 800; font-family: var(--display);
  color: var(--brand-deep); line-height: 1;
}
.bought-badge {
  position: absolute; right: 0.45rem; top: 0.45rem; z-index: 2;
  max-width: calc(100% - 3.2rem);
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  background: var(--brand-deep);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 6px 16px rgba(21, 36, 63, 0.22);
}
/* Badge promo Farmina + timer interativo (layout baixo / largo) */
.promo-flash {
  position: absolute; left: 0.35rem; right: 0.35rem; bottom: 0.35rem; z-index: 3;
  width: auto; min-width: 0; max-width: none;
  padding: 0.28rem 0.45rem 0.3rem;
  border-radius: 10px;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 8px 18px rgba(21, 36, 63, 0.26);
  backdrop-filter: blur(6px);
  transform-origin: center bottom;
  animation: promo-pop 0.45s cubic-bezier(.22, 1.2, .36, 1) both;
}
.promo-flash-shine {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,0.28) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: promo-shine 3.2s ease-in-out infinite;
}
.promo-flash-row,
.promo-flash-timer-row,
.promo-flash-sub,
.promo-flash-clock { position: relative; z-index: 1; }
.promo-flash-row {
  display: flex; align-items: center; gap: 0.28rem;
  margin-bottom: 0.15rem;
}
.promo-flash-timer-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.4rem;
}
.promo-flash-bolt {
  width: 0.42rem; height: 0.65rem; flex-shrink: 0;
  background: #fff;
  clip-path: polygon(55% 0, 100% 0, 45% 48%, 80% 48%, 0 100%, 40% 52%, 10% 52%);
  filter: drop-shadow(0 0 4px rgba(255,255,255,0.55));
  animation: promo-bolt 1.4s ease-in-out infinite;
}
.promo-flash-label {
  font-size: 0.58rem; font-weight: 800; letter-spacing: 0.03em;
  text-transform: uppercase; line-height: 1; flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.promo-flash-pct {
  font-size: 0.58rem; font-weight: 900;
  padding: 0.06rem 0.32rem; border-radius: 999px;
  background: rgba(255,255,255,0.22);
  letter-spacing: 0.02em;
  flex-shrink: 0;
}
.promo-flash-sub {
  font-size: 0.52rem; font-weight: 700; opacity: 0.88;
  letter-spacing: 0.03em; text-transform: uppercase;
  white-space: nowrap; flex-shrink: 0;
  margin: 0;
}
.promo-flash-clock {
  display: flex; align-items: center; gap: 0.08rem;
  font-variant-numeric: tabular-nums;
  margin-left: auto;
}
.promo-tick {
  display: inline-flex; align-items: baseline; justify-content: center; gap: 0.06rem;
  min-width: 0;
  padding: 0.1rem 0.22rem;
  border-radius: 5px;
  background: rgba(0,0,0,0.22);
  line-height: 1;
}
.promo-tick b {
  font-family: var(--display); font-size: 0.72rem; font-weight: 800; line-height: 1;
}
.promo-tick i {
  font-style: normal; font-size: 0.48rem; font-weight: 700;
  opacity: 0.8; letter-spacing: 0.02em; text-transform: uppercase;
}
.promo-tick-sep {
  font-family: var(--display); font-weight: 800; font-size: 0.65rem;
  opacity: 0.75; margin: 0;
  animation: promo-blink 1s step-end infinite;
}
.promo-flash-ended {
  font-size: 0.62rem; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; opacity: 0.95;
}
.promo-flash.theme-ember {
  background: linear-gradient(145deg, #f59e0b 0%, #c2410c 55%, #9a3412 100%);
}
.promo-flash.theme-berry {
  background: linear-gradient(145deg, #f43f5e 0%, #be123c 55%, #9f1239 100%);
}
.promo-flash.theme-forest {
  background: linear-gradient(145deg, #34d399 0%, #059669 50%, #047857 100%);
}
.promo-flash.theme-night {
  background: linear-gradient(145deg, #6366f1 0%, #4338ca 50%, #1e1b4b 100%);
}
.promo-flash.is-urgent {
  box-shadow: 0 8px 20px rgba(192, 69, 58, 0.42), 0 0 0 2px rgba(255,255,255,0.3);
  animation: promo-pop 0.45s cubic-bezier(.22, 1.2, .36, 1) both, promo-pulse 1.1s ease-in-out infinite;
}
.promo-flash.is-ended {
  opacity: 0.72; filter: grayscale(0.35);
  animation: none;
}
.promo-flash--compact {
  padding: 0.24rem 0.4rem 0.26rem;
  border-radius: 9px;
}
.promo-flash--compact .promo-flash-row { margin-bottom: 0.1rem; }
.promo-flash--compact .promo-tick b { font-size: 0.68rem; }
.promo-flash--compact .promo-tick { padding: 0.08rem 0.18rem; }
.product-detail-media .promo-flash {
  left: 0.7rem; right: auto; bottom: 0.7rem;
  width: min(100% - 1.4rem, 280px);
  min-width: 200px;
  padding: 0.4rem 0.6rem 0.42rem;
  border-radius: 12px;
}
.product-detail-media .promo-flash-label { font-size: 0.68rem; }
.product-detail-media .promo-flash-sub { font-size: 0.58rem; }
.product-detail-media .promo-tick b { font-size: 0.85rem; }
.product-detail-media .promo-tick { padding: 0.14rem 0.28rem; }

@keyframes promo-pop {
  from { opacity: 0; transform: translateY(8px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes promo-shine {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}
@keyframes promo-bolt {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.85; }
}
@keyframes promo-blink {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 0.2; }
}
@keyframes promo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.03); }
}
@media (prefers-reduced-motion: reduce) {
  .promo-flash,
  .promo-flash-shine,
  .promo-flash-bolt,
  .promo-tick-sep,
  .promo-flash.is-urgent {
    animation: none !important;
  }
}
.price-promo {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 0.55rem;
}
.price-promo-de {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
}
.price-promo-por {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #b45309;
  letter-spacing: -0.02em;
}
.price-promo-tag {
  display: inline-flex; align-items: center;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(180, 83, 9, 0.12);
  color: #9a3412;
  font-size: 0.72rem;
  font-weight: 800;
}
.price-promo-lg .price-promo-de { font-size: 1.05rem; }
.price-promo-lg .price-promo-por { font-size: 2rem; }
.price-promo-lg .price-promo-tag { font-size: 0.82rem; padding: 0.2rem 0.55rem; }
.product.product-promo { border-color: rgba(180, 83, 9, 0.35); }
.product .meta { color: var(--muted); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.product .meta .meta-bought {
  color: var(--brand-deep);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}
.product h3 {
  --product-title-size: 0.95rem;
  margin: 0;
  font-size: var(--product-title-size);
  line-height: 1.25;
  font-weight: 700;
  /* Altura fixa de 2 linhas (em cima do tamanho-base, não do font encolhido) */
  height: calc(0.95rem * 1.25 * 2);
  min-height: calc(0.95rem * 1.25 * 2);
  max-height: calc(0.95rem * 1.25 * 2);
  overflow: hidden;
  display: block;
}
.product h3 a {
  color: inherit;
  text-decoration: none;
  display: block;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.product h3 a:focus-visible { outline: 2px solid rgba(44, 73, 127, 0.45); outline-offset: 2px; border-radius: 4px; }
.product .price { font-family: var(--display); font-size: 1.25rem; font-weight: 800; color: var(--brand-deep); }
.product .stock { font-size: 0.85rem; color: var(--ink-soft); }
.product .stock.low { color: var(--danger); }
.product .actions { display: flex; gap: 0.4rem; margin-top: auto; align-items: center; flex-wrap: wrap; }
.product .actions .qty { margin-right: auto; }
.product.product-bought { border-color: rgba(44, 73, 127, 0.28); }

.filter-chips {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin: 0 0 0.65rem;
}
.filter-chip {
  appearance: none; border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 0.45rem 0.95rem;
  font-weight: 800; font-size: 0.86rem; color: var(--ink-soft);
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 0.4rem;
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}
.filter-chip:hover { border-color: rgba(180, 83, 9, 0.45); color: var(--ink); }
.filter-chip-promo .filter-chip-bolt {
  width: 0.45rem; height: 0.7rem; flex-shrink: 0;
  background: currentColor;
  clip-path: polygon(55% 0, 100% 0, 45% 48%, 80% 48%, 0 100%, 40% 52%, 10% 52%);
  opacity: 0.75;
}
.filter-chip-promo.active {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, #f59e0b 0%, #c2410c 55%, #9a3412 100%);
  box-shadow: 0 8px 20px rgba(194, 65, 12, 0.28);
}
.filter-chip-promo.active .filter-chip-bolt {
  background: #fff;
  opacity: 1;
  animation: promo-bolt 1.4s ease-in-out infinite;
}

.sort-chips {
  display: flex; flex-wrap: wrap; gap: 0.45rem;
  margin: 0 0 0.85rem;
}
.sort-chip {
  appearance: none; border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 0.45rem 0.9rem;
  font-weight: 700; font-size: 0.86rem; color: var(--ink-soft);
  cursor: pointer; transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.sort-chip:hover { border-color: rgba(44, 73, 127, 0.4); color: var(--ink); }
.sort-chip.active {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.brand-chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0 0 1rem; }
.brand-chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 0.35rem 0.7rem 0.35rem 0.35rem; cursor: pointer; font-weight: 700; font-size: 0.85rem;
  color: var(--ink-soft);
}
.brand-chip img, .brand-chip .chip-ph {
  width: 28px; height: 28px; border-radius: 999px; object-fit: contain;
  background: #f3f5f9;
}
.brand-chip .chip-ph { display: grid; place-items: center; font-size: 0.7rem; font-weight: 800; color: var(--brand-deep); }
.brand-chip.active { border-color: var(--brand); color: var(--brand-deep); background: rgba(44,73,127,.08); }

.home-bought-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem;
}
.home-bought-head h2 {
  margin: 0; font-family: var(--display); font-size: 1.2rem;
}
.home-bought-head p {
  margin: 0.3rem 0 0; color: var(--muted); font-size: 0.92rem;
}
.home-bought-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(168px, 200px);
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.bought-card {
  scroll-snap-align: start;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 100%;
}
.bought-card-media {
  position: relative;
  aspect-ratio: 1;
  background: #fff;
  display: grid; place-items: center;
}
.bought-card-media img {
  position: absolute; inset: 0.7rem;
  width: calc(100% - 1.4rem); height: calc(100% - 1.4rem);
  object-fit: contain;
}
.bought-card-media .media-ph {
  width: 3.2rem; height: 3.2rem; border-radius: 12px;
  display: grid; place-items: center;
  background: #eef1f6; color: var(--brand-deep);
  font-weight: 800; font-family: var(--display);
}
.bought-card-media .bought-badge {
  font-size: 0.62rem;
  padding: 0.22rem 0.45rem;
  max-width: calc(100% - 0.7rem);
}
.bought-card-body {
  padding: 0.7rem 0.75rem 0.8rem;
  display: grid; gap: 0.35rem; flex: 1;
}
.bought-card-body h3 {
  margin: 0; font-size: 0.88rem; line-height: 1.3; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.3em;
}
.bought-card-hist { margin: 0; font-size: 0.78rem; color: var(--brand-deep); font-weight: 700; }
.bought-card-price {
  font-family: var(--display); font-size: 1.05rem; color: var(--brand-deep);
}
.bought-card-body .btn { width: 100%; margin-top: 0.15rem; }
.pdp-bought {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(44, 73, 127, 0.08);
  color: var(--brand-deep);
  font-size: 0.9rem;
  font-weight: 700;
}
.pdp-promo {
  margin: 0 0 0.85rem;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  background: rgba(180, 83, 9, 0.1);
  color: #9a3412;
  font-size: 0.9rem;
  font-weight: 700;
}
.product-detail-media .bought-badge {
  right: 0.7rem; top: 0.7rem;
}

.product-detail-grid {
  display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 1.25rem; align-items: start;
}
.product-detail-media {
  position: relative;
  aspect-ratio: 1; border-radius: 16px; background: #fff; border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden;
}
.product-detail-media > img {
  position: absolute;
  inset: 1.1rem;
  width: calc(100% - 2.2rem);
  height: calc(100% - 2.2rem);
  max-width: none;
  object-fit: contain;
  object-position: center;
  padding: 0;
}
@media (max-width: 800px) {
  .product-detail-grid { grid-template-columns: 1fr; }
}

.toolbar {
  display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: end;
  margin-bottom: 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.3rem; flex: 1; min-width: 160px; }
.field label { font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select {
  border: 1px solid var(--line); border-radius: 12px;
  padding: 0.7rem 0.85rem; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus {
  outline: 2px solid rgba(44, 73, 127, 0.35); border-color: var(--brand);
}

.search-field { position: relative; z-index: 8; }
.search-wrap { position: relative; }
.search-wrap input { width: 100%; }
.search-suggest {
  position: absolute; left: 0; right: auto; top: calc(100% + 0.35rem);
  z-index: 30;
  /* Mais larga que o input, sem sair da viewport (JS ajusta left se precisar) */
  width: min(36rem, calc(100vw - 1.5rem));
  min-width: 100%;
  max-width: calc(100vw - 1.5rem);
  box-sizing: border-box;
  max-height: min(420px, 70vh);
  overflow: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(21, 36, 63, 0.16);
  display: grid;
  gap: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 73, 127, 0.55) rgba(44, 73, 127, 0.12);
}
.search-suggest::-webkit-scrollbar { width: 10px; }
.search-suggest::-webkit-scrollbar-track {
  background: rgba(44, 73, 127, 0.1);
  border-radius: 999px;
}
.search-suggest::-webkit-scrollbar-thumb {
  background: rgba(44, 73, 127, 0.5);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.search-suggest::-webkit-scrollbar-thumb:hover {
  background: rgba(44, 73, 127, 0.72);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.search-suggest[hidden] { display: none !important; }
.search-suggest-empty {
  padding: 0.9rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.search-suggest-item {
  appearance: none; border: 0; background: transparent;
  width: 100%; text-align: left; cursor: pointer;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 0.7rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid rgba(44, 73, 127, 0.08);
  color: inherit;
}
.search-suggest-item:hover,
.search-suggest-item.is-active {
  background: rgba(44, 73, 127, 0.07);
}
.search-suggest-thumb {
  width: 44px; height: 44px; border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(44, 73, 127, 0.08);
  overflow: hidden;
  display: grid; place-items: center; position: relative;
  flex-shrink: 0;
}
.search-suggest-thumb img {
  position: absolute;
  inset: 5px;
  width: calc(100% - 10px);
  height: calc(100% - 10px);
  max-width: none;
  object-fit: contain;
  object-position: center;
  padding: 0;
}
.search-suggest-ph {
  position: relative; z-index: 0;
  font-family: var(--display); font-weight: 800; font-size: 0.75rem;
  color: var(--brand-deep);
}
.search-suggest-copy { min-width: 0; display: grid; gap: 0.15rem; }
.search-suggest-title {
  font-size: 0.9rem; font-weight: 700; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.search-suggest-title mark {
  background: rgba(232, 162, 58, 0.35);
  color: inherit;
  border-radius: 3px;
  padding: 0 0.1em;
}
.search-suggest-meta {
  font-size: 0.76rem; color: var(--muted); font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.search-suggest-side {
  display: grid; gap: 0.15rem; justify-items: end; text-align: right;
}
.search-suggest-side strong {
  font-family: var(--display); font-size: 0.92rem; color: var(--brand-deep);
}
.search-suggest-price-de {
  font-size: 0.72rem; color: var(--muted); text-decoration: line-through; font-weight: 600;
}
.search-suggest-price-por {
  font-family: var(--display); font-size: 0.92rem; color: #b45309 !important; font-weight: 800;
}
.search-suggest-stock {
  font-size: 0.68rem; font-weight: 800; color: var(--ink-soft);
}
.search-suggest-stock.low { color: var(--danger); }
.search-suggest-bought {
  font-size: 0.65rem; font-weight: 800; color: var(--brand-deep);
  letter-spacing: 0.02em;
}
.search-suggest-more {
  appearance: none; border: 0; border-top: 1px solid var(--line);
  width: 100%; padding: 0.75rem 1rem;
  background: rgba(44, 73, 127, 0.05);
  color: var(--brand-deep); font-weight: 800; font-size: 0.88rem;
  cursor: pointer; text-align: center;
}
.search-suggest-more:hover,
.search-suggest-more.is-active {
  background: rgba(44, 73, 127, 0.12);
}
@media (max-width: 640px) {
  .search-suggest-item { grid-template-columns: 40px 1fr; }
  .search-suggest-side {
    grid-column: 2; justify-items: start; text-align: left;
    display: flex; flex-wrap: wrap; gap: 0.35rem 0.55rem; align-items: center;
  }
}

.state {
  padding: 2rem 1rem; text-align: center; color: var(--ink-soft);
}
.state.error { color: var(--danger); }
.toast {
  position: fixed; right: 1rem; bottom: 1rem; z-index: 80;
  background: var(--ink); color: #fff; padding: 0.85rem 1.1rem;
  border-radius: 14px; box-shadow: var(--shadow);
  transform: translateY(120%); opacity: 0; transition: .28s ease;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* Mini-carrinho (drawer) */
.minicart-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(15, 23, 42, 0.42);
  opacity: 0; transition: opacity .25s ease;
}
.minicart-backdrop.is-open { opacity: 1; }
.minicart-backdrop[hidden] { display: none !important; }
.minicart {
  position: fixed; top: 0; right: 0; z-index: 95;
  width: min(400px, 100vw); height: 100dvh;
  display: flex; flex-direction: column;
  background: #f7f8fb;
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 50px rgba(21, 36, 63, 0.18);
  transform: translateX(105%);
  transition: transform .28s cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}
.minicart.is-open {
  transform: translateX(0);
  pointer-events: auto;
}
.minicart-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 0.75rem; padding: 1.15rem 1.15rem 0.95rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
}
.minicart-head h2,
.minicart-title {
  margin: 0; font-family: var(--display); font-size: 1.2rem;
  letter-spacing: -0.03em;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--brand-deep);
}
.minicart-title-icon {
  flex-shrink: 0;
  color: var(--brand);
}
.minicart-status {
  margin: 0.3rem 0 0; font-size: 0.88rem; font-weight: 600;
  color: var(--brand-deep);
}
.minicart-status.is-warn { color: var(--danger); }
.minicart-close {
  appearance: none; border: 0; background: rgba(44, 73, 127, 0.08);
  width: 2.1rem; height: 2.1rem; border-radius: 999px;
  font-size: 1.35rem; line-height: 1; cursor: pointer; color: var(--ink);
  flex-shrink: 0;
}
.minicart-close:hover { background: rgba(44, 73, 127, 0.14); }
.minicart-body {
  flex: 1; overflow: auto; padding: 0.85rem 1rem 1rem;
  display: grid; gap: 0.65rem; align-content: start;
  scrollbar-width: thin;
  scrollbar-color: rgba(44, 73, 127, 0.55) rgba(44, 73, 127, 0.12);
}
.minicart-body::-webkit-scrollbar { width: 10px; }
.minicart-body::-webkit-scrollbar-track {
  background: rgba(44, 73, 127, 0.1);
  border-radius: 999px;
  margin: 0.35rem 0;
}
.minicart-body::-webkit-scrollbar-thumb {
  background: rgba(44, 73, 127, 0.5);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.minicart-body::-webkit-scrollbar-thumb:hover {
  background: rgba(44, 73, 127, 0.72);
  border: 2px solid transparent;
  background-clip: padding-box;
}
.minicart-body::-webkit-scrollbar-button {
  display: none;
  height: 0;
  width: 0;
}
.minicart-empty {
  padding: 2.2rem 1rem; text-align: center; color: var(--muted);
}
.minicart-empty a { color: var(--brand); font-weight: 700; text-decoration: underline; }
.minicart-line {
  display: grid; grid-template-columns: 64px 1fr; gap: 0.75rem;
  padding: 0.75rem; background: #fff; border: 1px solid var(--line);
  border-radius: 14px; transition: border-color .2s ease, box-shadow .2s ease;
}
.minicart-line.is-new {
  border-color: rgba(44, 73, 127, 0.45);
  box-shadow: 0 0 0 3px rgba(44, 73, 127, 0.1);
}
.minicart-thumb {
  position: relative;
  width: 64px; height: 64px; border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(44, 73, 127, 0.08);
  overflow: hidden;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.minicart-thumb img {
  position: absolute;
  inset: 0.4rem;
  width: calc(100% - 0.8rem);
  height: calc(100% - 0.8rem);
  max-width: none;
  object-fit: contain;
  object-position: center;
  padding: 0;
}
.minicart-thumb-ph {
  position: relative; z-index: 0;
  font-family: var(--display); font-weight: 800; font-size: 0.85rem;
  color: var(--brand-deep);
}
.minicart-meta { min-width: 0; display: grid; gap: 0.35rem; align-content: start; }
.minicart-meta h3 {
  margin: 0; font-size: 0.9rem; line-height: 1.3; font-weight: 700;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.minicart-meta .minicart-price {
  margin: 0; color: var(--muted); font-size: 0.82rem;
}
.minicart-meta .minicart-line-total {
  font-family: var(--display); font-weight: 700; font-size: 0.95rem;
  color: var(--brand-deep);
}
.minicart-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.5rem; margin-top: 0.15rem;
}
.minicart-actions .qty { transform: scale(0.92); transform-origin: left center; }
.minicart-remove {
  appearance: none; border: 0; background: transparent;
  color: var(--muted); font-size: 0.8rem; font-weight: 700;
  cursor: pointer; padding: 0.25rem 0.35rem;
}
.minicart-remove:hover { color: var(--danger); }
.minicart-foot {
  padding: 1rem 1.15rem 1.2rem;
  background: #fff; border-top: 1px solid var(--line);
  display: grid; gap: 0.65rem;
}
.minicart-foot[hidden] { display: none !important; }
.minicart-total {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 0.75rem; font-weight: 700;
}
.minicart-total span { color: var(--muted); font-size: 0.9rem; }
.minicart-total strong {
  font-family: var(--display); font-size: 1.25rem; color: var(--ink);
}
.minicart-cta { width: 100%; }
.minicart-continue { width: 100%; }
body.minicart-open { overflow: hidden; }
@media (max-width: 480px) {
  .minicart { width: 100vw; }
}

.table-list { display: grid; gap: 0.65rem; }
.row-item {
  display: grid; grid-template-columns: 1fr auto; gap: 0.75rem;
  align-items: center; padding: 0.95rem 1rem;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
}
.row-item h3 { margin: 0; font-size: 1rem; }
.row-item p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.9rem; }

.order-card {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.05rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: inherit;
  text-decoration: none;
}
a.order-card:hover {
  border-color: rgba(44, 73, 127, 0.35);
}
.order-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
}
.order-card-id h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-deep);
}
.order-card-id time {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}
.order-card-total {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-deep);
  white-space: nowrap;
  line-height: 1.2;
}
.order-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.55rem;
  align-items: center;
}
.order-card-meta > span {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: #f1f4f9;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
}
.order-card-cond {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: min(100%, 22rem);
}
.order-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.15rem;
  border-top: 1px solid var(--line);
}
.order-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
  flex-shrink: 0;
}
.order-card-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}
.order-card-saldo {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
}
.badge {
  display: inline-flex; align-items: center; padding: 0.2rem 0.55rem;
  border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  background: rgba(44, 73, 127, 0.12); color: var(--brand-deep);
}
.badge-conta-pago {
  background: rgba(34, 140, 90, 0.16); color: #176b44;
}
.badge-conta-bonificado {
  background: rgba(34, 140, 90, 0.12); color: #1a7a4d;
}
.badge-conta-em_aberto {
  background: rgba(232, 162, 58, 0.18); color: #8a5a12;
}
.badge-conta-parcial {
  background: rgba(44, 73, 127, 0.1); color: var(--brand-deep);
}
.badge-conta-atrasado {
  background: rgba(192, 69, 58, 0.12); color: var(--danger);
}
.badge-conta-em_avaliacao {
  background: rgba(232, 162, 58, 0.18);
  color: #9a3412;
}
.badge-conta-reprovado {
  background: rgba(192, 69, 58, 0.14);
  color: #9f1239;
}
.badge-cancel-pendente {
  background: rgba(232, 162, 58, 0.18);
  color: #9a3412;
}
.badge-cancel-aprovado {
  background: rgba(34, 120, 80, 0.14);
  color: #166534;
}
.badge-cancel-rejeitado {
  background: rgba(192, 69, 58, 0.14);
  color: #9f1239;
}
.badge-conta-sem_titulo {
  background: rgba(107, 122, 144, 0.14); color: var(--muted);
}

/* Modal genérico do portal */
.b2b-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.b2b-modal[hidden] { display: none !important; }
.b2b-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 24, 38, 0.48);
  backdrop-filter: blur(2px);
}
.b2b-modal-dialog {
  position: relative;
  width: min(100%, 440px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(18, 24, 38, 0.22);
  padding: 1.25rem 1.3rem 1.15rem;
}
.b2b-modal-dialog h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  color: var(--ink);
}
.b2b-modal-dialog p {
  margin: .45rem 0 0;
  color: var(--muted);
  font-size: .92rem;
  line-height: 1.45;
}
.b2b-modal-field {
  margin-top: 1rem;
}
.b2b-modal-field label {
  display: block;
  margin-bottom: .4rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink);
}
.b2b-modal-field textarea {
  width: 100%;
  min-height: 110px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .75rem .85rem;
  font: inherit;
  color: var(--ink);
  background: #fff;
}
.b2b-modal-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}
.b2b-modal-error {
  margin: .65rem 0 0;
  color: var(--danger);
  font-size: .88rem;
  display: none;
}
.b2b-modal-error.show { display: block; }
.b2b-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  justify-content: flex-end;
  margin-top: 1.15rem;
}
body.b2b-modal-open { overflow: hidden; }

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  gap: 1.25rem;
  align-items: start;
}
.cart-main,
.cart-aside {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.cart-main { padding: 0; overflow: hidden; }
.cart-main-head {
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: #fafbfd;
}
.cart-main-head h2 {
  margin: 0; font-family: var(--display); font-size: 1rem; font-weight: 700;
  letter-spacing: -0.02em;
}
.cart-count {
  font-size: 0.82rem; font-weight: 700; color: var(--brand-deep);
  background: rgba(44, 73, 127, 0.1);
  padding: 0.28rem 0.7rem; border-radius: 999px;
}

.cart-lines { display: grid; gap: 0; }
.cart-line {
  display: grid; grid-template-columns: 1fr auto; gap: 0.8rem;
  padding: 0.9rem 0; border-bottom: 1px solid var(--line);
}
.cart-item {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--line);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item-media {
  position: relative;
  width: 88px; height: 88px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  display: grid; place-items: center;
  overflow: hidden; flex-shrink: 0;
}
.cart-item-media > img {
  position: absolute;
  inset: 0.55rem;
  width: calc(100% - 1.1rem);
  height: calc(100% - 1.1rem);
  max-width: none;
  object-fit: contain;
  object-position: center;
  padding: 0;
}
.cart-item-media .media-ph,
.cart-item-media .ph {
  position: relative; z-index: 0;
  width: 2.6rem; height: 2.6rem; border-radius: 10px;
  display: grid; place-items: center;
  background: #eef1f6;
  font-family: var(--display); font-weight: 800; font-size: .85rem;
  color: var(--brand-deep);
}
.cart-item-media .media-ph[hidden],
.cart-item-media .ph[hidden] { display: none !important; }
.product-detail-media .media-ph {
  width: 5.5rem; height: 5.5rem; border-radius: 16px;
  display: grid; place-items: center;
  background: #eef1f6;
  color: var(--brand-deep); font-weight: 800; font-family: var(--display); font-size: 1.6rem;
}
.product-detail-media .media-ph[hidden] { display: none !important; }
.cart-item-body { min-width: 0; display: grid; gap: 0.55rem; }
.cart-item-title {
  margin: 0; font-size: 0.95rem; font-weight: 700; line-height: 1.3;
  color: var(--ink); letter-spacing: -0.01em;
}
.cart-item-meta {
  margin: 0; font-size: 0.85rem; color: var(--muted); font-weight: 600;
}
.cart-item-controls {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.65rem;
}
.cart-item-side {
  text-align: right;
  display: grid; gap: 0.35rem; justify-items: end;
  min-width: 7.5rem;
}
.cart-item-total {
  font-family: var(--display); font-size: 1.15rem; font-weight: 800;
  color: var(--brand-deep); letter-spacing: -0.02em;
}
.cart-item-unit {
  font-size: 0.78rem; color: var(--muted); font-weight: 600;
}
.cart-remove {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  color: var(--danger); font-weight: 700; font-size: 0.82rem; padding: 0.2rem 0.1rem;
}
.cart-remove:hover { text-decoration: underline; }

.cart-empty {
  padding: 3rem 1.5rem; text-align: center; display: grid; gap: 0.75rem; justify-items: center;
}
.cart-empty h2 {
  margin: 0; font-family: var(--display); font-size: 1.25rem; font-weight: 700;
}
.cart-empty p { margin: 0; color: var(--ink-soft); max-width: 26rem; }

.cart-aside {
  padding: 1.25rem;
  position: sticky; top: calc(var(--nav-h) + 0.85rem);
}
.cart-aside h2 {
  margin: 0 0 1rem; font-family: var(--display); font-size: 1.05rem; font-weight: 700;
  letter-spacing: -0.02em;
}
.cart-aside-note {
  margin: 0.85rem 0 0; padding: 0.75rem 0.85rem;
  border-radius: 12px; background: rgba(44, 73, 127, 0.06);
  color: var(--ink-soft); font-size: 0.82rem; line-height: 1.4;
}
.cart-aside-note-warn {
  background: rgba(232, 162, 58, 0.16);
  color: #7a4e10;
  font-weight: 600;
}
.cart-pagto-upsell {
  margin: 0.95rem 0 0;
  padding: 0.95rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(201, 132, 31, 0.35);
  background:
    linear-gradient(145deg, rgba(255, 248, 235, 0.95), rgba(255, 253, 249, 0.92));
}
.cart-pagto-upsell-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #9a6414;
}
.cart-pagto-upsell-title {
  margin: 0.35rem 0 0;
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.3;
}
.cart-pagto-upsell-title strong {
  color: var(--brand-deep);
  font-weight: 800;
}
.cart-pagto-upsell-cond {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-deep);
  line-height: 1.35;
}
.cart-pagto-upsell-meta {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.cart-pagto-upsell-cta {
  margin-top: 0.75rem;
  width: 100%;
}
.price-report {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(44, 73, 127, 0.22);
  background: rgba(44, 73, 127, 0.07);
}
.price-report strong {
  display: block;
  font-family: var(--display);
  font-size: 0.98rem;
  color: var(--brand-deep);
}
.price-report p {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.price-report-total {
  margin-top: 0.45rem !important;
  font-weight: 700;
  color: var(--ink) !important;
}
.price-report-total s { color: var(--muted); font-weight: 600; margin-right: 0.35rem; }
.price-report-delta { color: var(--brand-deep); font-weight: 800; }
.price-old {
  color: var(--muted);
  text-decoration: line-through;
  margin-right: 0.3rem;
}
.price-new { color: var(--brand-deep); font-weight: 800; }
.price-old-inline {
  color: var(--muted);
  font-size: 0.78em;
  font-weight: 600;
  margin-right: 0.35rem;
}
.price-pill {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  background: rgba(44, 73, 127, 0.12);
  color: var(--brand-deep);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.price-pill.up { background: rgba(192, 69, 58, 0.12); color: var(--danger); }
.price-pill.down { background: rgba(44, 73, 127, 0.14); color: var(--brand-deep); }
.cart-item-price-changed,
.cart-line-price-changed {
  border-color: rgba(44, 73, 127, 0.35);
  background: rgba(44, 73, 127, 0.03);
}
.cart-actions {
  display: grid; gap: 0.55rem; margin-top: 1.15rem;
}
.cart-actions .btn { width: 100%; }

.qty {
  display: inline-flex; align-items: center; gap: 0.2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px; padding: 0.18rem;
}
.qty button {
  width: 30px; height: 30px; border: 0; border-radius: 999px;
  background: rgba(44, 73, 127, 0.08); color: var(--brand-deep);
  cursor: pointer; font-weight: 700; line-height: 1;
}
.qty button:hover { background: rgba(44, 73, 127, 0.16); }
.qty input {
  width: 44px; border: 0; background: transparent; text-align: center;
  font-weight: 700; color: var(--ink); -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.summary {
  display: grid; gap: 0.65rem;
}
.summary .line {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  color: var(--ink-soft); font-size: 0.92rem;
}
.summary .line span:last-child {
  color: var(--ink); font-weight: 600; text-align: right;
}
.summary .total {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-family: var(--display); font-size: 1.35rem; font-weight: 800;
  margin-top: 0.35rem; padding-top: 0.85rem;
  border-top: 1px solid var(--line); color: var(--ink);
}
.summary .total span:last-child { color: var(--brand-deep); }

.checkout-pagto-line {
  align-items: center !important;
  flex-wrap: wrap;
}
.checkout-pagto-field {
  flex: 1 1 220px;
  min-width: min(100%, 220px);
  max-width: 360px;
  margin-left: auto;
}
.checkout-pagto-field select {
  width: 100%;
  font-weight: 600;
  color: var(--ink);
}

.checkout-entrega {
  margin: 1.15rem 0 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
.checkout-entrega legend {
  margin: 0 0 .55rem;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--ink);
}
.checkout-entrega-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.checkout-entrega-opt {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  margin: 0;
  padding: .85rem .9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.checkout-entrega-opt:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
}
.checkout-entrega-opt.is-selected {
  border-color: var(--brand);
  background: color-mix(in srgb, var(--brand) 8%, #fff);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand) 35%, transparent);
}
.checkout-entrega-opt input {
  margin-top: .2rem;
  accent-color: var(--brand);
}
.checkout-entrega-opt strong {
  display: block;
  font-size: .98rem;
  color: var(--ink);
}
.checkout-entrega-opt small {
  display: block;
  margin-top: .15rem;
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
}
.checkout-retirada-aviso {
  margin-top: .75rem;
}
@media (max-width: 560px) {
  .checkout-entrega-options {
    grid-template-columns: 1fr;
  }
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.account-layout {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.account-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}
.account-card-accent {
  grid-column: 1 / -1;
  background: linear-gradient(165deg, #fff 0%, #f3f6fb 100%);
  border-color: rgba(44, 73, 127, 0.18);
}
.account-card-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.55rem;
}
.account-name {
  margin: 0;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
  line-height: 1.2;
}
.account-legal {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}
.account-facts {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}
.account-fact {
  display: grid;
  gap: 0.15rem;
}
.account-fact span,
.account-op span {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.account-fact strong,
.account-op strong {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--ink);
  word-break: break-word;
}
.account-address-main {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.35;
}
.account-address-sub,
.account-address-city {
  margin: 0.35rem 0 0;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: 0.92rem;
}
.account-address-city {
  color: var(--brand-deep);
  font-weight: 800;
}
.account-ops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.25rem;
}
.account-op {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem 0.95rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}
.account-warn {
  margin: 0.9rem 0 0;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(232, 162, 58, 0.14);
  color: #8a5a12;
  font-size: 0.88rem;
  font-weight: 600;
}

/* Login */
.login-page {
  min-height: 100vh; display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background:
    radial-gradient(900px 520px at 18% 22%, rgba(124, 229, 119, 0.12), transparent 55%),
    radial-gradient(700px 420px at 78% 18%, rgba(232, 162, 58, 0.16), transparent 50%),
    linear-gradient(145deg, var(--bg-0), var(--bg-1) 45%, var(--bg-2));
  color: #eef2f8;
}
.login-visual {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 2.5rem;
  min-height: 100vh;
}
.login-brand {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.login-brand-glow {
  position: absolute;
  width: min(52vw, 420px);
  height: min(52vw, 420px);
  left: 42%;
  top: 28%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.14), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(44, 73, 127, 0.55), transparent 68%);
  filter: blur(2px);
  will-change: transform;
}
.login-brand-orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.login-brand-orb-a {
  width: clamp(160px, 28vw, 260px);
  height: clamp(160px, 28vw, 260px);
  left: 48%;
  top: 34%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.22), transparent 42%),
    radial-gradient(circle at 50% 55%, #3a5a96 0%, #2c497f 55%, #1a2f52 100%);
  box-shadow: 0 28px 60px rgba(10, 18, 36, 0.35);
  opacity: 0.92;
}
.login-brand-orb-b {
  width: clamp(88px, 14vw, 140px);
  height: clamp(88px, 14vw, 140px);
  left: 28%;
  top: 52%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 35% 30%, rgba(255, 220, 160, 0.55), transparent 45%),
    radial-gradient(circle at 50% 50%, #e8a23a 0%, #c9841f 70%, #9a6414 100%);
  opacity: 0.72;
  box-shadow: 0 16px 40px rgba(201, 132, 31, 0.28);
}
.login-brand-orbit {
  position: absolute;
  width: min(58vw, 340px);
  height: min(58vw, 340px);
  left: 48%;
  top: 36%;
  transform: translate(-50%, -50%);
  overflow: visible;
  will-change: transform;
}
.login-brand-orbit ellipse {
  fill: none;
  stroke: rgba(124, 229, 119, 0.55);
  stroke-width: 2.2;
}
.login-brand-node {
  position: absolute;
  left: var(--nx);
  top: var(--ny);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  will-change: transform;
  box-shadow: 0 0 0 6px rgba(124, 229, 119, 0.12);
}
.login-brand-node-lime {
  background: radial-gradient(circle at 35% 30%, #b6f5b2, #7ce577 55%, #4caf50);
}
.login-brand-node-amber {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 35% 30%, #ffe0a8, #e8a23a 60%, #c9841f);
  box-shadow: 0 0 0 5px rgba(232, 162, 58, 0.16);
}
.login-brand-mark-wrap {
  position: absolute;
  left: 48%;
  top: 34%;
  width: clamp(96px, 15vw, 148px);
  height: clamp(96px, 15vw, 148px);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at 40% 32%, #ffffff 0%, #f4f1ea 58%, #e6e1d7 100%);
  box-shadow:
    0 0 0 4px rgba(255, 253, 249, 0.55),
    0 18px 36px rgba(10, 18, 36, 0.35);
  will-change: transform;
  z-index: 2;
}
.login-brand-mark {
  width: 72%;
  height: auto;
  display: block;
  filter: none;
}
.login-copy { position: relative; z-index: 2; max-width: 28rem; }
.login-form-wrap .btn-primary[data-magnet-btn] {
  will-change: transform;
}
.login-copy .logo {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800; letter-spacing: -0.055em; margin: 0 0 0.6rem;
  line-height: 0.95;
  color: #fff;
  opacity: 1;
}
.login-copy p:not(.logo) {
  margin: 0; color: rgba(238, 242, 248, 0.78); font-size: 1.05rem;
  opacity: 1;
}
.login-card > * { opacity: 1; }
.login-form-wrap {
  display: grid; place-items: center; padding: 2rem;
  background:
    linear-gradient(180deg, rgba(243,245,249,0.98), rgba(236,240,247,0.96));
  color: var(--ink);
}
.login-card { width: min(400px, 100%); }
.login-card h1 {
  font-size: 1.8rem; margin: 0 0 0.35rem;
  letter-spacing: -0.04em; font-weight: 700;
}
.login-card .sub { color: var(--muted); margin: 0 0 1.4rem; }
.login-card .field { margin-bottom: 0.85rem; }
.login-card .btn { width: 100%; margin-top: 0.4rem; }
.login-error {
  display: none; margin: 0 0 0.9rem; padding: 0.7rem 0.85rem;
  background: rgba(192,69,58,.1); color: var(--danger);
  border-radius: 12px; font-weight: 600; font-size: 0.92rem;
}
.login-error.show { display: block; }
.login-hint { margin-top: 1.2rem; font-size: 0.82rem; color: var(--muted); }

.loader-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; width: 100%;
  background: transparent;
  z-index: 100; pointer-events: none;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s ease;
}
.loader-bar.is-active { opacity: 1; }
.loader-bar.is-active::after {
  content: '';
  position: absolute; top: 0; left: 0;
  height: 100%; width: 38%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  animation: b2b-loader-bar 1.05s ease-in-out infinite;
}

.vendor-card {
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.vendor-card .avatar {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(145deg, var(--brand), var(--bg-1));
  color: #fff; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 1.2rem;
}

.footer-note {
  text-align: center; color: var(--muted); font-size: 0.82rem;
  padding: 1rem 0 2rem;
}

.infinite-status {
  text-align: center;
  padding: 1.35rem 1rem 0.5rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.infinite-status[hidden] { display: none !important; }
.infinite-sentinel {
  height: 1px; width: 100%;
  pointer-events: none;
}

@media (max-width: 900px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { min-height: 34vh; padding: 1.5rem; }
  .login-brand-orb-a { width: 140px; height: 140px; top: 42%; }
  .login-brand-orb-b { width: 64px; height: 64px; }
  .login-brand-orbit { width: 200px; height: 200px; top: 44%; }
  .login-brand-mark-wrap { width: 84px; height: 84px; top: 42%; }
  .login-brand-node { width: 12px; height: 12px; }
  .nav-toggle { display: inline-flex; }
  .topbar {
    flex-wrap: nowrap;
    height: var(--nav-h);
    padding: 0 0.85rem;
    gap: 0.5rem;
  }
  .brand { min-width: 0; gap: 0.5rem; }
  .brand span { font-size: 1.05rem; }
  .nav-actions { gap: 0.4rem; flex-shrink: 0; }
  .topbar:has(.filial-slot:not([hidden])) { flex-wrap: wrap; height: auto; padding-top: 0.45rem; padding-bottom: 0.45rem; }
  .filial-slot:not([hidden]) { order: 4; flex: 1 1 100%; }
  .filial-switch { width: 100%; }
  .filial-switch select { max-width: none; flex: 1; min-width: 0; }
  .nav-logout-desktop { display: none !important; }
  .cart-pill { padding: 0.4rem 0.65rem; }
  .cart-pill .cart-label { display: none; }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    z-index: 36;
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
    margin: 0;
    padding: 0.75rem;
    background: #f3f5f9;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  }
  .nav-links.is-open { display: flex; }
  .nav-links a,
  .nav-logout-mobile {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink-soft);
    cursor: pointer;
    font-family: inherit;
  }
  .nav-links a.active {
    border-color: rgba(44, 73, 127, 0.35);
    color: var(--brand-deep);
    background: rgba(44, 73, 127, 0.08);
  }
  .nav-logout-mobile {
    display: block;
    margin-top: 0.25rem;
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.25);
  }
  body.nav-open { overflow: hidden; }
  .row-item { grid-template-columns: 1fr auto; }
  .order-card { padding: 0.95rem; gap: 0.65rem; }
  .order-card-total { font-size: 1.05rem; }
  .order-card-cond { max-width: 100%; }
  .order-card-foot .btn { flex-shrink: 0; }
  .account-layout { grid-template-columns: 1fr; }
  .account-card-accent { grid-column: auto; }
  .account-ops { grid-template-columns: 1fr; }
  .cart-layout { grid-template-columns: 1fr; }
  .cart-aside { position: static; }
  .cart-item {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.85rem;
  }
  .cart-item-side {
    grid-column: 2; text-align: left; justify-items: start;
    flex-direction: row; display: flex; flex-wrap: wrap;
    align-items: baseline; gap: 0.5rem 0.85rem;
  }
  .cart-item-media { width: 72px; height: 72px; }
  .cart-item-media > img {
    inset: 0.45rem;
    width: calc(100% - 0.9rem);
    height: calc(100% - 0.9rem);
  }
}

/* —— Loading states (skeleton + branded) —— */
.b2b-load {
  display: grid;
  gap: 0.85rem;
  padding: 0.35rem 0 0.15rem;
  width: 100%;
}
.grid-products > .b2b-load {
  grid-column: 1 / -1;
}
.b2b-load-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 0.35rem 0 0.55rem;
}
.b2b-load-copy {
  display: grid;
  gap: 0.15rem;
  text-align: left;
}
.b2b-load-copy strong {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-deep);
  letter-spacing: -0.02em;
}
.b2b-load-copy span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.b2b-orbit {
  --orbit-size: 44px;
  position: relative;
  width: var(--orbit-size);
  height: var(--orbit-size);
  flex-shrink: 0;
}
.b2b-orbit-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(44, 73, 127, 0.12);
  border-top-color: var(--brand);
  border-right-color: var(--accent);
  animation: b2b-spin 0.9s linear infinite;
}
.b2b-orbit-core {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 45%),
    linear-gradient(145deg, var(--brand), var(--bg-1));
  box-shadow: 0 6px 16px rgba(21, 36, 63, 0.22);
  animation: b2b-pulse 1.4s ease-in-out infinite;
}
.b2b-orbit-dot {
  position: absolute;
  top: -3px; left: 50%;
  width: 8px; height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 162, 58, 0.22);
  animation: b2b-spin 0.9s linear infinite;
  transform-origin: 50% calc(var(--orbit-size) / 2 + 3px);
}

@keyframes b2b-spin {
  to { transform: rotate(360deg); }
}
@keyframes b2b-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.92); opacity: 0.88; }
}
@keyframes b2b-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.skel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    90deg,
    rgba(44, 73, 127, 0.07) 0%,
    rgba(44, 73, 127, 0.13) 45%,
    rgba(232, 162, 58, 0.12) 55%,
    rgba(44, 73, 127, 0.07) 100%
  );
  background-size: 220% 100%;
  animation: b2b-shimmer 1.35s ease-in-out infinite;
  border-radius: 10px;
}
.skel-line { height: 0.72rem; }
.skel-line.lg { height: 1rem; width: 42%; }
.skel-line.md { width: 68%; }
.skel-line.sm { width: 34%; height: 0.6rem; }
.skel-pill { height: 1.35rem; width: 5.5rem; border-radius: 999px; }

.skel-order {
  display: grid;
  gap: 0.7rem;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
  background: rgba(255, 255, 255, 0.72);
}
.skel-order-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}
.skel-order-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.skel-product {
  display: grid;
  gap: 0.75rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}
.skel-thumb {
  aspect-ratio: 1;
  width: 100%;
  border-radius: 14px;
}

.skel-detail {
  display: grid;
  gap: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.75);
}
.skel-detail-hero {
  display: grid;
  grid-template-columns: minmax(120px, 220px) 1fr;
  gap: 1.1rem;
  align-items: start;
}
.skel-detail-hero .skel-thumb { max-width: 220px; }
.skel-detail-lines { display: grid; gap: 0.55rem; padding-top: 0.2rem; }

.skel-account {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.skel-account-card {
  display: grid;
  gap: 0.65rem;
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.75);
}

.b2b-load-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9rem;
}
.b2b-load-inline .b2b-orbit { --orbit-size: 22px; }
.b2b-load-inline .b2b-orbit-core { inset: 5px; }
.b2b-load-inline .b2b-orbit-dot {
  width: 5px; height: 5px; margin-left: -2.5px; top: -2px;
  transform-origin: 50% calc(var(--orbit-size) / 2 + 2px);
}

@keyframes b2b-loader-bar {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

@media (max-width: 640px) {
  .skel-detail-hero { grid-template-columns: 1fr; }
  .b2b-load-head { flex-direction: column; text-align: center; }
  .b2b-load-copy { text-align: center; }
}

/* Página de sucesso pós-checkout */
.success-hero {
  text-align: center;
  padding: 0.5rem 0 1.4rem;
  max-width: 40rem;
  margin: 0 auto;
}
.success-check {
  width: 4.5rem; height: 4.5rem;
  margin: 0 auto 0.85rem;
  border-radius: 999px;
  display: grid; place-items: center;
  color: #fff;
  background: linear-gradient(145deg, var(--brand) 0%, var(--brand-deep) 100%);
  box-shadow: 0 14px 34px rgba(44, 73, 127, 0.28);
}
.success-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.5vw, 2.35rem);
  letter-spacing: -0.04em;
  color: var(--ink);
}
.success-hero > p {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.45;
}
.success-multi-note {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--brand-deep);
}
.success-grid {
  display: grid;
  gap: 0.9rem;
  max-width: 720px;
  margin: 0 auto;
}
.success-order-card { margin: 0; }
.success-order-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}
.success-order-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
}
.success-order-meta {
  margin: 0.3rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}
.success-order-total {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--brand-deep);
  white-space: nowrap;
}
.success-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.success-fact {
  display: grid;
  gap: 0.25rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(44, 73, 127, 0.06);
}
.success-fact span {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.success-fact strong {
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.3;
  font-weight: 700;
}
.success-fin-note {
  margin: 0.75rem 0 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
  font-weight: 600;
}
.success-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}
.success-seller .success-seller-label {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.success-seller h2 {
  margin: 0.35rem 0 0.85rem;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--ink);
}
.success-seller-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.success-footer-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin: 1.35rem auto 0;
  max-width: 720px;
}
@media (max-width: 700px) {
  .success-facts { grid-template-columns: 1fr; }
  .success-footer-actions .btn { flex: 1 1 100%; }
}

.pedido-actions {
  display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center;
}

/* Documento imprimível / PDF */
body.print-doc .topbar,
body.print-doc .footer-note,
body.print-doc .minicart,
body.print-doc .minicart-backdrop,
body.print-doc .toast,
body.print-doc .loader-bar,
body.print-doc .nav-backdrop {
  display: none !important;
}
body.print-doc {
  background: #e8edf5;
}
body.print-doc .page {
  width: min(880px, calc(100% - 1.5rem));
  padding: 1rem 0 2.5rem;
}
.print-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}
.print-toolbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.print-sheet {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.5rem 1.6rem 1.75rem;
  box-shadow: var(--shadow);
  color: #15243f;
}
.print-loading {
  margin: 2rem 0;
  text-align: center;
  color: var(--muted);
  font-weight: 600;
}
.print-head {
  display: flex;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding-bottom: 1.1rem;
  margin-bottom: 1.1rem;
  border-bottom: 2px solid rgba(44, 73, 127, 0.18);
}
.print-brand {
  display: flex; align-items: center; gap: 0.75rem;
}
.print-brand img {
  width: 52px; height: 52px; object-fit: contain;
  border-radius: 12px; background: #f3f5f9; padding: 4px;
}
.print-brand strong {
  display: block;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}
.print-brand span {
  display: block;
  margin-top: 0.15rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}
.print-head-meta { text-align: right; font-size: 0.92rem; }
.print-os {
  font-family: var(--display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--brand-deep);
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}
.print-section { margin-bottom: 1.25rem; }
.print-section h2 {
  margin: 0 0 0.55rem;
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.print-parties {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.print-parties p { margin: 0.2rem 0; font-size: 0.92rem; line-height: 1.4; }
.print-name {
  font-family: var(--display);
  font-size: 1.1rem !important;
  font-weight: 800;
  color: var(--brand-deep);
}
.print-sheet .muted { color: var(--muted); font-size: 0.85rem; }
.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.print-table th,
.print-table td {
  border-bottom: 1px solid rgba(44, 73, 127, 0.12);
  padding: 0.55rem 0.4rem;
  vertical-align: top;
}
.print-table th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 800;
}
.print-table .num { text-align: right; white-space: nowrap; width: 1%; }
.print-table .money { text-align: right; white-space: nowrap; font-weight: 700; }
.print-table td.num { font-variant-numeric: tabular-nums; }
.print-totals {
  margin: 0.5rem 0 1.25rem auto;
  max-width: 280px;
  display: grid;
  gap: 0.35rem;
}
.print-totals .line,
.print-totals .total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.95rem;
}
.print-totals .total {
  margin-top: 0.35rem;
  padding-top: 0.55rem;
  border-top: 2px solid rgba(44, 73, 127, 0.2);
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--brand-deep);
}
.print-foot {
  margin-top: 1.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(44, 73, 127, 0.14);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.print-foot p { margin: 0.25rem 0; }

@media (max-width: 700px) {
  .print-parties { grid-template-columns: 1fr; }
  .print-head-meta { text-align: left; }
}

@media print {
  @page { margin: 12mm 12mm; size: A4; }
  html, body {
    background: #fff !important;
    min-height: 0 !important;
  }
  body.print-doc .page {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .no-print,
  body.print-doc .topbar,
  body.print-doc .footer-note,
  body.print-doc .minicart,
  body.print-doc .minicart-backdrop,
  body.print-doc .toast,
  body.print-doc .loader-bar,
  body.print-doc .nav-backdrop,
  body.print-doc .print-toolbar {
    display: none !important;
  }
  .print-sheet {
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
  }
  .print-table th,
  .print-table td {
    border-bottom-color: #ccc !important;
  }
  a { color: inherit !important; text-decoration: none !important; }
}

/* ——— 404 tematizado ——— */
.error-404-body {
  min-height: 100vh;
  background: #15243f;
}
.error-404-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  overflow: hidden;
  color: #eef2f8;
  background:
    radial-gradient(900px 520px at 12% 18%, rgba(232, 162, 58, 0.22), transparent 58%),
    radial-gradient(700px 480px at 92% 78%, rgba(44, 73, 127, 0.55), transparent 55%),
    linear-gradient(155deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
}
.error-404-atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.error-404-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}
.error-404-orb-a {
  width: min(42vw, 320px);
  height: min(42vw, 320px);
  top: 8%;
  right: 6%;
  background: radial-gradient(circle, rgba(232, 162, 58, 0.35), transparent 68%);
}
.error-404-orb-b {
  width: min(50vw, 380px);
  height: min(50vw, 380px);
  bottom: 4%;
  left: -6%;
  background: radial-gradient(circle, rgba(238, 242, 248, 0.1), transparent 70%);
}
.error-404-watermark {
  position: absolute;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(8rem, 28vw, 18rem);
  letter-spacing: -0.08em;
  line-height: 0.85;
  color: rgba(238, 242, 248, 0.06);
  user-select: none;
  white-space: nowrap;
}
.error-404-main {
  position: relative;
  z-index: 1;
  max-width: 34rem;
  margin: 0 auto;
  text-align: center;
}
.error-404-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin: 0 0 1.75rem;
  color: #fff;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  letter-spacing: -0.055em;
  line-height: 1;
}
.error-404-brand img {
  width: clamp(3.2rem, 8vw, 4.4rem);
  height: clamp(3.2rem, 8vw, 4.4rem);
  object-fit: contain;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.28));
}
.error-404-kicker {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 162, 58, 0.95);
}
.error-404-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(1.55rem, 3.6vw, 2.15rem);
  letter-spacing: -0.035em;
  color: #fff;
  line-height: 1.15;
}
.error-404-lead {
  margin: 0.85rem auto 0;
  max-width: 26rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(238, 242, 248, 0.78);
}
.error-404-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  justify-content: center;
  margin-top: 1.75rem;
}
.error-404-btn-ghost {
  border-color: rgba(238, 242, 248, 0.28) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
}
.error-404-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.14) !important;
  border-color: rgba(238, 242, 248, 0.45) !important;
}
.error-404-foot {
  position: relative;
  z-index: 1;
  margin: 3rem 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(238, 242, 248, 0.45);
}

@media (max-width: 560px) {
  .error-404-actions { flex-direction: column; align-items: stretch; }
  .error-404-actions .btn { width: 100%; justify-content: center; }
}

/* —— Trade / Parceria —— */
.page-trade .page { padding-top: 0; }

.trade-hero {
  position: relative;
  margin: 0 calc(50% - 50vw) 1.5rem;
  width: 100vw;
  overflow: hidden;
  color: #eef2f8;
}
.trade-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 90% at 90% 20%, rgba(232, 162, 58, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 80% at 0% 100%, rgba(124, 229, 119, 0.14), transparent 50%),
    linear-gradient(135deg, #15243f 0%, #20365e 42%, #2c497f 100%);
}
.trade-hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    radial-gradient(circle at 18% 40%, rgba(255,255,255,0.14) 0 1.5px, transparent 2px),
    radial-gradient(circle at 72% 60%, rgba(255,255,255,0.1) 0 1px, transparent 2px);
  background-size: 48px 48px, 72px 72px;
}
.trade-hero-inner {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.75rem 0 1.85rem;
}
.trade-hero-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 162, 58, 0.95);
}
.trade-hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  color: #fff;
}
.trade-hero-lead {
  margin: 0.55rem 0 0;
  max-width: 34rem;
  font-size: 1.02rem;
  line-height: 1.45;
  color: rgba(238, 242, 248, 0.78);
}

.trade-layout {
  display: grid;
  gap: 1.35rem;
}

.trade-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(44, 73, 127, 0.14);
  border-radius: 22px;
  padding: 0;
  background: #fff;
  box-shadow: 0 20px 48px rgba(21, 36, 63, 0.1);
}
.trade-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), var(--brand));
}
.trade-card-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.25rem 1.35rem 1rem 1.5rem;
  background:
    linear-gradient(105deg, rgba(44, 73, 127, 0.06) 0%, transparent 55%),
    #f8f9fc;
  border-bottom: 1px solid var(--line);
}
.trade-card-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.trade-card-titles h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.4vw, 1.45rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--brand-deep);
}
.trade-period {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0.4rem 0 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-soft);
}
.trade-period-sep {
  width: 1.1rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.trade-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.trade-badge-on {
  background: rgba(232, 162, 58, 0.18);
  color: #8a5a12;
  border: 1px solid rgba(232, 162, 58, 0.35);
}
.trade-badge-done {
  background: rgba(44, 73, 127, 0.12);
  color: var(--brand-deep);
  border: 1px solid rgba(44, 73, 127, 0.18);
}
.trade-badge-muted {
  background: rgba(30, 47, 82, 0.06);
  color: var(--muted);
}

.trade-card-body {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: center;
  padding: 1.35rem 1.5rem 0.5rem;
}

.trade-gauge { text-align: center; }
.trade-gauge-ring {
  position: relative;
  width: 128px;
  height: 128px;
  margin: 0 auto;
}
.trade-ring {
  width: 128px;
  height: 128px;
  transform: rotate(-90deg);
}
.trade-ring-track,
.trade-ring-prog {
  fill: none;
  stroke-width: 10;
  stroke-linecap: round;
}
.trade-ring-track { stroke: rgba(44, 73, 127, 0.1); }
.trade-ring-prog { stroke: var(--brand); }
.trade-gauge-value {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}
.trade-gauge-value strong {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--brand-deep);
  line-height: 1;
}
.trade-gauge-value span {
  margin-top: 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.trade-gauge-meta {
  margin: 0.55rem 0 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  max-width: 9.5rem;
}

.trade-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}
.trade-metric {
  padding: 0.85rem 0.9rem;
  border-radius: 14px;
  background: #f3f5f9;
  border: 1px solid transparent;
}
.trade-metric span {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 0.35rem;
}
.trade-metric strong {
  font-family: var(--display);
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.trade-metric-accent {
  background: rgba(44, 73, 127, 0.08);
  border-color: rgba(44, 73, 127, 0.12);
}
.trade-metric-accent strong { color: var(--brand-deep); }
.trade-metric-reward {
  background: linear-gradient(160deg, rgba(232, 162, 58, 0.2), rgba(232, 162, 58, 0.08));
  border-color: rgba(232, 162, 58, 0.28);
}
.trade-metric-reward strong { color: #7a4e0f; }

.trade-track-block {
  padding: 1.1rem 1.5rem 0.35rem;
}
.trade-track-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.35rem;
}
.trade-track {
  position: relative;
  padding: 0 0.4rem 2.85rem;
}
.trade-track-rail {
  height: 6px;
  border-radius: 999px;
  background: rgba(44, 73, 127, 0.1);
  overflow: hidden;
}
.trade-track-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand) 0%, #3d6bb0 55%, var(--accent) 100%);
  transform-origin: left center;
}
.trade-miles {
  list-style: none;
  margin: 0;
  padding: 0;
  position: absolute;
  left: 0.4rem;
  right: 0.4rem;
  top: 0;
  height: 6px;
}
.trade-mile {
  position: absolute;
  top: 0;
  left: var(--mile-left, 0%);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 6.5rem;
  pointer-events: none;
}
.trade-mile-dot {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin-top: -4px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid rgba(44, 73, 127, 0.25);
  box-shadow: 0 0 0 3px #fff;
}
.trade-mile.is-hit .trade-mile-dot {
  border-color: var(--accent);
  background: var(--accent);
}
.trade-mile-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 0.55rem;
  text-align: center;
}
.trade-mile-pct {
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--brand-deep);
  line-height: 1.2;
}
.trade-mile-reward {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  line-height: 1.25;
}
.trade-mile.is-hit .trade-mile-reward { color: #7a4e0f; }

.trade-hint {
  margin: 0.35rem 1.5rem 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--brand-deep);
  background: rgba(44, 73, 127, 0.06);
  border: 1px solid rgba(44, 73, 127, 0.1);
}
.trade-hint-ok {
  background: rgba(232, 162, 58, 0.12);
  border-color: rgba(232, 162, 58, 0.28);
  color: #6b4310;
}
.trade-liq {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.75rem 1.5rem 0;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  background: var(--brand-deep);
  color: #fff;
}
.trade-liq span {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.8;
}
.trade-liq strong {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
}

.trade-note {
  margin: 0.9rem 1.5rem 1.25rem;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.45;
}

.trade-history {
  padding: 0.25rem 0 0;
}
.trade-history-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--brand-deep);
}
.trade-history-head p {
  margin: 0.25rem 0 0.85rem;
  font-size: 0.88rem;
  color: var(--muted);
}
.trade-history ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.55rem;
}
.trade-history li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.05rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(21, 36, 63, 0.05);
  font-size: 0.9rem;
}
.trade-history li span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}
.trade-history li strong { color: var(--brand-deep); }
.trade-history-val { text-align: right; }
.trade-history-val strong {
  font-family: var(--display);
  font-size: 1.05rem;
}

.trade-empty {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 22px;
  background:
    linear-gradient(165deg, rgba(44, 73, 127, 0.06), transparent 50%),
    #fff;
  border: 1px solid var(--line);
}
.trade-empty-mark {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 35%, rgba(232,162,58,0.55), transparent 50%),
    linear-gradient(145deg, var(--brand), var(--brand-deep));
  box-shadow: 0 12px 28px rgba(44, 73, 127, 0.25);
}
.trade-empty h2 {
  margin: 0;
  font-family: var(--display);
  color: var(--brand-deep);
}
.trade-empty p {
  margin: 0.5rem auto 1.25rem;
  max-width: 28rem;
  color: var(--ink-soft);
}

@media (max-width: 720px) {
  .trade-card-body {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .trade-metrics { grid-template-columns: 1fr; width: 100%; }
  .trade-gauge-meta { max-width: none; }
  .trade-card-head {
    flex-wrap: wrap;
    padding: 1.1rem 1.15rem 0.95rem 1.25rem;
  }
  .trade-card-body { padding: 1.15rem 1.15rem 0.35rem; }
  .trade-track-block { padding: 1rem 1.15rem 0.25rem; }
  .trade-track-label { margin-bottom: 0.75rem; }
  .trade-hint,
  .trade-liq,
  .trade-note {
    margin-left: 1.15rem;
    margin-right: 1.15rem;
  }

  /* Faixas: lista vertical no mobile (sem overlap) */
  .trade-track {
    padding: 0;
  }
  .trade-track-rail {
    display: none;
  }
  .trade-miles {
    position: static;
    height: auto;
    display: grid;
    gap: 0.55rem;
  }
  .trade-mile {
    position: static;
    left: auto;
    transform: none;
    width: 100%;
    max-width: none;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border-radius: 12px;
    background: #f3f5f9;
    border: 1px solid var(--line);
    pointer-events: auto;
  }
  .trade-mile.is-hit {
    background: rgba(232, 162, 58, 0.12);
    border-color: rgba(232, 162, 58, 0.3);
  }
  .trade-mile-dot {
    margin-top: 0;
    box-shadow: none;
  }
  .trade-mile-copy {
    margin-top: 0;
    align-items: flex-start;
    text-align: left;
    min-width: 0;
  }
  .trade-mile-pct {
    font-size: 0.92rem;
  }
  .trade-mile-reward {
    font-size: 0.8rem;
    margin-top: 0.1rem;
  }

  .trade-history li { flex-direction: column; }
  .trade-history-val { text-align: left; }
}

.acordo-slot {
  display: grid;
  gap: 0.85rem;
  margin: 1.1rem 0 0.2rem;
}
.acordo-slot-compact {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.acordo-card {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(232, 162, 58, 0.18), transparent 46%),
    linear-gradient(165deg, #fff 0%, #f4f7fb 100%);
  border: 1px solid rgba(44, 73, 127, 0.16);
  border-radius: 20px;
  padding: 1.15rem 1.2rem 1rem;
  box-shadow: var(--shadow);
}
.acordo-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #2C497F, #e8a23a);
}
.acordo-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}
.acordo-kicker {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2C497F;
}
.acordo-card h3 {
  margin: 0.2rem 0 0;
  font-family: var(--display);
  font-size: 1.35rem;
  letter-spacing: -0.03em;
}
.acordo-pill {
  flex: none;
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 800;
}
.acordo-pill.is-ok {
  background: #e7f6ee;
  color: #0f7a45;
}
.acordo-pill.is-warn {
  background: #fff4e5;
  color: #9a5b00;
}
.acordo-benefit,
.acordo-hint,
.acordo-dates,
.acordo-obs,
.acordo-pct {
  margin: 0.55rem 0 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.45;
}
.acordo-hint-ok { color: #0f7a45; }
.acordo-obs {
  padding-top: 0.45rem;
  border-top: 1px solid rgba(44, 73, 127, 0.1);
}
.acordo-bar {
  margin-top: 0.75rem;
  height: 8px;
  border-radius: 999px;
  background: rgba(44, 73, 127, 0.1);
  overflow: hidden;
}
.acordo-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2C497F, #e8a23a);
}
.acordo-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.8rem;
}
.acordo-metrics div {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(44, 73, 127, 0.08);
  border-radius: 12px;
  padding: 0.55rem 0.65rem;
}
.acordo-metrics span {
  display: block;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.acordo-metrics strong {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.95rem;
}
@media (max-width: 720px) {
  .acordo-metrics { grid-template-columns: 1fr; }
  .acordo-card-top { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important; transition: none !important;
  }
  .skel {
    background: rgba(44, 73, 127, 0.1);
  }
}
