/*
 * RightAir Components - Product Surface
 * Shared container geometry for slider tracks, static grids and future WooCommerce loops.
 * The surface controls card sizing, columns, gaps and responsive placement.
 */

/* v0.7.36 - Shared product-card surface and first-class five-column grid
 * The product card owns product presentation. Slider and grid are separate
 * containers that consume the same renderer and desktop card context.
 * Existing slider-specific movement, timing and responsive behaviour remains
 * unchanged. Tablet layout is intentionally not defined in this release.
 */
.ra-product-grid,
.ra-product-grid * {
    box-sizing: border-box;
}

.ra-product-grid {
    width: 100%;
    margin: 0 auto;
    font-family: var(--ra-font) !important;
    color: var(--ra-text);
}

.ra-product-grid__items {
    width: 100%;
}

@media (min-width: 1181px) {
    html body .ra-product-grid {
        --ra-grid-gap: 14px;
        width: 100% !important;
        max-width: 1400px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 0 !important;
    }

    html body .ra-product-grid__items {
        display: grid !important;
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 14px !important;
        align-items: stretch !important;
    }

    html body .ra-product-grid .ra-product-card {
        width: 100% !important;
        height: auto !important;
        aspect-ratio: 4 / 5 !important;
        grid-template-rows: 52% 48% !important;
    }

    html body .ra-product-grid .ra-product-card__badges {
        inset: 9px 9px auto 9px !important;
    }

    html body .ra-product-grid .ra-product-badge,
    html body .ra-product-grid .ra-product-card .awl-label-text,
    html body .ra-product-grid .ra-card-label--8588,
    html body .ra-product-grid .ra-card-label--8831,
    html body .ra-product-grid .ra-card-label--8587,
    html body .ra-product-grid .ra-card-label--287176,
    html body .ra-product-grid .ra-card-label--fallback {
        font-size: 9px !important;
    }

    html body .ra-product-grid .ra-product-card__body {
        padding: 0 7px 7px !important;
        gap: 4px !important;
    }

    html body .ra-product-grid .ra-product-card__title,
    html body .ra-product-grid .ra-product-card__title > a {
        font-size: 12px !important;
        line-height: 1.13 !important;
    }

    html body .ra-product-grid .ra-product-card__variations {
        min-height: 40px !important;
        max-height: 40px !important;
        height: 40px !important;
        align-content: flex-start !important;
        overflow: hidden !important;
        gap: 4px !important;
    }

    html body .ra-product-grid .ra-variation-pill {
        min-height: 16px !important;
        padding: 0 6px !important;
        font-size: 8px !important;
    }

    html body .ra-product-grid .ra-product-card__price {
        min-height: 20px !important;
        margin-top: 5px !important;
        gap: 8px !important;
        justify-content: center !important;
        text-align: center !important;
    }

    html body .ra-product-grid .ra-price-current,
    html body .ra-product-grid .ra-product-card__price ins .woocommerce-Price-amount,
    html body .ra-product-grid .ra-product-card__price > .woocommerce-Price-amount {
        font-size: 14px !important;
    }

    html body .ra-product-grid .ra-price-original,
    html body .ra-product-grid .ra-product-card__price del {
        font-size: 10px !important;
    }

    html body .ra-product-grid .ra-product-card__actions {
        gap: 5px !important;
    }

    html body .ra-product-grid .ra-button {
        height: 30px !important;
        min-height: 30px !important;
        padding: 2px 6px !important;
        font-size: 10.5px !important;
    }

    html body .ra-product-grid .ra-card-label--8111 { width: 31px !important; }
    html body .ra-product-grid .ra-card-label--8452 { width: 47.6px !important; }
    html body .ra-product-grid .ra-card-label--8108 { width: 42px !important; }

    html body .ra-product-grid .ra-product-labels--bottom-left {
        top: calc(52% - 8px) !important;
    }
}

@media (min-width: 1181px) and (max-width: 1400px) {
    html body .ra-product-grid .ra-product-card__title,
    html body .ra-product-grid .ra-product-card__title > a {
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
        max-height: calc(1.13em * 2) !important;
    }
}

@media (min-width: 1181px) and (max-width: 1250px) {
    html body .ra-product-grid .ra-product-card {
        grid-template-rows: 50% 50% !important;
    }

    html body .ra-product-grid .ra-product-card__body {
        grid-template-rows: calc(1.13em * 2) minmax(0, 1fr) 40px 20px 30px !important;
    }

    html body .ra-product-grid .ra-product-card__title,
    html body .ra-product-grid .ra-product-card__title > a {
        min-height: calc(1.13em * 2) !important;
        height: calc(1.13em * 2) !important;
        max-height: calc(1.13em * 2) !important;
    }

    html body .ra-product-grid .ra-product-labels--bottom-left {
        top: calc(50% - 8px) !important;
    }
}

/* Maintain page-edge breathing room once the 1400px reference surface begins
 * reducing. This applies continuously through tablet and mobile. */
@media (max-width: 1400px) {
    html body .ra-product-grid {
        width: 100% !important;
        max-width: 1400px !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

/* Mobile static grid: one full-width column using the same card component.
 * The grid surface owns only the available geometry. The card remains
 * responsible for its typography, controls and interactions.
 *
 * v0.7.40:
 * - make the image row deliberately shorter;
 * - let the card height follow its fixed content zones instead of viewport height;
 * - give the three-line title safe line-box room;
 * - remove the flexible spacer between title and variations;
 * - retain the approved side-by-side action buttons.
 */
@media (max-width: 767px) {
    html body .ra-product-grid {
        --ra-grid-mobile-image-height: clamp(220px, 57vw, 250px);
    }

    html body .ra-product-grid__items {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 14px !important;
        width: 100% !important;
    }

    html body .ra-product-grid .ra-product-card {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        grid-template-rows: var(--ra-grid-mobile-image-height) auto !important;
        align-self: start !important;
    }

    html body .ra-product-grid .ra-product-card__image {
        min-height: 0 !important;
        height: var(--ra-grid-mobile-image-height) !important;
        padding: 38px 12px 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        overflow: hidden !important;
    }

    html body .ra-product-grid .ra-product-card__image img,
    html body .ra-product-grid .ra-product-card__image-el {
        display: block !important;
        width: 100% !important;
        height: 100% !important;
        max-width: 100% !important;
        max-height: 100% !important;
        margin: 0 !important;
        object-fit: contain !important;
        object-position: center !important;
    }

    html body .ra-product-grid .ra-product-card__body {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        min-height: 0 !important;
        align-content: normal !important;
        gap: 0 !important;
        padding: 0 12px 12px !important;
    }

    html body .ra-product-grid .ra-product-card__title,
    html body .ra-product-grid .ra-product-card__title > a {
        font-size: 17px !important;
        line-height: 1.2 !important;
    }

    html body .ra-product-grid .ra-product-card__title {
        display: block !important;
        box-sizing: border-box !important;
        min-height: calc((3 * 1.2em) + 2px) !important;
        height: calc((3 * 1.2em) + 2px) !important;
        max-height: calc((3 * 1.2em) + 2px) !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    html body .ra-product-grid .ra-product-card__title > a {
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 3 !important;
        line-clamp: 3 !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
        overflow: hidden !important;
    }

    html body .ra-product-grid .ra-product-card__controls {
        display: flex !important;
        flex-direction: column !important;
        min-height: 0 !important;
        height: auto !important;
        margin: 8px 0 0 !important;
        padding: 0 !important;
        gap: 8px !important;
        align-content: normal !important;
    }

    html body .ra-product-grid .ra-product-card__variations {
        flex: 0 0 54px !important;
        min-height: 54px !important;
        height: 54px !important;
        max-height: 54px !important;
        margin: 0 !important;
        overflow: hidden !important;
        align-content: flex-start !important;
        gap: 6px !important;
    }

    html body .ra-product-grid .ra-variation-pill {
        min-height: 23px !important;
        padding: 3px 8px !important;
        font-size: 10.5px !important;
    }

    html body .ra-product-grid .ra-product-card__price {
        min-height: 24px !important;
        margin: 0 !important;
        gap: 8px !important;
        justify-content: center !important;
        text-align: center !important;
    }

    html body .ra-product-grid .ra-price-current,
    html body .ra-product-grid .ra-product-card__price ins .woocommerce-Price-amount,
    html body .ra-product-grid .ra-product-card__price > .woocommerce-Price-amount {
        font-size: 17px !important;
    }

    html body .ra-product-grid .ra-price-original,
    html body .ra-product-grid .ra-product-card__price del {
        font-size: 11px !important;
    }

    html body .ra-product-grid .ra-product-card__actions {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
        width: 100% !important;
        min-height: 43px !important;
        height: 43px !important;
        margin: 0 !important;
    }

    html body .ra-product-grid .ra-product-card__actions .ra-button {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 43px !important;
        height: 43px !important;
        padding-left: 8px !important;
        padding-right: 8px !important;
        font-size: 14px !important;
    }

    html body .ra-product-grid .ra-card-label--8588,
    html body .ra-product-grid .ra-card-label--8831,
    html body .ra-product-grid .ra-card-label--8587,
    html body .ra-product-grid .ra-card-label--287176,
    html body .ra-product-grid .ra-card-label--fallback {
        min-height: 24px !important;
        padding: 6px 11px !important;
        font-size: 12px !important;
        line-height: 1 !important;
    }

    html body .ra-product-grid .ra-card-label--8111 { width: 36px !important; }
    html body .ra-product-grid .ra-card-label--8452 { width: 55px !important; }
    html body .ra-product-grid .ra-card-label--8108 { width: 48px !important; }

    html body .ra-product-grid .ra-product-labels--top-left {
        top: 13px !important;
        left: 13px !important;
    }

    html body .ra-product-grid .ra-product-labels--top-right {
        top: 13px !important;
        right: 13px !important;
    }

    html body .ra-product-grid .ra-product-labels--bottom-left {
        top: calc(var(--ra-grid-mobile-image-height) - 20px) !important;
        left: 13px !important;
    }
}

/* v0.7.42 - Optional compact two-column mobile product grid
 * Usage: [rightair_product_grid mobile_columns="2"]
 * The grid surface changes only the space available to the shared product card.
 * Markup, variation logic, pricing, cart, quote and loader behaviour remain shared.
 */
@media (max-width: 767px) {
    html body .ra-product-grid--mobile-2 {
        --ra-grid-mobile-compact-gap: 10px;
        --ra-grid-mobile-compact-image-height: clamp(132px, 38vw, 178px);
    }

    html body .ra-product-grid--mobile-2 .ra-product-grid__items {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: var(--ra-grid-mobile-compact-gap) !important;
        align-items: stretch !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card {
        grid-template-rows: var(--ra-grid-mobile-compact-image-height) minmax(0, 1fr) !important;
        min-width: 0 !important;
        height: 100% !important;
        align-self: stretch !important;
        overflow: hidden !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__image {
        height: var(--ra-grid-mobile-compact-image-height) !important;
        padding: 28px 7px 4px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__image img,
    html body .ra-product-grid--mobile-2 .ra-product-card__image-el {
        max-width: 100% !important;
        max-height: 100% !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__body {
        height: 100% !important;
        padding: 0 7px 8px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__title,
    html body .ra-product-grid--mobile-2 .ra-product-card__title > a {
        font-size: 12.5px !important;
        line-height: 1.18 !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__title {
        min-height: calc((3 * 1.18em) + 2px) !important;
        height: calc((3 * 1.18em) + 2px) !important;
        max-height: calc((3 * 1.18em) + 2px) !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__controls {
        flex: 1 1 auto !important;
        margin-top: 6px !important;
        gap: 6px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__variations {
        flex: 0 0 auto !important;
        flex-basis: auto !important;
        min-height: 44px !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        gap: 4px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-variation-pill {
        min-height: 20px !important;
        padding: 3px 5px !important;
        font-size: 8.5px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-variation-pill--room-size {
        flex-direction: column !important;
        align-items: flex-start !important;
        padding-left: 9px !important;
        padding-right: 9px !important;
        text-align: left !important;
        line-height: 1.08 !important;
        white-space: normal !important;
    }

    html body .ra-product-grid--mobile-2 .ra-variation-pill__capacity,
    html body .ra-product-grid--mobile-2 .ra-variation-pill__room-size {
        display: block;
        white-space: nowrap;
    }

    html body .ra-product-grid--mobile-2 .ra-variation-pill__room-size {
        margin-left: 0 !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__price {
        min-height: 31px !important;
        margin-top: auto !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 2px !important;
        overflow: visible !important;
    }

    html body .ra-product-grid--mobile-2 .ra-price-current,
    html body .ra-product-grid--mobile-2 .ra-product-card__price ins .woocommerce-Price-amount,
    html body .ra-product-grid--mobile-2 .ra-product-card__price > .woocommerce-Price-amount {
        font-size: 13.5px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-price-original,
    html body .ra-product-grid--mobile-2 .ra-product-card__price del {
        font-size: 9px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__actions {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-rows: repeat(2, 32px) !important;
        gap: 5px !important;
        height: auto !important;
        min-height: 69px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__actions .ra-button {
        min-height: 32px !important;
        height: 32px !important;
        padding-left: 6px !important;
        padding-right: 6px !important;
        font-size: 11px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-button__icon {
        flex-basis: 12px !important;
        width: 12px !important;
        height: 12px !important;
        margin-right: 5px !important;
        font-size: 12px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-button.is-loading .ra-button__spinner {
        margin-right: 5px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-card-label--8588,
    html body .ra-product-grid--mobile-2 .ra-card-label--8831,
    html body .ra-product-grid--mobile-2 .ra-card-label--8587,
    html body .ra-product-grid--mobile-2 .ra-card-label--287176,
    html body .ra-product-grid--mobile-2 .ra-card-label--fallback {
        min-height: 20px !important;
        padding: 5px 7px !important;
        font-size: 9px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-card-label--8111 { width: 28px !important; }
    html body .ra-product-grid--mobile-2 .ra-card-label--8452 { width: 42px !important; }
    html body .ra-product-grid--mobile-2 .ra-card-label--8108 { width: 37px !important; }

    html body .ra-product-grid--mobile-2 .ra-product-labels--top-left {
        top: 8px !important;
        left: 8px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-labels--top-right {
        top: 8px !important;
        right: 8px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-labels--center-right {
        right: 6px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-labels--bottom-left {
        top: calc(var(--ra-grid-mobile-compact-image-height) - 15px) !important;
        left: 8px !important;
    }
}

/* v0.8.15 - Shared product-card image contract
 * Keep this final surface override after responsive slider/grid rules so every
 * renderer uses the same full-bleed square-image crop and title inset.
 */
html body .ra-product-surface .ra-product-card__image {
    border-bottom: 6px solid #fff !important;
    padding: 0 !important;
}

html body .ra-product-surface .ra-product-card__image img,
html body .ra-product-surface .ra-product-card__image-el {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* v0.8.16 - Shared variation-zone fallback
 * Short descriptions occupy exactly the same reserved zone as variation pills,
 * including each surface's responsive allocation.
 */
/* v0.8.18 - Slider line-clamp containment
 * Preserve the existing 40px variation zone while limiting the text content
 * area to exactly three computed lines. This prevents the top edge of a fourth
 * line from bleeding through beneath the clamp in slider cards.
 */
@media (min-width: 768px) {
    html body .ra-featured-slider .ra-product-card__short-description {
        box-sizing: border-box !important;
        min-height: 40px !important;
        height: 40px !important;
        max-height: 40px !important;
        padding-bottom: calc(40px - 3.75em) !important;
        overflow: hidden !important;
        contain: paint !important;
    }
}

@media (max-width: 767px) {
    html body .ra-featured-slider .ra-product-card__controls .ra-product-card__short-description,
    html body .ra-product-grid .ra-product-card__short-description {
        display: -webkit-box !important;
        flex: 0 0 54px !important;
        width: 100% !important;
        min-height: 54px !important;
        height: 54px !important;
        max-height: 54px !important;
        margin: 0 !important;
        font-size: 13px !important;
        line-height: 1.3 !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 3 !important;
        line-clamp: 3 !important;
        overflow: hidden !important;
    }

    html body .ra-featured-slider .ra-product-card__controls .ra-product-card__short-description {
        margin-top: 18px !important;
    }
}

@media (max-width: 767px) {
    html body .ra-product-grid--mobile-2 .ra-product-card__short-description {
        flex: 0 0 44px !important;
        min-height: 44px !important;
        height: 44px !important;
        max-height: 44px !important;
        display: -webkit-box !important;
        font-size: 10px !important;
        line-height: 1.2 !important;
        -webkit-box-orient: vertical !important;
        overflow: hidden !important;
        -webkit-line-clamp: 3 !important;
        line-clamp: 3 !important;
    }
}



/* v0.8.19 - Hard description clipping
 * The outer element reserves the variation zone. A separate inner text box is
 * clipped to an exact three-line pixel height, so no fourth-line glyphs can
 * bleed into the price area in slider or grid layouts.
 */
html body .ra-product-surface .ra-product-card__short-description {
    display: block !important;
    overflow: hidden !important;
    contain: paint !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
}

html body .ra-product-surface .ra-product-card__short-description-text {
    display: -webkit-box !important;
    width: 100% !important;
    max-height: 36px !important;
    overflow: hidden !important;
    font: inherit !important;
    line-height: 12px !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
}

@media (max-width: 767px) {
    html body .ra-product-surface .ra-product-card__short-description-text {
        max-height: 51px !important;
        line-height: 17px !important;
    }

    html body .ra-product-grid--mobile-2 .ra-product-card__short-description-text {
        max-height: 36px !important;
        line-height: 12px !important;
    }
}


/* v0.8.23 - Compact mobile grid centre-right label parity
 * Anchor centre-right labels to the true midpoint of the compact image stage.
 * The shared product-card markup remains unchanged.
 */
@media (max-width: 767px) {
    html body .ra-product-grid--mobile-2 .ra-product-labels--center-right {
        top: calc(var(--ra-grid-mobile-compact-image-height) / 2) !important;
        right: 6px !important;
        transform: translateY(-50%) !important;
    }
}

/* v0.9.8 - Dedicated tablet product-surface geometry
 * Tablet is a first-class shared surface between the five-column desktop and
 * existing mobile layouts. Slider and grid consume the same three-column card
 * geometry. The image stage is bounded while the body follows its content, so
 * short descriptions cannot create the oversized empty cards produced by the
 * inherited two-column 4:5 fallback.
 */
@media (min-width: 768px) and (max-width: 1180px) {
    html body .ra-product-surface {
        --ra-tablet-card-gap: 14px;
        --ra-tablet-image-height: clamp(210px, 27vw, 300px);
    }

    html body .ra-product-grid__items {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        gap: var(--ra-tablet-card-gap) !important;
        align-items: start !important;
        width: 100% !important;
        height: auto !important;
    }

    /* The featured surface remains a one-row rail. The viewport exposes three
     * cards while Woo product rotation moves the flex track horizontally. */
    html body .ra-featured-slider .ra-slider-products-track {
        display: flex !important;
        grid-template-columns: none !important;
        flex-wrap: nowrap !important;
        gap: var(--ra-tablet-card-gap) !important;
        align-items: flex-start !important;
        width: 100% !important;
        height: auto !important;
        transition: transform 360ms ease !important;
        will-change: transform;
    }

    html body .ra-product-grid .ra-product-card,
    html body .ra-featured-slider .ra-slider-products-track .ra-product-card {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        grid-template-rows: var(--ra-tablet-image-height) auto !important;
        align-self: start !important;
    }

    html body .ra-featured-slider .ra-slider-products-track .ra-product-card {
        flex: 0 0 calc((100% - (2 * var(--ra-tablet-card-gap))) / 3) !important;
        width: calc((100% - (2 * var(--ra-tablet-card-gap))) / 3) !important;
    }

    html body .ra-product-surface .ra-product-card__image {
        width: 100% !important;
        height: var(--ra-tablet-image-height) !important;
        min-height: 0 !important;
    }

    html body .ra-product-surface .ra-product-card__body {
        height: auto !important;
        min-height: 0 !important;
        grid-template-rows: calc(1.16em * 3) 40px 20px 32px !important;
        gap: 5px !important;
        padding: 0 8px 8px !important;
    }

    html body .ra-product-surface .ra-product-card__title,
    html body .ra-product-surface .ra-product-card__title > a {
        min-height: calc(1.16em * 3) !important;
        height: calc(1.16em * 3) !important;
        max-height: calc(1.16em * 3) !important;
        font-size: clamp(10.5px, 1.15vw, 13px) !important;
        line-height: 1.16 !important;
        -webkit-line-clamp: 3 !important;
        line-clamp: 3 !important;
    }

    html body .ra-product-surface .ra-product-card__controls {
        display: contents !important;
    }

    html body .ra-product-surface .ra-product-card__variations,
    html body .ra-product-surface .ra-product-card__short-description {
        grid-row: 2 !important;
        min-height: 40px !important;
        height: 40px !important;
        max-height: 40px !important;
        margin: 0 !important;
        overflow: hidden !important;
        align-content: flex-start !important;
    }

    html body .ra-product-surface .ra-product-card__short-description-text {
        max-height: 30px !important;
        font-size: clamp(9px, .9vw, 10.5px) !important;
        line-height: 15px !important;
        -webkit-line-clamp: 2 !important;
        line-clamp: 2 !important;
    }

    html body .ra-product-surface .ra-variation-pill {
        min-height: 16px !important;
        padding: 0 6px !important;
        font-size: clamp(7.5px, .72vw, 9px) !important;
    }

    html body .ra-product-surface .ra-product-card__price {
        grid-row: 3 !important;
        min-height: 20px !important;
        height: 20px !important;
        margin: 0 !important;
        gap: 7px !important;
        justify-content: center !important;
        text-align: center !important;
    }

    html body .ra-product-surface .ra-price-current,
    html body .ra-product-surface .ra-product-card__price ins .woocommerce-Price-amount,
    html body .ra-product-surface .ra-product-card__price > .woocommerce-Price-amount {
        font-size: clamp(12px, 1.2vw, 15px) !important;
    }

    html body .ra-product-surface .ra-price-original,
    html body .ra-product-surface .ra-product-card__price del {
        font-size: clamp(7px, .7vw, 9px) !important;
    }

    html body .ra-product-surface .ra-product-card__actions {
        grid-row: 4 !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 5px !important;
        min-height: 32px !important;
    }

    html body .ra-product-surface .ra-product-card__actions .ra-button {
        height: 32px !important;
        min-height: 32px !important;
        padding: 3px 6px !important;
        font-size: clamp(9px, .9vw, 11px) !important;
    }

    html body .ra-product-surface .ra-product-card__badges {
        inset: 9px 9px auto 9px !important;
    }

    html body .ra-product-surface .ra-product-labels--bottom-left {
        top: calc(var(--ra-tablet-image-height) - 8px) !important;
    }
}

/* v0.9.10 - Tablet autoplay transform ownership
 * The legacy <=1180px fallback declares transform:none!important on the rail.
 * Tablet now uses the transform slider lifecycle, so the viewport must clip the
 * rail while JavaScript owns the inline important transform.
 */
@media (min-width: 768px) and (max-width: 1180px) {
    html body .ra-featured-slider .ra-slider-products-viewport {
        overflow: hidden !important;
    }
}


/* v0.9.11 - Tablet desktop-style merchandising row
 * The desktop promo artwork occupies the first of three tablet columns. The
 * product viewport occupies the remaining two columns and exposes two cards.
 * Brands remain a full-width row below the merchandising rail.
 */
@media (min-width: 768px) and (max-width: 1180px) {
    html body .ra-featured-slider .ra-slider-layout {
        display: grid !important;
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
        grid-template-rows: auto auto !important;
        gap: var(--ra-tablet-card-gap, 14px) !important;
        align-items: start !important;
    }

    html body .ra-featured-slider .ra-slider-block--promo {
        order: initial !important;
        grid-column: 1 !important;
        grid-row: 1 !important;
        width: 100% !important;
        height: 100% !important;
        aspect-ratio: auto !important;
        overflow: hidden !important;
    }

    html body .ra-featured-slider .ra-promo-panel,
    html body .ra-featured-slider .ra-promo-panel picture {
        width: 100% !important;
        height: 100% !important;
    }

    html body .ra-featured-slider .ra-promo-panel__image {
        width: 100% !important;
        height: 100% !important;
        max-height: none !important;
        object-fit: cover !important;
        object-position: center !important;
    }

    html body .ra-featured-slider .ra-slider-block--products {
        order: initial !important;
        grid-column: 2 / span 2 !important;
        grid-row: 1 !important;
        width: 100% !important;
        overflow: hidden !important;
    }

    html body .ra-featured-slider .ra-slider-products-track .ra-product-card {
        flex: 0 0 calc((100% - var(--ra-tablet-card-gap, 14px)) / 2) !important;
        width: calc((100% - var(--ra-tablet-card-gap, 14px)) / 2) !important;
    }

    html body .ra-featured-slider .ra-slider-block--brands {
        order: initial !important;
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        width: 100% !important;
    }
}

/* v0.9.15 - Tablet top label readability
 * Increase only the text-based labels anchored at the top-left and top-right
 * of shared product cards. Desktop, mobile, image labels and lower labels are
 * intentionally unchanged.
 */
@media (min-width: 768px) and (max-width: 1180px) {
    html body .ra-product-surface .ra-product-labels--top-left .ra-product-badge,
    html body .ra-product-surface .ra-product-labels--top-left .awl-label-text,
    html body .ra-product-surface .ra-product-labels--top-left .ra-card-label--discount,
    html body .ra-product-surface .ra-product-labels--top-left .ra-card-label--text,
    html body .ra-product-surface .ra-product-labels--top-left .ra-card-label--8588,
    html body .ra-product-surface .ra-product-labels--top-left .ra-card-label--8831,
    html body .ra-product-surface .ra-product-labels--top-left .ra-card-label--8587,
    html body .ra-product-surface .ra-product-labels--top-left .ra-card-label--287176,
    html body .ra-product-surface .ra-product-labels--top-left .ra-card-label--fallback,
    html body .ra-product-surface .ra-product-labels--top-right .ra-product-badge,
    html body .ra-product-surface .ra-product-labels--top-right .awl-label-text,
    html body .ra-product-surface .ra-product-labels--top-right .ra-card-label--discount,
    html body .ra-product-surface .ra-product-labels--top-right .ra-card-label--text,
    html body .ra-product-surface .ra-product-labels--top-right .ra-card-label--8588,
    html body .ra-product-surface .ra-product-labels--top-right .ra-card-label--8831,
    html body .ra-product-surface .ra-product-labels--top-right .ra-card-label--8587,
    html body .ra-product-surface .ra-product-labels--top-right .ra-card-label--287176,
    html body .ra-product-surface .ra-product-labels--top-right .ra-card-label--fallback {
        font-size: 11px !important;
    }
}

/* v0.9.18 - Product grid feed filters and Phase 3 presentation refinement */
.ra-product-filters {
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
}

.ra-product-filters__group {
    display: grid;
    gap: 7px;
}

.ra-product-filters__pills {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.ra-filter-pill {
    appearance: none;
    border: 1px solid #cfd5dd;
    border-radius: 999px;
    background: #fff;
    color: var(--ra-text);
    min-height: 32px;
    padding: 6px 12px;
    font: inherit;
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, opacity 160ms ease;
}

.ra-filter-pill:hover,
.ra-filter-pill:focus-visible {
    border-color: #d9dde3;
    background: #eef0f3;
}

.ra-filter-pill.is-active {
    border-color: #0872ba;
    background: #0872ba;
    color: #fff;
}

.ra-filter-pill:disabled {
    opacity: 0.34;
    cursor: not-allowed;
}

.ra-product-grid__items > .ra-product-card[hidden] {
    display: none !important;
}

.ra-product-grid__empty {
    margin: 24px 0 0;
    padding: 18px;
    text-align: center;
    border: 1px solid rgba(0, 101, 153, 0.16);
    border-radius: 8px;
    background: #f4f5f6;
    color: var(--ra-text);
    font-size: 14px;
}

@media (max-width: 767px) {
    .ra-product-filters {
        margin-bottom: 14px;
    }

    .ra-product-filters__pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 3px;
        scrollbar-width: thin;
    }

    .ra-filter-pill {
        flex: 0 0 auto;
        min-height: 30px;
        padding: 6px 10px;
        font-size: 11px;
    }
}


/* v0.9.20 - Shared top-left percentage label contrast */
html body .ra-product-surface .ra-product-labels--top-left .ra-card-label--discount,
html body .ra-product-grid .ra-product-labels--top-left .ra-card-label--discount,
html body .ra-featured-slider .ra-product-labels--top-left .ra-card-label--discount {
    color: #fff !important;
}

/* v0.9.24 - Product Grid incremental loading */
.ra-product-grid__load-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}

.ra-product-grid__load-more-wrap[hidden] {
    display: none !important;
}

.ra-product-grid__load-more {
    min-height: 42px;
    padding: 9px 24px;
    border: 1px solid #0872ba;
    border-radius: 999px;
    background: #0872ba;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.ra-product-grid__load-more:hover,
.ra-product-grid__load-more:focus-visible {
    border-color: #006599;
    background: #006599;
}

.ra-product-grid__load-more:focus-visible {
    outline: 2px solid #0872ba;
    outline-offset: 3px;
}


/* Divi 5 Theme Builder representative preview. */
.ra-product-grid--builder-preview .ra-product-grid__builder-notice {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--ra-border, #d3d8df);
    border-radius: 10px;
    background: #f7f9fb;
    color: var(--ra-text-muted, #5e6e84);
    font-size: 13px;
    line-height: 1.4;
}
.ra-product-grid--builder-preview .ra-product-grid__builder-notice strong { color: var(--ra-primary, #0271ba); }
.ra-product-grid--builder-preview .ra-product-filters,
.ra-product-grid--builder-preview .ra-product-card__actions,
.ra-product-grid--builder-preview .ra-view-controls { pointer-events: none; }

/* v0.10.5 - Canonical Product Grid controls
 * Single ownership point for filter toggle + mobile column controls.
 * Desktop controls use 32px. Mobile visible controls use the same 30px
 * outer height as the mobile filter pills. Legacy v0.7.43 control rules
 * were removed so this section is the only responsive geometry contract.
 */
.ra-view-controls {
    display: none;
}


.ra-product-grid__controls-shell {
    width: 100%;
}

.ra-product-grid__controls-placeholder {
    display: block;
    width: 100%;
    height: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.ra-product-grid__controls-placeholder[hidden] {
    display: none !important;
}

.ra-product-grid:not(.ra-product-grid--builder-preview) > .ra-product-grid__controls-shell.is-stuck {
    position: fixed !important;
    z-index: 99990 !important;
    top: var(--ra-sticky-controls-top, var(--ra-sticky-header-height, 0px)) !important;
    left: var(--ra-sticky-controls-left, 0px) !important;
    width: var(--ra-sticky-controls-width, 100%) !important;
    max-width: none !important;
    max-height: var(--ra-sticky-controls-max-height, 100vh) !important;
    padding-top: 10px !important;
    padding-bottom: 2px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    background: #fff !important;
    box-shadow: none !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

/* Keep the toolbar/filter relationship exactly the same as normal flow. */
.ra-product-grid:not(.ra-product-grid--builder-preview) > .ra-product-grid__controls-shell.is-stuck .ra-product-grid__toolbar {
    position: static !important;
    width: 100% !important;
    margin-top: 0 !important;
    box-shadow: none !important;
    background: #fff !important;
}

.ra-product-grid:not(.ra-product-grid--builder-preview) > .ra-product-grid__controls-shell.is-stuck .ra-product-filters {
    position: static !important;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0 !important;
    overflow: visible !important;
    background: #fff !important;
    box-shadow: none !important;
}

@media (max-width: 767px) {
    html body .ra-product-grid[data-view-controls="1"]:not(.ra-product-grid--builder-preview) > .ra-product-grid__controls-shell.is-stuck {
        padding-top: 10px !important;
        padding-right: 15px !important;
        padding-bottom: 2px !important;
        padding-left: 15px !important;
    }

    html body .ra-product-grid[data-view-controls="1"]:not(.ra-product-grid--builder-preview) > .ra-product-grid__controls-shell.is-stuck .ra-product-grid__toolbar {
        height: 30px !important;
        min-height: 30px !important;
        padding: 0 !important;
    }
}

.ra-product-grid__toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0 0 10px;
    padding: 0;
}

/* Closed sticky state: keep the button geometry untouched and add 3px of
   white shell space above/below it. */
/* Expanded sticky filters join the same fixed stack directly below toolbar. */
html body .ra-filter-toggle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    height: 32px !important;
    min-height: 32px !important;
    margin: 0 !important;
    padding: 0 10px !important;
    gap: 5px !important;
    border: 1px solid #0872ba !important;
    border-radius: 999px !important;
    background: #0872ba !important;
    color: #fff !important;
    font: inherit !important;
    font-size: 12px !important;
    line-height: 1 !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    vertical-align: middle !important;
}

/* State colour is semantic: active/expanded is always Comfort Blue. */
html body .ra-filter-toggle.is-active,
html body .ra-filter-toggle[aria-expanded="true"] {
    border-color: #4a94d0 !important;
    background: #4a94d0 !important;
    color: #fff !important;
}

/* Hover colour is only valid on a real hover-capable pointer. */
@media (hover: hover) and (pointer: fine) {
    html body .ra-filter-toggle:hover {
        border-color: #4a94d0 !important;
        background: #4a94d0 !important;
        color: #fff !important;
    }
}

/* iOS/touch browsers can latch :hover after a tap. A closed button must
   always resolve back to the default state regardless of that pseudo-hover. */
@media (hover: none), (pointer: coarse) {
    html body .ra-filter-toggle:not(.is-active)[aria-expanded="false"],
    html body .ra-filter-toggle:not(.is-active)[aria-expanded="false"]:hover {
        border-color: #0872ba !important;
        background: #0872ba !important;
        color: #fff !important;
    }
}

html body .ra-filter-toggle:focus-visible {
    border-color: #4a94d0 !important;
    background: #4a94d0 !important;
    color: #fff !important;
}

html body .ra-filter-toggle:focus-visible {
    outline: 2px solid #0872ba !important;
    outline-offset: 3px !important;
}

html body .ra-filter-toggle > span {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

html body .ra-filter-toggle__icon,
html body .ra-filter-toggle__chevron {
    display: block !important;
    flex: 0 0 auto !important;
    width: 12px !important;
    height: 12px !important;
    margin: 0 !important;
    padding: 0 !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.8 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    pointer-events: none !important;
}

html body .ra-filter-toggle[aria-expanded="true"] .ra-filter-toggle__chevron {
    transform: rotate(180deg);
}

.ra-product-filters[hidden] {
    display: none !important;
}

html body .ra-product-filters {
    gap: 5px !important;
    margin-bottom: 12px !important;
}

html body .ra-product-filters__group {
    gap: 5px !important;
}

.ra-product-grid--builder-preview .ra-filter-toggle:disabled {
    opacity: 1;
    cursor: default;
}

@media (max-width: 767px) {
    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar {
        display: flex !important;
        flex-flow: row nowrap !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        height: 30px !important;
        min-height: 30px !important;
        gap: 8px !important;
        margin: 0 0 10px !important;
        padding: 0 !important;
    }

    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar > .ra-filter-toggle {
        flex: 0 0 auto !important;
        align-self: center !important;
        height: 30px !important;
        min-height: 30px !important;
        margin: 0 !important;
        padding: 0 10px !important;
        position: static !important;
        transform: none !important;
    }

    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar > .ra-view-controls {
        display: flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: flex-end !important;
        align-self: center !important;
        width: auto !important;
        height: 30px !important;
        min-height: 30px !important;
        margin: 0 !important;
        padding: 0 !important;
        position: static !important;
        transform: none !important;
    }

    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar .ra-view-controls__layout {
        display: inline-grid !important;
        grid-template-columns: repeat(2, 24px) !important;
        align-items: center !important;
        gap: 2px !important;
        box-sizing: border-box !important;
        width: auto !important;
        height: 30px !important;
        min-height: 30px !important;
        margin: 0 !important;
        padding: 2px !important;
        border: 1px solid var(--ra-border) !important;
        border-radius: var(--ra-radius-pill) !important;
        background: #fff !important;
    }

    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar .ra-view-controls__button {
        width: 24px !important;
        min-width: 24px !important;
        height: 24px !important;
        min-height: 24px !important;
        margin: 0 !important;
        padding: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border: 0 !important;
        border-radius: var(--ra-radius-pill) !important;
        background: transparent !important;
        color: var(--ra-comfort-blue) !important;
        box-shadow: none !important;
        cursor: pointer !important;
        appearance: none !important;
        -webkit-appearance: none !important;
        transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease !important;
    }

    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar .ra-view-controls__button:hover,
    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar .ra-view-controls__button:focus-visible {
        background: rgba(2, 113, 186, 0.1) !important;
        color: var(--ra-comfort-blue) !important;
        outline: none !important;
    }

    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar .ra-view-controls__button:focus-visible {
        box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ra-comfort-blue) !important;
    }

    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar .ra-view-controls__button.is-active,
    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar .ra-view-controls__button[aria-pressed="true"] {
        background: var(--ra-comfort-blue) !important;
        color: #fff !important;
    }

    html body .ra-product-grid[data-view-controls="1"] .ra-product-grid__toolbar .ra-view-controls__icon {
        width: 14px !important;
        height: 14px !important;
        display: block !important;
        fill: none !important;
        stroke: currentColor !important;
        stroke-width: 1.8 !important;
        stroke-linejoin: round !important;
        vector-effect: non-scaling-stroke !important;
        pointer-events: none !important;
    }

    html body .ra-product-filters {
        gap: 5px !important;
        margin-bottom: 10px !important;
    }
}





/* v0.10.47 - Load More uses the Product Grid filter-pill interaction palette */
.ra-product-grid__load-more {
    border-color: #cfd5dd;
    background: #fff;
    color: var(--ra-text);
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.ra-product-grid__load-more:hover,
.ra-product-grid__load-more:focus-visible {
    border-color: #d9dde3;
    background: #eef0f3;
    color: var(--ra-text);
}

.ra-product-grid__load-more:active {
    border-color: #0872ba;
    background: #0872ba;
    color: #fff;
}

.ra-product-grid__load-more:focus-visible {
    outline: 2px solid #0872ba;
    outline-offset: 3px;
}
