.canda-store-layout .store-theme-toggle {
  display:grid;
  place-items:center;
  flex:0 0 44px;
  width:44px;
  height:44px;
  padding:0;
  border:1px solid var(--home-line);
  border-radius:50%;
  background:var(--canda-surface);
  color:var(--home-ink);
  cursor:pointer;
}
.canda-store-layout .store-theme-toggle:hover {
  background:var(--home-wash);
  border-color:var(--home-accent);
  color:var(--home-accent);
}
.store-theme-toggle svg {
  width:20px;
  height:20px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.store-theme-toggle[aria-pressed="false"] .store-theme-sun,
.store-theme-toggle[aria-pressed="true"] .store-theme-moon {display:none}

@media (max-width:355px) {
  .canda-store-layout .canda-nav-inner .presentation-store-brand {min-width:0}
  .canda-store-layout .canda-nav-inner .presentation-store-brand img {width:min(100%,98px)}
}

:root[data-store-theme="dark"] {
  color-scheme:dark;
  background:#181719;
}
:root[data-store-theme="dark"] body.canda-store-layout {
  --theme-page:#181719;
  --theme-surface:#232125;
  --theme-panel:#2c292d;
  --theme-raised:#373238;
  --theme-line:#514a52;
  --theme-field:#807480;
  --theme-ink:#f5eff2;
  --theme-muted:#c8bdc5;
  --theme-accent:#ff9da7;
  --theme-tint:#482a32;
  --theme-primary:#a5212b;
  --theme-primary-hover:#8d1c2a;
  --theme-success:#9ad6b1;
  --theme-warning:#e7c58a;
  --home-ink:var(--theme-ink);
  --home-muted:var(--theme-muted);
  --home-line:var(--theme-line);
  --home-wash:var(--theme-panel);
  --home-soft:var(--theme-panel);
  --home-surface:var(--theme-page);
  --home-accent:var(--theme-accent);
  --canda-page:var(--theme-page);
  --canda-surface:var(--theme-surface);
  --canda-field-border:var(--theme-field);
  --red:var(--theme-accent);
  --red-dark:var(--theme-accent);
  --action-red:var(--theme-primary);
  --action-red-hover:var(--theme-primary-hover);
  --ui-line:var(--theme-line);
  --ui-wash:var(--theme-panel);
  --ui-tint:var(--theme-tint);
  --ui-shadow:none;
  background:var(--theme-page);
  color:var(--theme-ink);
}
:root[data-store-theme="dark"] .canda-store-layout {
  & :focus-visible {outline-color:var(--theme-accent)}
  & :is(.section-kicker,.eyebrow,.v2-section-kicker,.legal-kicker,.category-jump,.category-return,.back-catalog) {color:var(--theme-accent)}

  /* Shared header and dropdowns. Keep printed brand colors on a neutral background. */
  & :is(.canda-home-header,.canda-header-search,.canda-search-suggestions,.category-menu,.language-options,.v2-hours-popover) {
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-ink);
  }
  & .presentation-store-brand img {background:#fff;border-radius:6px;mix-blend-mode:normal}
  & :is([data-account-guest],.account-toggle,.presentation-store-cart,.language-picker summary) {
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-ink);
  }
  & :is(.category-menu a,.account-menu button,.language-options button,.v2-hours-address,.v2-hours-phone,.v2-hours-live,.v2-hours-table th) {
    color:var(--theme-ink);
  }
  & :is(.category-menu a,.account-menu button,.language-options button,.canda-search-result):hover {
    background:var(--theme-panel);
    color:var(--theme-accent);
  }
  & :is(.account-menu-caption,.v2-hours-dropdown summary,.v2-department-phone span,.canda-company-footer) {
    color:var(--theme-muted);
  }
  & :is(.v2-hours-state,.v2-hours-live [data-v2-hours-label]) {color:var(--theme-success)}

  /* Cards and surfaces keep their separation without tinting product photography. */
  & :is(.canda-home-department,.canda-catalogue-card,.product-card,.product-info,.card-cart-actions,
    .subcategory-card,.category-filter-panel,.category-no-results,.category-empty,.catalog-category>a,
    .v2-search-card,.v2-search-form,.v2-search--results,.customer-card,.account-profile,
    .customer-order,.cart-row,.order-form,.order-form-card,.order-summary,.v2-offer-form-card,
    .v2-offer-summary,.v2-offer-item,.v2-pack-card,.v2-partner-form,.v2-partner-benefits li,
    .v2-logistics-card,.v2-showroom-grid figure,.legal-hub-card,.legal-document,.legal-withdrawal,
    .material-guide-panel,.material-guide-result,.compare-empty,.contact-form-card,.review-card) {
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-ink);
    box-shadow:none;
  }
  & :is(.subcategory-types,.filter-panel-intro,.filter-mobile-footer,.product-summary .detail-price,
    .product-key-details,.linked-variants,.product-delivery,.v2-product-logistics,
    .v2-material-calculator,.v2-calculator-answer,.tubadzin-range-note,.v2-season,.legal-sidebar,
    .legal-table-wrap,.catalogue-section-nav,.catalogue-validity,.catalogue-editions,
    .bundle-teaser,.material-teaser-card,.faq-answer,.story-closing,.auth-mode-tabs) {
    background:var(--theme-panel);
    border-color:var(--theme-line);
    color:var(--theme-ink);
  }
  & :is(.material-teaser-card,.story-closing) {background-image:none}
  & :is(.canda-home-tabs [data-home-current],.subcategory-nav-heading>span,.category-active-filters button,
    [data-filter-active-count],[data-facet-selected],.linked-variant-choice[aria-current="true"],
    .favorite-toggle[aria-pressed="true"],.compare-toggle[aria-pressed="true"],
    .catalogue-section-link--campaign) {
    background:var(--theme-tint);
    border-color:var(--theme-line);
    color:var(--theme-accent);
    box-shadow:none;
  }
  & :is(.subcategory-card,.catalogue-section-link--producers):hover {
    background:var(--theme-panel);
    border-color:var(--theme-accent);
  }
  & :is(.subcategory-count,.model-pending-label,.tubadzin-format-badge,.linked-variants header>span) {
    background:var(--theme-raised);
    border-color:var(--theme-line);
    color:var(--theme-ink);
  }
  & :is(.subcategory-types summary,.subcategory-card svg,.product-family-link,.variant-change-status button,
    .filter-panel-intro button,.breadcrumbs a,.catalogue-collection-heading p,.catalogue-contact,
    .v2-search-upload,.tubadzin-range-note a,.legal-document a,.privacy-note a) {color:var(--theme-accent)}
  & :is(.product-info h3,.product-summary h1,.product-price,.detail-price strong,
    .catalog-category h3,.legal-document :is(h1,h2,h3),.faq-list summary,.linked-variants legend strong,
    .catalogue-library-heading h1,.catalogue-group h3) {color:var(--theme-ink)}
  & :is(.breadcrumbs,.category-catalog-note,.subcategory-group h3,.category-results-toolbar :is(p,label),
    .filter-hint,.filter-option small,.filter-price-fields label,.product-description,.product-brand-name,
    .product-summary .detail-price>span,.product-reference,.product-price small,.package-volume,
    .v2-vat-note,.v2-search-code,.v2-search-status,.v2-search-heading p:not(.eyebrow),.v2-search-card-info>small,
    .specification-list dt,.linked-variants :is(header p,legend,.linked-variant-help,.variant-color-note),
    .variant-color-caption small,.v2-material-calculator label,.v2-calculator-note,.v2-calculator-source,
    .customer-card>p,.customer-muted,.catalogue-breadcrumbs,.catalogue-search label,.catalogue-pdf-note,
    .catalogue-group-links a,.legal-breadcrumbs,.legal-intro,.legal-version,.legal-form-note) {color:var(--theme-muted)}
  & :is(.specification-list dd,.v2-offer-page,.catalogue-library-main,.catalogue-editions a,
    .v2-search-form label,.legal-hub-card h2,.legal-document p,.legal-document li) {color:var(--theme-ink)}
  & :is(.specification-list>div:nth-child(odd),.legal-table th) {background:var(--theme-panel)}
  & :is(.specification-list>div,.legal-toc,.legal-table td,.legal-table th,.faq-list,.faq-list details) {border-color:var(--theme-line)}
  & :is(.v2-card-stock,.v2-search-stock) {color:var(--theme-warning)}
  & :is(.v2-card-stock[data-status="in_stock"],.v2-search-stock.available,.v2-search-card-feedback,
    .v2-product-added,.customer-status,.variant-change-status) {color:var(--theme-success)}

  /* Forms and compact controls. */
  & :is(main,.privacy-dialog,.canda-catalog-modal,.product-offer-modal)
    :is(input:not([type="checkbox"],[type="radio"],[type="range"],[type="hidden"]),select,textarea) {
    background-color:var(--theme-page);
    color:var(--theme-ink);
  }
  & :is(main,.privacy-dialog,.canda-catalog-modal,.product-offer-modal)
    :is(input:not([type="checkbox"],[type="radio"],[type="range"],[type="hidden"]),select,textarea):not([aria-invalid="true"]) {
    border-color:var(--theme-field);
  }
  & :is(input,textarea)::placeholder {color:var(--theme-muted);opacity:1}
  & :is(.filter-error,[aria-invalid="true"]) {border-color:var(--theme-accent)}
  & :is(.filter-error,.v2-calculator-feedback,.form-error,.customer-error) {color:var(--theme-accent)}
  & :is(.home-button:not(.primary),.button.button-secondary,.button.secondary,
    .product-detail-actions [data-product-order],.card-secondary-actions :is(.product-share-button,.compare-toggle),
    .favorite-toggle-detail,.v2-search--results .favorite-toggle:not([aria-pressed="true"]),
    .linked-variant-choice:not([aria-current="true"]),.auth-mode-tabs button[aria-pressed="false"],
    .image-viewer-close,.image-viewer-tools button,.privacy-banner-actions button,.privacy-actions button,
    .canda-modal-close,.canda-preview-tools button,.canda-preview-tools a,.canda-preview-links a) {
    background:var(--theme-panel);
    border-color:var(--theme-line);
    color:var(--theme-ink);
  }
  & :is(.button:not(.button-secondary,.secondary),.home-button.primary,.search-submit,
    .product-detail-actions [data-add-cart],.category-pagination a[rel="next"],
    .auth-mode-tabs button[aria-pressed="true"],:where(#assistant-launcher)) {
    background:var(--theme-primary);
    border-color:var(--theme-primary);
    color:#fff;
  }
  & :is(.button:not(.button-secondary,.secondary),.home-button.primary,.search-submit,
    .product-detail-actions [data-add-cart],.category-pagination a[rel="next"],
    .auth-mode-tabs button[aria-pressed="true"],:where(#assistant-launcher)):hover:not(:disabled,[aria-disabled="true"]) {
    background:var(--theme-primary-hover);
    border-color:var(--theme-primary-hover);
    color:#fff;
  }
  & .category-page-picker select {appearance:auto;background-image:none;padding-inline-end:10px}

  /* Cart, privacy and overlays. */
  & .offer-cart {
    --cart-ink:var(--theme-ink);
    --cart-muted:var(--theme-muted);
    --cart-line:var(--theme-line);
    --cart-wash:var(--theme-panel);
    --cart-tint:var(--theme-tint);
    --cart-shadow:none;
  }
  & :is(.offer-cart-section,.offer-cart-card,.offer-cart-empty,.offer-cart-step-number,
    .offer-cart-steps [aria-current="step"],.offer-cart-option,.offer-cart-quantity,
    .offer-cart-drop,.offer-cart-extras,.offer-cart-add,.offer-cart-back) {
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-ink);
  }
  & :is(.offer-cart-option:has(:checked),.offer-cart-option:hover,.offer-cart-drop:hover) {
    background:var(--theme-tint);
    border-color:var(--theme-accent);
  }
  & :is(.privacy-banner,.privacy-banner .privacy-feedback,.privacy-dialog,.canda-catalog-modal,
    .canda-modal-header,.canda-preview-content,.product-offer-modal,.product-offer-modal-head,
    .product-image-viewer,.image-viewer-head,.image-viewer-tools,#assistant-form) {
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-ink);
  }
  & :is(.canda-catalog-modal h2,.product-image-viewer h2,.privacy-banner h2,.privacy-dialog h2) {color:var(--theme-ink)}
  & :is(.privacy-banner-copy p,.privacy-dialog p,.privacy-options small,#assistant-status) {color:var(--theme-muted)}
  & #assistant-panel {
    --chat-ink:var(--theme-ink);
    --chat-muted:var(--theme-muted);
    --chat-border:var(--theme-line);
    background:var(--theme-surface);
    border-color:var(--theme-line);
    color:var(--theme-ink);
  }
  & :is(.catalogue-logo-card,.product-brand-logo:not(.product-brand-logo--light)) {background:#fff}
}
