/*
 * Loaded last, after the design system and the product blocks (inc/assets.php): rules that adjust them.
 * To be merged into the topic files with the CSS clean-up.
 */
.swx-site-header .wcml-cs-item-toggle{color:var(--sw-ink)!important}
.swx-site-header .sg-utility{padding:8px 0}
.single-product .summary h1.product_title{font-size:clamp(30px,3.2vw,47px);line-height:1.05}
.woocommerce.single-product div.product p.price,.woocommerce.single-product div.product span.price{font-size:28px;color:var(--sw-ink);font-weight:700}
.woocommerce.single-product div.product .stock{color:#3e5b33}
.woocommerce.single-product div.product .star-rating{color:var(--sw-ink)}
.woocommerce.single-product div.product form.cart{margin-bottom:24px}
.woocommerce.single-product div.product form.cart .button{background:var(--sw-orange);color:var(--sw-ink);border-radius:0}
.woocommerce.single-product div.product .summary{font-size:16px;line-height:1.65}
.swx-site-header p{margin-bottom:0}
.swx-site-header .sg-utility-links{gap:24px}
.swx-site-footer{margin-top:0}

/* Product meta. */
.single-product .product_meta .wcml_currency_switcher,.single-product .product_meta .sku_wrapper{display:none!important}

/* Composite builder: the preview stays inside the purchase area. */
body.swpa-product .product-type-composite>.sw-builder-preview-boundary{grid-column:1;grid-row:1 / span 2;align-self:stretch;position:relative;min-width:0;min-height:0;padding-bottom:24px}
body.swpa-product .product-type-composite .sw-builder-preview-boundary>.woocommerce-product-gallery--wooco{position:sticky!important;top:48px;box-sizing:border-box;padding:16px!important;border:1px solid var(--sw-line);border-radius:8px;max-height:calc(100vh - 72px);overflow:auto;background:var(--sw-paper)}
body.swpa-product .product-type-composite .sw-builder-preview-boundary>.woocommerce-product-gallery--wooco:before{content:var(--sw-text-setup);display:block;font:700 12px/1.4 Arial,sans-serif;letter-spacing:.12em;padding-bottom:12px;border-bottom:1px solid var(--sw-line);margin-bottom:12px}
body.swpa-product .product-type-composite .sw-builder-preview-boundary .woocommerce-product-gallery__wrapper{grid-template-columns:repeat(3,minmax(0,1fr))!important}
body.swpa-product .product-type-composite .sw-builder-preview-boundary .woocommerce-product-gallery__image:first-child{grid-column:1/-1}
body.swpa-product .product-type-composite .sw-builder-preview-boundary .woocommerce-product-gallery__image img{height:100px!important}
body.swpa-product .product-type-composite .sw-builder-preview-boundary .woocommerce-product-gallery__image:first-child img{height:240px!important}
@media(max-width:849px){
body.swpa-product .product-type-composite>.sw-builder-preview-boundary{width:100%;padding-bottom:0}
body.swpa-product .product-type-composite .sw-builder-preview-boundary>.woocommerce-product-gallery--wooco{position:relative!important;top:auto;max-height:none}
body.swpa-product .product-type-composite .sw-builder-preview-boundary .woocommerce-product-gallery__image:first-child{grid-column:auto}
body.swpa-product .product-type-composite .sw-builder-preview-boundary .woocommerce-product-gallery__image:first-child img{height:100px!important}
}

/* Link from a deck to its setup builder. */
.single-product .summary .sw-custom-build-cta{clear:both;margin:0 0 24px;width:100%}
.single-product .summary a.sw-custom-build-link{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-height:52px;padding:14px 20px;background:#484846;color:var(--sw-white);border:1px solid #484846;text-decoration:none;font:700 16px/1.4 Arial,sans-serif;letter-spacing:.04em;text-transform:uppercase;transition:background .2s,border-color .2s}
.single-product .summary a.sw-custom-build-link:hover{background:var(--sw-ink);border-color:var(--sw-ink);color:var(--sw-white)}
.single-product .summary a.sw-custom-build-link:focus-visible{outline:2px solid var(--sw-orange);outline-offset:3px}
@media(max-width:600px){.single-product .summary a.sw-custom-build-link{font-size:14px;min-height:48px;padding:12px 16px}}

/* Star ratings on product cards. */
body.switch-native #main .ac-product-copy h3{height:auto!important;min-height:0!important;margin:0 0 8px!important}
body.switch-native #main .ac-product-rating{margin:0 0 10px;line-height:1}
body.switch-native #main .ac-review-link{display:inline-flex;align-items:center;gap:6px;max-width:100%;color:var(--sw-ink);text-decoration:none}
body.switch-native #main .ac-review-link:hover .ac-review-count{text-decoration:underline}
body.switch-native #main .ac-product-rating .star-rating{position:relative;display:inline-block;float:none;margin:0;padding:0;width:auto;height:1em;overflow:hidden;font:16px/1 Arial,sans-serif;letter-spacing:0;color:var(--sw-ink)}
body.switch-native #main .ac-product-rating .star-rating:before{content:"★★★★★";position:relative;display:block;top:0;left:0;color:#d0cfca;float:none}
body.switch-native #main .ac-product-rating .star-rating>span{display:block;position:absolute;top:0;left:0;height:1em;overflow:hidden;padding-top:1em;float:none}
body.switch-native #main .ac-product-rating .star-rating>span:before{content:"★★★★★";position:absolute;top:0;left:0;color:var(--sw-ink);font:inherit}
body.switch-native #main .ac-review-count{font:12px/1.3 Arial,sans-serif;color:var(--sw-muted)}
body.switch-native #main .ac-review-average{font:700 14px/1.3 Arial,sans-serif;color:var(--sw-ink)}

/* White product photos (class sw-white-blend from SWITCH Storefront) blend into Paper: the white pixels take the colour of the box behind them. */
body.single-product #main img.sw-white-blend{mix-blend-mode:multiply}
body.single-product #main figure:has(>img.sw-white-blend),
body.single-product #main .product-images:has(img.sw-white-blend),
body.single-product #main .woocommerce-product-gallery--wooco:has(img.sw-white-blend),
body.single-product #main .swpa-product-image:has(img.sw-white-blend),
body.single-product #main .sg-banner-image:has(img.sw-white-blend),
body.single-product #main .product-thumbnails img.sw-white-blend{background:transparent}
body.single-product #main .sp-kit-card:has(img.sw-white-blend),
body.single-product #main .woocommerce-product-gallery__image:has(img.sw-white-blend),
body.single-product #main .product-thumbnails .col:has(img.sw-white-blend){background:var(--sw-paper)}
