/* Catálogo: /produtos, /produtos/{categoria} e /produto/{slug}.
   Medidas do protótipo (renderProdutosHub, renderCategoria, renderProduto, renderProdQuote). */

/* Títulos de seção do catálogo ---------------------------------------------- */
.cat-h2 { font-size: 26px; font-weight: 700; color: var(--c-blue); margin: 0 0 20px; }
.prod-h2 { font-size: 24px; font-weight: 700; color: var(--c-blue); margin: 0 0 20px; }

/* Hub ----------------------------------------------------------------------- */
.cat-hub { padding: 20px 0 80px; }
.cat-grid { list-style: none; margin: 0 0 48px; padding: 0; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.ccard { display: flex; flex-direction: column; height: 100%; background: var(--c-white); border: 1px solid var(--c-border); border-radius: 10px; overflow: hidden; color: var(--c-text); transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease); }
.ccard:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -16px rgba(20, 56, 127, .18); border-color: var(--c-orange); color: var(--c-text); }
.ccard__media { height: 160px; }
.ccard__media .ph { min-height: 160px; border-radius: 0; }
.ccard__body { padding: 22px; flex: 1; display: flex; flex-direction: column; }
.ccard__title { font-size: 18px; font-weight: 600; color: var(--c-blue); margin: 0 0 8px; }
.ccard__text { color: var(--c-text-muted); font-size: 14px; margin: 0 0 12px; line-height: 1.55; flex: 1; }
.ccard__more { display: inline-flex; align-items: center; gap: 6px; color: var(--c-orange-ink); font-weight: 600; font-size: 14px; }
.ccard__more .ico { font-size: 12px; transition: transform .15s ease; }
.ccard:hover .ccard__more .ico { transform: translateX(3px); }
.cat-hub__featured { margin-top: 48px; }

/* Resultados da busca do hub */
.cat-results { padding: 20px 0 48px; border-bottom: 1px solid var(--c-border); margin-bottom: 28px; }
.cat-results__count { color: var(--c-text-muted); font-size: 15px; margin: 0 0 20px; }

/* Aviso de marcas/modelos ilustrativos */
.cat-note { margin: 16px 0 0; font-size: 13px; color: var(--c-text-muted); display: flex; align-items: center; gap: 8px; }
.cat-note .ico { flex: 0 0 auto; }

/* Categoria: busca, ordenação e marcas -------------------------------------- */
.cat-page { padding: 20px 0 80px; }
.cat-filters { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; padding: 16px; background: var(--c-surface-alt); border-radius: 10px; }
.cat-search { flex: 1 1 240px; position: relative; }
.cat-search .ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--c-text-muted); pointer-events: none; }
.cat-search input, .cat-select { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #8C8C8C; border-radius: var(--r-btn); background: var(--c-white); font-size: 14.5px; color: var(--c-text); }
.cat-search input { padding-left: 40px; }
.cat-select { width: auto; flex: 0 1 auto; }
.cat-filters__submit { min-height: 48px; }
/* Com JS a busca filtra na hora e a ordenação envia sozinha: o botão fica dispensável */
.js [data-catalog-form] .cat-filters__submit { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.js [data-catalog-form] { position: relative; }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.cat-chip { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--c-border); background: var(--c-white); color: var(--c-text); font-size: 14px; font-weight: 600; transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
.cat-chip:hover { border-color: var(--c-blue); color: var(--c-blue); }
.cat-chip[aria-current="true"] { background: var(--c-blue); border: 1.5px solid var(--c-blue); color: var(--c-white); }
.cat-chip[aria-current="true"]:hover { background: var(--c-blue-dark); color: var(--c-white); }

/* Grupos por linha */
.cat-groups { display: flex; flex-direction: column; gap: 44px; }
.cat-group[hidden], [data-catalog-item][hidden] { display: none; }
.cat-group__title { font-size: 22px; font-weight: 700; color: var(--c-blue); margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.cat-group__count { font-size: 14px; font-weight: 500; color: var(--c-text-muted); }

/* Estado vazio */
.cat-empty { padding: 60px 20px; text-align: center; background: var(--c-surface-alt); border-radius: 10px; }
.cat-empty[hidden] { display: none; }
.cat-empty__icon { display: block; margin: 0 auto 16px; font-size: 40px; color: #8C8C8C; }
.cat-empty__title { font-size: 1.17em; font-weight: 700; color: var(--c-blue); margin: 0 0 8px; }
.cat-empty__text { color: var(--c-text-muted); margin: 0; }
.cat-empty .btn-row { margin-top: 20px; }

/* Como escolher */
.cat-howto { margin-top: 48px; padding: 28px; background: var(--c-surface-alt); border-radius: 10px; }
.cat-howto__title { font-size: 20px; font-weight: 700; color: var(--c-blue); margin: 0 0 10px; }
.cat-howto p { color: var(--c-text-muted); margin: 0; line-height: 1.65; }

/* Produto ------------------------------------------------------------------- */
.prod { padding: 0 0 60px; }
.prod__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 48px; align-items: start; }

/* Galeria */
.prod__main { border: 1px solid var(--c-border); border-radius: var(--r-card); overflow: hidden; background: var(--c-white); }
.prod__main-img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; background: var(--c-white); }
.prod__main--empty { border: 0; }
.prod__main--empty .ph { min-height: min(440px, 80vw); }
.prod__thumbs { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.prod__thumb { display: block; min-height: 44px; padding: 0; background: var(--c-white); border: 1px solid var(--c-border); border-radius: var(--r-sm); overflow: hidden; transition: border-color .15s ease; }
.prod__thumb:hover { border-color: var(--c-orange); }
.prod__thumb[aria-current="true"], .prod__thumb[aria-pressed="true"] { border: 2px solid var(--c-orange); }
.prod__thumb-img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: contain; }

/* Informações */
.prod__tag { color: var(--c-orange-ink); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 10px; }
.prod__title { font-size: clamp(26px, 4vw, 38px); font-weight: 700; color: var(--c-blue); margin: 0 0 10px; letter-spacing: -.015em; line-height: 1.15; }
.prod__meta { color: var(--c-text-muted); font-size: 15px; margin-bottom: 20px; }
.prod__short { color: var(--c-text); font-size: 16.5px; line-height: 1.6; margin: 0 0 24px; }
.prod__keyspecs { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.prod__keyspecs li { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.prod__keyspecs .ico { color: var(--c-orange); margin-top: 4px; font-size: 11px; }
.prod__keyspecs-k { display: block; color: var(--c-text-muted); font-size: 12px; }
.prod__keyspecs-v { display: block; color: var(--c-blue); font-weight: 600; }
.prod__ctas { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.prod__ctas .btn { flex: 1 1 200px; min-height: 50px; }
.prod__note { padding: 14px; background: var(--c-surface-alt); border-radius: var(--r-card); font-size: 13.5px; color: var(--c-text-muted); line-height: 1.55; }

/* Orçamento rápido */
.pq { border: 1px solid var(--c-border); border-radius: 10px; padding: 20px; margin-bottom: 16px; background: var(--c-white); scroll-margin-top: calc(var(--header-h) + 38px); }
.pq__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.pq__title { margin: 0; font-size: 18px; font-weight: 700; color: var(--c-blue); }
.pq__step { font-size: 13px; color: var(--c-text-muted); }
.pq__step[hidden] { display: none; }
.pq__panel { border: 0; margin: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.pq__panel + .pq__panel { margin-top: 14px; }
.pq__panel[hidden] { display: none; }
.pq__row { display: flex; flex-wrap: wrap; gap: 12px; }
.pq__field { flex: 1 1 160px; min-width: 0; }
.pq__label { display: block; font-size: 13.5px; font-weight: 600; color: var(--c-text); margin-bottom: 6px; }
.pq__input { width: 100%; min-height: 48px; padding: 0 14px; border: 1.5px solid var(--c-border-strong); border-radius: var(--r-btn); font-size: 16px; color: var(--c-text); background: var(--c-white); }
.pq__input:hover { border-color: #8C8C8C; }
.pq__input[aria-invalid="true"] { border-color: var(--c-error); }
.pq__err { color: var(--c-error); font-size: 13px; margin-top: 5px; }
.pq__err[hidden] { display: none; }
.pq__check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--c-text-muted); line-height: 1.5; cursor: pointer; }
.pq__check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--c-orange-ink); flex: 0 0 auto; }
.pq__check a { color: var(--c-blue); text-decoration: underline; text-underline-offset: 2px; }
.pq__check a:hover { color: var(--c-orange-ink); }
.pq__actions { display: flex; gap: 10px; }
.pq__actions .btn, .pq__next { min-height: 50px; font-size: 15.5px; }
.pq__back { padding-inline: 18px; color: var(--c-text); }
.pq__back[hidden], .pq__next[hidden] { display: none; }
.pq__submit { flex: 1; }

/* Especificações */
.prod-narrow { max-width: 73.75rem; }
.prod-specs { padding: 40px 0; background: var(--c-surface-alt); }
.spec-table { margin: 0; background: var(--c-white); border-radius: 10px; overflow: hidden; border: 1px solid var(--c-border); }
.spec-table__row { display: grid; grid-template-columns: 200px 1fr; border-bottom: 1px solid #F1F1F1; }
.spec-table__row:last-child { border-bottom: 0; }
.spec-table dt { padding: 14px 20px; background: #F8F8F8; color: var(--c-text-muted); font-size: 14px; font-weight: 500; }
.spec-table dd { margin: 0; padding: 14px 20px; color: var(--c-blue); font-size: 14.5px; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 559px) {
  .spec-table__row { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .spec-table dt, .spec-table dd { padding: 12px 14px; }
}

/* Descrição */
.prod-desc { padding: 60px 0; }
.prod-desc .prod-h2 { margin-bottom: 16px; }
.prod-desc__p { color: var(--c-text-muted); font-size: 16px; line-height: 1.7; margin: 0 0 14px; }
.prod-desc__p:last-of-type { margin-bottom: 24px; }
.prod-desc__box { padding: 20px; background: var(--c-surface-alt); border-radius: 10px; border-left: 3px solid var(--c-orange); }
.prod-desc__tag { font-size: 12px; color: var(--c-orange-ink); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 8px; }
.prod-desc__box p:last-child { color: var(--c-text); font-size: 14.5px; line-height: 1.65; margin: 0; }

/* Relacionados */
.prod-related { padding: 40px 0 80px; background: var(--c-surface-alt); }

/* Página de marca (/marcas/{slug}) */
.brand-page__head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin: 8px 0 24px; }
.brand-page__logo { width: 200px; height: 96px; display: flex; align-items: center; justify-content: center; padding: 16px 22px; border: 1px solid var(--c-border); border-radius: var(--r-card); background: var(--c-white); flex: 0 0 auto; }
.brand-page__logo img { max-width: 100%; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.brand-page__title { margin: 0; font-size: clamp(22px, 2.4vw, 28px); }
.brand-page__count { margin: 4px 0 0; color: var(--c-text-muted); font-size: 14px; }
.pq__panel > .pq__field { margin-top: 12px; }
.pq__opt { font-weight: 400; color: var(--c-text-muted); }
