/* Paleta editorial compartilhada apenas pela página de vendas e pelo checkout.
   O escopo mantém esta escolha acima dos temas e das cores salvas anteriormente. */
:root body.pn-editorial[data-page] {
  --editorial-ink: #292929;
  --editorial-heading: #111111;
  --editorial-muted: #606060;
  --editorial-accent: #b91c1c;
  --editorial-hover: #991b1b;
  --editorial-button: #15803d;
  --editorial-button-hover: #166534;
  --editorial-link: #0057b8;
  --editorial-line: #dedede;
  --editorial-soft: #f7f7f7;
  --store-primary: var(--editorial-accent);
  --store-button: var(--editorial-button);
  --store-button-text: #ffffff;
  --store-background: #ffffff;
  --store-checkout: var(--editorial-accent);
  --ink: var(--editorial-ink);
  --muted: var(--editorial-muted);
  --blue: var(--editorial-link);
  --blue-dark: #00438e;
  --line: var(--editorial-line);
  --soft: var(--editorial-soft);
  --warm: var(--editorial-soft);
  --cream: #ffffff;
  --checkout-page: #ffffff;
  --checkout-surface: #ffffff;
  --checkout-ink: var(--editorial-ink);
  --checkout-muted: var(--editorial-muted);
  --checkout-brand: var(--editorial-accent);
  --checkout-buy: var(--editorial-accent);
  --checkout-buy-hover: var(--editorial-hover);
  --checkout-line: var(--editorial-line);
  background: #ffffff !important;
  color: var(--editorial-ink);
}

:root body.pn-editorial[data-page] :is(h1, h2, h3, .pn-price, .pn-sticky strong, .summary-meta h3, .order-totals dd) {
  color: var(--editorial-heading) !important;
}

:root body.pn-editorial[data-page] :is(.pn-header, .checkout-header) {
  background: #ffffff;
  border-top-color: var(--editorial-accent);
  border-bottom: 1px solid var(--editorial-line);
}

:root body.pn-editorial[data-page] :is(.brand.pedra-nobre, .brand.pedra-nobre .brand-name, .brand.pedra-nobre .brand-overline, .pn-footer-short > strong) {
  color: var(--editorial-heading) !important;
}

:root body.pn-editorial[data-page] :is(.pn-eyebrow, .reviews-eyebrow, .section-eyebrow, .legal-eyebrow) {
  color: var(--editorial-accent) !important;
}

:root body.pn-editorial[data-page] :is(.pn-help, .pn-rating, .pn-questions a, .pn-footer-short a, .reviews-source-link, .reviews-source-note a, .checkout-back, .btn-text, .shipping-edit, .summary-meta > a, .clean-footer-help a, .legal-footer a, .legal-contact-button, .clean-order-details > summary, .clean-review-details > summary, .checkout-hint > summary) {
  color: var(--editorial-link) !important;
}

:root body.pn-editorial[data-page] :is(.pn-buy, .btn-primary) {
  background: var(--editorial-button) !important;
  border-color: var(--editorial-button) !important;
  color: #ffffff !important;
  box-shadow: none;
}

:root body.pn-editorial[data-page] :is(.pn-buy, .btn-primary):hover:not(:disabled):not([aria-disabled="true"]) {
  background: var(--editorial-button-hover) !important;
  border-color: var(--editorial-button-hover) !important;
  filter: none !important;
}

:root body.pn-editorial[data-page] :is(.pn-buy, .btn-primary):is(:disabled, [aria-disabled="true"]) {
  background: #ededed !important;
  border-color: #d0d0d0 !important;
  color: var(--editorial-muted) !important;
  cursor: not-allowed;
  opacity: 1;
  box-shadow: none;
}

:root body.pn-editorial[data-page] :is(a, button, summary, input, select, textarea):focus-visible {
  outline-color: var(--editorial-link);
}

/* Produto: destaque no botão e na escolha do kit; leitura em tons neutros. */
:root body.pn-editorial[data-page="product"] :is(.pn-selected-name, .pn-pix, .pn-installments, .pn-delivery, .pn-status, .pn-kit-choice > span, .pn-sticky > div > span, .pn-sticky small, .pn-footer-short, .pn-legal-fold > summary, .creator-heading p, .creator-caption small, .creator-hint, .reviews-author > div > span, .reviews-origin, .reviews-source-note) {
  color: var(--editorial-muted);
}

:root body.pn-editorial[data-page="product"] :is(.pn-questions p, .pn-contents ul, .reviews-quote) {
  color: var(--editorial-ink);
}

:root body.pn-editorial[data-page="product"] :is(.pn-main-image, .reviews-section, .creator-count) {
  background: var(--editorial-soft);
}

:root body.pn-editorial[data-page="product"] :is(.pn-kit-choice, .pn-contents, .pn-details-section, .pn-videos, .pn-footer-short, .pn-sticky, .pn-questions details, .reviews-card, .creator-count) {
  border-color: var(--editorial-line);
}

:root body.pn-editorial[data-page="product"] .pn-kit-option input:checked + .pn-kit-choice {
  border-color: var(--editorial-accent) !important;
  background: #fff5f5;
}

:root body.pn-editorial[data-page="product"] .pn-kit-option input:checked + .pn-kit-choice::before {
  border-color: var(--editorial-accent);
}

:root body.pn-editorial[data-page="product"] .pn-kit-option input:focus-visible + .pn-kit-choice {
  outline-color: var(--editorial-link);
}

:root body.pn-editorial[data-page="product"] .pn-thumb[aria-pressed="true"] {
  border-color: var(--editorial-accent);
}

:root body.pn-editorial[data-page="product"] :is(.pn-shipping-chip, .pn-promotion) {
  background: var(--editorial-soft);
  color: var(--editorial-ink);
}

:root body.pn-editorial[data-page="product"] :is(.creator-count, .creator-caption strong) {
  color: var(--editorial-ink);
}

:root body.pn-editorial[data-page="product"] .creator-play svg { fill: var(--editorial-accent); }
:root body.pn-editorial[data-page="product"] .creator-close { color: var(--editorial-link); }

/* Checkout: vermelho para ações/seleção, azul para navegação e foco. */
:root body.pn-editorial[data-page="checkout"] :is(.checkout-card, .order-summary) {
  background: #ffffff;
  border-color: var(--editorial-line);
  box-shadow: none;
}

:root body.pn-editorial[data-page="checkout"] .order-summary { border-top-color: var(--editorial-accent); }

:root body.pn-editorial[data-page="checkout"] :is(.checkout-progress li, .checkout-hint, .field-hint, .summary-delivery, .summary-meta p, .checkout-security, .clean-seller-line, .clean-footer-help, .review-summary-label, .clean-detail-totals > div, .clean-legal-details > summary, .payment-method-tab span) {
  color: var(--editorial-muted);
}

:root body.pn-editorial[data-page="checkout"] :is(.form-field label, .review-summary-body, .clean-detail-totals dd, .btn-secondary) {
  color: var(--editorial-ink);
}

:root body.pn-editorial[data-page="checkout"] .form-field :is(input, select, textarea)::placeholder { color: #707070; }
:root body.pn-editorial[data-page="checkout"] .form-field :is(input, select, textarea):not([aria-invalid="true"]):focus {
  border-color: var(--editorial-link);
  outline-color: var(--editorial-link);
}

:root body.pn-editorial[data-page="checkout"] .form-field [aria-invalid="true"]:focus {
  border-color: var(--checkout-danger);
  outline-color: var(--checkout-danger);
}

:root body.pn-editorial[data-page="checkout"] .card-number-row:focus-within {
  border-color: var(--editorial-link);
  box-shadow: 0 0 0 2px #0057b81a;
}

:root body.pn-editorial[data-page="checkout"] .checkout-progress .step-number {
  border-color: #c9c9c9;
  color: var(--editorial-muted);
  background: #ffffff;
}

:root body.pn-editorial[data-page="checkout"] .checkout-progress .is-active { color: var(--editorial-accent); }
:root body.pn-editorial[data-page="checkout"] .checkout-progress .is-active .step-number {
  border-color: var(--editorial-accent);
  background: var(--editorial-accent);
  color: #ffffff;
  box-shadow: none;
}

:root body.pn-editorial[data-page="checkout"] .checkout-progress :is(.is-complete, .is-completed) .step-number {
  background: #f1f1f1;
  border-color: #bdbdbd;
  color: var(--editorial-ink);
}

:root body.pn-editorial[data-page="checkout"] .checkout-progress li::after { background: var(--editorial-line); }
:root body.pn-editorial[data-page="checkout"] :is(.payment-method-tab.is-active, .shipping-option.is-selected, #shippingCardExpresso.is-selected) {
  border-color: var(--editorial-accent);
  background: #fff5f5;
  color: var(--editorial-ink);
  box-shadow: none;
}

:root body.pn-editorial[data-page="checkout"] :is(.shipping-option input, #cartReminderConsent) { accent-color: var(--editorial-accent); }
:root body.pn-editorial[data-page="checkout"] :is(.email-domain-option, .clean-review-details, .promotion-badge) {
  background: var(--editorial-soft) !important;
  border-color: var(--editorial-line) !important;
  color: var(--editorial-ink) !important;
}

:root body.pn-editorial[data-page="checkout"] .email-domain-option:hover { border-color: var(--editorial-link) !important; }
:root body.pn-editorial[data-page="checkout"] .email-domain-option:focus-visible { outline-color: var(--editorial-link) !important; }
:root body.pn-editorial[data-page="checkout"] label:has(> #cartReminderConsent) { color: var(--editorial-muted); }

/* Informações legais e consentimento, mantendo mensagens de erro/sucesso originais. */
:root body.pn-editorial[data-page] .legal-footer {
  --legal-blue: var(--editorial-link);
  --legal-ink: var(--editorial-ink);
  --legal-muted: var(--editorial-muted);
  --legal-line: var(--editorial-line);
  background: var(--editorial-soft) !important;
  border-top-color: var(--editorial-line) !important;
  color: var(--editorial-ink);
}

:root body.pn-editorial[data-page] :is(.legal-policy[open] > summary, .legal-policies-toggle[open] > summary, .legal-prices thead) {
  background: #f1f1f1 !important;
  color: var(--editorial-ink) !important;
}

:root body.pn-editorial[data-page] .site-consent { border-top-color: var(--editorial-line) !important; }
:root body.pn-editorial[data-page] .site-consent :is(a, button) {
  color: var(--editorial-link) !important;
  border-color: #c9c9c9 !important;
}
