/* One shared toggle; original dark palette and component styles stay intact. */
.theme-toggle { display: inline-grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; min-width: 44px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--paper); cursor: pointer; }
.theme-toggle svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Header geometry is shared by both themes; the spacer is ordinary flex space. */
.site-header.storefront-theme-header { grid-template-columns: minmax(112px, 166px) minmax(0, 1fr) minmax(max-content, 28vw); padding-inline-end: var(--header-controls-inset, 12px); }
.site-header.storefront-theme-header .movio-brand-image { max-width: 100% !important; }
.storefront-theme-header .storefront-header-actions { display: flex; grid-area: actions; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-width: 0; padding-inline: var(--header-actions-inset, 0px); }
.theme-account-controls { position: relative; display: flex; flex: 0 0 auto; align-items: center; gap: 10px; }
.item-page-header.storefront-theme-header { display: grid; grid-template-columns: minmax(0, 1fr) minmax(max-content, 45%); grid-template-areas: "brand actions"; padding-inline-end: var(--header-controls-inset, 12px); }
.item-page-header.storefront-theme-header .wordmark { max-width: 100%; }
@media (min-width: 1001px) {
  .storefront-theme-header { --header-controls-inset: 42px; --header-actions-inset: 35px; }
}
@media (min-width: 761px) and (max-width: 1000px) {
  .site-header.storefront-theme-header { grid-template-columns: 112px minmax(0, 1fr) max-content; }
}
@media (max-width: 760px) {
  .site-header.storefront-theme-header { grid-template-columns: minmax(0, 140px) minmax(0, 1fr); grid-template-areas: "brand actions" "search search"; }
}
@media (max-width: 430px) {
  .site-header.storefront-theme-header { grid-template-columns: minmax(0, 116px) minmax(0, 1fr); }
  .item-page-header .theme-toggle { flex-basis: 40px; width: 40px; min-width: 40px; }
}

/* Only the customer light theme overrides the existing palette. */
html[data-theme="light"] {
  color-scheme: light;
  --ink: #ffffff;
  --surface: #ffffff;
  --surface-2: #f4f6f1;
  --line: rgba(24, 33, 22, .15);
  --muted: #596452;
  --paper: #182116;
  --text: #182116;
  --theme-accent-text: #42610d;
  --theme-shadow: 0 6px 24px rgba(24, 33, 22, .06);
}
html[data-theme="light"] body { background: var(--ink); color: var(--paper); }
html[data-theme="light"] .page-shell::before { background-image: none; }
html[data-theme="light"] :is(.site-header, .item-page-header) { background: rgba(255,255,255,.97); border-color: var(--line); }
html[data-theme="light"] :is(.hero, .categories, .category-destinations, .catalog, .cart, .promise, .faq, .active-category, .active-category--header, .trust-section, .trust-strip, .item-page-main) { background: var(--ink); color: var(--paper); }
html[data-theme="light"] :is(.category-card, .category-card:nth-child(2), .category-card:nth-child(3), .card-copy, .category-detail, .compact-product-card, .detail-related-card, .cart-horizontal-page .cart-item, .cart-page .cart-summary, .item-page-ecommerce .item-page-copy, .item-page-ecommerce .detail-content-panel, .trust-item) { background: var(--surface); color: var(--paper); border-color: var(--line); box-shadow: var(--theme-shadow); }
html[data-theme="light"] :is(.item-page-ecommerce .detail-specification-row, .item-page-ecommerce .item-page-facts dl > div, .account-detail-panel, .customer-orders-empty) { background: var(--surface-2); border-color: var(--line); color: var(--paper); }
html[data-theme="light"] :is(.hero h1, .hero-intro, .hero-categories, .category-detail h3, .category-detail-copy p, .item-page-ecommerce .item-page-copy h1, .item-page-ecommerce .detail-content-panel h2, .item-page-ecommerce .detail-related h2, .account-dialog h2, .account-detail-panel, .trust-item, .card-copy h3) { color: var(--paper); }
html[data-theme="light"] :is(.hero-intro, .item-page-description, .detail-category-label, .product-category, .section-index, .eyebrow, .summary-note, .summary-row, .cart-heading-count, .item-page-ecommerce .item-page-facts dt, .detail-related-empty, .product-price-label small, .product-description, .cart-remove, .auth-form label, .checkout-form label) { color: var(--muted); }
html[data-theme="light"] :is(h1 em, .hero-categories b, .section-heading h2 span, .catalog-heading h2 span, .categories .section-heading h2 span, .category-destinations .section-index, .categories .section-index, .card-copy p, .item-header-back, .item-page-index, .item-page-not-found > p, .detail-pricing strong, .detail-related-card strong, .detail-header-cart b, .cart-unit-pricing strong, .summary-label, .summary-delivery span:last-child, .checkout-installment, .checkout-message, .auth-message, .account-greeting, .account-order strong, .detail-cart-message, .cart-empty > span, .catalog-filter-state, .search-result-link span, .product-price-label, .product-price-value, .information-page a, .information-links a, .forgot-password, .account-back, .customer-order h4, .customer-account-tabs button[aria-pressed="true"]) { color: var(--theme-accent-text); }
html[data-theme="light"] :is(.search-form, .search-results, .search-message, .account-menu, .account-dialog, .search-panel) { background: var(--surface); color: var(--paper); border-color: var(--line); box-shadow: var(--theme-shadow); }
html[data-theme="light"] :is(.search-form input, .checkout-form input, .checkout-form textarea, .checkout-form select, .auth-form input, #deliveryType) { background: var(--surface); color: var(--paper); border-color: var(--line); }
html[data-theme="light"] :is(.search-form input, .checkout-form input, .auth-form input)::placeholder { color: #67715f; }
html[data-theme="light"] :is(.header-cart-link, .account-button, .detail-header-cart, .customer-account-tabs button) { border-color: var(--line); color: var(--paper); }
html[data-theme="light"] :is(.search-submit, .primary-action, .checkout-submit, .checkout-card, .auth-submit, .auth-switch button[aria-pressed="true"], .category-detail .product-buy, .item-page-ecommerce .detail-purchase-actions .detail-buy, .item-page-back, .product-discount, .detail-discount-badge, .cart-count.has-items, .mobile-cart-checkout button, .skip-link) { color: #182116; }
html[data-theme="light"] :is(.compact-product-card .product-cart, .item-page-ecommerce .detail-purchase-actions .detail-add, .card-arrow) { background: #f0f8df; color: var(--theme-accent-text); border-color: #a3c66e; }
html[data-theme="light"] :is(.category-detail .add-to-cart:disabled, .item-page-add:disabled, .checkout-unavailable) { background: #e6ebe0; color: #53604b; border-color: #cbd4c4; }
html[data-theme="light"] :is(.account-menu button:hover, .account-menu button:focus-visible, .account-back:hover, .forgot-password:hover, .cart-page .cart-item-copy h3 a:hover) { background: var(--surface-2); color: var(--theme-accent-text); }
html[data-theme="light"] :is(.cart-horizontal-page .quantity-control button:hover:not(:disabled), .hero-categories a:hover, .hero-categories a:focus-visible, .header-category-link:hover, .header-category-link:focus-visible, .category-card:hover .card-arrow, .category-card:focus-visible .card-arrow) { background: var(--accent); color: #182116; }
html[data-theme="light"] .detail-stock-badge { color: #206735; background: #eaf6ec; border-color: #a6cdb1; }
html[data-theme="light"] .auth-message.is-error { color: #a02d25; }
html[data-theme="light"] .checkout-message.checkout-success { color: #42610d; background: #f4f9e9; }
html[data-theme="light"] .customer-order { border-color: var(--line); }
html[data-theme="light"] .cart-horizontal-page .mobile-cart-checkout { background: rgba(255,255,255,.98); border-color: var(--line); box-shadow: 0 -6px 24px rgba(24,33,22,.07); }
html[data-theme="light"] :is(footer, .storefront-footer, .movio-footer) { background: #f5f7f1; color: var(--paper); border-color: var(--line); }
html[data-theme="light"] :is(.storefront-footer .footer-column h3, .storefront-footer .footer-column a:hover, .footer-nav a:hover) { color: var(--theme-accent-text); }
html[data-theme="light"] :is(.storefront-footer .footer-column a, .storefront-footer .footer-entry, .storefront-footer .footer-phone) { color: var(--paper); }
html[data-theme="light"] :is(.storefront-footer .footer-column p, .storefront-footer .footer-bottom) { color: var(--muted); border-color: var(--line); }
html[data-theme="light"] .storefront-footer .social-link { color: var(--paper) !important; }

/* Nested labels and historical fixed colors need their own light-theme contrast. */
html[data-theme="light"] :is(.category-detail .product-buy .add-label, .category-detail .product-buy .add-icon, .item-page-add .add-label) { color: #182116; }
html[data-theme="light"] :is(.trust-item strong, .account-detail-panel p) { color: var(--paper); }
html[data-theme="light"] :is(.product-old-price-label, .product-stock-quantity, .trust-item small) { color: var(--muted); }
html[data-theme="light"] :is(.item-page-facts dd.stock-available, .stock-available) { color: #206735; }
html[data-theme="light"] :is(.item-page-facts dd.stock-unavailable, .stock-unavailable) { color: #a02d25; }

html[data-theme="light"] :where(header, main, footer, .account-dialog) :focus-visible:not(.footer-admin-entry) { outline-color: #42610d; }
