/* Semantic colors cover the child theme and Storefront/WooCommerce surfaces. */
:root {
  color-scheme: light;
  --ctc-surface: #fff;
  --ctc-raised: #eaf0eb;
  --ctc-footer-bg: #edece6;
  --ctc-link: #174a35;
  --ctc-link-hover: #103727;
  --ctc-soft-heading: #577565;
  --ctc-accent-text: #785419;
  --ctc-focus: #397254;
  --ctc-control-border: #667b6d;
  --ctc-button-bg: #174a35;
  --ctc-button-hover: #103727;
  --ctc-button-text: #fff;
  --ctc-notice-error: #fff0f0;
  --ctc-notice-info: #f4f8ff;
  --ctc-notice-success: #f4fff7;
  --ctc-notice-warning: #fffbf4;
  --ctc-error: #a51d24;
  --ctc-logo-bg: transparent;
  --ctc-logo-padding: 0;
}
:root[data-ctc-theme="dark"] {
  color-scheme: dark;
  --ctc-cream: #101913;
  --ctc-paper: #19281f;
  --ctc-ink: #edf4ed;
  --ctc-muted: #b9c8bc;
  --ctc-slate: #b9c8bc;
  --ctc-line: #42564a;
  --ctc-surface: #19281f;
  --ctc-raised: #24372b;
  --ctc-footer-bg: #142219;
  --ctc-link: #afddbd;
  --ctc-link-hover: #d5f2df;
  --ctc-soft-heading: #94c7a3;
  --ctc-accent-text: #dfbc76;
  --ctc-focus: #dfbc76;
  --ctc-control-border: #8b9f90;
  --ctc-button-bg: #afddbd;
  --ctc-button-hover: #d5f2df;
  --ctc-button-text: #132219;
  --ctc-notice-error: #3b2024;
  --ctc-notice-info: #1c3040;
  --ctc-notice-success: #1c3526;
  --ctc-notice-warning: #382e19;
  --ctc-error: #ffaeb4;
  --ctc-logo-bg: #f8f7f3;
  --ctc-logo-padding: .5rem .75rem;
}
/* Automatic dark appearance still works when JavaScript is disabled. */
@media (prefers-color-scheme: dark) {
  :root:not([data-ctc-theme]) {
    color-scheme: dark;
    --ctc-cream: #101913; --ctc-paper: #19281f; --ctc-ink: #edf4ed;
    --ctc-muted: #b9c8bc; --ctc-slate: #b9c8bc; --ctc-line: #42564a;
    --ctc-surface: #19281f; --ctc-raised: #24372b; --ctc-footer-bg: #142219;
    --ctc-link: #afddbd; --ctc-link-hover: #d5f2df; --ctc-soft-heading: #94c7a3;
    --ctc-accent-text: #dfbc76; --ctc-focus: #dfbc76; --ctc-control-border: #8b9f90;
    --ctc-button-bg: #afddbd; --ctc-button-hover: #d5f2df; --ctc-button-text: #132219;
    --ctc-notice-error: #3b2024; --ctc-notice-info: #1c3040;
    --ctc-notice-success: #1c3526; --ctc-notice-warning: #382e19; --ctc-error: #ffaeb4;
    --ctc-logo-bg: #f8f7f3; --ctc-logo-padding: .5rem .75rem;
  }
}

/* Keep the approved logo colors legible on a small cream plate in dark mode. */
.ctc-brand-logo, .ctc-footer-logo {
  box-sizing: border-box;
  background: var(--ctc-logo-bg);
  padding: var(--ctc-logo-padding);
  border-radius: 4px;
}
.site-header > .col-full { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 2rem; }
.site-header > .col-full::before, .site-header > .col-full::after { display: none; }
.ctc-appearance { display: flex; align-items: center; gap: .6rem; padding-bottom: 1.25rem; font-size: .78rem; }
.ctc-appearance[hidden] { display: none; }
.ctc-appearance label { color: var(--ctc-muted); }
.ctc-appearance select { min-height: 44px; padding: .45rem 1.8rem .45rem .7rem; border: 1px solid var(--ctc-control-border); border-radius: 5px; font: inherit; cursor: pointer; }

body, .site-header { background-color: var(--ctc-cream); color: var(--ctc-ink); }
.site-footer { background: var(--ctc-footer-bg); color: var(--ctc-muted); }
h1, h2, h3, h4, h5, h6, .product_title, .wc-block-components-title { color: var(--ctc-ink); }
a, .site-header a, .ctc-menu a, .ctc-text-link, .ctc-product-card h3 a,
.ctc-product-price, .ctc-footer nav a, .woocommerce-breadcrumb a,
.woocommerce-tabs ul.tabs li a, .storefront-handheld-footer-bar ul li > a { color: var(--ctc-link); }
a:hover, .site-header a:hover, .ctc-menu a:hover { color: var(--ctc-link-hover); }
.woocommerce-breadcrumb, .single-product div.product .product_meta, .stock.in-stock,
.ctc-eyebrow, .ctc-product-kind, .ctc-hero-preview figcaption { color: var(--ctc-muted); }
.ctc-hero h1 span { color: var(--ctc-soft-heading); }
.ctc-benefit-strip span::before, .ctc-steps li > span,
.ctc-product-card-bundle .ctc-product-kind { color: var(--ctc-accent-text); }
.ctc-product-card, .ctc-hero-preview { background: var(--ctc-surface); }
.ctc-hero-preview { box-shadow: 0 20px 60px #0002, 0 0 0 1px var(--ctc-line); }
.ctc-hero-image, .ctc-card-image, .ctc-file-preview { background: var(--ctc-raised); }
.ctc-file-preview { color: var(--ctc-ink); }
.ctc-card-bottom { border-color: var(--ctc-line); }
.ctc-home .ctc-button { color: #162019 !important; }
.ctc-about h2, .ctc-about .ctc-about-lead { color: #fff; }

/* Native controls, Storefront product/account pages and the legacy checkout. */
input, textarea, select, .input-text {
  background-color: var(--ctc-surface); color: var(--ctc-ink);
  border-color: var(--ctc-control-border); accent-color: var(--ctc-button-bg);
}
input::placeholder, textarea::placeholder { color: var(--ctc-muted); opacity: 1; }
input:focus, textarea:focus, select:focus { background-color: var(--ctc-surface); color: var(--ctc-ink); }
body input[type="text"], body input[type="email"], body input[type="number"],
body input[type="password"], body input[type="tel"], body input[type="search"],
body input[type="url"], body textarea, body .quantity .qty {
  background-color: var(--ctc-surface); color: var(--ctc-ink); border-color: var(--ctc-control-border);
}
.single-product div.product .product_meta a, .woocommerce-tabs ul.tabs li.active a,
ul.products li.product .price { color: var(--ctc-link); }
#respond { background: var(--ctc-surface); color: var(--ctc-ink); }
body a:focus-visible, body button:focus-visible, body input:focus-visible,
body select:focus-visible, body textarea:focus-visible, body summary:focus-visible {
  outline: 3px solid var(--ctc-focus); outline-offset: 4px;
}
body button, body input[type="submit"], body input[type="button"], body .button,
body .button.alt, body .added_to_cart, body .wp-element-button,
body .wc-block-components-button:not(.is-link) {
  background-color: var(--ctc-button-bg); color: var(--ctc-button-text); border-color: transparent;
}
body button:hover, body .button:hover, body .button.alt:hover, body .wp-element-button:hover,
body .wc-block-components-button:not(.is-link):hover {
  background-color: var(--ctc-button-hover); color: var(--ctc-button-text);
}
table:not(.wc-block-cart-items) th, table:not(.wc-block-cart-items) td,
#payment, #payment .payment_methods > li, #payment .payment_methods > li .payment_box,
#payment .place-order, .woocommerce-checkout-review-order, .woocommerce-cart-form,
.select2-container--default .select2-selection--single, .select2-dropdown,
.select2-search input, .widget_shopping_cart, .storefront-handheld-footer-bar {
  background-color: var(--ctc-surface); color: var(--ctc-ink); border-color: var(--ctc-line);
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ctc-ink); }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option[aria-selected="true"] { background: var(--ctc-button-bg); color: var(--ctc-button-text); }
.site-header .site-header-cart .widget_shopping_cart,
.site-header .site-header-cart .widget_shopping_cart .total,
.site-header .site-header-cart .widget_shopping_cart .buttons { background: var(--ctc-surface); color: var(--ctc-ink); }
.site-header .site-header-cart .widget_shopping_cart a:not(.button) { color: var(--ctc-link); }
.site-header .site-header-cart .widget_shopping_cart .button { background: var(--ctc-button-bg); color: var(--ctc-button-text); }
.site-header .site-header-cart .cart-contents,
.site-header .site-header-cart .widget_shopping_cart .quantity,
.site-header .site-header-cart .widget_shopping_cart .amount { color: var(--ctc-ink); }
.site-header .site-header-cart .widget_shopping_cart .button.checkout {
  background: var(--ctc-button-bg); color: var(--ctc-button-text);
}
.site-footer a:not(.button):not(.components-button) { color: var(--ctc-link); }
.ctc-preview-bar .ctc-file-label { color: #e6c58a; }
body .storefront-handheld-footer-bar ul li > a,
body .storefront-handheld-footer-bar ul li.search .site-search {
  background: var(--ctc-surface); color: var(--ctc-link);
}
body .site-footer .storefront-handheld-footer-bar a:not(.button):not(.components-button) { color: var(--ctc-link); }
body .storefront-handheld-footer-bar ul li.cart .count {
  background: var(--ctc-button-bg); color: var(--ctc-button-text); border-color: var(--ctc-surface);
}

/* WooCommerce cart/checkout blocks provide several explicit light-only styles. */
.wc-block-cart, .wc-block-checkout, .wc-block-components-sidebar,
.wc-block-components-order-summary, .wc-block-components-totals-wrapper {
  --wc-separator-color: var(--ctc-line); color: var(--ctc-ink); border-color: var(--ctc-line);
}
body .wc-block-components-text-input input,
body .wc-block-components-text-input input:focus,
body .wc-block-components-combobox .components-combobox-control__input,
body .wc-block-components-combobox .components-combobox-control__input:focus,
body .wc-block-components-textarea,
body .wc-block-components-combobox .components-form-token-field__suggestions-list,
body .wc-block-components-combobox .components-form-token-field__input-container,
body .wc-block-components-radio-control-accordion-option,
body .wc-block-components-radio-control-accordion-content,
body .wc-block-components-order-summary-item__quantity {
  background: var(--ctc-surface); color: var(--ctc-ink); border-color: var(--ctc-control-border);
}
/* Block styles load after the theme and include type/state selectors. */
body .wc-block-components-form .wc-block-components-text-input input[type],
body .wc-block-components-form .wc-block-components-text-input input[type]:focus,
body .wc-block-components-text-input input[type],
body .wc-block-components-text-input input[type]:focus,
body .wc-blocks-components-select .wc-blocks-components-select__container,
body .wc-blocks-components-select .wc-blocks-components-select__select,
body .wc-block-components-checkbox .wc-block-components-checkbox__input[type="checkbox"] {
  background-color: var(--ctc-surface); color: var(--ctc-ink); border-color: var(--ctc-control-border);
}
body .wc-blocks-components-select .wc-blocks-components-select__label,
body .wc-block-components-form .wc-block-components-text-input label { color: var(--ctc-muted); }
body .wc-blocks-components-select .wc-blocks-components-select__expand { fill: var(--ctc-ink); }
body .wc-block-components-order-summary .wc-block-components-order-summary-item__quantity {
  background: var(--ctc-raised); color: var(--ctc-ink); border-color: var(--ctc-control-border);
}
body .wc-block-components-text-input label,
body .wc-block-components-combobox .components-base-control__label,
body .wc-block-components-select label,
body .wc-block-components-product-metadata { color: var(--ctc-muted); }
body .wc-block-components-combobox .components-form-token-field__suggestion.is-selected {
  background: var(--ctc-button-bg); color: var(--ctc-button-text);
}
body .wc-block-components-quantity-selector { border-color: var(--ctc-control-border); }
body .wc-block-components-quantity-selector input { background: transparent; color: var(--ctc-ink); }
body .wc-block-components-quantity-selector button,
body .wc-block-components-totals-coupon-link,
body .wc-block-components-panel__button,
body .wc-block-cart-item__remove-link,
body .wc-block-components-button.is-link { background: transparent; color: var(--ctc-link); }
body .wc-block-components-quantity-selector button:disabled { opacity: .5; }
body .wc-block-components-validation-error { color: var(--ctc-error); }
body .wc-block-components-notice-banner { background: var(--ctc-surface); color: var(--ctc-ink); border-color: var(--ctc-control-border); }
body .wc-block-components-notice-banner.is-error { background: var(--ctc-notice-error); border-color: var(--ctc-error); }
body .wc-block-components-notice-banner.is-info { background: var(--ctc-notice-info); }
body .wc-block-components-notice-banner.is-success { background: var(--ctc-notice-success); }
body .wc-block-components-notice-banner.is-warning { background: var(--ctc-notice-warning); }
body .wc-block-components-notice-banner > .wc-block-components-notice-banner__content .wc-forward,
body .wc-block-components-notice-banner > .wc-block-components-button { color: var(--ctc-ink) !important; }
@media (max-width: 767px) {
  .site-header > .col-full { gap: 0 1rem; }
  .ctc-appearance { width: 100%; justify-content: flex-end; padding-bottom: .85rem; }
}
