.hyperdaf-commerce-active {
    color: var(--hdc-text);
    font-family: var(--hdc-font-body);
    font-weight: var(--hdc-font-weight-body);
}

.hyperdaf-commerce-active h1,
.hyperdaf-commerce-active h2,
.hyperdaf-commerce-active h3,
.hyperdaf-commerce-active h4,
.hyperdaf-commerce-active h5,
.hyperdaf-commerce-active h6,
.hyperdaf-commerce-page h1,
.hyperdaf-commerce-page h2,
.hyperdaf-commerce-page h3 {
    font-family: var(--hdc-font-heading);
    font-weight: var(--hdc-font-weight-heading);
}

.hyperdaf-commerce-active button,
.hyperdaf-commerce-active input,
.hyperdaf-commerce-active select,
.hyperdaf-commerce-active textarea,
.hyperdaf-commerce-active .button,
.hyperdaf-commerce-active .wc-block-components-button,
.hyperdaf-commerce-page button,
.hyperdaf-commerce-page input,
.hyperdaf-commerce-page select,
.hyperdaf-commerce-page textarea {
    font-family: var(--hdc-font-ui);
}

.hyperdaf-commerce-page {
    background: var(--hdc-page-background);
    color: var(--hdc-text);
}

.hyperdaf-commerce-active .woocommerce .button,
.hyperdaf-commerce-active .woocommerce button.button,
.hyperdaf-commerce-active .woocommerce input.button,
.hyperdaf-commerce-active .wc-block-components-button:not(.is-link) {
    padding: calc(var(--hdc-space-3) - 2px) calc(var(--hdc-space-5) + 2px);
    border: 0;
    border-radius: var(--hdc-button-radius);
    background: var(--hdc-primary);
    color: var(--hdc-button-text);
    font-family: var(--hdc-font-ui);
    font-weight: var(--hdc-font-weight-button);
    transition: background var(--hdc-transition), color var(--hdc-transition);
}

.hyperdaf-commerce-active .woocommerce .button:hover,
.hyperdaf-commerce-active .woocommerce .button:focus-visible,
.hyperdaf-commerce-active .woocommerce button.button:hover,
.hyperdaf-commerce-active .woocommerce button.button:focus-visible,
.hyperdaf-commerce-active .woocommerce input.button:hover,
.hyperdaf-commerce-active .woocommerce input.button:focus-visible,
.hyperdaf-commerce-active .wc-block-components-button:not(.is-link):hover,
.hyperdaf-commerce-active .wc-block-components-button:not(.is-link):focus-visible {
    background: var(--hdc-primary-hover);
    color: var(--hdc-button-hover-text);
}

.hyperdaf-commerce-active:not(.hyperdaf-global-product-card) .woocommerce ul.products li.product {
    overflow: hidden;
    padding: var(--hdc-space-4);
    border: 1px solid var(--hdc-border);
    border-radius: var(--hdc-radius);
    background: var(--hdc-surface);
    transition: border-color var(--hdc-transition), background-color var(--hdc-transition);
}

.hyperdaf-commerce-active:not(.hyperdaf-global-product-card) .woocommerce ul.products li.product:hover {
    border-color: var(--hdc-primary);
    background: var(--hdc-flat-hover);
}

.hyperdaf-commerce-active:not(.hyperdaf-global-product-card) .woocommerce ul.products li.product a img {
    aspect-ratio: 1 / 1;
    border-radius: var(--hdc-compact-radius);
    object-fit: cover;
}

.hyperdaf-commerce-active .woocommerce div.product .woocommerce-product-gallery__wrapper {
    overflow: hidden;
    border-radius: var(--hdc-radius);
}

.hyperdaf-commerce-active .woocommerce-message,
.hyperdaf-commerce-active .woocommerce-info,
.hyperdaf-commerce-active .woocommerce-error {
    border: 1px solid var(--hdc-border);
    border-inline-start: var(--hdc-space-1) solid var(--hdc-primary);
    border-radius: var(--hdc-radius);
    background: var(--hdc-surface);
}

/* Semantic commerce actions: dedicated DNA roles, no selector-level color patches. */
.hyperdaf-commerce-active .woocommerce .single_add_to_cart_button,
.hyperdaf-commerce-active .woocommerce .add_to_cart_button,
.hyperdaf-commerce-active .wc-block-components-product-button__button {
    background: var(--hdc-add-to-cart-background);
    color: var(--hdc-add-to-cart-text);
}

/* Global Cart Action contract: exactly one package-owned product-cart SVG is
 * used by generic WooCommerce Add to Cart / View Cart actions. Renderer-level
 * markup must not add a second inline cart icon when this pseudo-element owns
 * the glyph. Product Card, Deals and Quick View are explicit inline-icon owners
 * and remain excluded from this generic pseudo-icon rule. */
.hyperdaf-commerce-active .single_add_to_cart_button,
.hyperdaf-commerce-active .add_to_cart_button:not(.hdc-product-card__cart):not(.hdc-home-deals-week__action--cart):not(.hdc-quick-product__button--cart),
.hyperdaf-commerce-active .wc-block-components-product-button__button,
.hyperdaf-commerce-active .added_to_cart.wc-forward {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hyperdaf-commerce-active .single_add_to_cart_button > .hdc-icon,
.hyperdaf-commerce-active .add_to_cart_button:not(.hdc-product-card__cart):not(.hdc-home-deals-week__action--cart):not(.hdc-quick-product__button--cart) > .hdc-icon,
.hyperdaf-commerce-active .wc-block-components-product-button__button > .hdc-icon,
.hyperdaf-commerce-active .added_to_cart.wc-forward > .hdc-icon {
    display: none !important;
}

.hyperdaf-commerce-active .single_add_to_cart_button::before,
.hyperdaf-commerce-active .add_to_cart_button:not(.hdc-product-card__cart):not(.hdc-home-deals-week__action--cart):not(.hdc-quick-product__button--cart)::before,
.hyperdaf-commerce-active .wc-block-components-product-button__button::before,
.hyperdaf-commerce-active .added_to_cart.wc-forward::before {
    display: inline-block;
    width: var(--hdc-cart-icon-width);
    height: var(--hdc-cart-icon-height);
    flex: 0 0 var(--hdc-cart-icon-width);
    background: currentColor;
    content: "";
    -webkit-mask: url("../../icons/product-archive/product-cart.svg") center / contain no-repeat;
    mask: url("../../icons/product-archive/product-cart.svg") center / contain no-repeat;
}

.hyperdaf-commerce-active .woocommerce .single_add_to_cart_button:hover,
.hyperdaf-commerce-active .woocommerce .single_add_to_cart_button:focus-visible,
.hyperdaf-commerce-active .woocommerce .add_to_cart_button:hover,
.hyperdaf-commerce-active .woocommerce .add_to_cart_button:focus-visible,
.hyperdaf-commerce-active .wc-block-components-product-button__button:hover,
.hyperdaf-commerce-active .wc-block-components-product-button__button:focus-visible {
    background: var(--hdc-add-to-cart-hover-background);
    color: var(--hdc-add-to-cart-hover-text);
}

.hyperdaf-commerce-active .woocommerce .woocommerce-MyAccount-downloads-file,
.hyperdaf-commerce-active .woocommerce .woocommerce-order-downloads a.button,
.hyperdaf-commerce-active .woocommerce .woocommerce-table--order-downloads a.button,
.hyperdaf-commerce-active .wc-block-order-confirmation-downloads a.wc-block-components-button {
    background: var(--hdc-download-background);
    color: var(--hdc-download-text);
}

.hyperdaf-commerce-active .woocommerce .woocommerce-MyAccount-downloads-file:hover,
.hyperdaf-commerce-active .woocommerce .woocommerce-MyAccount-downloads-file:focus-visible,
.hyperdaf-commerce-active .woocommerce .woocommerce-order-downloads a.button:hover,
.hyperdaf-commerce-active .woocommerce .woocommerce-order-downloads a.button:focus-visible,
.hyperdaf-commerce-active .woocommerce .woocommerce-table--order-downloads a.button:hover,
.hyperdaf-commerce-active .woocommerce .woocommerce-table--order-downloads a.button:focus-visible,
.hyperdaf-commerce-active .wc-block-order-confirmation-downloads a.wc-block-components-button:hover,
.hyperdaf-commerce-active .wc-block-order-confirmation-downloads a.wc-block-components-button:focus-visible {
    background: var(--hdc-download-hover-background);
    color: var(--hdc-download-hover-text);
}

/* Public business-template continuations. These selectors consume only public body roles. */
body.hdc-archive-composition--electronics-dense .hdc-product-archive { --hdc-archive-sidebar-min:220px; --hdc-archive-sidebar-max:260px; --hdc-archive-layout-gap:18px; }
body.hdc-archive-composition--electronics-dense .hdc-archive-filters,
body.hdc-archive-composition--electronics-dense .hdc-archive-toolbar { border-radius:0; }
/* Single Product template variations are owned by the canonical Single Product module profiles. */

body.hdc-archive-composition--medicine-catalog .hdc-archive-filters { border-color:var(--hdf-color-border,#D1E7E2); border-radius:var(--hdf-radius-md,10px); background:var(--hdf-color-surface-subtle,#ECFDF5); }
body.hdc-archive-composition--medicine-catalog .hdc-archive-toolbar { border-radius:var(--hdf-radius-md,10px); }

body.hdc-archive-composition--furniture-gallery .hdc-product-archive { --hdc-archive-sidebar-min:210px; --hdc-archive-sidebar-max:250px; --hdc-archive-layout-gap:34px; }
body.hdc-archive-composition--furniture-gallery .hdc-archive-filters { border-radius:0; background:var(--hdf-color-surface-subtle,#F3ECE4); }
body.hdc-archive-composition--furniture-gallery .hdc-archive-toolbar { border-width:0 0 1px; border-radius:0; padding-inline:0; }

body.hdc-archive-composition--universal-flex .hdc-archive-filters,
body.hdc-archive-composition--universal-flex .hdc-archive-toolbar { border-radius:var(--hdf-radius-lg,16px); }



/* Step 31: whole-site Commerce semantic bold uses the normal-bold ceiling. */
.hyperdaf-commerce-active strong,
.hyperdaf-commerce-active b {
    font-weight: 700;
}
