/* ===================================================================
   Products item customization
   =================================================================== */

/* --- Card carousel ------------------------------------------------ */
.o_tt_card_carousel {
    overflow: hidden;
}

/* Frame base (shared by active & inactive images) */
.o_tt_card_frame {
    transition: transform .58s ease, opacity .14s ease;
    will-change: transform, opacity;
}
.o_tt_card_frame[data-tt-active="1"] {
    display: block;
    opacity: 1;
    transform: translateX(0);
}
.o_tt_card_frame[data-tt-active="0"] {
    display: none;
    opacity: 0;
    transform: translateX(100%);
}

/* Navigation buttons (prev / next) */
.o_tt_card_nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(.96);
    z-index: 3;
    opacity: .72;
    pointer-events: auto;
    width: 1.45rem;
    height: 1.45rem;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, .46);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
    transition: opacity .16s ease, transform .16s ease,
                background-color .16s ease, box-shadow .16s ease;
}
.o_tt_card_nav_prev { left: .35rem; }
.o_tt_card_nav_next { right: .35rem; }

.o_tt_card_nav .fa {
    font-size: .75rem;
    line-height: 1;
}

/* Hover: enlarge & brighten buttons when cursor is inside carousel */
.o_tt_card_carousel:hover .o_tt_card_nav {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(-50%) scale(1);
}

/* --- Products list layout ----------------------------------------- */
.o_wsale_layout_list .oe_product_cart_has_description {
    gap: 1rem;
    align-items: stretch;
}
.o_wsale_layout_list .oe_product_cart_has_description .oe_product_image {
    flex: 0 0 clamp(12.375rem, 25.5vw, 17.25rem);
    max-width: clamp(12.375rem, 25.5vw, 17.25rem);
    min-width: 12.375rem;
}
.o_wsale_layout_list .oe_product_cart_has_description .o_tt_card_carousel {
    min-height: clamp(8.1rem, 15.6vw, 11.4rem);
}
.o_wsale_layout_list .oe_product_cart_has_description .o_wsale_product_information {
    min-width: 0;
    padding-top: .15rem;
}
.o_wsale_layout_list .oe_product_cart_has_description .o_tt_listing_location {
    color: #6c757d;
    font-size: .9rem;
    line-height: 1.15;
    margin-top: -.1rem;
    margin-bottom: .4rem;
}
.o_wsale_layout_list .oe_product_cart_has_description .o_tt_card_nav {
    width: 1.35rem;
    height: 1.35rem;
    opacity: .56;
}

/* --- List-only: hide card bar overlay ----------------------------- */
body:has(.o_wsale_apply_list.active) .oe_product_cart_has_description .o_tt_shop_card_bar {
    display: none !important;
}

/* --- Grid-only overrides ------------------------------------------ */
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_listing_location {
    display: none !important;
}
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_list_actions {
    display: none !important;
}
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_shop_card_bar {
    z-index: 3;
    background: rgba(0, 0, 0, 0.58);
    min-height: 2.1rem;
}
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_shop_card_location {
    min-width: 0;
    font-size: 0.8rem;
    line-height: 1;
}
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_shop_card_actions .o_comparelist_button {
    display: block !important;
}
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_icon_btn {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    line-height: 1;
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_icon_btn i {
    color: #fff;
    font-size: 0.92rem;
    line-height: 1;
}
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_icon_btn .visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_icon_btn:hover,
form.oe_product_cart:hover .o_tt_shop_card_actions .o_tt_icon_btn {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.45);
    transform: translateY(-1px);
}
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_compare_btn,
body:has(.o_wsale_apply_grid.active) .oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_cart_btn {
    pointer-events: auto;
}

/* --- Responsive – tablet ------------------------------------------ */
@media (max-width: 991.98px) {
    .oe_product_cart_has_description .o_wsale_product_sub {
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        flex-wrap: nowrap !important;
        gap: .35rem !important;
    }
    .oe_product_cart_has_description .product_price {
        margin-top: 0 !important;
        min-width: 0 !important;
        flex: 0 1 auto !important;
    }
    .oe_product_cart_has_description .o_wsale_product_btn {
        width: auto !important;
        flex: 0 1 auto !important;
        justify-content: flex-start !important;
        flex-wrap: nowrap !important;
    }
}

/* --- Responsive – mobile ------------------------------------------ */
@media (max-width: 575.98px) {
    .o_wsale_layout_list .oe_product_cart_has_description .o_tt_shop_card_actions {
        gap: .35rem !important;
    }
    .o_wsale_layout_list .oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_icon_btn {
        width: 1.7rem;
        height: 1.7rem;
    }
    .o_wsale_layout_list .oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_icon_btn i {
        font-size: .84rem;
    }
}

/* --- Compare button overrides ------------------------------------- */
.oe_product_cart_has_description .o_tt_compare_btn {
    width: auto !important;
    min-width: max-content !important;
    height: auto !important;
    padding: .14rem .42rem !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
}
.oe_product_cart_has_description .o_tt_compare_btn .o_tt_compare_label {
    display: inline-block !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
    line-height: 1;
}
