/* ===================================================================
   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 only while the carousel is actively sliding (see
   o_tt_card_carousel[data-tt-animating] toggled in products_item_customization.js)
   — promoting a GPU layer for every hidden gallery frame on every card at
   rest was overwhelming mobile GPU/memory budgets and breaking touch
   scrolling on real phones. */
.o_tt_card_carousel[data-tt-animating="1"] .o_tt_card_frame {
    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;
}
/* Details/Compare/Add-to-cart/Offer all live inside this wrapper (see
   products_item_customization.xml, website_sale_product_machine_attributes
   and tt_website_offer) so they form a single flex item in o_wsale_product_sub
   and wrap onto a new line as one group instead of splitting mid-row. */
.oe_product_cart_has_description .o_tt_shop_card_actions {
    flex-wrap: nowrap;
    flex-shrink: 0;
}
.oe_product_cart_has_description .o_tt_shop_card_actions .o_comparelist_button {
    display: flex !important;
    align-items: center;
}
.oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_icon_btn {
    box-sizing: content-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
    font-size: clamp(0.72rem, 0.5rem + 0.45vw, 0.875rem);
    line-height: 1.1;
    padding: clamp(0.18rem, 0.3vw, 0.35rem);
    transition: transform 0.15s ease;
}
.oe_product_cart_has_description .o_tt_shop_card_actions .o_tt_icon_btn:hover {
    transform: translateY(-1px);
}

/* --- 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: wrap !important;
        gap: .35rem !important;
    }
    .oe_product_cart_has_description .product_price {
        margin-top: 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;
    }
}

