/* =========================================================
   SPADE — AUTOMATIC SALE PERCENTAGE CIRCLES
   ========================================================= */

/* SINGLE PRODUCT — TITLE + CENTRED PINK CIRCLE */
.single-product .spade-product-title-row {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 24px !important;
}

.single-product .spade-product-title-row .spade-product-title {
    flex: 0 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
}

.single-product .spade-product-title-row .spade-sale-circle--product {
    flex: 0 0 70px !important;
    align-self: center !important;
    margin: 0 !important;
}

/* BASE CIRCLE */
.spade-sale-circle {
    flex: 0 0 auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #ffffff !important;
    font-family: var(--spade-font-body, "Manrope", Arial, sans-serif);
    text-align: center;
    pointer-events: none;
    box-sizing: border-box;
}

.spade-sale-circle[hidden],
.spade-sale-circle__upto[hidden] {
    display: none !important;
}

/* PRODUCT CARDS — RED CIRCLE */
.spade-sale-circle--card {
    width: 60px;
    height: 60px;
    padding: 8px 5px;
    background: #cf2027 !important;
    box-shadow: 0 7px 20px rgba(207, 32, 39, 0.24);
}

.spade-new-product__media > .spade-sale-circle--card,
.spade-featured-card__media > .spade-sale-circle--card,
.spade-collection-product__media > .spade-sale-circle--card,
.spade-related-card__media > .spade-sale-circle--card {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.spade-product-badges .spade-sale-circle--card {
    position: relative;
    top: auto;
    left: auto;
    z-index: auto;
}

.spade-new-product__media,
.spade-featured-card__media,
.spade-collection-product__media,
.spade-related-card__media {
    position: relative;
}

/* PRODUCT PAGE — LARGE SPADE PINK CIRCLE */
.spade-sale-circle--product {
    width: 70px;
    height: 70px;
    padding: 8px 5px;
    background: #d7006d !important;
    box-shadow: 0 10px 28px rgba(215, 0, 109, 0.22);
}

/* CIRCLE TYPOGRAPHY */
.spade-sale-circle__upto {
    display: block;
    margin: 0 0 2px;
    color: #ffffff !important;
    font-size: 7px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.spade-sale-circle__percent {
    display: block;
    margin: 0;
    color: #ffffff !important;
    font-size: 18px;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: -0.035em;
    white-space: nowrap;
}

.spade-sale-circle__off {
    display: block;
    margin-top: 4px;
    color: #ffffff !important;
    font-size: 8px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.spade-sale-circle--product .spade-sale-circle__upto {
    margin-bottom: 2px;
    font-size: 7px;
}

.spade-sale-circle--product .spade-sale-circle__percent {
    font-size: 22px;
}

.spade-sale-circle--product .spade-sale-circle__off {
    margin-top: 4px;
    font-size: 8px;
}

/* REMOVE GENERIC SALE TEXT BADGES */
.spade-product-badge--sale,
.spade-new-product__badge--sale,
.spade-collection-product__badge--sale {
    display: none !important;
}

/* TABLET */
@media (max-width: 900px) {
    .spade-sale-circle--card {
        width: 54px;
        height: 54px;
    }

    .spade-sale-circle--card .spade-sale-circle__percent {
        font-size: 16px;
    }

    .spade-sale-circle--card .spade-sale-circle__off {
        font-size: 7px;
    }

    .single-product .spade-product-title-row {
        gap: 16px !important;
    }

    .single-product .spade-product-title-row .spade-sale-circle--product {
        flex-basis: 62px !important;
    }

    .spade-sale-circle--product {
        width: 62px;
        height: 62px;
    }

    .spade-sale-circle--product .spade-sale-circle__percent {
        font-size: 20px;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .single-product .spade-product-title-row {
        align-items: center !important;
        gap: 12px !important;
    }

    .single-product .spade-product-title-row .spade-product-title {
        flex: 1 1 auto !important;
    }

    .single-product .spade-product-title-row .spade-sale-circle--product {
        flex: 0 0 54px !important;
        width: 54px !important;
        height: 54px !important;
        margin: 0 !important;
    }

    .spade-sale-circle--card {
        width: 50px;
        height: 50px;
        padding: 7px 4px;
    }

    .spade-sale-circle--card .spade-sale-circle__upto {
        font-size: 6px;
    }

    .spade-sale-circle--card .spade-sale-circle__percent {
        font-size: 15px;
    }

    .spade-sale-circle--card .spade-sale-circle__off {
        margin-top: 3px;
        font-size: 6px;
    }

    .spade-new-product__media > .spade-sale-circle--card,
    .spade-featured-card__media > .spade-sale-circle--card,
    .spade-collection-product__media > .spade-sale-circle--card,
    .spade-related-card__media > .spade-sale-circle--card {
        top: 10px;
        left: 10px;
    }

    .spade-sale-circle--product {
        padding: 6px 4px;
    }

    .spade-sale-circle--product .spade-sale-circle__upto {
        font-size: 6px;
    }

    .spade-sale-circle--product .spade-sale-circle__percent {
        font-size: 17px;
    }

    .spade-sale-circle--product .spade-sale-circle__off {
        margin-top: 3px;
        font-size: 7px;
    }
}

/* =========================================================
   SPADE — GLOBAL SOLD OUT BADGE
   ========================================================= */

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product,
.spade-product-card,
.spade-global-product-card {
    position: relative;
}


/* badge */
.spade-soldout-badge {
    position: absolute;
    top: 34%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 15;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 170px;
    height: 52px;
    padding: 0 26px;

    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);

    color: #222222;
    border: 1px solid rgba(255, 255, 255, 0.55);

    font-family: "Manrope", Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-align: center;
    white-space: nowrap;

    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.05);
    pointer-events: none;
}


/* slightly fade sold out product image */
.woocommerce ul.products li.product.outofstock img,
.woocommerce-page ul.products li.product.outofstock img,
.spade-product-card.outofstock img,
.spade-global-product-card.outofstock img {
    opacity: 0.52;
}


/* keep product info visible */
.woocommerce ul.products li.product.outofstock .woocommerce-loop-product__title,
.woocommerce ul.products li.product.outofstock .price,
.woocommerce-page ul.products li.product.outofstock .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product.outofstock .price {
    opacity: 1;
}


/* mobile */
@media (max-width: 768px) {

    .spade-soldout-badge {
        min-width: 138px;
        height: 44px;
        padding: 0 18px;
        font-size: 10px;
        letter-spacing: 0.1em;
    }

}