/* ==========================================================================
   Dark content scheme — loaded last, only when the scheme is "Tối"
   (Giao diện → Tùy biến → Màu thương hiệu, or ?giao-dien=toi preview;
   see inc/brand-colors.php). The header, page bands and footer are
   already dark; this turns the content area dark as well. Mostly token
   swaps — the rest covers places that pair an "ink" background with
   white text, which would invert into white-on-white.
   ========================================================================== */
html[data-theme="dark"] {
	color-scheme: dark;
	--sk-ink: #f3f4f6;
	--sk-text-2: #c9ced8;
	--sk-paper: #141925;
	--sk-surface: #1b2130;
	--sk-line: #262d3b;
	--sk-muted: #a9b0bd;
	--sk-accent-text: #ff3b44;
	--sk-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
	--sk-shadow-md: 0 10px 28px rgba(0, 0, 0, 0.45);
	--sk-page-bg: #0b0e14;
}
html[data-theme="dark"] body { background: var(--sk-page-bg); color: var(--sk-ink); }

/* Content areas that had their own light backgrounds. */
html[data-theme="dark"] .sk-shop { background: var(--sk-page-bg); }
html[data-theme="dark"] .sk-section--surface,
html[data-theme="dark"] .sk-trust,
html[data-theme="dark"] .sk-contact-cta,
html[data-theme="dark"] .sk-about-stats { background: #10141d; }
html[data-theme="dark"] .sk-gallery__main { background: linear-gradient(160deg, #1b2130, #10141d); }
html[data-theme="dark"] .sk-footer { margin-top: 0; }

/* Cards: slightly lifted panels with a red edge on hover. */
html[data-theme="dark"] .sk-card,
html[data-theme="dark"] .sk-product-card { background: var(--sk-paper); border-color: var(--sk-line); }
html[data-theme="dark"] .sk-product-card:hover { border-color: rgba(var(--sk-accent-rgb), 0.6); box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(var(--sk-accent-rgb), 0.25); }
html[data-theme="dark"] .sk-product-card__media { background: #1b2130; }
html[data-theme="dark"] .sk-product-card__cta { background: #222a3a; }
html[data-theme="dark"] .sk-product-card__cta:hover { background: #2b3446; }
html[data-theme="dark"] .sk-product-card__design { background: rgba(20, 25, 37, 0.9); color: #fff; box-shadow: none; }
html[data-theme="dark"] .sk-wish { background: rgba(20, 25, 37, 0.9); color: #fff; box-shadow: none; }
html[data-theme="dark"] .sk-rating__stars::before { background-image: linear-gradient(90deg, var(--star) calc(var(--rating) / 5 * 100%), #3a4252 0); }
html[data-theme="dark"] #reviews .star-rating::before { color: #3a4252; }

/* "Ink background + white text" pairs → use the accent instead. */
html[data-theme="dark"] .sk-icon-btn:hover,
html[data-theme="dark"] .sk-gallery__arrow:hover,
html[data-theme="dark"] .sk-filter__chip.is-active,
html[data-theme="dark"] .sk-pagination .page-numbers.current { background: var(--sk-accent); border-color: var(--sk-accent); color: #fff; }
html[data-theme="dark"] .sk-btn--outline { --sk-btn-fg-hover: #111; }
html[data-theme="dark"] .sk-toolbar__filter-btn { background: var(--sk-accent); border-color: var(--sk-accent); }
html[data-theme="dark"] .sk-btn--dark { --sk-btn-bg: #222a3a; --sk-btn-bd: #222a3a; --sk-btn-bg-hover: #2b3446; --sk-btn-bd-hover: #2b3446; }
html[data-theme="dark"] .sk-gallery__arrow { background: rgba(27, 33, 48, 0.9); color: #fff; }
html[data-theme="dark"] .sk-pill.is-active .sk-pill__badge { background: #fff; }

/* Form controls. */
html[data-theme="dark"] .sk-field,
html[data-theme="dark"] input[type="text"],
html[data-theme="dark"] input[type="email"],
html[data-theme="dark"] input[type="tel"],
html[data-theme="dark"] input[type="search"],
html[data-theme="dark"] input[type="number"],
html[data-theme="dark"] textarea,
html[data-theme="dark"] select { background-color: #10141d; border-color: var(--sk-line); color: var(--sk-ink); }
html[data-theme="dark"] .woocommerce-ordering select.orderby {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%23f4f4f5' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}
html[data-theme="dark"] .sk-swatch.is-active { background: rgba(var(--sk-accent-rgb), 0.15); }
html[data-theme="dark"] .sk-price-filter__slider input[type="range"]::-webkit-slider-thumb { background: #111; }
html[data-theme="dark"] .sk-contact__form-card { background: #10141d; }
html[data-theme="dark"] .sk-modal__panel { background: #141925; }

/* Product page tabs read in light grey rather than near-black. */
html[data-theme="dark"] .sk-tabs__panel { color: #c9ced8; }
html[data-theme="dark"] .sk-product__trust svg { stroke: var(--sk-ink); }
html[data-theme="dark"] .sk-tag { background: var(--sk-surface); }
html[data-theme="dark"] .sk-benefits__item { background: var(--sk-paper); }

/* Mobile contact bar. */
html[data-theme="dark"] .sk-floating-contact__menu { background: #10141d; border-top-color: var(--sk-line); }

/* Dark swatches / dots would vanish on the dark background. */
html[data-theme="dark"] .sk-swatch--color,
html[data-theme="dark"] .sk-color-dot { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
html[data-theme="dark"] .sk-swatch--color.is-active { box-shadow: 0 0 0 2px var(--sk-page-bg), 0 0 0 4px var(--sk-accent); }
