/**
 * Site-wide surfaces. Beats Astra Customizer dark body/content colors
 * so every template uses the design system. Header/footer keep their
 * own Customizer colors.
 */

html {
  background-color: var(--ds-page, #ebede8) !important;
}

body {
  background-color: var(--ds-page, #ebede8) !important;
  color: var(--ds-neutral, #2d3436) !important;
  font-family: var(--ds-font-body) !important;
  font-size-adjust: from-font;
}

.site,
#page,
.site-content,
#content,
#primary,
.ast-separate-container,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post,
.ast-plain-container,
.ast-page-builder-template .site-content,
.ast-woocommerce-container,
.woocommerce-page .site-content {
  background-color: var(--ds-page, #ebede8) !important;
  color: var(--ds-neutral, #2d3436);
}

/* Content containers only — do NOT paint header builder rows
   (.site-above-header-wrap / primary wrap also use .ast-container). */
.site-content .ast-container,
.ast-woocommerce-container .ast-container {
  background-color: var(--ds-page, #ebede8) !important;
  color: var(--ds-neutral, #2d3436);
}

/* Desktop only: nested content wrap uses .ast-container / .site-*-header-wrap
   inside the bar. Do NOT target .site-above-header-wrap alone — on mobile
   that class is on the bar itself and would wipe Customizer background. */
.site-header .ast-above-header-bar > .site-above-header-wrap,
.site-header .ast-above-header-bar .ast-container,
.site-header .ast-primary-header-bar > .site-primary-header-wrap,
.site-header .ast-primary-header-bar .ast-container,
.site-header .ast-below-header-bar > .site-below-header-wrap,
.site-header .ast-below-header-bar .ast-container {
	background-color: transparent !important;
}

.entry-content,
.entry-content p,
.woocommerce-product-details__short-description,
.woocommerce-Tabs-panel,
.woocommerce-checkout,
.woocommerce-cart,
.woocommerce-account,
.related.products,
.upsells.products {
  color: var(--ds-neutral, #2d3436);
  font-family: var(--ds-font-body);
}

.entry-title,
.page-title,
.ast-archive-title,
.woocommerce-products-header .page-title,
.product_title,
.related.products > h2,
.upsells.products > h2,
.woocommerce-Tabs-panel h2,
.cart_totals h2,
.woocommerce-billing-fields h3,
.woocommerce-additional-fields h3 {
  font-family: var(--ds-font-headline) !important;
  font-weight: 400 !important;
  color: var(--ds-neutral, #2d3436) !important;
}

/* Track Order: Astra heading color is #f5f5f5; force readable text on light page */
.page-id-30 h1,
.page-id-30 h2,
.page-id-30 h3,
.page-id-30 .elementor-heading-title,
.page-id-30 .entry-content :where(h1, h2, h3),
.woocommerce-form-track-order,
.woocommerce-form-track-order p,
.woocommerce-form-track-order label {
  color: var(--ds-neutral, #2d3436) !important;
}

.entry-content a:not(.button):not(.ds-btn),
.woocommerce-info a,
.woocommerce-message a {
  color: var(--ds-primary, #507a95);
}

.woocommerce table.shop_table,
.woocommerce table.shop_table th,
.woocommerce table.shop_table td,
.woocommerce-cart .cart-collaterals,
.woocommerce-checkout #order_review,
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-content,
.woocommerce div.product .woocommerce-tabs ul.tabs li,
.woocommerce div.product .woocommerce-tabs .panel {
  background-color: var(--ds-tertiary, #f9f9f9) !important;
  color: var(--ds-neutral, #2d3436) !important;
  border-color: var(--ds-primary-8, #b5c7d2) !important;
}

.woocommerce-MyAccount-navigation ul li a {
  color: var(--ds-neutral, #2d3436) !important;
  font-family: var(--ds-font-label);
}

.woocommerce-MyAccount-navigation ul li.is-active a {
  color: var(--ds-primary, #507a95) !important;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce-page .select2-container .select2-selection--single {
  background: var(--ds-tertiary, #f9f9f9) !important;
  color: var(--ds-neutral, #2d3436) !important;
  border: 1px solid var(--ds-primary-8, #b5c7d2) !important;
  font-family: var(--ds-font-body) !important;
}

.woocommerce #respond input#submit,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background-color: var(--ds-primary, #507a95) !important;
  border-color: var(--ds-primary, #507a95) !important;
  color: var(--ds-white, #fff) !important;
  font-family: var(--ds-font-label) !important;
  font-weight: 600 !important;
}

.woocommerce #respond input#submit:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
  opacity: 0.92;
  color: var(--ds-white, #fff) !important;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  color: var(--ds-neutral, #2d3436) !important;
  font-family: var(--ds-font-body) !important;
}

.woocommerce-info,
.woocommerce-message,
.woocommerce-error {
  background: var(--ds-secondary, #ebf1f4) !important;
  color: var(--ds-neutral, #2d3436) !important;
  border-top-color: var(--ds-primary, #507a95) !important;
}

.widget,
.widget-title,
.sidebar-main {
  color: var(--ds-neutral, #2d3436);
}

.widget-title {
  font-family: var(--ds-font-headline) !important;
  font-weight: 400 !important;
}

/* ------------------------------------------------------------------
   WooCommerce Blocks checkout / cart
   Astra Customizer still emits dark-theme text (near-white). We force
   a light page surface, so block checkout inherits invisible white text.
   ------------------------------------------------------------------ */
body.woocommerce-checkout,
body.woocommerce-cart,
.woocommerce-checkout .entry-content,
.woocommerce-cart .entry-content,
.wp-block-woocommerce-checkout,
.wp-block-woocommerce-cart,
.wc-block-checkout,
.wc-block-cart {
	color: #2d3436 !important;
}

.wp-block-woocommerce-checkout *,
.wp-block-woocommerce-cart *,
.wc-block-checkout *:not(.wc-block-components-button):not(.wc-block-components-button *),
.wc-block-cart *:not(.wc-block-components-button):not(.wc-block-components-button *) {
	color: inherit;
}

.wc-block-components-title,
.wc-block-components-checkout-step__title,
.wc-block-components-checkout-step__description,
.wc-block-components-checkout-step__heading,
.wc-block-checkout__actions_row,
.wc-block-components-totals-wrapper,
.wc-block-components-order-summary,
.wc-block-components-order-summary-item,
.wc-block-components-order-summary-item__description,
.wc-block-components-product-name,
.wc-block-components-product-price,
.wc-block-components-product-metadata,
.wc-block-components-totals-item,
.wc-block-components-totals-item__label,
.wc-block-components-totals-item__value,
.wc-block-components-totals-footer-item,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
.wc-block-components-radio-control-accordion-option,
.wc-block-components-radio-control__label,
.wc-block-components-radio-control__description,
.wc-block-components-radio-control__option-layout,
.wc-block-components-checkbox__label,
.wc-block-components-textarea,
.wc-block-components-text-input input,
.wc-block-components-text-input label,
.wc-block-components-combobox label,
.wc-block-components-address-form label,
.wc-block-components-address-card,
.wc-block-components-address-card address,
.wc-block-components-panel__button,
.wc-block-components-totals-coupon__button,
.wc-block-checkout__terms,
.wc-block-components-checkout-return-to-cart-button,
a.wc-block-components-checkout-return-to-cart-button {
	color: #2d3436 !important;
}

.wc-block-components-text-input input,
.wc-block-components-textarea,
.wc-block-components-combobox input,
.wc-block-components-text-input .wc-block-components-text-input__field {
	background-color: #ffffff !important;
	color: #2d3436 !important;
	border-color: #c5cdd3 !important;
}

/* Keep CTA buttons readable (white on brand primary) */
.wc-block-components-button:not(.is-link),
.wc-block-components-checkout-place-order-button,
.wc-block-cart__submit-button {
	color: #ffffff !important;
	background-color: var(--ds-primary, #507a95) !important;
	border-color: var(--ds-primary, #507a95) !important;
}

.wc-block-components-button:not(.is-link):hover,
.wc-block-components-checkout-place-order-button:hover,
.wc-block-cart__submit-button:hover {
	color: #ffffff !important;
	background-color: var(--ds-primary-4, #466b83) !important;
	border-color: var(--ds-primary-4, #466b83) !important;
}

.wc-block-components-button.is-link,
.wc-block-components-checkout-return-to-cart-button {
	color: var(--ds-primary, #507a95) !important;
}

.wc-block-components-product-badge,
.wc-block-components-sale-badge {
	color: #2d3436 !important;
}

