/* Scoped to listing cards; product detail typography is intentionally independent. */
.woocommerce ul.products li.product.isd-product-card,
.woocommerce-page ul.products li.product.isd-product-card {
    min-width: 0;
    align-self: start;
}
ul.products .isd-product-card .astra-shop-thumbnail-wrap {
    position: relative;
    isolation: isolate;
    margin-bottom: 12px;
}
ul.products .isd-product-card .astra-shop-thumbnail-wrap > .woocommerce-loop-product__link {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    cursor: pointer;
}
ul.products .isd-product-card .astra-shop-thumbnail-wrap > .woocommerce-loop-product__link img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100%;
    margin: 0 !important;
    object-fit: contain;
}
ul.products .isd-product-card .astra-shop-summary-wrap {
    min-width: 0;
    text-align: center;
}
body ul.products li.product.isd-product-card .isd-card-title,
body .pc-carousel-wrapper .pc-product-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    height: 2.8em;
    min-height: 2.8em;
    margin: 0 0 6px !important;
    padding: 0 !important;
    font-family: Arial, sans-serif !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.4 !important;
    letter-spacing: normal;
    color: #111;
    text-transform: none;
    overflow-wrap: anywhere;
}
ul.products .isd-product-card .isd-card-title-link,
ul.products .isd-product-card .isd-card-price-link,
body .pc-carousel-link {
    color: inherit;
    text-decoration: none !important;
    cursor: pointer;
}
ul.products .isd-product-card .isd-card-title-link {
    display: block;
    font: inherit;
    line-height: inherit;
}
ul.products .isd-product-card .isd-card-price-link {
    display: block;
}
ul.products .isd-product-card .isd-card-price-link .price {
    margin: 0 !important;
}
body.woocommerce-js ul.products li.product.isd-product-card .ast-shop-product-out-of-stock {
    position: absolute;
    left: 8px;
    bottom: 8px;
    top: auto;
    right: auto;
    width: auto;
    max-width: calc(100% - 16px);
    margin: 0;
    padding: 4px 6px;
    background: #f2f2f0;
    color: #444;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    font: 600 11px/1.25 Arial, sans-serif;
    letter-spacing: .02em;
    text-align: left;
    text-transform: uppercase;
    transform: none;
    z-index: 2;
    pointer-events: none;
}
body .pc-carousel-wrapper .pc-product-info {
    min-width: 0;
}
/* Own the image height at the scroll container. In Safari, intrinsic images
   inside nested flex items can otherwise size against the outer Swiper width. */
body .pc-carousel-wrapper,
body .pc-carousel-wrapper .pc-carousel-link {
    min-width: 0;
}
body .pc-carousel-wrapper .pc-carousel-container {
    aspect-ratio: 3 / 4;
    min-width: 0;
    min-height: 0;
}
body .pc-carousel-wrapper .pc-carousel-item {
    flex: 0 0 100%;
    min-width: 0;
    min-height: 0;
    height: 100% !important;
    aspect-ratio: auto;
}
body .pc-carousel-wrapper .pc-carousel-item img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: contain;
}
.isd-card-title-link:focus-visible,
.isd-card-price-link:focus-visible,
.woocommerce-loop-product__link:focus-visible,
.pc-carousel-link:focus-visible,
.vi-wcaio-sidebar-cart-wrap [tabindex]:focus-visible,
.vi-wcaio-sidebar-cart-wrap a:focus-visible,
.vi-wcaio-sidebar-cart-wrap button:focus-visible,
.vi-wcaio-sidebar-cart-wrap input:focus-visible {
    outline: 2px solid #333 !important;
    outline-offset: 3px;
}
.isd-cart-load-error {
    position: fixed;
    z-index: 100000000;
    right: 16px;
    bottom: 16px;
    max-width: calc(100vw - 32px);
    padding: 16px;
    background: #fff;
    color: #111;
    border: 1px solid #ddd;
    box-shadow: 0 4px 24px #0002;
}
/* Selected values replace XT's floating swatch tooltips on every input type. */
body.isd-swatch-labels-enabled .xt_woovs-tooltip {
    display: none !important;
    visibility: hidden !important;
}
form.isd-swatch-labels .variations .label > label {
    display: inline !important;
}
form.isd-swatch-labels .variations .label > .isd-selected-value:not([hidden]) {
    display: inline !important;
    visibility: visible !important;
    margin-left: 8px;
    font-size: inherit;
    font-weight: 400;
    letter-spacing: normal;
    color: #555;
}
form.isd-swatch-labels .isd-selected-value::before {
    content: '·';
    margin-right: 8px;
    color: #aaa;
}
form.isd-swatch-labels .isd-selected-value[hidden] {
    display: none !important;
}
form.isd-swatch-labels .xt_woovs-attribute-value {
    visibility: hidden !important;
}
@media (max-width: 767px) {
    body ul.products li.product.isd-product-card .isd-card-title,
    body .pc-carousel-wrapper .pc-product-title {
        font-size: 13px !important;
    }
    body.woocommerce-js ul.products li.product.isd-product-card .ast-shop-product-out-of-stock {
        font-size: 10px;
    }
    ul.products .isd-product-card .astra-shop-thumbnail-wrap {
        margin-bottom: 10px;
    }
}

/* Mobile SKU controls keep the same footprint before, during and after selection. */
@media (max-width: 1024px) {
    form.isd-swatch-labels .xt_woovs-attribute-value {
        display: none !important;
    }
    form.isd-swatch-labels .variations .reset_variations {
        display: block !important;
        height: 20px;
        min-height: 20px;
        line-height: 20px;
        margin: 10px 0 0;
        padding: 0;
    }
}
