/* =============================================================================
   Mais Vendidos Hub — estilos globais
   Tema único "Marketplace": amarelo #ffd84d + azul profundo #294a8a/#1d315d.

   Sumário:
     1. Design tokens
     2. Base e utilitários de layout
     3. Botões e links de ação
     4. Formulários de busca
     5. Cabeçalho público
     6. Hero (cartão azul sobre faixa amarela)
     7. Janela "Como funciona"
     8. Faixa de confiança
     9. Títulos de seção e página
    10. Página inicial — faixas por categoria
    11. Prateleiras horizontais de produtos
    12. Cartão de produto
    13. Cartão de categoria (/categorias e busca)
    14. Página de categoria
    15. Estados (vazio, carregando, erro, 404)
    16. Rodapé
    17. Área administrativa
    18. Responsivo
    19. Busca e filtro em tempo real de categorias (/categorias)
   ============================================================================= */


/* -----------------------------------------------------------------------------
   1. Design tokens
----------------------------------------------------------------------------- */
:root {
  /* Neutros */
  --ink: #20242d;
  --muted: #667085;
  --cream: #f4f5f7;
  --paper: #ffffff;
  --mist: #eef1f6;
  --line: #e2e5ea;

  /* Identidade */
  --blue: #294a8a;
  --blue-dark: #1d315d;
  --blue-soft: #e8eefb;
  --yellow: #ffd84d;
  --yellow-deep: #f3c52e;
  --green: #24875d;

  /* Feedback */
  --danger: #a13b27;
  --warning-bg: #fff1d1;
  --warning-ink: #85601e;

  --shadow: 0 16px 40px rgba(32, 36, 45, .10);
}

/* -----------------------------------------------------------------------------
   2. Base e utilitários de layout
----------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  zoom: 1.1;
}

@media (max-width: 600px) {
  body {
    zoom: 1;
  }
}

a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(41, 74, 138, .45);
  outline-offset: 3px;
}

img { max-width: 100%; }

/* Container proporcional e equilibrado (densidade elegante de marketplace) */
.shell {
  width: min(1260px, calc(100% - 32px));
  margin-inline: auto;
}
@media (min-width: 1440px) {
  /* Em telas de 27", mantem alinhamento compacto e confortavel (estilo Mercado Livre / Amazon) */
  .shell {
    width: min(1300px, calc(100% - 48px));
  }
}
@media (max-width: 760px) {
  .shell {
    width: min(100% - 24px, 640px);
  }
}

.page-main { min-height: calc(100vh - 160px); }

.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;
}
/* -----------------------------------------------------------------------------
   3. Botões e links de ação
----------------------------------------------------------------------------- */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 0; border-radius: 8px; padding: 9px 13px;
  font-size: .72rem; font-weight: 800; cursor: pointer;
  transition: transform .15s ease, background .15s ease;
}
.button:hover { transform: translateY(-1px); }

.button-primary { background: var(--blue); color: #fff; }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { background: var(--blue-soft); color: var(--blue-dark); }
.button-yellow { background: var(--yellow); color: var(--blue-dark); }
.button-yellow:hover { background: var(--yellow-deep); }
.button-light { background: #fff; color: var(--blue-dark); }
.button-muted { background: var(--mist); color: var(--muted); }
.button-wide { width: 100%; margin-top: 16px; }

.text-link { color: var(--blue); font-size: .82rem; font-weight: 800; }
.text-link:hover { color: var(--blue-dark); }

.text-button {
  border: 0; background: transparent; color: var(--blue);
  cursor: pointer; font-size: .8rem; font-weight: 800; padding: 4px;
}
.text-button-danger { color: var(--danger); }
.small-button { padding: 8px 10px; font-size: .72rem; }

/* -----------------------------------------------------------------------------
   4. Formulários de busca
----------------------------------------------------------------------------- */
.search-form {
  display: flex; align-items: center; gap: 10px;
  max-width: 670px; margin-top: 17px;
  padding: 7px 8px 7px 15px;
  border-radius: 12px; background: var(--paper);
  box-shadow: 0 12px 30px rgba(10, 23, 50, .25);
}
.search-form input {
  min-width: 0; flex: 1;
  border: 0; outline: 0; padding: 12px 8px;
  background: transparent; color: var(--ink);
}
.search-form input::placeholder { color: #8b9792; }
.search-icon { color: var(--blue); font-size: 1.65rem; line-height: 1; padding-left: 0; }

.button-search { min-width: 92px; background: var(--blue); color: #fff; }
.button-search:hover { background: var(--blue-dark); }

/* -----------------------------------------------------------------------------
   5. Cabeçalho público
----------------------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: var(--yellow);
  box-shadow: 0 3px 12px rgba(31, 49, 93, .12);
}
.header-inner {
  min-height: 70px;
  display: grid;
  grid-template-columns: max-content minmax(280px, 1fr) max-content;
  align-items: center; gap: 22px;
}


.site-logo {
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  transition: transform .18s ease;
}
.brand-logo-link {
  text-decoration: none;
}
.brand-logo-link:hover .site-logo {
  transform: translateY(-1px) scale(1.02);
}
@media (max-width: 760px) {
  .site-logo {
    height: 34px;
    max-width: 170px;
  }
}

.brand-mark {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--blue-dark);
  font-size: 1rem; font-weight: 800; letter-spacing: -.02em;
}
.brand-symbol {
  display: grid; place-items: center;
  width: 39px; height: 39px;
  border-radius: 12px;
  background: var(--blue-dark); color: var(--yellow);
  box-shadow: 4px 4px 0 rgba(255, 255, 255, .72);
  font-size: .78rem; font-weight: 900; letter-spacing: -.04em;
}
.brand-copy { display: flex; flex-direction: column; line-height: 1.05; }
.brand-copy strong { max-width: 180px; font-size: .98rem; }
.brand-copy small {
  margin-top: 4px;
  color: rgba(29, 49, 93, .72);
  font-size: .61rem; font-weight: 700;
  letter-spacing: .08em; text-transform: uppercase;
}

.header-search { min-width: 0; }
.header-search .search-form {
  width: 100%; max-width: none; margin: 0;
  padding: 5px 6px 5px 13px;
  border-radius: 10px; border: 0;
  box-shadow: 0 2px 8px rgba(29, 49, 93, .16);
}
.header-search .search-form input { padding-block: 9px; }
.header-search .search-icon { font-size: 1.3rem; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-categories-link, .header-admin-link {
  color: var(--blue-dark); font-size: .78rem; font-weight: 800;
}
.header-admin-link {
  padding: 7px 11px;
  border: 1px solid rgba(29, 49, 93, .24);
  border-radius: 9px;
}
.header-actions a:hover { color: #0f2044; }

/* -----------------------------------------------------------------------------
   6. Hero — cartão azul sobre faixa amarela
----------------------------------------------------------------------------- */
.hero {
  padding: 22px 0 18px;
  background: linear-gradient(180deg, var(--yellow) 0 58%, var(--cream) 58% 100%);
}
.hero-banner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(250px, .55fr);
  min-height: 265px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(130deg, var(--blue-dark), #315595);
  color: #fff;
  box-shadow: 0 24px 60px rgba(29, 49, 93, .24);
}
.hero-banner::before, .hero-banner::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .13);
}
.hero-banner::before { width: 420px; height: 420px; right: -150px; top: -170px; }
.hero-banner::after { width: 220px; height: 220px; right: 180px; bottom: -150px; }

.hero-content { position: relative; z-index: 2; padding: 28px 20px 25px 36px; }
.hero-pill {
  display: inline-flex; width: fit-content;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 999px;
  background: rgba(255, 255, 255, .10);
  color: #fff3bd;
  font-size: .68rem; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase;
}
.hero-pill-light { color: #fff0ab; }

.hero h1 {
  max-width: 720px;
  margin: 14px 0 12px;
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  font-weight: 850; line-height: .98; letter-spacing: -.055em;
}
.hero-copy { max-width: 680px; margin: 0; color: #dfe8fa; font-size: .82rem; }
.hero-shortcuts { display: flex; gap: 10px; margin-top: 9px; color: #dfe8fa; font-size: .66rem; }
.hero-shortcuts a, .hero-shortcut-button { font-weight: 700; }
.hero-shortcuts a:hover, .hero-shortcut-button:hover { color: var(--yellow); }
.hero-shortcut-button { margin: 0; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; }

.hero-ranking {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center;
  padding: 24px;
}
.ranking-orbit {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  width: 118px; height: 118px;
  border: 9px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  background: var(--yellow); color: var(--blue-dark);
  box-shadow: 0 20px 50px rgba(10, 23, 50, .35), inset 0 0 0 2px rgba(255, 255, 255, .55);
  transform: rotate(3deg);
}
.ranking-number { font-size: 2.45rem; font-weight: 900; line-height: .85; letter-spacing: -.08em; }
.ranking-label { margin-top: 7px; font-size: .48rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

.hero-stats {
  display: grid; width: 100%;
  grid-template-columns: repeat(3, 1fr); gap: 7px;
  margin-top: 13px;
}
.hero-stats div { text-align: center; }
.hero-stats strong { display: block; font-size: 1rem; }
.hero-stats span { display: block; color: #c9d6ed; font-size: .6rem; line-height: 1.25; }

.hero-reasons {
  position: relative; z-index: 2;
  grid-column: 1 / -1;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px;
  padding: 0 36px 26px;
}
.hero-reason {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--yellow);
  color: var(--blue-dark);
  box-shadow: 0 10px 24px rgba(10, 23, 50, .18);
}
.hero-reason > span {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 28px; height: 28px;
  border-radius: 9px;
  background: var(--blue-dark); color: var(--yellow);
  font-size: .82rem; font-weight: 900;
}
.hero-reason strong { display: block; font-size: .78rem; font-weight: 850; line-height: 1.2; }
.hero-reason small { display: block; margin-top: 2px; color: rgba(29, 49, 93, .74); font-size: .68rem; line-height: 1.35; }
@media (max-width: 760px) {
  .hero-reasons { grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 8px; padding: 0 20px 20px; }
  .hero-reason { padding: 10px 12px; }
}

/* -----------------------------------------------------------------------------
   7. Janela "Como funciona"
----------------------------------------------------------------------------- */
.how-dialog-backdrop {
  position: fixed; inset: 0; z-index: 99999;
  display: grid; place-items: center;
  padding: 16px;
  background: rgba(9, 19, 42, .75);
  backdrop-filter: blur(4px);
}
.how-dialog-backdrop[hidden] {
  display: none !important;
}
.how-dialog {
  position: relative;
  z-index: 100000;
  width: min(500px, calc(100% - 32px));
  max-height: calc(100dvh - 32px);
  margin: 0; padding: 0;
  overflow: auto;
  border: 0; border-radius: 20px;
  background: #fff; color: var(--ink);
  box-shadow: 0 28px 80px rgba(9, 19, 42, .34);
}
.how-dialog-card { position: relative; padding: 30px; }
.how-dialog-close {
  position: absolute; top: 14px; right: 14px;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  border: 0; border-radius: 50%;
  background: #edf0f5; color: var(--blue-dark);
  font-size: 1.35rem; line-height: 1; cursor: pointer;
}
.how-dialog-kicker { color: var(--blue); font-size: .66rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.how-dialog h2 { margin: 4px 0 7px; font-size: 1.75rem; line-height: 1.05; letter-spacing: -.04em; }
.how-dialog-card > p { margin: 0; color: var(--muted); font-size: .88rem; }
.how-dialog-steps { display: grid; gap: 10px; margin: 22px 0 0; padding: 0; list-style: none; }
.how-dialog-steps li { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: #f4f6fa; }
.how-dialog-steps li > span {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--yellow); color: var(--blue-dark);
  font-size: .75rem; font-weight: 900;
}
.how-dialog-steps strong, .how-dialog-steps small { display: block; }
.how-dialog-steps strong { font-size: .8rem; }
.how-dialog-steps small { margin-top: 2px; color: var(--muted); font-size: .7rem; }

/* -----------------------------------------------------------------------------
   8. Faixa de confiança
----------------------------------------------------------------------------- */
.trust-strip { padding: 3px 0 18px; }
.trust-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid var(--line); border-radius: 14px;
  background: #fff;
}
.trust-grid > div { display: flex; align-items: center; gap: 11px; padding: 14px 18px; }
.trust-grid > div + div { border-left: 1px solid var(--line); }
.trust-grid > div > span {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 31px; height: 31px;
  border-radius: 50%;
  background: var(--blue-soft); color: var(--blue);
  font-size: .7rem; font-weight: 900;
}
.trust-grid p { margin: 0; color: var(--muted); font-size: .7rem; line-height: 1.35; }
.trust-grid strong { display: block; margin-bottom: 2px; color: var(--ink); font-size: .78rem; }

/* -----------------------------------------------------------------------------
   9. Títulos de seção e página
----------------------------------------------------------------------------- */
.section { padding: 34px 0 56px; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .66rem; font-weight: 800; color: var(--blue); }

.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; margin-bottom: 18px; }
.section-heading h2 {
  margin: 5px 0 0;
  font-size: clamp(1.7rem, 2.5vw, 2.35rem);
  font-weight: 850; line-height: 1; letter-spacing: -.045em;
}
.section-heading p { max-width: 420px; margin: 0; color: var(--muted); font-size: .86rem; text-align: right; }

.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 25px; padding: 40px 0 32px; }
.page-heading h1 { margin: 5px 0 0; font-size: clamp(1.7rem, 2.5vw, 2.35rem); font-weight: 850; letter-spacing: -.045em; }
.page-heading p { max-width: 520px; margin: 8px 0 0; color: var(--muted); }

/* -----------------------------------------------------------------------------
   10. Página inicial — faixas largas por categoria
----------------------------------------------------------------------------- */
.home-category-list { display: grid; gap: 20px; }
.home-category-showcase {
  width: 100%; min-width: 0;
  padding: 18px; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px;
  background: #fff;
  box-shadow: 0 7px 22px rgba(32, 36, 45, .06);
}
.home-category-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 16px; }
.home-category-intro { display: flex; min-width: 0; align-items: center; gap: 15px; }
.home-category-icon {
  display: grid; place-items: center; flex: 0 0 auto;
  width: 68px; height: 68px; overflow: hidden;
  border-radius: 18px;
  background: var(--yellow); color: var(--blue-dark);
  box-shadow: 6px 6px 0 rgba(41, 74, 138, .14);
  font-size: 1.7rem; font-weight: 900;
}
.home-category-icon img { width: 100%; height: 100%; object-fit: cover; }
.home-category-intro h3 { margin: 2px 0 3px; font-size: 1.15rem; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.home-category-intro p { max-width: 620px; margin: 2px 0 0; color: var(--muted); font-size: .68rem; line-height: 1.35; }
.home-subcategory-chips { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chips-label { font-size: .58rem; font-weight: 750; color: var(--muted, #64748b); text-transform: uppercase; letter-spacing: .06em; }
.subcategory-chip { display: inline-flex; align-items: center; font-size: .62rem; font-weight: 600; padding: 2px 7px; border-radius: 5px; background: #f1f5f9; border: 1px solid #e2e8f0; color: #334155; text-decoration: none; transition: all .15s ease; }
.subcategory-chip:hover { background: var(--blue-soft, #e8eefb); color: var(--blue, #294a8a); border-color: #cbd5e1; }

.shelf-count { color: var(--blue); font-size: .58rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.home-category-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 13px; }
.home-category-date { color: var(--muted); font-size: .64rem; white-space: nowrap; }
.shelf-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  color: var(--muted, #64748b);
  font-size: .52rem;
  letter-spacing: .02em;
  margin-top: 5px;
  padding-right: 2px;
  user-select: none;
  opacity: .85;
}

.home-category-empty {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 104px;
  border: 1px dashed #cbd3df; border-radius: 13px;
  background: #f7f8fb; color: var(--muted);
}
.home-category-empty > span {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue-soft); color: var(--blue); font-weight: 900;
}
.home-category-empty strong, .home-category-empty small { display: block; }
.home-category-empty strong { color: var(--ink); font-size: .8rem; }
.home-category-empty small { margin-top: 2px; font-size: .67rem; }

/* -----------------------------------------------------------------------------
   11. Prateleiras horizontais de produtos (100% no esquadro, alinhados e nivelados)
----------------------------------------------------------------------------- */
.product-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(170px, 185px);
  align-items: stretch;
  gap: 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  padding: 4px 4px 10px;
  scroll-padding-inline: 4px;
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.product-rail::-webkit-scrollbar {
  display: none;
}
.product-rail:active,
.product-rail.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
.product-rail:focus-visible { outline: 3px solid rgba(41, 74, 138, .35); outline-offset: 4px; }

.product-rail .product-card,
.product-grid .product-card {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  min-width: 0;
  scroll-snap-align: start;
  border-radius: 11px;
}
.product-rail .product-image-wrap,
.product-grid .product-image-wrap {
  height: 135px;
  min-height: 135px;
  max-height: 135px;
  flex-shrink: 0;
}
.product-rail .product-card-body,
.product-grid .product-card-body {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 1 auto;
  padding: 10px 11px;
}
.product-rail .product-meta-line,
.product-grid .product-meta-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 1.55em;
  max-height: 1.55em;
  overflow: hidden;
  font-size: .60rem;
  color: var(--muted);
  flex-shrink: 0;
}
.product-rail .product-meta-line > span:last-child,
.product-grid .product-meta-line > span:last-child {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1 1 auto;
}
.product-rail .product-card h3,
.product-grid .product-card h3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  height: 4.0em;
  line-height: 1.33;
  font-size: .76rem;
  font-weight: 700;
  margin: 5px 0 4px;
  word-break: break-word;
  flex-shrink: 0;
}
.product-rail .product-price,
.product-grid .product-price {
  font-size: 1.10rem;
  font-weight: 850;
  margin-top: 6px;
  margin-bottom: 8px;
  height: 1.3em;
  line-height: 1.3;
  flex-shrink: 0;
}
.product-rail .product-description,
.product-grid .product-description {
  display: none;
}
.product-rail .button,
.product-grid .button {
  margin-top: auto !important;
  padding: 6px 10px;
  font-size: .68rem;
  font-weight: 800;
  border-radius: 6px;
  width: 100%;
}
.product-rail .rank-badge,
.product-grid .rank-badge {
  font-size: .56rem;
  padding: 3px 6px;
}
.product-rail .product-affiliate-badge,
.product-grid .product-affiliate-badge {
  font-size: .52rem;
  padding: 3px 5px;
}

/* -----------------------------------------------------------------------------
   11b. Grade de produtos (Páginas de Busca e Categorias - 100% no esquadro)
----------------------------------------------------------------------------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 195px));
  gap: 12px;
  align-items: stretch;
  justify-content: start;
  margin-top: 14px;
}
.product-grid > div {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.product-grid > div .product-card {
  flex: 1 1 auto;
  height: 100%;
}
.product-grid > div .text-link {
  margin-top: 8px;
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary, #0056b3);
}
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }
}

.product-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #dfe3e9;
  border-radius: 12px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(32, 36, 45, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  cursor: pointer;
  overflow: hidden;
}
.product-card,
.product-card * {
  cursor: pointer !important;
}
.product-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(32, 36, 45, .12);
  border-color: #0070e0;
}
.product-card:hover h3 {
  color: #0070e0;
}
.product-card:hover .button-primary {
  background: #005bb5;
  box-shadow: 0 4px 14px rgba(0, 112, 224, .35);
}
.product-card .button {
  pointer-events: none;
}

.product-image-wrap {
  display: grid;
  place-items: center;
  position: relative;
  height: 160px;
  overflow: hidden;
  background: #fff;
  border-bottom: 1px solid #edf0f4;
}
.product-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
}
.product-image-empty {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: var(--mist);
  color: #98a2b3;
  font-size: 1.8rem;
}
.rank-badge {
  position: absolute;
  z-index: 2;
  left: 10px;
  right: auto;
  top: 10px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--blue-dark);
  font-size: .60rem;
  font-weight: 800;
}
.product-affiliate-badge {
  position: absolute;
  z-index: 2;
  top: 10px;
  right: 10px;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: .56rem;
  font-weight: 800;
  text-transform: uppercase;
}

.product-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 12px;
}
.product-card-body .button {
  margin-top: auto;
}
.product-meta-line {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: .61rem;
}
.condition {
  display: inline-block;
  border-radius: 4px;
  padding: 2px 6px;
  background: #e9f6f0;
  color: var(--green);
  font-size: .66rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}
.product-card h3 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  line-height: 1.30;
  min-height: 3.9em;
  margin: 6px 0 4px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: -.01em;
  word-break: break-word;
  overflow-wrap: break-word;
}
.product-description {
  min-height: 2.5em;
  color: var(--muted);
  font-size: .74rem;
}
.product-price {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -.025em;
}
.price-empty {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: .82rem;
}
.price-date {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: .65rem;
}
/* -----------------------------------------------------------------------------
   13. Cartão de categoria (/categorias e resultados de busca)
----------------------------------------------------------------------------- */
.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 13px;
}
@media (max-width: 760px) {
  .category-grid { grid-template-columns: 1fr; }
}

.category-card {
  display: flex;
  flex-direction: column;
  position: relative;
  border: 1px solid #dfe3e9;
  border-radius: 13px;
  background: #fff;
  color: inherit;
  box-shadow: 0 3px 12px rgba(32, 36, 45, .04);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  overflow: hidden;
}
.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(32, 36, 45, .11);
  border-color: #0070e0;
}
.category-card-top {
  position: relative;
  min-height: 105px;
  padding: 13px;
  background: linear-gradient(135deg, #f7f8fa, #e9eef8);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #edf0f4;
}
.category-art {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 15px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(41, 74, 138, .12);
  overflow: hidden;
}
.category-art > span:first-child {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--blue-dark);
  font-size: 1.45rem;
}
.category-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 6px;
}
.category-source {
  position: absolute;
  top: 9px;
  right: 9px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .90);
  border: 1px solid #e1e7f0;
  color: #526078;
  font-size: .55rem;
  font-weight: 700;
}
.category-source > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.category-source > span.is-stale { background: #e09b1f; }

.category-card-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  padding: 13px;
}
.category-card-body h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 750;
  color: var(--ink);
}
.category-card-body h3 a { color: inherit; }
.category-card-body h3 a:hover { color: #0070e0; }
.category-card p {
  min-height: 2.6em;
  margin: 0 0 10px;
  color: var(--muted);
  font-size: .72rem;
}
.category-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid #edf0f4;
}
.card-count {
  display: flex;
  flex-direction: column;
}
.card-count strong {
  color: var(--blue);
  font-size: 1.08rem;
  font-weight: 850;
  line-height: 1;
}
.card-count span {
  color: var(--muted);
  font-size: .59rem;
  margin-top: 2px;
}
.card-meta {
  color: var(--muted);
  font-size: .63rem;
}
/* -----------------------------------------------------------------------------
   14. Página de categoria
----------------------------------------------------------------------------- */
.category-page { padding: 0 0 70px; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 17px 0 11px; color: var(--muted); font-size: .66rem; }
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb strong { color: var(--ink); }

.category-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, .6fr);
  overflow: hidden;
  border-radius: 20px;
  background: linear-gradient(130deg, var(--blue-dark), #315595);
  color: #fff;
  box-shadow: 0 18px 46px rgba(29, 49, 93, .20);
}
.category-hero-content { max-width: none; padding: 32px 36px; }
.category-hero-content h1 {
  margin: 10px 0 8px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 850; letter-spacing: -.06em; line-height: 1;
}
.category-hero-content > p { max-width: 690px; margin: 0; color: #dce6f8; }
.update-line { color: var(--muted); font-size: .82rem; }
.category-hero-content .update-line { margin-top: 13px; color: #afc1e1; }
.category-links { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 17px; }

.category-summary { display: grid; align-content: center; gap: 1px; padding: 20px; background: rgba(8, 23, 52, .22); }
.category-summary > div { padding: 13px; border: 1px solid rgba(255, 255, 255, .13); background: rgba(255, 255, 255, .06); }
.category-summary span { display: block; color: #b9c9e4; font-size: .63rem; text-transform: uppercase; letter-spacing: .08em; }
.category-summary strong { display: block; margin-top: 5px; color: #fff; font-size: 1.15rem; }

.product-section { padding-bottom: 0; }

.ranking-empty-state {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(280px, .55fr);
  gap: 20px; align-items: center;
  padding: 24px;
  border: 1px solid #dce2ea; border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(32, 36, 45, .06);
}
.ranking-empty-icon {
  display: grid; place-items: center;
  width: 68px; height: 68px;
  border-radius: 20px;
  background: var(--yellow); color: var(--blue-dark);
  font-size: 1.9rem; font-weight: 900;
}
.status-kicker { color: var(--green); font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.ranking-empty-copy h2 { margin: 5px 0 8px; font-size: 1.4rem; font-weight: 800; line-height: 1.08; letter-spacing: -.035em; }
.ranking-empty-copy p { margin: 0; color: var(--muted); font-size: .84rem; }
.ranking-empty-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.ranking-status-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.ranking-status-list li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; background: #f3f7f5; }
.ranking-status-list li > span {
  display: grid; place-items: center;
  width: 25px; height: 25px; border-radius: 50%;
  background: var(--green); color: #fff;
  font-size: .68rem; font-weight: 900;
}
.ranking-status-list .is-pending { background: #fff7dd; }
.ranking-status-list .is-pending > span { background: #d39700; }
.ranking-status-list strong, .ranking-status-list small { display: block; }
.ranking-status-list strong { font-size: .7rem; }
.ranking-status-list small { margin-top: 2px; color: var(--muted); font-size: .61rem; }

/* -----------------------------------------------------------------------------
   15. Estados (vazio, carregando, erro, 404)
----------------------------------------------------------------------------- */
.empty-state {
  padding: 64px 22px; text-align: center;
  border: 1px dashed #cfd5de; border-radius: 20px;
  background: #fff;
}
.empty-icon { display: block; color: var(--yellow-deep); font-size: 2rem; }
.empty-state h2 { margin: 8px 0; font-weight: 850; letter-spacing: -.04em; }
.empty-state p { max-width: 470px; margin: 0 auto; color: var(--muted); }

/* -----------------------------------------------------------------------------
   16. Busca e rodapé
----------------------------------------------------------------------------- */
.search-page { padding-bottom: 56px; }
.search-result-label { margin: 30px 0 12px; font-size: 1.25rem; font-weight: 850; letter-spacing: -.03em; }
.search-summary { margin: 18px 0 0; color: var(--muted); font-size: .85rem; font-weight: 600; }

.site-footer { padding: 26px 0; background: var(--blue-dark); color: #d5dff0; font-size: .76rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.footer-inner p { margin: 0; }
.disclosure { margin: 22px 0 0; color: #707887; font-size: .78rem; }
.site-footer .disclosure { margin: 0; color: #b7c4db; }

/* -----------------------------------------------------------------------------
   17. Área administrativa
----------------------------------------------------------------------------- */
.admin-shell { min-height: 100vh; background: #eef3ee; }
.admin-header { background: var(--ink); color: #fff; }
.admin-header .header-inner { min-height: 66px; display: flex; }
.admin-header 
.site-logo {
  height: 42px;
  width: auto;
  max-width: 220px;
  object-fit: contain;
  display: block;
  transition: transform .18s ease;
}
.brand-logo-link {
  text-decoration: none;
}
.brand-logo-link:hover .site-logo {
  transform: translateY(-1px) scale(1.02);
}
@media (max-width: 760px) {
  .site-logo {
    height: 34px;
    max-width: 170px;
  }
}

.brand-mark { color: #fff; }
.admin-header .brand-symbol { background: var(--yellow-deep); color: var(--blue-dark); box-shadow: 4px 4px 0 var(--yellow); }
.admin-header .brand-copy small { color: #c9d6ed; }
.admin-header .text-button { color: #d9e4dd; }

.admin-content { padding: 42px 0 78px; }
.admin-topbar { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.admin-topbar h1 { margin: 0; font-size: 2.8rem; font-weight: 850; line-height: 1; letter-spacing: -.06em; }
.admin-topbar p { margin: 8px 0 0; color: var(--muted); }
.admin-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }

.admin-panel {
  padding: 24px;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--paper);
  box-shadow: 0 8px 24px rgba(32, 36, 45, .04);
}
.admin-panel h2 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 850; letter-spacing: -.04em; }
.admin-panel > p { margin: 4px 0 0; color: var(--muted); font-size: .86rem; }

.command-textarea {
  width: 100%; min-height: 145px; resize: vertical;
  margin: 16px 0 12px; padding: 13px;
  border: 1px solid var(--line); border-radius: 11px;
  background: #fbfcfa; color: var(--ink);
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field-full { grid-column: 1 / -1; }
.form-field label { font-size: .75rem; font-weight: 800; color: var(--ink); }
.form-field input, .form-field textarea, .form-field select {
  width: 100%;
  border: 1px solid var(--line); border-radius: 9px;
  padding: 10px 11px;
  background: #fbfcfa; color: var(--ink);
}
.form-field textarea { min-height: 100px; resize: vertical; }
.form-help { color: var(--muted); font-size: .72rem; }
.form-error, .form-success { margin: 12px 0 0; border-radius: 9px; padding: 10px 12px; font-size: .8rem; }
.form-error { background: #fff0ed; color: var(--danger); }
.form-success { background: #e9f5ed; color: var(--green); }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.check-field { display: flex; flex-direction: row; align-items: center; gap: 8px; font-size: .8rem; }
.check-field input { width: 17px; height: 17px; accent-color: var(--blue); }

.admin-category-list { display: grid; gap: 10px; margin-top: 18px; }
.admin-category-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; }
.admin-category-row h3 { margin: 0; font-size: .98rem; }
.admin-category-row p { margin: 2px 0 0; color: var(--muted); font-size: .73rem; }
.admin-category-row-actions { display: flex; flex-wrap: wrap; justify-content: end; gap: 7px; }

.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: .67rem; font-weight: 800; }
.status-active { background: #e1f1e5; color: var(--green); }
.status-inactive { background: #ecefed; color: var(--muted); }
.status-warn { background: var(--warning-bg); color: var(--warning-ink); }

.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.admin-table th, .admin-table td { padding: 12px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.admin-table th { color: var(--muted); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; }
.sync-error { max-width: 500px; color: var(--danger); font-size: .75rem; }

.login-page {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
  background: radial-gradient(circle at 10% 20%, #e8eefb, transparent 35%), var(--cream);
}
.login-card {
  width: min(420px, 100%);
  padding: 34px;
  border: 1px solid var(--line); border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow);
}
.login-card h1 { margin: 26px 0 7px; font-size: 2.2rem; font-weight: 850; line-height: 1; letter-spacing: -.06em; }
.login-card > p { color: var(--muted); font-size: .88rem; }
.login-card .form-field { margin-top: 17px; }
.login-card .button { margin-top: 22px; width: 100%; }

.disclosure-admin {
  margin: 22px 0 0;
  padding: 12px 14px; border-radius: 10px;
  background: #fff5dc; color: #765522;
  font-size: .78rem;
}

/* -----------------------------------------------------------------------------
   18. Responsivo
----------------------------------------------------------------------------- */
@media (max-width: 1020px) {
  .header-inner {
    grid-template-columns: max-content minmax(200px, 1fr) max-content;
    gap: 14px;
  }
  .brand-copy small { display: none; }
  .category-grid, .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }
  .hero-banner { grid-template-columns: 1fr 260px; }
  .hero-content { padding-left: 32px; }
  .ranking-orbit { width: 100px; height: 100px; }
  .ranking-number { font-size: 2.1rem; }
  .ranking-empty-state { grid-template-columns: auto 1fr; }
  .ranking-status-list { grid-column: 1 / -1; grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 760px) {
  .header-inner {
    grid-template-columns: 1fr max-content;
    min-height: auto;
    padding: 12px 0;
  }
  .header-search { grid-column: 1 / -1; grid-row: 2; }
  .header-categories-link { display: none; }
  .brand-symbol { width: 36px; height: 36px; }

  .hero {
    padding-top: 16px;
    background: linear-gradient(180deg, var(--yellow) 0 48%, var(--cream) 48% 100%);
  }
  .hero-banner {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    border-radius: 16px;
  }
  .hero-content {
    min-width: 0;
    padding: 22px 18px 18px;
  }
  .hero h1 { font-size: clamp(1.7rem, 7.5vw, 2.2rem); }
  .hero-copy { font-size: .90rem; }
  .hero-ranking { min-width: 0; padding: 0 18px 18px; }
  .ranking-orbit { display: none; }
  .hero-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, .14);
  }

  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid > div + div { border-top: 1px solid var(--line); border-left: 0; }

  .section { padding: 28px 0 42px; }
  .section-heading, .page-heading, .admin-topbar { display: block; }
  .section-heading p, .page-heading p { margin-top: 8px; text-align: left; }

  .category-grid, .product-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .category-card-top { min-height: 95px; }
  .category-hero-card { grid-template-columns: 1fr; }
  .category-hero-content { padding: 22px 16px; }
  .category-summary { grid-template-columns: repeat(3, 1fr); padding: 0 14px 16px; }
  .category-summary > div { padding: 10px 8px; }
  .category-summary strong { font-size: .80rem; }

  .ranking-empty-state { grid-template-columns: 1fr; padding: 18px; }
  .ranking-empty-icon { width: 52px; height: 52px; border-radius: 15px; }
  .ranking-status-list { grid-column: auto; grid-template-columns: 1fr; }

  .home-category-showcase { padding: 12px; }
  .home-category-header { align-items: flex-start; flex-direction: column; gap: 10px; }
  .home-category-icon { width: 44px; height: 44px; border-radius: 12px; font-size: 1.2rem; }
  .home-category-header h3 { font-size: 1.10rem; }
  .home-category-actions { width: 100%; justify-content: space-between; }
  .home-category-date { white-space: normal; font-size: .64rem; }
  .home-category-empty { min-height: 75px; padding: 12px; justify-content: flex-start; }

  .product-rail {
    grid-auto-columns: minmax(150px, 165px);
    gap: 8px;
  }
  .product-rail .product-image-wrap {
    height: 120px;
    min-height: 120px;
  }
}
/* -----------------------------------------------------------------------------
   20. Setas de Navegação no Trilho e Indicador de Mouse (Desktop)
----------------------------------------------------------------------------- */
.product-rail-wrapper {
  position: relative;
  width: 100%;
}

.rail-nav-btn {
  position: absolute;
  top: 70px;
  transform: translateY(-50%);
  z-index: 20;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d0d7de;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  color: #1a202c;
  cursor: pointer;
  opacity: 0.92;
  transition: opacity .2s ease, transform .15s ease, background .15s ease, box-shadow .15s ease;
}

.rail-nav-btn:hover {
  opacity: 1;
  background: var(--yellow, #ffd84d);
  color: #000;
  border-color: #f3c52e;
  transform: translateY(-50%) scale(1.10);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.24);
}

.rail-nav-prev {
  left: 2px;
}

.rail-nav-next {
  right: 2px;
}

@media (max-width: 768px) {
  .rail-nav-btn { display: none !important; }
}

.shelf-hint-bar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 6px;
  padding-right: 4px;
}

.shelf-mouse-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .68rem;
  font-weight: 650;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 3px 11px;
  letter-spacing: .01em;
}

.shelf-mouse-hint .mouse-icon {
  font-size: .85rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .shelf-hint-bar { display: none !important; }
}

/* Categorias compactas */
.category-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 7px;
  margin-bottom: 1.1rem;
}

.category-quick-pill {
  display: flex;
  align-items: center;
  gap: 0.50rem;
  padding: 0.45rem 0.65rem;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 7px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.category-quick-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0, 112, 224, 0.10);
  border-color: #0070e0;
}

.category-quick-icon {
  font-size: 0.88rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(0, 112, 224, 0.08);
  color: #0070e0;
  flex-shrink: 0;
}

.category-quick-label {
  font-size: 0.72rem;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.subcategory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 8px;
}

.subcategory-nav-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--paper, #fff);
  border: 1px solid #dfe3e9;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 1px 4px rgba(32, 36, 45, .03);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.subcategory-nav-card:hover {
  transform: translateY(-2px);
  border-color: #0070e0;
  box-shadow: 0 5px 12px rgba(0, 112, 224, .12);
}

.subcategory-nav-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: rgba(0, 112, 224, .08);
  color: #0070e0;
  font-size: .80rem;
  flex-shrink: 0;
}

.subcategory-nav-info strong {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--ink);
}

.subcategory-nav-info small {
  display: block;
  margin-top: 1px;
  color: var(--muted);
  font-size: .60rem;
}

.subcategory-nav-arrow {
  margin-left: auto;
  color: #a0aec0;
  font-size: .90rem;
  transition: transform .15s ease, color .15s ease;
}

.subcategory-nav-card:hover .subcategory-nav-arrow {
  transform: translateX(3px);
  color: #0070e0;
}

/* -----------------------------------------------------------------------------
   14. Popup Quick View de Produto (com botão Voltar / X sempre visível)
----------------------------------------------------------------------------- */
.pqv-backdrop {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(9, 19, 42, .74);
  backdrop-filter: blur(5px);
}
.pqv-backdrop[hidden] {
  display: none !important;
}
.pqv-dialog {
  position: relative;
  z-index: 100000;
  width: min(840px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  border-radius: 22px;
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(9, 19, 42, .40);
  animation: pqvIn .18s cubic-bezier(.16, 1, .3, 1);
}
@keyframes pqvIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.pqv-header {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--yellow);
  border-bottom: 1px solid rgba(15, 41, 66, .10);
}
.pqv-header-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .82rem;
  font-weight: 800;
  letter-spacing: -.01em;
  color: var(--blue-dark);
}
.pqv-header-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 112, 224, .18);
}
.pqv-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  background: var(--blue-dark);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(9, 19, 42, .18);
  transition: background .15s ease, transform .15s ease;
}
.pqv-close:hover {
  background: var(--blue);
  transform: translateY(-1px);
}
.pqv-body {
  display: grid;
  grid-template-columns: minmax(240px, 340px) 1fr;
  gap: 26px;
  padding: 24px;
  align-items: start;
}
.pqv-image-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  padding: 22px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f8fafd;
}
.pqv-image {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}
.pqv-image[hidden] { display: none; }
.pqv-image-empty {
  font-size: 2.5rem;
  color: #cbd5e1;
}
.pqv-rank-badge {
  position: absolute;
  top: 12px;
  left: 12px;
}
.pqv-offer-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}
.pqv-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: .76rem;
  color: var(--muted);
}
.pqv-seller {
  font-weight: 600;
  color: var(--ink);
}
.pqv-captured {
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef4fc;
  color: var(--blue);
  font-weight: 700;
  font-size: .70rem;
}
.pqv-title {
  margin: 0 0 14px;
  font-size: 1.24rem;
  font-weight: 800;
  line-height: 1.32;
  letter-spacing: -.02em;
  color: var(--ink);
}
.pqv-price-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: #f4f8fe;
  border: 1px solid #dbe8fa;
}
.pqv-price {
  font-size: 1.9rem;
  font-weight: 900;
  letter-spacing: -.03em;
  line-height: 1.05;
  color: var(--blue-dark);
}
.pqv-price-note {
  font-size: .75rem;
  color: var(--muted);
}
.pqv-desc {
  margin: 0 0 14px;
  font-size: .86rem;
  line-height: 1.5;
  color: #334155;
}
.pqv-highlights {
  display: grid;
  gap: 7px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: .80rem;
  color: #334155;
}
.pqv-highlights li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pqv-highlights li span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0, 112, 224, .10);
  color: var(--blue);
  font-size: .72rem;
  font-weight: 800;
  flex-shrink: 0;
}
.pqv-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.pqv-buy-btn {
  flex: 1 1 240px;
  justify-content: center;
  padding: 13px 18px !important;
  font-size: .92rem !important;
  font-weight: 800 !important;
}
.pqv-back-btn {
  flex: 0 1 auto;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
  color: var(--ink);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s ease;
}
.pqv-back-btn:hover {
  background: #eef2f7;
}
.pqv-disclosure {
  margin: 12px 0 0;
  font-size: .71rem;
  line-height: 1.4;
  color: var(--muted);
}
@media (max-width: 720px) {
  .pqv-backdrop { padding: 10px; }
  .pqv-dialog { max-height: calc(100dvh - 20px); border-radius: 18px; }
  .pqv-body { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .pqv-image-stage { min-height: 200px; padding: 14px; }
  .pqv-image { max-height: 220px; }
  .pqv-title { font-size: 1.08rem; }
  .pqv-price { font-size: 1.62rem; }
  .pqv-actions { flex-direction: column; }
  .pqv-buy-btn, .pqv-back-btn { width: 100%; text-align: center; }
}

/* 15. Ordenacao de produtos na categoria */
.sort-toggle {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin: 0 0 14px;
}
.sort-toggle-label { font-size: .78rem; font-weight: 700; color: var(--muted); }
.sort-pill {
  padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink); font-size: .8rem; font-weight: 700; text-decoration: none;
  transition: background .15s ease, border-color .15s ease;
}
.sort-pill:hover { border-color: var(--blue); }
.sort-pill.is-active { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }

