body[data-theme="light"]{
  --home-page-bg:#f5f7f2;
  --home-surface:#ffffff;
  --home-surface-soft:#eef6e8;
  --home-header:rgba(255,255,255,.92);
  --home-search:#0f3d2e;
  --home-hero:linear-gradient(135deg,#eaf5e0 0%,#f4f8ef 58%,#ffffff 100%);
  --home-text:#0f3d2e;
  --home-text-soft:#39463b;
  --home-muted:#687366;
  --home-border:#dce6d6;
  --home-card:#ffffff;
  --home-card-soft:#f8faf6;
  --home-shadow:0 20px 50px rgba(15,61,46,.12);
}

body[data-theme="dark"]{
  --home-page-bg:#07120d;
  --home-surface:rgba(12,18,15,.96);
  --home-surface-soft:rgba(255,255,255,.055);
  --home-header:rgba(7,12,10,.94);
  --home-search:#071f16;
  --home-hero:linear-gradient(135deg,#07120d 0%,#0d2118 55%,#07120d 100%);
  --home-text:#f5f7fb;
  --home-text-soft:#d1d5db;
  --home-muted:#a6b3aa;
  --home-border:rgba(255,255,255,.12);
  --home-card:rgba(15,23,18,.94);
  --home-card-soft:rgba(255,255,255,.055);
  --home-shadow:0 24px 60px rgba(0,0,0,.32);

  --page-bg:var(--home-page-bg);
  --surface:var(--home-surface);
  --surface-soft:var(--home-surface-soft);
  --text:var(--home-text);
  --muted:var(--home-muted);
  --border:var(--home-border);
  --shadow:var(--home-shadow);
  --green-900:#f5f7fb;
  --green-800:#d1fae5;
  --green-700:#22c55e;
  --green-100:rgba(34,197,94,.14);
  --yellow:#22c55e;
}

body[data-theme="light"] .page-shell{
  background:radial-gradient(circle at top left,rgba(31,143,77,.12),transparent 30%),linear-gradient(180deg,#f9fbf6 0%,var(--home-page-bg) 46%,#f7f8f4 100%);
}

body[data-theme="dark"] .page-shell{
  background:radial-gradient(circle at top left,rgba(34,197,94,.16),transparent 32%),linear-gradient(180deg,#050806 0%,var(--home-page-bg) 46%,#050806 100%);
}

body[data-theme] .site-header{
  background:var(--home-header);
  border-bottom-color:var(--home-border);
}

body[data-theme] .brand-copy strong,
body[data-theme] .hero-copy h1,
body[data-theme] .hero-product-info h2,
body[data-theme] .section-head h2,
body[data-theme] .card h3,
body[data-theme] .catalog-card h3,
body[data-theme] .catalog-modal-info h2{
  color:var(--home-text);
}

body[data-theme] .brand-copy small,
body[data-theme] .header-nav a,
body[data-theme] .hero-copy p,
body[data-theme] .hero-product-info p,
body[data-theme] .section-head p,
body[data-theme] .catalog-count,
body[data-theme] .catalog-card-meta,
body[data-theme] .catalog-modal-author,
body[data-theme] .catalog-modal-desc,
body[data-theme] .catalog-modal-meta,
body[data-theme] .checkout-note,
body[data-theme] .catalog-preview-slide figcaption,
body[data-theme] .catalog-preview-counter{
  color:var(--home-muted);
}

body[data-theme] .brand-mark,
body[data-theme] .hero-eyebrow,
body[data-theme] .preview-pill,
body[data-theme] .catalog-card-kicker{
  background:var(--home-surface-soft);
  border-color:var(--home-border);
  color:var(--green-700);
}

body[data-theme] .search-bar-wrap{
  background:var(--home-search);
}

body[data-theme] .search-input-wrap{
  background:var(--home-surface);
  color:var(--home-muted);
  border:1px solid var(--home-border);
}

body[data-theme] .search-input-wrap input{
  color:var(--home-text);
}

body[data-theme] .search-input-wrap input::placeholder{
  color:var(--home-muted);
}

body[data-theme] .hero-section{
  background:var(--home-hero);
  border-bottom-color:var(--home-border);
}

body[data-theme] .hero-product-card,
body[data-theme] .card,
body[data-theme] .catalog-card,
body[data-theme] .how-grid article,
body[data-theme] .catalog-modal-dialog{
  background:var(--home-card);
  border-color:var(--home-border);
  box-shadow:var(--home-shadow);
}

body[data-theme] .hero-pdf-card,
body[data-theme] .catalog-card-thumb,
body[data-theme] .catalog-preview-slide,
body[data-theme] .catalog-modal-meta span,
body[data-theme] .catalog-modal-loading,
body[data-theme] .catalog-modal-empty{
  background:var(--home-card-soft);
  border-color:var(--home-border);
  color:var(--home-muted);
}

body[data-theme] .hero-product-info strong,
body[data-theme] .catalog-card-price,
body[data-theme] .modal-price-row strong{
  color:var(--home-text);
}

body[data-theme] .category-strip{
  background:var(--home-surface);
  border-bottom-color:var(--home-border);
}

body[data-theme] .category-chip{
  background:var(--home-surface);
  border-color:var(--home-border);
  color:var(--home-text);
}

body[data-theme] .category-chip.active,
body[data-theme] .category-chip:hover{
  background:var(--green-700);
  border-color:var(--green-700);
  color:#fff;
}

body[data-theme] .catalog-loading{
  background:var(--home-card);
  border-color:var(--home-border);
  color:var(--home-muted);
}

body[data-theme] .catalog-modal-backdrop{
  background:rgba(3,16,11,.72);
}

body[data-theme="light"] .catalog-modal-backdrop{
  background:rgba(15,61,46,.30);
}

body[data-theme] .catalog-modal-info{
  border-left-color:var(--home-border);
}

body[data-theme] .catalog-modal-close,
body[data-theme] .catalog-preview-nav{
  background:var(--home-surface);
  color:var(--home-text);
  border-color:var(--home-border);
}

body[data-theme] .catalog-preview-dot{
  background:var(--home-border);
}

body[data-theme] .catalog-preview-dot.is-active{
  background:var(--green-700);
}

body[data-theme="dark"] .login-btn.ui-action-link,
body[data-theme="dark"] .cart-btn.ui-action-link{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.14);
  color:#f5f7fb;
}

body[data-theme="dark"] .login-btn.ui-action-link:hover,
body[data-theme="dark"] .cart-btn.ui-action-link:hover{
  background:rgba(255,255,255,.12);
  border-color:rgba(34,197,94,.42);
}

body[data-theme="dark"] .cart-btn strong{
  background:rgba(255,255,255,.16);
  color:#f5f7fb;
}

@media(max-width:900px){
  body[data-theme] .catalog-modal-info{border-left:0;border-top-color:var(--home-border)}
}
