.site-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  padding: 22px 16px 34px;
  border-top: 1px solid #ede6e2;
  background: var(--cream);
  font:
    600 13px "DM Sans",
    sans-serif;
}
.site-links a {
  color: #5b6762;
  text-decoration: none;
}
.site-links a:hover {
  color: #b4231c;
}

/* A marca aparece no cabeçalho compartilhado. */
.topbar .brand {
  visibility: hidden;
}
/* Botão flutuante do WhatsApp segue Meu site (lado e piscar). */
.whatsapp-float[hidden] {
  display: none;
}
.whatsapp-float.whatsapp-float-esquerda {
  right: auto;
  left: 24px;
}
.whatsapp-float.whatsapp-float-esquerda::after {
  right: auto;
  left: calc(100% + 10px);
}
.whatsapp-float.whatsapp-float-fixo {
  animation: none;
}

/* Rodapé igual ao das demais páginas do site: fundo escuro, três colunas e barra inferior. */
.business-footer {
  margin: 0;
  padding-block: 44px 36px;
  background: #0d0d0f;
  color: #d6d6db;
}
.business-footer .footer-info-grid {
  gap: 32px;
}
.business-footer h3 {
  margin: 0 0 8px;
  color: #8f8f98;
  font:
    700 11.5px "DM Sans",
    sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.business-footer p,
.business-footer a {
  margin: 0 0 6px;
  color: #d6d6db;
  font:
    400 14.5px / 1.5 "DM Sans",
    sans-serif;
  white-space: normal;
}
.business-footer a:hover {
  color: #ff6a5c;
}
.business-footer .footer-info-grid a {
  color: var(--btn-primary-text, #fff) !important;
}
.site-footer:not(.site-footer-shared) {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: #09090b;
  color: #8f8f98;
}
.site-footer:not(.site-footer-shared) span,
.site-footer:not(.site-footer-shared) button {
  font:
    400 13px "DM Sans",
    sans-serif;
}
.site-footer:not(.site-footer-shared) span:nth-child(2) {
  color: #8f8f98;
}
.site-footer:not(.site-footer-shared) span:nth-child(2) strong {
  color: var(--btn-primary-text, #fff) !important;
}
.site-footer:not(.site-footer-shared) button {
  color: #d6d6db;
  font-weight: 600;
}
@media (max-width: 700px) {
  .business-footer .footer-info-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .site-footer:not(.site-footer-shared) {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 6px;
  }
  .site-footer:not(.site-footer-shared) span:nth-child(2),
  .site-footer:not(.site-footer-shared) button {
    justify-self: start;
  }
}
.site-footer:not(.site-footer-shared) {
  padding-right: max(96px, var(--page-gutter, 24px));
}
@media (max-width: 700px) {
  .site-footer:not(.site-footer-shared) {
    padding-bottom: 76px;
    padding-right: 24px;
  }
}

.topbar {
  top: 64px;
  z-index: 30;
}
@media (max-width: 1100px) {
  .topbar {
    top: 60px;
  }
}

.topbar .brand {
  display: none;
}
.topbar {
  grid-template-columns: minmax(0, 720px) auto;
  justify-content: space-between;
}
@media (max-width: 760px) {
  .topbar {
    display: none;
  }
}

/* A busca e os produtos seguem o mesmo limite do cabeçalho compartilhado. */
.topbar {
  width: var(--site-content-width);
  margin-inline: auto;
  padding-inline: 0;
}
.catalog-content {
  width: var(--site-content-width);
  margin-inline: auto;
  padding-inline: 0;
}

.topbar {
  grid-template-columns: minmax(0, 1fr);
}
.topbar .header-search {
  max-width: none;
}
/* Ordenação compacta; ações extras não deslocam o seletor para o centro. */
:root .results-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px 16px;
}

@media (min-width: 801px) {
  /* O catálogo substitui a amostra inicial pela lista completa de cores. */
  #filters[data-color-reserve] .filter-group:has(> .color-filter) {
    min-block-size: 403px;
  }
}

:root .results-bar .sort {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

:root .results-bar .sort select {
  min-inline-size: 0;
  inline-size: 230px;
  max-inline-size: 100%;
  white-space: nowrap;
  min-block-size: 36px;
  padding: 6px 8px;
  border-color: transparent;
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  line-height: normal;
  align-items: center;
  padding-block: 0;
}

:root .results-bar > .open-product {
  white-space: nowrap;
  min-height: 36px;
  padding: 6px;
}

@media (max-width: 800px) {
  :root .results-bar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
  }

  :root .results-bar #result-count {
    min-block-size: 1lh;
    grid-column: 1 / -1;
    grid-row: 1;
  }

  :root .results-bar .mobile-filter {
    grid-column: 1;
    grid-row: 2;
    width: auto;
    min-height: 36px;
    padding: 6px 12px;
  }

  :root .results-bar .sort {
    grid-column: 2;
    grid-row: 2;
    justify-self: end;
  }

  :root .results-bar > .open-product {
    grid-column: 1 / -1;
    justify-self: end;
    min-height: 28px;
    padding: 4px 0;
  }
}
/* Detalhes complementam o título sem estourar os cartões no celular. */
:root .product-card .product-model {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
}

:root .product-content {
  min-width: 0;
}

:root :is(.product-meta, #modal-name, #modal-description, #modal-model) {
  overflow-wrap: anywhere;
}

/* Busca centralizada e seletor com largura suficiente para dois algarismos. */
.topbar .header-search {
  width: min(100%, 660px);
  max-width: 660px;
  margin-inline: auto;
}
:root .pagination-size select {
  inline-size: 76px;
  min-inline-size: 76px;
  flex: 0 0 76px;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}
:root .pagination-size select option {
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

@media (max-width: 760px) {
  .topbar {
    display: grid;
    height: auto;
    padding-block: 12px;
  }
  .topbar .header-search {
    display: flex;
    width: 100%;
    min-width: 0;
  }
}

/* A busca permanece no início do conteúdo, sem acompanhar a rolagem. */
.topbar,
.topbar.is-compact {
  position: static;
  background: transparent;
  border: 0;
  box-shadow: none;
  pointer-events: none;
}
.topbar .header-search {
  pointer-events: auto;
  background: var(--surface, #fff);
}
:root .topbar .header-search input:is(:focus, :focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}
:root .topbar .header-search:focus-within {
  border-color: var(--ink);
}

:root #sort-select option {
  white-space: nowrap;
}

body:has(#catalogo) > .topbar {
  display: none;
}

:root #catalogo .catalog-head {
  padding-block: 28px 24px;
}

:root #catalogo .catalog-head h1 {
  margin-top: 0;
}

:root #catalogo .catalog-content {
  padding-top: 0;
}

:root #catalogo .results-bar {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-bottom: 16px;
}

:root #catalogo .filter-top {
  min-height: 44px;
  padding-bottom: 16px;
}

:root #catalogo .catalog-search {
  display: flex;
  width: 100%;
  max-width: none;
  min-width: 0;
  height: 44px;
  margin: 0;
  background: var(--surface);
  border-color: var(--line);
}

:root #catalogo .catalog-search input {
  min-width: 0;
  background: transparent;
  color: var(--ink);
}

:root #catalogo .catalog-search:focus-within {
  border-color: var(--accent-dark);
  outline: 2px solid var(--accent-dark);
  outline-offset: 2px;
}

:root #catalogo .results-bar .sort {
  color: var(--muted);
  font-size: 13px;
}

:root #catalogo .results-bar .sort select {
  inline-size: 190px;
  min-block-size: 44px;
  font-size: 14px;
  font-weight: 600;
}

:root #catalogo #clear-filters {
  font-size: 13px;
  font-weight: 600;
}

:root #catalogo .pagination #result-count {
  flex: 1 1 auto;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

:root #catalogo .pagination-size {
  order: 0;
}

:root #catalogo .pagination #result-count {
  order: 1;
}

:root #catalogo .pagination-nav {
  order: 2;
}

@media (max-width: 800px) {
  :root #catalogo .catalog-head {
    padding-block: 22px 20px;
  }

  :root #catalogo .results-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  :root #catalogo .catalog-search {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  :root #catalogo .results-bar .mobile-filter {
    grid-column: 1;
    grid-row: 2;
    min-height: 44px;
    width: 100%;
  }

  :root #catalogo .results-bar .sort {
    grid-column: 2;
    grid-row: 2;
    width: 100%;
    min-width: 0;
    justify-self: stretch;
    gap: 0;
    font-size: 0;
  }

  :root #catalogo .results-bar .sort select {
    inline-size: 100%;
  }

  :root #catalogo .pagination {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px 12px;
  }

  :root #catalogo .pagination-size {
    width: auto;
    justify-content: start;
  }

  :root #catalogo .pagination #result-count {
    text-align: right;
  }

  :root #catalogo .pagination-nav {
    grid-column: 1 / -1;
  }
}

:root #catalogo .catalog-search input:is(:focus, :focus-visible) {
  outline: none !important;
  box-shadow: none !important;
}

:root #catalogo #applied-filters:empty {
  display: none;
}

@media (min-width: 761px) {
  :root #catalogo .results {
    display: flex;
    flex-direction: column;
    min-width: 0;
  }

  :root #catalogo #product-grid {
    flex: 0 0 auto;
    margin-bottom: 28px;
  }

  :root #catalogo .pagination {
    margin-top: auto;
  }
}

#catalogo .product-card:has(.avail-indisponivel) {
  background: #f1f1f1;
  border-color: #b8b8b8;
}
#catalogo .product-card:has(.avail-indisponivel) .product-image img {
  filter: grayscale(1);
}
#catalogo .avail-indisponivel {
  background: #dedede;
  color: #333;
}
#catalogo .product-card:has(.avail-indisponivel) .product-model,
#catalogo .product-card:has(.avail-indisponivel) .open-product {
  color: #444;
}


html body #product-modal #add-to-quote.primary-button {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--btn-primary-bg, #b4231c) !important;
  color: var(--btn-primary-text, #fff) !important;
  border-color: var(--btn-primary-border, #b4231c) !important;
}
html body #product-modal #add-to-quote.primary-button:hover {
  background: var(--btn-primary-hover-bg, #921e18) !important;
  color: var(--btn-primary-text, #fff) !important;
}


html body #quote-page button:not(.quote-budget-button) {
  background: var(--surface, #fff) !important;
  color: var(--ink, #222) !important;
  border-color: var(--line, #d8d8d8) !important;
}
html body #quote-page button:not(.quote-budget-button):hover {
  background: var(--cream, #f3f3f3) !important;
  color: var(--ink, #222) !important;
}
html body #quote-page .quote-visual-choices button[aria-checked="true"],
html body #quote-page .quote-variation label:has(:checked) {
  background: var(--cream, #f3f3f3) !important;
  color: var(--ink, #222) !important;
  border-color: var(--ink, #222) !important;
}
html body #quote-page button:focus-visible {
  outline: 2px solid var(--ink, #222);
  outline-offset: 2px;
}
html body #quote-page .quote-budget-button {
  background: var(--btn-primary-bg, #b4231c) !important;
  color: var(--btn-primary-text, #fff) !important;
  border-color: var(--btn-primary-border, #b4231c) !important;
}
html body #quote-page .quote-budget-button:hover {
  background: var(--btn-primary-hover-bg, #921e18) !important;
  color: var(--btn-primary-text, #fff) !important;
}


html body #product-modal :is(.color-option, #minus-quantity, #plus-quantity) {
  background: var(--surface, #fff) !important;
  color: var(--ink, #222) !important;
  border-color: var(--line, #d8d8d8) !important;
}
html body #product-modal :is(.color-option, #minus-quantity, #plus-quantity):hover {
  background: var(--cream, #f3f3f3) !important;
  color: var(--ink, #222) !important;
}
html body #product-modal #color-options .color-option.selected {
  background: var(--cream, #f3f3f3) !important;
  border-color: var(--ink, #222) !important;
}
html body #product-modal .modal-thumbnail.is-selected {
  border-color: var(--ink, #222) !important;
}
html body #product-modal :is(.color-option, #minus-quantity, #plus-quantity):focus-visible {
  outline: 2px solid var(--ink, #222);
  outline-offset: 2px;
}

html body #product-modal #enquiry-colors .enquiry-contact {
  min-width: 160px;
  min-height: 44px;
  background: var(--btn-primary-bg, #b4231c) !important;
  border-color: var(--btn-primary-border, #b4231c) !important;
  color: var(--btn-primary-text, #fff) !important;
}
html body #product-modal #enquiry-colors .enquiry-contact:hover,
html body #product-modal #enquiry-colors .enquiry-contact:focus-visible {
  background: var(--btn-primary-hover-bg, #921e18) !important;
  color: var(--btn-primary-text, #fff) !important;
}
