/* Shared light palette. Loaded after page styles; homepage refinements load last. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #fff; --surface: #fff; --surface-2: #f7f5f6; --surface-3: #efecee;
  --text: #292629; --muted: #70696d; --line: #e9e3e6; --border: #e9e3e6; --border-color: #e9e3e6;
  --brand-red: #fb3c58; --accent: #cc2946; --accent-light: #cc2946;
  --blue: #cc2946; --blue-light: #cc2946; --cyan: #cc2946; --orange: #fb3c58;
  --blush: #fff5f8; --blush-deep: #fde9ef; --action: #171517; --action-hover: #343034;
  --shadow: 0 20px 65px #38212c1a;
  --panel-bg: #fff; --admin-bg: #fff5f8; --admin-text: #292629;
  --admin-border: #e9e3e6; --admin-muted: #70696d; --admin-accent: #cc2946;
  --tblr-body-bg: #fff5f8; --tblr-body-color: #292629; --tblr-border-color: #e9e3e6;
  --tblr-primary: #171517; --tblr-primary-rgb: 23,21,23; --tblr-link-color: #cc2946;
  background: var(--bg); color: var(--text);
}
html[data-theme="light"] body { background: var(--bg); color: var(--text); }
html[data-theme="light"] body :is(input, select, textarea) { accent-color: var(--accent); }
html[data-theme="light"] body :is(input, textarea)::placeholder { color: #837a7f; }
html[data-theme="light"] body :is(.section-kicker, .text-link, .text-button, .detail-overline) { color: var(--accent); }
html[data-theme="light"] body :is(.breadcrumbs, .breadcrumbs i) { color: var(--muted); }
html[data-theme="light"] body :is(.breadcrumbs a:hover, .text-button:hover) { color: var(--accent); }
html[data-theme="light"] body :is(.btn-primary, .product-card-action, .category-search button, .primary-button, .shopier-button) {
  color: #fff; background: var(--action); border-color: var(--action); box-shadow: none;
}
html[data-theme="light"] body :is(.btn-primary, .product-card-action, .category-search button, .primary-button, .shopier-button):hover {
  color: #fff; background: var(--action-hover); border-color: var(--action-hover);
}
html[data-theme="light"] body .btn-outline { color: var(--text); background: #fff; border-color: #ddd6da; }
html[data-theme="light"] body .btn-outline:hover { border-color: var(--text); }
html[data-theme="light"] body .btn-glass { color: var(--text); background: #fff; border-color: var(--line); }
html[data-theme="light"] body :is(.demo-chip, .status-pill, .status-pill.paid, .status-pill.fulfilled) { background: var(--blush-deep); color: var(--accent); border-color: #efd8e1; }
html[data-theme="light"] body :is(.loading-card, .empty-state, .error-state) { background: var(--blush); color: var(--muted); border-color: #ead7df; }
html[data-theme="light"] body :is(.empty-state h3, .error-state strong) { color: var(--text); }
html[data-theme="light"] body :is(.empty-state p, .error-state p) { color: var(--muted); }
html[data-theme="light"] body :is(.toast, .toast.error) { background: #fff; color: var(--text); border-color: #e9a7b5; box-shadow: var(--shadow); }
html[data-theme="light"] body .toast.error { border-color: var(--accent); }
html[data-theme="light"] body .pagination button { background: #fff; color: var(--muted); border-color: var(--line); }
html[data-theme="light"] body .pagination button.active { background: var(--action); color: #fff; border-color: var(--action); }

/* Header, footer and the existing mobile menu. */
html[data-theme="light"] body .site-header { background: #ffffffed; color: var(--text); border-color: var(--line); }
html[data-theme="light"] body .brand-name > span { color: var(--brand-red)!important; }
html[data-theme="light"] body .site-header .header-search { background: #faf8f9; border-color: var(--line); }
html[data-theme="light"] body .header-search input { color: var(--text); }
html[data-theme="light"] body :is(.nav-shell, .footer-bottom) { border-color: var(--line); }
html[data-theme="light"] body .site-header :is(.nav-categories a, .nav-utility, .header-logout) { color: var(--muted); }
html[data-theme="light"] body .site-header :is(.nav-categories a:hover, .nav-categories a.active, .nav-utility:hover) { color: var(--accent); background: var(--blush); }
html[data-theme="light"] body .site-header .nav-categories a i { color: var(--accent); background: var(--blush-deep); }
html[data-theme="light"] body :is(.header-user .user-avatar, .icon-button) { background: var(--surface-2); color: var(--text); border-color: var(--line); }
html[data-theme="light"] body .site-header .cart-link { background: var(--surface-2); color: var(--text); }
html[data-theme="light"] body .site-header .cart-count { background: var(--brand-red); color: #fff; }
html[data-theme="light"] body .site-footer { background: #fcfafb; color: var(--text); border-color: var(--line); }
html[data-theme="light"] body .footer-grid h3 { color: var(--text); }
html[data-theme="light"] body :is(.site-footer p, .footer-bottom, .footer-grid a:not(.brand)) { color: var(--muted); }
html[data-theme="light"] body .footer-grid a:not(.brand):hover { color: var(--accent); }
html[data-theme="light"] body :is(.mobile-menu-panel, .mobile-menu-main) { background: #fff; color: var(--text); }
html[data-theme="light"] body .mobile-menu-rail { background: #fcf7f9; border-color: var(--line); }
html[data-theme="light"] body .mobile-menu-rail-item.is-active { background: var(--blush-deep); color: var(--text); }
html[data-theme="light"] body .mobile-category-card { background: #fff; color: var(--text); border-color: var(--line); border-left-color: var(--brand-red); }
html[data-theme="light"] body .mobile-menu-search { background: var(--surface-2); border-color: var(--line); }
html[data-theme="light"] body .mobile-menu-panel .mobile-menu-icon { color: var(--accent); background: var(--blush-deep); }
html[data-theme="light"] body .mobile-menu-panel .is-active .mobile-menu-icon { background: var(--action); color: #fff; }
html[data-theme="light"] body .mobile-menu-head button { background: var(--surface-2); color: var(--text); }
html[data-theme="light"] body .mobile-menu-head button:first-child { background: var(--action); color: #fff; }
html[data-theme="light"] body .mobile-menu-shortcuts { border-color: var(--line); }
html[data-theme="light"] body .mobile-menu-shortcuts a { background: var(--blush); color: var(--muted); }
html[data-theme="light"] body .site-header :is(.quick-login, .quick-wallet) { background: var(--action); color: #fff; }
html[data-theme="light"] body .site-header :is(.quick-register, .quick-orders) { background: #fff; color: var(--text); border: 1px solid var(--line); }
html[data-theme="light"] body .site-header .quick-balance { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
html[data-theme="light"] body .mobile-bottom-nav { background: #fffffff5; border-color: var(--line); }
html[data-theme="light"] body .mobile-bottom-nav :is(a, button, i) { color: var(--muted); }
html[data-theme="light"] body .mobile-bottom-nav :is(.active, .active i) { color: var(--accent); }
html[data-theme="light"] body .mobile-bottom-nav a[data-nav="cart"] i { color: #fff; background: var(--action); box-shadow: 0 4px 12px #29212824; }

/* Account, notifications, support, login and verification. */
html[data-theme="light"] body :is(.hub-group, .auth-card, .legal-card) { background: #fff; color: var(--text); border-color: var(--line); box-shadow: var(--shadow); }
html[data-theme="light"] body .hub-group { box-shadow: none; }
html[data-theme="light"] body :is(.hub-group h2, .hub-entry small, .profile-form label, .form-stack label, .auth-bottom) { color: var(--muted); }
html[data-theme="light"] body :is(.hub-group > a, .hub-group > .hub-logout, .hub-entry, .auth-bottom) { border-color: var(--line); }
html[data-theme="light"] body :is(.ticket-row, .notification-item, .ticket-message) { background: var(--blush); color: var(--text); border-color: #efdae3; }
html[data-theme="light"] body .notification-item.unread { background: var(--blush-deep); border-left-color: var(--brand-red); }
html[data-theme="light"] body :is(.notification-item span, .notification-item small, .ticket-row small, .ticket-message small, .ticket-message p) { color: var(--muted); }
html[data-theme="light"] body :is(.profile-form input, .profile-form textarea, .form-stack input, .topup-form select, .purchase-form input) {
  background: #fff; color: var(--text); border-color: #dcd1d6;
}
html[data-theme="light"] body :is(.auth-card > p, .legal-card p, .legal-card code, #resend-timer, .auth-divider) { color: var(--muted); }
html[data-theme="light"] body .auth-icon { background: var(--blush-deep); color: var(--accent); }
html[data-theme="light"] body .auth-side-art { background: radial-gradient(circle at 40% 30%, #fff5f8, #f8d8e2); box-shadow: 0 15px 60px #efd3df66; }
html[data-theme="light"] body .auth-side-art i { color: var(--accent); filter: drop-shadow(0 10px 8px #b7788d22); }
html[data-theme="light"] body .auth-divider::before,
html[data-theme="light"] body .auth-divider::after { background: var(--line); }
html[data-theme="light"] body :is(.form-error, .verify-feedback, .auth-bottom a, .legal-card a) { color: var(--accent); }

/* Book catalog and individual product pages. */
html[data-theme="light"] body .category-hero { background: linear-gradient(120deg, #fff5f8, #fde9ef); color: var(--text); border-color: #f1dce5; }
html[data-theme="light"] body .category-hero::before,
html[data-theme="light"] body .category-hero::after { border-color: #e7b9c866; }
html[data-theme="light"] body .category-glow { background: radial-gradient(ellipse, #f3c7d655, transparent 70%); }
html[data-theme="light"] body .category-hero-icon { background: #fff; color: var(--accent); }
html[data-theme="light"] body :is(.category-hero p, .results-heading span:not(.demo-chip), .filter-label) { color: var(--muted); }
html[data-theme="light"] body .category-search { background: #fff; color: var(--muted); border-color: #e7d7df; }
html[data-theme="light"] body .category-search input { color: var(--text); }
html[data-theme="light"] body .filter-pills button { background: #fff; color: var(--muted); border-color: var(--line); }
html[data-theme="light"] body .filter-pills button.active { background: var(--action); color: #fff; border-color: var(--action); box-shadow: none; }
html[data-theme="light"] body :is(.product-card, .product-detail, .product-description) { background: #fff; color: var(--text); border-color: var(--line); }
html[data-theme="light"] body .product-card:hover { border-color: #e4a9b8; }
html[data-theme="light"] body :is(.product-visual, .book-visual) { background: var(--blush); color: var(--text); }
html[data-theme="light"] body .book-art { background: var(--blush)!important; }
html[data-theme="light"] body .book-visual img { filter: drop-shadow(5px 8px 8px #38212c26); }
html[data-theme="light"] body :is(.product-card-body p, .product-card-body small, .old-price, .detail-subtitle, .product-description p, .purchase-form label, .purchase-help) { color: var(--muted); }
html[data-theme="light"] body :is(.price, .cart-item-price) { color: var(--text); }
html[data-theme="light"] body .product-badge { background: var(--blush-deep); color: var(--accent); }
html[data-theme="light"] body .favorite-toggle { background: #fff; color: var(--muted); border-color: var(--line); }
html[data-theme="light"] body .favorite-toggle.is-favorite { background: var(--blush-deep); color: var(--accent); border-color: #e9a7b5; }
html[data-theme="light"] body :is(.detail-facts span, .detail-price-block) { background: var(--blush); color: var(--text); border-color: #efdae3; }

/* Cart and orders. */
html[data-theme="light"] body :is(.cart-item, .summary-card, .order-card) { background: #fff; color: var(--text); border-color: var(--line); }
html[data-theme="light"] body :is(.cart-item-icon, .order-line-icon) { background: var(--blush-deep); color: var(--accent); }
html[data-theme="light"] body :is(.cart-item-copy small, .summary-row, .summary-row.total, .order-top small, .order-line-main small, .order-line-status, .order-note) { color: var(--muted); }
html[data-theme="light"] body :is(.summary-row strong, .summary-row.total strong, .order-top .order-total, .order-codes code) { color: var(--text); }
html[data-theme="light"] body :is(.cart-quantity, .summary-row.total, .order-line, .order-bottom) { border-color: var(--line); }
html[data-theme="light"] body .cart-quantity button { background: var(--blush); color: var(--text); }
html[data-theme="light"] body :is(.order-top, .order-codes, .summary-card p) { background: var(--blush); color: var(--muted); border-color: #efdae3; }

/* Wallet and payment status surfaces. */
html[data-theme="light"] body :is(.wallet-hero, .wallet-current) { background: linear-gradient(120deg, #fff5f8, #fde9ef); color: var(--text); border-color: #f1dce5; box-shadow: none; }
html[data-theme="light"] body :is(.wallet-user small, .wallet-values small, .wallet-hero > p, .wallet-current > span, .wallet-current a) { color: var(--muted); }
html[data-theme="light"] body .wallet-avatar { background: var(--blush-deep); color: var(--accent); }
html[data-theme="light"] body .wallet-values div { background: #ffffffa6; border-color: #ecd4de; }
html[data-theme="light"] body :is(.wallet-card:not(.wallet-current), .topup-card) { background: #fff; color: var(--text); border-color: var(--line); }
html[data-theme="light"] body :is(.wallet-payment-note, .checkout-notice, .wallet-success) { background: var(--blush); color: var(--text); border-color: #efdae3; }
html[data-theme="light"] body :is(.wallet-step p, .wallet-muted, .wallet-assurance, .payment-method small, .amount-label, .amount-input > span, #checkout-status, .topup-history-heading > span, .topup-pagination > span) { color: var(--muted); }
html[data-theme="light"] body :is(.amount-input, .payment-help input) { background: #fff; color: var(--text); border-color: #dcd1d6; }
html[data-theme="light"] body .amount-input input { color: var(--text); }
html[data-theme="light"] body .amount-presets button { background: var(--blush); color: var(--text); border-color: #efdae3; }
html[data-theme="light"] body .amount-presets button:is(:hover, [aria-pressed="true"]) { background: var(--action); color: #fff; border-color: var(--action); }
html[data-theme="light"] body :is(.wallet-total, .payment-help) { border-color: var(--line); }
html[data-theme="light"] body :is(.topup-method-icon, .topup-action, .topup-details > summary) { background: var(--blush); color: var(--accent); border-color: #efdae3; }

/* Admin panels retain their layout and use the shared light palette. */
html[data-theme="light"] body.admin-shell { background: var(--admin-bg); color: var(--admin-text); }
html[data-theme="light"] body :is(.admin-tabs button.active, .admin-tabs button:hover) { background: var(--blush-deep); color: var(--accent); }
html[data-theme="light"] body :is(.admin-product-icon, .admin-product-actions button, .admin-avatar) { background: var(--blush); color: var(--text); border-color: #efdae3; }
html[data-theme="light"] body :is(.admin-product-price, .admin-shell .eyebrow, .admin-shell .text-button, .metric-change, .metric-change.negative) { color: var(--accent); }
html[data-theme="light"] body :is(.admin-order-item, .admin-ticket-message, .wallet-review) { border-color: var(--line); }
html[data-theme="light"] body :is(.admin-order-head small, .admin-order-item small, .admin-product-copy small, .admin-ticket-row span, .stock-indicator, .sidebar-section-label) { color: var(--muted); }
html[data-theme="light"] body :is(.admin-support-detail textarea, .wallet-review textarea) { background: #fff; color: var(--text); border: 1px solid #dcd1d6; border-radius: 9px; padding: 11px; }
html[data-theme="light"] body.admin-shell .table { color: var(--text); }
html[data-theme="light"] body .table { --tblr-table-bg: #fff; --tblr-table-striped-bg: #fff5f8; --tblr-table-hover-bg: #fde9ef; }

/* Mail already uses a light layout; bring its surfaces into the same palette. */
html[data-theme="light"] body[data-shell="mail"] { background: var(--blush); }
html[data-theme="light"] body :is(.mail-main, .mail-compose, .mail-login input) { background: #fff; color: var(--text); border-color: var(--line); }
html[data-theme="light"] body :is(.mail-sidebar, .mail-search, .compose-header, .mail-row, .mail-empty > i, .login-emblem) { background: var(--blush); color: var(--muted); border-color: var(--line); }
html[data-theme="light"] body :is(.mail-folders button.active, .mail-folders button:hover, .mail-row.selected, .mail-row:hover) { background: var(--blush-deep); color: var(--accent); }
html[data-theme="light"] body .mail-row.unread { background: #fff; }
html[data-theme="light"] body .mail-primary-action { background: var(--action); color: #fff; }
html[data-theme="light"] body :is(.mail-preview, .mail-message, .mail-row time, .mail-list-footer, .toolbar-label, .mail-safe-note, .detail-addresses small, .detail-date, .mail-empty p, .mail-login p, .mail-login label, .compose-from > span, .compose-field > span, .compose-text-label) { color: var(--muted); }
html[data-theme="light"] body :is(.mail-toolbar, .mail-tabs, .mail-row, .compose-header, .compose-field, .compose-from) { border-color: var(--line); }

/* Optional analytics notice follows the page palette. */
html[data-theme="light"] body .analytics-consent { background: #fff; color: var(--text); border-color: #e9a7b5; box-shadow: var(--shadow); }
html[data-theme="light"] body .analytics-consent :is(p, small) { color: var(--muted); }
