:root {
  --brand-bg: #333333;
  --brand-bg-deep: #292929;
  --brand-surface: #414141;
  --brand-surface-soft: #4a4a4a;
  --brand-border: #5c5c5c;
  --brand-yellow: #FFCC01;
  --brand-white: #ffffff;
  --brand-muted: #d1d1d1;
}

html {
  background: var(--brand-bg);
}

body.brand-dark-page {
  background: var(--brand-bg) !important;
  color: var(--brand-white) !important;
}

body.brand-dark-page main {
  background: var(--brand-bg);
}

body.brand-dark-page .bg-white,
body.brand-dark-page .produto,
body.brand-dark-page .total-box,
body.brand-dark-page .carrinho-vazio,
body.brand-dark-page .card,
body.brand-dark-page .modal-content,
body.brand-dark-page .modal-escolha,
body.brand-dark-page .resumo-pedido-compacto,
body.brand-dark-page .opcao-entrega,
body.brand-dark-page .agendamento-form,
body.brand-dark-page .pedido-revisao-card,
body.brand-dark-page .pedido-recibo,
body.brand-dark-page .badge-item {
  background: var(--brand-surface) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

/* As fotos e o QR Code continuam em fundo branco para não perder legibilidade. */
body.brand-dark-page figure.bg-white,
body.brand-dark-page .product-image-figure,
body.brand-dark-page .qr-container img,
body.brand-dark-page .produto img,
body.brand-dark-page .produto-imagem {
  background: #ffffff !important;
}

body.brand-dark-page .text-gray-900,
body.brand-dark-page .text-gray-800,
body.brand-dark-page .text-gray-700,
body.brand-dark-page .text-gray-600,
body.brand-dark-page h1,
body.brand-dark-page h2,
body.brand-dark-page h3,
body.brand-dark-page h4,
body.brand-dark-page label,
body.brand-dark-page .produto-info strong,
body.brand-dark-page .produto-info span,
body.brand-dark-page .produto-nome,
body.brand-dark-page .item-value-modern,
body.brand-dark-page .topbar-title strong,
body.brand-dark-page .topbar-title span {
  color: var(--brand-white) !important;
}

body.brand-dark-page .text-gray-500,
body.brand-dark-page .text-gray-400,
body.brand-dark-page .item-label-modern,
body.brand-dark-page .footer-note,
body.brand-dark-page .step-label,
body.brand-dark-page .step-time,
body.brand-dark-page .produto-info p,
body.brand-dark-page .badge-item p {
  color: var(--brand-muted) !important;
}

body.brand-dark-page .border-gray-200,
body.brand-dark-page .border-gray-300,
body.brand-dark-page .border-b,
body.brand-dark-page .footer-block {
  border-color: var(--brand-border) !important;
}

body.brand-dark-page .aberto {
  background: rgba(41, 41, 41, 0.96) !important;
  color: var(--brand-white) !important;
  border: 1px solid rgba(255, 204, 1, 0.45);
}

body.brand-dark-page header > .bg-white {
  background: var(--brand-bg) !important;
}

body.brand-dark-page .info-item-modern {
  background: var(--brand-surface) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page .icon-circle-modern {
  background: var(--brand-yellow) !important;
  color: #111111 !important;
}

body.brand-dark-page #main-category-nav,
body.brand-dark-page #search-container.fixed-search,
body.brand-dark-page .topbar {
  background: var(--brand-bg-deep) !important;
  border-color: var(--brand-yellow) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.32) !important;
}

body.brand-dark-page #main-category-nav {
  border-bottom: 2px solid var(--brand-yellow) !important;
}

body.brand-dark-page .category-link {
  color: var(--brand-white) !important;
}

body.brand-dark-page .category-link.active,
body.brand-dark-page .category-grid-item.active p,
body.brand-dark-page a.text-amber-600,
body.brand-dark-page .text-amber-600 {
  color: var(--brand-yellow) !important;
}

body.brand-dark-page .category-grid-item.active div {
  border-color: var(--brand-yellow) !important;
}

body.brand-dark-page input,
body.brand-dark-page select,
body.brand-dark-page textarea,
body.brand-dark-page #search-bar {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page input::placeholder,
body.brand-dark-page textarea::placeholder {
  color: #bcbcbc !important;
}

body.brand-dark-page input:focus,
body.brand-dark-page select:focus,
body.brand-dark-page textarea:focus,
body.brand-dark-page #search-bar:focus {
  border-color: var(--brand-yellow) !important;
  box-shadow: 0 0 0 3px rgba(255, 204, 1, 0.16) !important;
  outline: none;
}

body.brand-dark-page .bg-green-500,
body.brand-dark-page .btn-finalizar,
body.brand-dark-page .btn-proximo,
body.brand-dark-page .btn-pagamento,
body.brand-dark-page .btn-voltar,
body.brand-dark-page .btn-copiar,
body.brand-dark-page .btn-processar-cartao {
  background: var(--brand-yellow) !important;
  color: #111111 !important;
  border-color: var(--brand-yellow) !important;
  box-shadow: 0 4px 16px rgba(255, 204, 1, 0.28) !important;
}

body.brand-dark-page .hover\:bg-green-600:hover,
body.brand-dark-page .btn-finalizar:hover,
body.brand-dark-page .btn-proximo:hover,
body.brand-dark-page .btn-pagamento:hover,
body.brand-dark-page .btn-copiar:hover {
  background: #ffda3d !important;
}

body.brand-dark-page .btn-comprar-mais,
body.brand-dark-page .btn-voltar-escolha,
body.brand-dark-page .btn-editar {
  background: transparent !important;
  color: var(--brand-yellow) !important;
  border-color: var(--brand-yellow) !important;
}

body.brand-dark-page #search-results > div,
body.brand-dark-page #shopping-cart-container,
body.brand-dark-page #cart-content,
body.brand-dark-page #app-bottom-nav {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

/* Cabeçalho e resumo do carrinho expandido. */
body.brand-dark-page #cart-expanded > .bg-gray-50 {
  background: var(--brand-surface) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #cart-expanded > .bg-gray-50:last-child {
  background: var(--brand-bg-deep) !important;
}

body.brand-dark-page #cart-expanded .text-gray-800,
body.brand-dark-page #cart-expanded #cart-total-expanded {
  color: var(--brand-white) !important;
}

body.brand-dark-page #cart-collapse-btn {
  color: var(--brand-yellow) !important;
}

/* Modais e etapas do checkout do carrinho. */
body.brand-dark-page #modalEscolhaEntrega .modal-escolha,
body.brand-dark-page #modalCheckout .modal-content {
  background: var(--brand-surface) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #modalEscolhaEntrega .modal-escolha h2,
body.brand-dark-page #modalEscolhaEntrega .opcao-entrega-info h3,
body.brand-dark-page #modalEscolhaEntrega .opcao-entrega:hover .opcao-entrega-info h3,
body.brand-dark-page #modalEscolhaEntrega .opcao-entrega.selected .opcao-entrega-info h3 {
  color: var(--brand-white) !important;
}

body.brand-dark-page #modalEscolhaEntrega .modal-escolha > p,
body.brand-dark-page #modalEscolhaEntrega .opcao-entrega-info p,
body.brand-dark-page #modalEscolhaEntrega .opcao-entrega:hover .opcao-entrega-info p,
body.brand-dark-page #modalEscolhaEntrega .opcao-entrega.selected .opcao-entrega-info p {
  color: var(--brand-muted) !important;
}

body.brand-dark-page #modalEscolhaEntrega .opcao-entrega,
body.brand-dark-page #modalEscolhaEntrega .opcao-entrega:hover,
body.brand-dark-page #modalEscolhaEntrega .opcao-entrega.selected {
  background: var(--brand-bg-deep) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #modalEscolhaEntrega .opcao-entrega.selected {
  border-color: var(--brand-yellow) !important;
}

body.brand-dark-page #modalCheckout .resumo-header,
body.brand-dark-page #modalCheckout .resumo-header:hover,
body.brand-dark-page #modalCheckout .resumo-detalhes {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #modalCheckout .resumo-info,
body.brand-dark-page #modalCheckout .resumo-line,
body.brand-dark-page #modalCheckout .resumo-line span:last-child {
  color: var(--brand-white) !important;
}

body.brand-dark-page #modalCheckout .resumo-total-final {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-yellow) !important;
  border-top: 2px solid var(--brand-yellow);
}

body.brand-dark-page #modalCheckout .form-buttons {
  background: var(--brand-surface) !important;
  border-color: var(--brand-surface) !important;
}

body.brand-dark-page #modalCheckout .pedido-revisao-titulo,
body.brand-dark-page #modalCheckout .pedido-recibo-marca,
body.brand-dark-page #modalCheckout .pedido-recibo-cliente,
body.brand-dark-page #modalCheckout .pedido-recibo-tabela th,
body.brand-dark-page #modalCheckout .pedido-recibo-tabela td,
body.brand-dark-page #modalCheckout .pedido-recibo-linha,
body.brand-dark-page #modalCheckout .pedido-recibo-linha span:last-child,
body.brand-dark-page #modalCheckout .pedido-recibo-total {
  color: var(--brand-white) !important;
}

body.brand-dark-page #modalCheckout .pedido-revisao-subtitulo,
body.brand-dark-page #modalCheckout .pedido-recibo-data {
  color: var(--brand-muted) !important;
}

body.brand-dark-page #modalCheckout .pedido-recibo-divisor,
body.brand-dark-page #modalCheckout .pedido-recibo-tabela td,
body.brand-dark-page #modalCheckout .pedido-recibo-total {
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #modalCheckout .pedido-recibo-total span:last-child,
body.brand-dark-page #modalCheckout #pedidoRevisaoTotal {
  color: var(--brand-yellow) !important;
}

body.brand-dark-page #modalCheckout #opcao-pix,
body.brand-dark-page #modalCheckout #opcao-cartao,
body.brand-dark-page #modalCheckout .info-box {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-white) !important;
}

body.brand-dark-page #modalCheckout #opcao-pix strong,
body.brand-dark-page #modalCheckout #opcao-cartao strong,
body.brand-dark-page #modalCheckout .info-box strong {
  color: var(--brand-white) !important;
}

body.brand-dark-page #modalCheckout #opcao-pix > div:nth-child(2) span,
body.brand-dark-page #modalCheckout .info-box i {
  color: var(--brand-yellow) !important;
}

body.brand-dark-page #modalCheckout #opcao-cartao > div:first-child > div:nth-child(2) span {
  color: var(--brand-muted) !important;
}

body.brand-dark-page #modalCheckout .cpf-nota-toggle,
body.brand-dark-page #modalCheckout .cpf-toggle-btns button {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-muted) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #modalCheckout .cpf-nota-label strong {
  color: var(--brand-white) !important;
}

body.brand-dark-page #modalCheckout .cpf-toggle-btns button.active-sim,
body.brand-dark-page #modalCheckout .cpf-toggle-btns button.active-nao {
  background: var(--brand-yellow) !important;
  color: #111111 !important;
  border-color: var(--brand-yellow) !important;
}

body.brand-dark-page #app-bottom-nav .nav-active,
body.brand-dark-page #app-bottom-nav .nav-active i,
body.brand-dark-page #app-bottom-nav .nav-active span {
  color: var(--brand-yellow) !important;
}

body.brand-dark-page #ageModal {
  background: var(--brand-bg) !important;
}

body.brand-dark-page #ageModal > div,
body.brand-dark-page #splash > div {
  background: var(--brand-surface) !important;
  color: var(--brand-white) !important;
  border: 1px solid var(--brand-border);
}

body.brand-dark-page #ageModal h1,
body.brand-dark-page #ageModal p,
body.brand-dark-page #splash p {
  color: var(--brand-white) !important;
}

body.brand-dark-page #ageModal button:first-of-type,
body.brand-dark-page #splash button:first-of-type {
  background: var(--brand-yellow) !important;
  color: #111111 !important;
}

body.brand-dark-page .site-footer {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-muted) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page .site-footer .legal-note {
  background: var(--brand-surface) !important;
  color: #ffe36d !important;
  border: 1px solid rgba(255, 204, 1, 0.35);
}

body.brand-dark-page .site-footer h3,
body.brand-dark-page .site-footer .legal-note strong {
  color: var(--brand-white) !important;
}

body.brand-dark-page .site-footer a,
body.brand-dark-page a.link-destaque,
body.brand-dark-page .voltar {
  color: var(--brand-yellow) !important;
}

/* Carrinho e checkout */
body.brand-dark-page .resumo-tabela td,
body.brand-dark-page .resumo-line,
body.brand-dark-page .pedido-recibo-tabela td,
body.brand-dark-page .pedido-recibo-tabela th,
body.brand-dark-page .info-linha,
body.brand-dark-page .info-linha .label,
body.brand-dark-page .info-linha .value {
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page .resumo-tabela .total-row td:last-child,
body.brand-dark-page .resumo-total-final,
body.brand-dark-page .resumo-total-final span:last-child,
body.brand-dark-page .total-valor,
body.brand-dark-page .produto-preco {
  color: var(--brand-yellow) !important;
}

body.brand-dark-page .endereco-resumo-card,
body.brand-dark-page .autofill-notice,
body.brand-dark-page .comprar-mais-hint,
body.brand-dark-page .revisao-section,
body.brand-dark-page .revisao-content,
body.brand-dark-page .dados-comprador,
body.brand-dark-page .pix-code,
body.brand-dark-page .security-notice,
body.brand-dark-page .entregador-info,
body.brand-dark-page .metodos-pagamento,
body.brand-dark-page .modal-entrega-content,
body.brand-dark-page .modal-cartao-content,
body.brand-dark-page .faq-accordion,
body.brand-dark-page .faq-header,
body.brand-dark-page .faq-content,
body.brand-dark-page .faq-body {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page .pix-hero {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-white) !important;
  border-bottom: 2px solid var(--brand-yellow);
}

body.brand-dark-page .progress-line,
body.brand-dark-page .step-circle {
  background: #666666 !important;
  border-color: var(--brand-surface) !important;
}

body.brand-dark-page .progress-line-fill,
body.brand-dark-page .progress-step.active .step-circle {
  background: var(--brand-yellow) !important;
  color: #111111 !important;
}

/* Página de pagamento: contraste completo */
body.brand-dark-page #comoPagarPix,
body.brand-dark-page #comoPagarPix > div:nth-child(2) > div:not(:last-child) {
  background: var(--brand-surface) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #comoPagarPix h3,
body.brand-dark-page #comoPagarPix > div:nth-child(2) > div:not(:last-child) div[style*="color: #333"] {
  color: var(--brand-white) !important;
}

body.brand-dark-page #comoPagarPix p,
body.brand-dark-page #comoPagarPix > div:nth-child(2) > div:not(:last-child) div[style*="color: #666"] {
  color: var(--brand-muted) !important;
}

body.brand-dark-page #deliveryInfoBox {
  background: var(--brand-surface) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-yellow) !important;
}

body.brand-dark-page #deliveryInfoBox [style*="color: #8b5a00"] {
  color: var(--brand-white) !important;
}

body.brand-dark-page #deliveryInfoBox [style*="background: rgba(255,255,255"] {
  background: var(--brand-bg-deep) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #secaoFaq .faq-header,
body.brand-dark-page #secaoFaq .faq-body {
  background: var(--brand-bg-deep) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #secaoFaq .faq-header > div > div:first-child,
body.brand-dark-page #secaoFaq .faq-body p,
body.brand-dark-page #secaoFaq .faq-body strong {
  color: var(--brand-white) !important;
}

body.brand-dark-page #secaoFaq .faq-header > div > div:last-child,
body.brand-dark-page #secaoFaq .faq-icon {
  color: var(--brand-muted) !important;
}

body.brand-dark-page #secaoFaq #comprovante-area,
body.brand-dark-page #secaoFaq #comprovante-msg {
  background: var(--brand-surface) !important;
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #secaoFaq #comprovante-label,
body.brand-dark-page #secaoFaq #comprovante-area i {
  color: var(--brand-muted) !important;
}

body.brand-dark-page #motoboyCard,
body.brand-dark-page #motoboyCard > div:first-child {
  background: var(--brand-surface) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #motoboyCard > div:first-child > span:nth-child(2),
body.brand-dark-page #motoboyCard [style*="color:#111"],
body.brand-dark-page #motoboyCard [style*="color:#555"] {
  color: var(--brand-white) !important;
}

body.brand-dark-page #motoboyCard [style*="color:#888"] {
  color: var(--brand-muted) !important;
}

body.brand-dark-page #motoboyCard #motoboyStatus {
  background: var(--brand-yellow) !important;
  color: #111111 !important;
  border-color: var(--brand-yellow) !important;
}

body.brand-dark-page #listaProdutosPagamento,
body.brand-dark-page #listaProdutosPagamento > div {
  color: var(--brand-white) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page #listaProdutosPagamento > div > div > span:nth-child(2),
body.brand-dark-page #listaProdutosPagamento > div > span:last-child,
body.brand-dark-page #listaProdutosPagamento + div > span:first-child,
body.brand-dark-page #nomeResumoPagamento {
  color: var(--brand-white) !important;
}

body.brand-dark-page #listaProdutosPagamento > div > div > span:first-child,
body.brand-dark-page #totalResumoPagamento {
  color: var(--brand-yellow) !important;
}

body.brand-dark-page #listaProdutosPagamento + div + div {
  background: var(--brand-border) !important;
}

body.brand-dark-page #enderecoResumoPagamento,
body.brand-dark-page #bairroCidadeResumoPagamento,
body.brand-dark-page #numeroPedidoRodape {
  color: var(--brand-muted) !important;
}

body.brand-dark-page .modal-entrega-content .entrega-head,
body.brand-dark-page .modal-entrega-content [style*="background:#fafafa"] {
  background: var(--brand-bg-deep) !important;
  border-color: var(--brand-border) !important;
}

body.brand-dark-page .modal-entrega-content [style*="color:#111"],
body.brand-dark-page .modal-entrega-content [style*="color: #333"] {
  color: var(--brand-white) !important;
}

body.brand-dark-page .modal-entrega-content [style*="color:#666"] {
  color: var(--brand-muted) !important;
}

/* Documentos legais */
body.brand-dark-page .pagina {
  background: var(--brand-bg);
}

body.brand-dark-page .titulo,
body.brand-dark-page .secao__titulo,
body.brand-dark-page .subtitulo,
body.brand-dark-page .empresa__nome,
body.brand-dark-page strong {
  color: var(--brand-white);
}

body.brand-dark-page .secao,
body.brand-dark-page .empresa,
body.brand-dark-page .divisor {
  border-color: var(--brand-border) !important;
}

::-webkit-scrollbar-track {
  background: var(--brand-bg-deep);
}

::-webkit-scrollbar-thumb {
  background: var(--brand-yellow);
}

@media (max-width: 640px) {
  body.brand-dark-page .site-footer {
    padding-left: 14px;
    padding-right: 14px;
  }
}
