.search-results-wrapper {
    display: none;
}

body.search.woocommerce .wd-grid-g {
    gap: 3px !important;
}

/* AP: padding on list card wrapper (search results only) */
body.search.woocommerce .product-list-item .product-wrapper {
    padding: 10px !important;
    /* override Woodmart defaults */
    box-sizing: border-box;
}

/* AP: list row layout (minimal) */
.wd-product.product-list-item .product-list-content.ap-list-row {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    flex-basis: 100%;
}

/* AP: search list – shrink image column and image */
body.search.woocommerce .product-list-item .product-element-top {
    flex: 0 0 72px !important;
    /* override Woodmart's 300px */
    max-width: 72px;
}

body.search.woocommerce .product-list-item .product-image-link img {
    width: 100%;
    max-width: 72px;
    /* safety */
    height: auto;
    object-fit: contain;
}

body.search.woocommerce .ap-plus {
    font-size: 26px !important;
}

.ap-list-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
}

body.search.woocommerce .wd-product :where(.product-wrapper, .product-element-bottom) {
    flex-direction: row !important;
    justify-content: space-between !important;
}

/* AP loader on main content */
/* full-height overlay sits inside .main-page-wrapper */
.main-page-wrapper.ap-has-loader {
    position: relative;
}

.ap-site-loader {
    position: absolute;
    inset: 0;
    /* cover full wrapper */
    display: none;
    /* toggled by JS */
    align-items: flex-start;
    /* top */
    justify-content: center;
    /* horizontally centered */
    padding-top: 14px;
    z-index: 9999;
    /* above inner content */
    background: rgba(255, 255, 255, 0.65);
}

/* custom spinner (top-center) */
.ap-site-loader .ap-spinner {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 3px solid rgba(0, 0, 0, 0.18);
    border-top-color: rgba(0, 0, 0, 0.65);
    animation: ap-spin .6s linear infinite;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

    body.search.woocommerce .wd-product.product-list-item .product-list-content .wd-entities-title {
        font-size: 12px;
    }

@keyframes ap-spin {
    to {
        transform: rotate(360deg);
    }
}


@media (min-width: 769px) {
    body.search.woocommerce .product-list-item .product-element-top {
        flex: 0 0 115px !important;
        /* override Woodmart's 300px */
        max-width: 115px;
    }

    body.search.woocommerce .product-list-item .product-image-link img {
        width: 100%;
        max-width: 115px;
        /* safety */
        height: auto;
        object-fit: contain;
    }

    body.search.woocommerce .wd-product.product-list-item .product-list-content .wd-entities-title {
        font-size: 100%;
    }
}