/* Rev35: coherent, accessible NIGHT mode. Light mode remains unchanged. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #111a15;
  --soft: #18261e;
  --card: #1e2b23;
  --cream-50: #111b15;
  --cream-100: #18261e;
  --cream-200: #203127;
  --cream-300: #294031;
  --cream-line: rgba(222,236,215,.18);
  --line: rgba(220,236,217,.20);
  --ink: #f2f0e8;
  --charcoal: #e3e9dd;
  --text-soft: #cedccd;
  --text-faint: #afc6b6;
  --green-300: #b7ebcd;
  --green-500: #79c9a0;
  --green-600: #78cca0;
  --green-700: #91dbb5;
  --green-800: #b2e4cb;
  --green-900: #d3f2e2;
  --green-50: #213f30;
  --green-100: #234331;
  --white: #1e2b23;
  --mayan-ivory: #111b15;
  --mayan-ivory-dim: #203127;
  --mayan-green-deep:#194a32;
  --mayan-green-dark:#236445;
  --mayan-green-main:#2e7854;
  --mayan-green-mid:#3e9167;
  --mayan-green-soft:#62b68a;
  --shadow-sm: 0 6px 23px rgba(0,0,0,.28);
  --shadow-md: 0 20px 48px rgba(0,0,0,.35);
}
html[data-theme="dark"] body { background: var(--paper); color: var(--ink); }
html[data-theme="dark"] .sec,
html[data-theme="dark"] .sec-soft,
html[data-theme="dark"] .sec-dark,
html[data-theme="dark"] .products-page { color: var(--charcoal); }
html[data-theme="dark"] :is(.sec-title,.g-title,.sec-dark .sec-title,.page-hero h1,.page-hero h2) { color:var(--ink); }
html[data-theme="dark"] :is(.sec-lead,.sec-dark .sec-lead,.brand-card p,.catalog-strip__text p,.cat-card p,.sector-card p,.why-item p,.contact-form p,.footer-brand p,.product-card p,.page-hero p) { color: var(--text-soft); }
html[data-theme="dark"] :is(.sec-tag,.sec-dark .sec-tag) { color:#b7ebcd; background:rgba(128,200,151,.10); border-color:rgba(165,224,181,.29); }
html[data-theme="dark"] :is(.sec .sec-title span,.sec-dark .g-title span,.g-title span) {color:#aeddbf;}
html[data-theme="dark"] :is(.brand-card__text,.cat-card__title,.product-card__title,.why-item h3,.sector-card h3,.catalog-strip__text h3) { color:var(--ink); }
html[data-theme="dark"] :is(.why-item,.cat-card,.catalog-strip,.brand-card,.sector-card,.cov-wrap,.quote-band,.contact-form,.empty-state,.product-card,.flip-btn) { background-color:var(--card);border-color:var(--line); }
/* buttons stay dark enough for white text */
html[data-theme="dark"] :is(.btn-green,.btn-primary,.btn-cta,.basket-add,.product-order-btn) {background-color:#256845; border-color:#39895c; color:#fff;}
html[data-theme="dark"] :is(.btn-green,.btn-primary,.btn-cta,.basket-add,.product-order-btn):hover {background-color:#317f55; border-color:#65b487; color:#fff;}
html[data-theme="dark"] :is(.btn-outline,.btn-light,.btn-ghost) {color:#cdf0d9; border-color:#83c99d; background-color:#21392b;}
html[data-theme="dark"] :is(.btn-outline,.btn-light,.btn-ghost):hover {color:#fff; background-color:#317451;}
/* Product cards retain clean WHITE image beds but the copy has night contrast. */
html[data-theme="dark"] .product-card__media {background:#f6f8f4;}
html[data-theme="dark"] :is(.product-card__name,.product-card__subtitle,.product-card__pack,.product-card__meta,.product-card__more) {color:#eaf0e7;}
/* Product detail dialog, including packing data, quantity and zoom tools. */
html[data-theme="dark"] .product-modal.pm-premium .modal-content {background:#19291f;color:#e9eee6;}
html[data-theme="dark"] .product-modal.pm-premium .product-modal__info h4 {color:#fff4d7;}
html[data-theme="dark"] .product-modal.pm-premium .pm-specs {background:#243d2d; border-color:rgba(175,225,189,.22);}
html[data-theme="dark"] .product-modal.pm-premium .pm-spec dt {color:#c0d7c8;}
html[data-theme="dark"] .product-modal.pm-premium .pm-spec dd {color:#f4f6eb;}
html[data-theme="dark"] .product-modal.pm-premium .pm-tools,
html[data-theme="dark"] .product-modal.pm-premium .pm-hint {background:#20382b;color:#e3eadf;}
html[data-theme="dark"] .product-modal.pm-premium :is(.pm-tool,.pm-zoom-pct,.btn-close) {color:#f6e2ac;}
html[data-theme="dark"] .product-modal.pm-premium .btn-close {background:#20382b;}
html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-control:focus {background:#203128;color:#f2f4eb;border-color:#779e83;}
html[data-theme="dark"] .form-control::placeholder {color:#abbeb0;opacity:1;}
html[data-theme="dark"] .form-control:focus {outline-color:#b2d8b9;}
/* Flipbook remains on its deliberate bright-paper surface. Do NOT invert it. */
html[data-theme="dark"] .catalog-luxury-section :is(.catalog-view-title strong,.catalog-stat,.catalog-action-btn,.catalog-icon-btn,.flip-page-indicator,.flip-zoom-indicator) {color:#2a4f38;}
/* No accidental blanket recoloring of hero slides, nav or white PDF pages. */
html[data-theme="dark"] :is(.sec,.products-page,.catalog-section) ::selection {background:#adcc91;color:#132b1b;}
