body :is(.wd-products-shop-view a.shop-view,.pb15-category-columns button[data-columns]) {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #797169;
    border-radius: 6px;
    background: #30302e;
    color: #f2efea;
    text-decoration: none;
}
body .wd-products-shop-view { gap: 5px; }
body :is(.wd-products-shop-view a.shop-view,.pb15-category-columns button[data-columns]):is(:hover,:focus-visible,.current-variation,[aria-pressed="true"]) {
    border-color: #eb661b;
    background: #392d25;
    color: #ffab7b;
}
body :is(.wd-products-shop-view a.shop-view,.pb15-category-columns button[data-columns])::before {
    font: 400 22px/1 woodmart-font;
}
body :is(.wd-products-shop-view .per-row-list,.pb15-category-columns [data-columns="1"])::before { content: "\f12a"; }
body :is(.wd-products-shop-view .per-row-2,.pb15-category-columns [data-columns="2"])::before { content: "\f12b"; }
body :is(.wd-products-shop-view .per-row-3,.pb15-category-columns [data-columns="3"])::before { content: "\f12c"; }
body :is(.wd-products-shop-view .per-row-4,.pb15-category-columns [data-columns="4"])::before { content: "\f12d"; }

body .wd-products.grid-columns-2 .wd-product-thumb > a.product-image-link {
    display: grid;
    justify-items: center;
    width: 100%;
}
body .wd-products.grid-columns-2 .wd-product-thumb > a.product-image-link > img[data-pb15-landscape] {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

body .wd-products.elements-list .product-list-item > .wd-product-wrapper {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding: clamp(12px, 1.3vw, 22px);
    background: #272624;
    border: 1px solid #504b44;
    border-radius: 6px;
}
body .wd-products.elements-list .product-list-item {
    padding-bottom: 0;
    border-bottom: 0;
}
body .wd-products.elements-list .product-list-item > .wd-product-wrapper > :is(.wd-product-thumb,.product-list-content) {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin: 0;
}
body .wd-products.elements-list .product-list-item .product-image-link {
    display: grid;
    place-items: center;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    background: #202020;
}
body .wd-products.elements-list .product-list-item .product-image-link > img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
body .wd-products.elements-list .product-list-content { text-align: start; }
body .wd-products.elements-list .product-list-content .wd-entities-title {
    margin: 0 0 6px;
    font-size: clamp(18px, 1.6vw, 25px);
}
body .wd-products.elements-list .product-list-content .woocommerce-product-details__short-description {
    max-width: 70ch;
    margin-block: 8px 12px;
}
body .wd-products.elements-list .product-list-content .woocommerce-product-details__short-description p:last-child { margin-bottom: 0; }
@media (min-width: 768px) {
    body .wd-products.elements-list .product-list-item > .wd-product-wrapper {
        grid-template-columns: minmax(0, min(36%, 500px)) minmax(0, 1fr);
        gap: clamp(18px, 2.4vw, 38px);
    }
}

/* WoodMart still fades the main image even when the alternate image is disabled. */
body .wd-products[data-source="main_loop"] .wd-product .wd-product-thumb > a.product-image-link {
    overflow: hidden;
}
body .wd-products[data-source="main_loop"] .wd-product .wd-product-thumb > a.product-image-link,
body .wd-products[data-source="main_loop"] .wd-product .wd-product-thumb > a.product-image-link > img:not(.pb15-hover-alternate) {
    opacity: 1 !important;
    visibility: visible !important;
}
body main#main-content .wd-products.elements-list .product-list-content .wd-add-btn > a.product_type_variable.add_to_cart_button {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 44px;
    max-width: 100%;
    padding: 8px 12px 8px 14px;
    border: 1px solid #eb661b !important;
    border-radius: 6px;
    background: #392d25 !important;
    color: #ffab7b !important;
    font: 600 14px/1.3 "Alexandria Shop", "Lato-Regular", sans-serif;
    text-transform: none;
}
body main#main-content .wd-products.elements-list .product-list-content .wd-add-btn > a.product_type_variable.add_to_cart_button .wd-action-icon {
    display: none;
}
body main#main-content .wd-products.elements-list .product-list-content .wd-add-btn > a.product_type_variable.add_to_cart_button::after {
    content: "→";
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: #503729;
    color: inherit;
    font-size: 16px;
}
body main#main-content .wd-products.elements-list .product-list-content .wd-add-btn > a.product_type_variable.add_to_cart_button:is(:hover,:focus-visible) {
    background: #493326 !important;
    color: #ffe1ce !important;
}

/* Place the alternate inside the same image box, so layout changes cannot crop the transition. */
@media (hover: hover) and (pointer: fine) {
    body .wd-products[data-source="main_loop"] .wd-product-thumb > .product-image-link,
    body .pb15-term-image[data-pb15-hover-src] {
        position: relative;
        isolation: isolate;
    }
    body :is(.wd-product-thumb > .product-image-link,.pb15-term-image) > .pb15-hover-alternate {
        display: block;
        position: absolute !important;
        inset: 0 !important;
        z-index: 1;
        width: 100% !important;
        height: 100% !important;
        max-width: none !important;
        max-height: none !important;
        background-position: center;
        background-size: cover;
        background-repeat: no-repeat;
        border-radius: inherit;
        pointer-events: none;
        opacity: 0 !important;
        transition: opacity .42s ease;
        transform: none !important;
        scale: none !important;
        clip-path: none !important;
    }
    body :is(.wd-product:not(.quick-shop-shown) .product-image-link,.pb15-term-image):hover > .pb15-hover-alternate {
        opacity: 1 !important;
    }
}
@media (prefers-reduced-motion: reduce) {
    body :is(.wd-product-thumb > .product-image-link,.pb15-term-image) > .pb15-hover-alternate { transition: none; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
    @starting-style {
        body :is(.wd-product:not(.quick-shop-shown) .product-image-link,.pb15-term-image):hover > .pb15-hover-alternate {
            opacity: 0 !important;
        }
    }
}

body .wd-products[data-source="main_loop"] .wd-product .wd-product-thumb > .hover-img { display: none !important; }

body .wd-products[data-source="main_loop"] .wd-product .wd-product-thumb > a.product-image-link {
    display: grid !important;
    justify-items: center;
    width: 100%;
}
body .wd-products[data-source="main_loop"] .wd-product .wd-product-thumb > a.product-image-link > img:not(.pb15-hover-alternate) {
    display: block !important;
}

@media (hover: hover) and (pointer: fine) {
    body .pb15-term-image > .pb15-hover-alternate[data-pb15-fit-image] {
        background-color: #272623;
        background-size: contain;
    }
}
