/**
 * PRISMA Native Commerce – neutral shared baseline.
 * Loaded only while WooCommerce is active. WooCommerce default block styles stay enabled.
 */
:root {
    --prisma-commerce-card-radius: var(--wp--custom--radius--medium, 10px);
    --prisma-commerce-control-height: 2.75rem;
}

.prisma-commerce-active .wc-block-components-button,
.prisma-commerce-active .woocommerce a.button,
.prisma-commerce-active .woocommerce button.button,
.prisma-commerce-active .woocommerce input.button {
    align-items: center;
    background: var(--wp--preset--color--accent);
    border: 1px solid var(--wp--preset--color--accent);
    border-radius: var(--wp--custom--radius--small, 6px);
    color: var(--wp--preset--color--inverse-text);
    cursor: pointer;
    display: inline-flex;
    font: inherit;
    font-weight: 650;
    justify-content: center;
    min-height: var(--prisma-commerce-control-height);
    padding: .72rem 1.15rem;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.prisma-commerce-active .wc-block-components-button:hover,
.prisma-commerce-active .woocommerce a.button:hover,
.prisma-commerce-active .woocommerce button.button:hover,
.prisma-commerce-active .woocommerce input.button:hover {
    background: var(--wp--preset--color--accent-hover);
    border-color: var(--wp--preset--color--accent-hover);
    color: var(--wp--preset--color--inverse-text);
}

.prisma-commerce-active :where(.wc-block-components-button,.woocommerce a.button,.woocommerce button.button,.woocommerce input.button):focus-visible,
.prisma-commerce-active :where(input,select,textarea,a,button):focus-visible {
    outline: 3px solid var(--wp--preset--color--accent);
    outline-offset: 3px;
}

.prisma-commerce-active :where(.wc-block-components-text-input input,.wc-blocks-components-select__select,.woocommerce input.input-text,.woocommerce select,.woocommerce textarea) {
    background: var(--wp--preset--color--surface);
    border: 1px solid var(--wp--preset--color--border-strong);
    border-radius: var(--wp--custom--radius--small, 6px);
    box-sizing: border-box;
    color: var(--wp--preset--color--text);
    font: inherit;
    min-height: var(--prisma-commerce-control-height);
}

.prisma-commerce-active .woocommerce-error,
.prisma-commerce-active .woocommerce-info,
.prisma-commerce-active .woocommerce-message,
.prisma-commerce-active .wc-block-components-notice-banner {
    border: 1px solid var(--wp--preset--color--border);
    border-left-width: 4px;
    border-radius: var(--wp--custom--radius--small, 6px);
    box-shadow: none;
    color: var(--wp--preset--color--text);
}
.prisma-commerce-active .woocommerce-error { border-left-color: var(--wp--preset--color--error); }
.prisma-commerce-active .woocommerce-info { border-left-color: var(--wp--preset--color--info); }
.prisma-commerce-active .woocommerce-message { border-left-color: var(--wp--preset--color--success); }

.prisma-commerce-active .wc-block-grid__product,
.prisma-commerce-active .wc-block-product,
.prisma-commerce-active .products-block-post-template > li {
    min-width: 0;
}

.prisma-commerce-active :where(.wc-block-grid__product,.wc-block-product,.products-block-post-template > li) > :where(.wc-block-components-product-image,.wc-block-grid__product-image) img {
    aspect-ratio: 1 / 1;
    background: var(--wp--preset--color--subtle);
    border-radius: var(--prisma-commerce-card-radius);
    display: block;
    object-fit: cover;
    width: 100%;
}

.prisma-commerce-active :where(.wc-block-components-product-title,.wc-block-grid__product-title) {
    color: var(--wp--preset--color--text);
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
}

.prisma-commerce-active :where(.wc-block-components-product-price,.price) {
    color: var(--wp--preset--color--text);
    font-weight: 700;
}

.prisma-commerce-active :where(.wc-block-components-product-price,.price) del {
    color: var(--wp--preset--color--muted);
    font-weight: 400;
    opacity: 1;
}

.prisma-commerce-active :where(.wc-block-components-product-sale-badge,.onsale) {
    background: var(--wp--preset--color--inverse);
    border: 0;
    border-radius: var(--wp--custom--radius--pill, 999px);
    color: var(--wp--preset--color--inverse-text);
    font-size: .75rem;
    font-weight: 700;
    line-height: 1;
    min-height: auto;
    min-width: auto;
    padding: .48rem .65rem;
}

.prisma-commerce-active .wc-block-mini-cart__badge {
    background: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--inverse-text);
}

.prisma-commerce-active .wc-block-mini-cart__drawer,
.prisma-commerce-active .wc-block-components-drawer {
    color: var(--wp--preset--color--text);
}

.prisma-commerce-active table.shop_table,
.prisma-commerce-active .woocommerce table.shop_table {
    border-color: var(--wp--preset--color--border);
    border-radius: var(--wp--custom--radius--small, 6px);
}

.prisma-commerce-active .woocommerce nav.woocommerce-pagination ul,
.prisma-commerce-active .woocommerce nav.woocommerce-pagination ul li {
    border-color: var(--wp--preset--color--border);
}

.prisma-commerce-active .woocommerce nav.woocommerce-pagination ul li a,
.prisma-commerce-active .woocommerce nav.woocommerce-pagination ul li span {
    min-height: 2.5rem;
    min-width: 2.5rem;
    padding: .65rem;
}

.prisma-commerce-assurance .wp-block-column { min-width: 0; }

@media (max-width: 781px) {
    .prisma-commerce-active .wc-block-product-template {
        column-gap: var(--wp--preset--spacing--m);
        row-gap: var(--wp--preset--spacing--xl);
    }
}

@media (prefers-reduced-motion: reduce) {
    .prisma-commerce-active *,
    .prisma-commerce-active *::before,
    .prisma-commerce-active *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}

/* PRISMA 0.2.1: deterministic Product Collection cards and Germanized shopmarks. */
.prisma-commerce-active :where(.wc-block-product-template,.products-block-post-template) {
    align-items: stretch;
}

.prisma-commerce-active :where(.wc-block-product,.products-block-post-template > li) {
    display: flex;
    flex-direction: column;
    gap: .55rem;
    height: 100%;
}

.prisma-commerce-active :where(.wc-block-product,.products-block-post-template > li) > .wp-block-button,
.prisma-commerce-active :where(.wc-block-product,.products-block-post-template > li) > .wp-block-woocommerce-product-button {
    margin-top: auto;
}

.prisma-commerce-active .prisma-gzd-product-meta {
    color: var(--wp--preset--color--muted);
    font-size: .875rem;
    line-height: 1.5;
    margin: -.15rem 0 .25rem;
    text-align: center;
}

.prisma-commerce-active .prisma-gzd-product-meta[data-prisma-gzd="single"] {
    font-size: .9rem;
    margin: .4rem 0 .85rem;
    text-align: left;
}

.prisma-commerce-active .prisma-gzd-product-meta :where(p,.legal-price-info) {
    margin: 0;
}

.prisma-commerce-active .prisma-gzd-product-meta .wc-gzd-additional-info {
    display: block;
    margin: .15rem 0;
}

.prisma-commerce-active .prisma-gzd-product-meta .legal-price-info .wc-gzd-additional-info span + span::before {
    content: " · ";
}

/* Germanized may append legacy block shopmarks after the CTA. PRISMA places
   the same plugin-generated information directly after the price instead. */
.prisma-commerce-active :where(.wc-block-product,.products-block-post-template > li) > :where(.legal-price-info,.wc-gzd-additional-info-loop) {
    display: none;
}

.prisma-commerce-active .prisma-gzd-product-meta :where(.legal-price-info,.wc-gzd-additional-info-loop) {
    display: block;
}

.prisma-commerce-active :where(.wc-block-product-template,.products-block-post-template) {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: clamp(1.25rem, 2.5vw, 2.25rem) !important;
}

@media (max-width: 900px) {
    .prisma-commerce-active :where(.wc-block-product-template,.products-block-post-template) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 560px) {
    .prisma-commerce-active :where(.wc-block-product-template,.products-block-post-template) {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}


/* PRISMA 0.2.3: product titles wrap only between words. */
.prisma-commerce-active :where(.wc-block-components-product-title,.wc-block-grid__product-title,.wc-block-product .wp-block-post-title,.woocommerce-loop-product__title) {
    hyphens: none;
    overflow-wrap: normal;
    text-wrap: balance;
    word-break: normal;
}
