.col > .col-inner:has(> .cp-catalogue-label-wrap) {
    /* Let the labels straddle the card border. The image clips its own corners. */
    overflow: visible !important;
}

.col > .col-inner:has(> .cp-catalogue-label-wrap) > .product-small {
    /* With overflow visible on the card (so the labels can straddle the border) the inner box painted
       square white corners over the rounded border: labelled cards looked different from the others
       (no corners, bottom edge missing). Clip the inner box to the card radius instead. */
    border-radius: inherit;
    overflow: hidden;
}

:is(.products, .row, .flickity-slider):not(.cp-products-slider *):has(> .col > .col-inner > .cp-catalogue-label-wrap) > .col:has(> .col-inner > .product-small.box) {
    /* Reserve room inside each cell, including when Flatsome clips its slider viewport. */
    padding-block-start: 26px;
}

.cp-products-section .cp-products-slider:has(.cp-catalogue-label-wrap) {
    /* Swiper clips vertically as well, including when pills wrap to two lines. */
    padding-block-start: 30px;
}

.cp-catalogue-label-wrap {
    position: absolute;
    inset: 0 4px auto;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 3px 6px;
    transform: translateY(-50%);
    pointer-events: none;
}

.cp-catalogue-label {
    max-width: 100%;
    padding: 5px 7px;
    border-radius: 6px;
    background: #62666d;
    color: #fff;
    font-family: 'CP Barlow', Arial, sans-serif;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    overflow-wrap: anywhere;
    text-align: center;
    text-transform: uppercase;
}

.cp-catalogue-label--preorder { background: #e53935; }
.cp-catalogue-label--eta { background: #00bcd4; text-transform: none; }
.cp-catalogue-label--low-stock { background: #ffb800; color: #422100; }
.cp-catalogue-label--top-seller { background: #ffdf32; color: #302400; }
.cp-catalogue-label--new { background: #67138d; }

.cp-products-slide .cp-catalogue-label {
    padding-inline: 6px;
    font-size: 11px;
}

.cp-catalogue-bbd {
    margin: 5px 0 0;
    color: #526471;
    font-size: 12px;
    line-height: 1.4;
}

.product-small .cp-catalogue-bbd {
    display: block;
    min-height: 1.4em;
    margin: 4px 0 0;
    color: #637780;
    font-size: 11px;
}

.product-small .cp-catalogue-bbd time {
    color: #111;
}

.cp-catalogue-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    min-height: 40px;
    margin: 6px 0 0;
    padding: 4px 7px;
    border-radius: 6px;
    background: #e7f4ec;
    color: #24563b;
    font-size: 12px;
    line-height: 1.25;
    text-align: start;
}

.cp-catalogue-status-title {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-weight: 700;
}

.cp-catalogue-status-title svg {
    display: block;
    flex: 0 0 1.1em;
    width: 1.1em;
    height: 1.1em;
    margin-block-start: .075em;
}

.cp-catalogue-status-detail { display: block; }

:is(.cp-products-slide, .related-products-wrapper) .cp-catalogue-status-detail {
    padding-inline-start: calc(1.1em + 5px);
}

.cp-catalogue-status--preorder { background: #f1e7f8; color: #56177c; }
.cp-catalogue-status--warehouse { background: #e8f3f9; color: #224d66; }
.cp-catalogue-status--unavailable,
.cp-catalogue-status--out-of-stock { background: #f1eff3; color: #63586b; }

.cp-catalogue-status-faces {
    display: grid;
    flex: 1;
    min-width: 0;
    overflow: clip;
    overflow-wrap: break-word;
    perspective: 240px;
}

.cp-catalogue-status-summary,
.cp-catalogue-status-explanation {
    /* Both faces contribute to height so longer translations can wrap without moving the card. */
    grid-area: 1 / 1;
    align-self: center;
    transition: transform 260ms ease, opacity 180ms ease;
}

.cp-catalogue-status-summary {
    transform-origin: bottom;
}

.cp-catalogue-status-explanation {
    opacity: 0;
    pointer-events: none;
    transform: translateY(100%) rotateX(-60deg);
    transform-origin: top;
}

.cp-catalogue-status:has(> .cp-catalogue-info[aria-expanded="true"]) .cp-catalogue-status-summary {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%) rotateX(60deg);
}

.cp-catalogue-status:has(> .cp-catalogue-info[aria-expanded="true"]) .cp-catalogue-status-explanation {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

:is(.product-small .box-text, .cp-product-page .summary) .cp-catalogue-info {
    display: grid;
    place-items: center;
    flex: 0 0 24px;
    width: 24px;
    min-width: 24px;
    min-height: 24px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font-size: 14px;
    line-height: 1;
    box-shadow: none;
}

.cp-catalogue-info svg {
    width: 16px;
    height: 16px;
}

.cp-catalogue-info:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 1px;
}

@media (prefers-reduced-motion: reduce) {
    .cp-catalogue-status-summary,
    .cp-catalogue-status-explanation {
        transition: none;
    }
}

@media (max-width: 549px) {
    .cp-catalogue-label-wrap { gap: 3px 4px; }
    .cp-catalogue-label, .cp-products-slide .cp-catalogue-label { padding: 4px 5px; font-size: 10px; }
    .cp-catalogue-status {
        position: relative;
        padding: 6px 7px;
        font-size: 11px;
    }
    .cp-catalogue-status:has(> .cp-catalogue-info) {
        min-height: 44px;
    }
    .cp-catalogue-status:has(> .cp-catalogue-info) :is(.cp-catalogue-status-title, .cp-catalogue-status-explanation) {
        padding-inline-end: 19px;
    }
    :is(.product-small .box-text, .cp-product-page .summary) .cp-catalogue-info {
        position: absolute;
        inset: 0;
        display: flex;
        justify-content: flex-end;
        align-items: flex-start;
        width: 100%;
        height: 100%;
        padding: 6px 7px;
        border-radius: inherit;
    }
    .cp-catalogue-info svg {
        width: 14px;
        height: 14px;
    }
}

/* The native loop and the slider shortcode use different outer card classes. */
.col:has(> .col-inner > .product-small.box) {
    display: flex;
}

.col > .col-inner:has(> .product-small.box) {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
}

.product-small.box {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    width: 100%;
}

.product-small.box > .box-image {
    flex: none;
    width: auto;
}

.product-small.box > .box-text:has(> .price-wrapper) {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: auto !important; /* Flatsome may give the text a fixed inline height. */
}

.product-small.box .box-text > .price-wrapper {
    height: auto !important;
    flex-shrink: 0;
}

.product-small.box .box-text > :is(form.cart, .add-to-cart-button, .cp-catalogue-unavailable-actions, .cp-bis-btn, .geo-restricted-btn) {
    margin-block-start: auto !important;
    margin-block-end: 0 !important;
}

.product-small.box .box-text > :is(form.cart, .cp-catalogue-unavailable-actions) {
    padding-block-start: 8px;
}

.cp-catalogue-unavailable-actions {
    display: flex;
    flex-direction: column;
}

.cp-catalogue-unavailable-actions > .button {
    margin: 0 !important;
}

.product-small.box .box-text :is(form.cart, .cp-catalogue-unavailable-actions) .quantity.buttons_added:not(.hidden) {
    --cp-card-quantity-height: 32px;
    display: flex;
    width: 100%;
    margin: 0 0 var(--cp-card-quantity-gap, 14px) !important;
    border: 1px solid #e3deea;
    border-radius: 8px;
}

.product-small.box .box-text :is(form.cart, .cp-catalogue-unavailable-actions) .quantity.buttons_added :is(.minus, .qty, .plus) {
    box-sizing: border-box;
    height: var(--cp-card-quantity-height) !important;
    min-height: 0 !important;
    margin: 0;
    padding: 0;
    border: 0 !important;
    box-shadow: none;
    font-size: 13px;
    line-height: var(--cp-card-quantity-height);
    text-align: center;
}

.product-small.box .box-text :is(form.cart, .cp-catalogue-unavailable-actions) .quantity.buttons_added :is(.minus, .plus) {
    flex: 0 0 var(--cp-card-quantity-height);
    border-radius: 7px;
}

.product-small.box .box-text :is(form.cart, .cp-catalogue-unavailable-actions) .quantity.buttons_added .qty {
    flex: 1;
    min-width: 0;
    max-width: none;
    border-inline: 1px solid #e3deea !important;
    border-radius: 0;
}

.product-small.box .box-text .cp-catalogue-unavailable-actions > .quantity.buttons_added.cp-catalogue-disabled-quantity:not(.hidden) {
    display: grid;
    grid-template-columns: var(--cp-card-quantity-height) minmax(0, 1fr) var(--cp-card-quantity-height);
}

.product-small.box .box-text .cp-catalogue-disabled-quantity > :disabled {
    width: 100%;
    min-width: 0;
    max-width: none;
    background: #f7f6f9;
    color: #716879;
    opacity: 1;
    cursor: not-allowed;
    -webkit-text-fill-color: currentColor;
}

.product-small.box .box-text form.cart .quantity.buttons_added :focus-visible {
    outline: 2px solid #5d1587;
    outline-offset: -2px;
}

.product-small.box .box-text :is(.cp-bis-btn.out-of-stock-btn, .geo-restricted-btn).button {
    align-self: center;
    width: 100% !important;
    min-height: 40px;
    padding: 5px 7px;
    border-width: 1px !important;
    border-style: solid !important;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.2 !important;
    letter-spacing: 0;
    text-transform: uppercase;
}

.product-small.box .box-text .cp-bis-btn.out-of-stock-btn.button {
    border-color: #dbc8e9 !important;
    background: #f5eff9 !important;
    color: #5d1587 !important;
}

.product-small.box .box-text .cp-bis-btn--subscribed.out-of-stock-btn.button {
    border-color: #c9e4d3 !important;
    background: #edf7f1 !important;
    color: #25613f !important;
}

.product-small.box .box-text .geo-restricted-btn.button {
    border-color: #e3deea !important;
    background: #f1eff3 !important;
    color: #4f4358 !important;
    opacity: 1;
}

.product-small.box .geo-restricted-label::before {
    content: '\2298';
    margin-inline-end: .35em;
    margin-inline-start: 0;
    vertical-align: baseline;
}

@media (min-width: 1025px) and (hover: hover) and (pointer: fine) {
    .product-small.box .box-text :is(.cp-bis-btn.out-of-stock-btn, .geo-restricted-btn).button {
        min-height: 36px;
    }
}

@media (max-width: 549px) {
    .product-small.box .box-text :is(form.cart, .cp-catalogue-unavailable-actions) .quantity.buttons_added:not(.hidden) {
        --cp-card-quantity-height: 36px;
    }
    .product-small.box {
        --cp-card-action-height: 48px;
        --cp-card-quantity-gap: 8px;
    }
    .product-small.box .box-text :is(.cp-bis-btn.out-of-stock-btn, .geo-restricted-btn).button {
        min-height: var(--cp-card-action-height);
    }
}
