/* BLKFOG native WooCommerce product colour indicators */
.woocommerce ul.products li.product .blkfog-loop-swatches,.blkfog-loop-swatches{display:flex;align-items:center;flex-wrap:wrap;gap:11px;min-height:20px;margin:11px 0 0;padding:0;clear:both}
.blkfog-loop-swatch{position:relative;display:inline-block;box-sizing:border-box;width:18px;height:18px;flex:0 0 18px;border-radius:50%;background:var(--blkfog-colour);border:1px solid rgba(0,0,0,.24)}
.blkfog-loop-swatch.is-unavailable{opacity:1;box-shadow:0 0 0 3px #fff,0 0 0 4px #6768694d}
.blkfog-loop-swatch.is-unavailable::after{content:"";position:absolute;left:50%;top:50%;width:26px;height:0.5px;background:#a5a5a5;opacity:.75;transform:translate(-50%,-50%) rotate(-45deg)}

/* The Sober card itself is a flex container: stack its direct children in DOM order.
   Leave ul.products (the four-column grid) unchanged. */
.woocommerce ul.products li.product:has(> .blkfog-loop-swatches){flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important}
.woocommerce ul.products li.product > .blkfog-loop-swatches{flex:0 0 auto!important;align-self:stretch!important;order:initial!important}

/* Explicit flex item ordering: Sober can set order on individual card children.
   Use the confirmed actual markup, rather than relying on source order alone. */
body .woocommerce ul.products li.product:has(> .blkfog-loop-swatches) > .product-header{order:0!important}
body .woocommerce ul.products li.product:has(> .blkfog-loop-swatches) > .woocommerce-loop-product__title{order:1!important}
body .woocommerce ul.products li.product:has(> .blkfog-loop-swatches) > .star-rating{order:2!important}
body .woocommerce ul.products li.product:has(> .blkfog-loop-swatches) > .price{order:3!important}
body .woocommerce ul.products li.product:has(> .blkfog-loop-swatches) > .blkfog-loop-swatches{order:4!important}

/* Genuine WooCommerce ratings only; no fabricated stars or counts. */
.woocommerce ul.products li.product .star-rating,
.woocommerce ul.products li.product .star-rating::before,
.woocommerce ul.products li.product .star-rating span::before{color:#a34e30!important}
.woocommerce ul.products li.product .woocommerce-review-link,
.woocommerce ul.products li.product .count{color:#777}
/* Swatch links inherit the existing 18px circle; keep unavailable spans inert. */
.woocommerce ul.products li.product a.blkfog-loop-swatch{cursor:pointer;text-decoration:none;transition:box-shadow .18s ease,transform .18s ease}
.woocommerce ul.products li.product a.blkfog-loop-swatch:hover{box-shadow:0 0 0 3px #fff,0 0 0 4px #6768694d;transform:translateY(-1px)}
.woocommerce ul.products li.product a.blkfog-loop-swatch:focus-visible{outline:2px solid #a34e30;outline-offset:3px}

/* BLKFOG swatch tooltips: use existing accessible labels, no JS. */
li.product .blkfog-loop-swatches{overflow:visible}
li.product .blkfog-loop-swatch{position:relative}
li.product .blkfog-loop-swatch::before{content:attr(aria-label);position:absolute;left:50%;bottom:calc(100% + 11px);transform:translate(-50%,4px);background:#fff;color:#191919;font-size:10px;font-weight:600;line-height:1.25;letter-spacing:.065em;text-transform:uppercase;white-space:nowrap;padding:7px 9px;border-radius:2px;opacity:0;visibility:hidden;pointer-events:none;z-index:20;transition:opacity .16s ease,transform .16s ease,visibility .16s ease}
li.product .blkfog-loop-swatch:hover::before,li.product .blkfog-loop-swatch:focus-visible::before{opacity:1;visibility:visible;transform:translate(-50%,0)}
@media(hover:none){li.product .blkfog-loop-swatch::before{display:none}}

/* Colour names only in tooltips; stock status is already shown by disabled swatches. */
li.product .blkfog-loop-swatch[style*="#191919"]::before{content:"BLACK"}
li.product .blkfog-loop-swatch[style*="#989b9e"]::before{content:"GREY"}
li.product .blkfog-loop-swatch[style*="#a34e30"]::before{content:"RUST"}
li.product .blkfog-loop-swatch[style*="#f5f2e9"]::before{content:"WHITE"}

/* Full Collection: its custom page shell does not have the .woocommerce ancestor.
   Match the same verified direct-child Sober card structure independently. */
body.page-id-955 li.product:has(> .blkfog-loop-swatches){display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important}
body.page-id-955 li.product:has(> .blkfog-loop-swatches) > .product-header{order:0!important}
body.page-id-955 li.product:has(> .blkfog-loop-swatches) > .woocommerce-loop-product__title{order:1!important}
body.page-id-955 li.product:has(> .blkfog-loop-swatches) > .star-rating{order:2!important}
body.page-id-955 li.product:has(> .blkfog-loop-swatches) > .price{order:3!important}
body.page-id-955 li.product:has(> .blkfog-loop-swatches) > .blkfog-loop-swatches{display:flex;align-items:center;gap:11px;flex:0 0 auto!important;align-self:stretch!important;order:4!important;min-height:20px;margin:11px 0 0;overflow:visible}

/* Full Collection / custom WooCommerce grids: target the actual UL > LI markup,
   without relying on a page-id or .woocommerce wrapper. */
ul.products > li.product:has(> .blkfog-loop-swatches){display:flex!important;flex-direction:column!important;align-items:stretch!important;justify-content:flex-start!important}
ul.products > li.product:has(> .blkfog-loop-swatches) > .product-header{order:0!important}
ul.products > li.product:has(> .blkfog-loop-swatches) > .woocommerce-loop-product__title{order:1!important}
ul.products > li.product:has(> .blkfog-loop-swatches) > .star-rating{order:2!important}
ul.products > li.product:has(> .blkfog-loop-swatches) > .price{order:3!important}
ul.products > li.product:has(> .blkfog-loop-swatches) > .blkfog-loop-swatches{position:static!important;float:none!important;order:4!important;flex:0 0 auto!important;align-self:stretch!important;display:flex!important;margin:11px 0 0!important}
