/* ============================================================
   Ecomlabs Product Sticky — floating add-to-cart bar
   Desktop: top sticky bar
   Mobile : bottom sticky bar (with WhatsApp)
   ============================================================ */

/* Anchor target marker — add `ecomlabs-sticky-anchor` to any section
   you want the sticky tabs to scroll to. Provides scroll-margin-top so
   the section doesn't end up hidden under the desktop sticky bar. */
.ecomlabs-sticky-anchor {
    scroll-margin-top: 160px;
}

.ecomlabs-sticky-cart,
.ecomlabs-sticky-cart-mobile {
    position: fixed;
    left: 0;
    right: 0;
    z-index: 1040;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .2s ease, visibility .2s;
}

.ecomlabs-sticky-cart.is-visible,
.ecomlabs-sticky-cart-mobile.is-visible {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Desktop top bar ---------- */
.ecomlabs-sticky-cart {
    top: 0;
    transform: translateY(-100%);
    display: none;
}

.ecomlabs-sticky-cart.is-visible {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .ecomlabs-sticky-cart {
        display: block;
    }
}

.ecomlabs-sticky-cart__inner {
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 10px 20px;
}

.ecomlabs-sticky-cart__image {
    flex: 0 0 auto;
    display: block;
    width: 60px;
    height: 60px;
    overflow: hidden;
}

.ecomlabs-sticky-cart__image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.ecomlabs-sticky-cart__info {
    flex: 1 1 auto;
    min-width: 0;
}

.ecomlabs-sticky-cart__name {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    color: #222;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.ecomlabs-sticky-cart__delivery {
    font-size: 13px;
    font-weight: 600;
    color: #2e8b2e;
    margin-top: 2px;
}

.ecomlabs-sticky-cart__delivery:empty {
    display: none;
}

.ecomlabs-sticky-cart__price {
    flex: 0 0 auto;
    text-align: right;
    font-size: 14px;
    line-height: 1.3;
    max-width: 340px;
}

.ecomlabs-sticky-cart__price:empty {
    display: none;
}

.ecomlabs-sticky-cart__price .product-prices,
.ecomlabs-sticky-cart__price .product_prices {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.ecomlabs-sticky-cart__price .product-price {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.ecomlabs-sticky-cart__price .current-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.ecomlabs-sticky-cart__price .price_with_tax,
.ecomlabs-sticky-cart__price .price_pvp {
    font-size: 22px;
    font-weight: 700;
    color: var(--color_link);
}

.ecomlabs-sticky-cart__price .show_pvp .old_price {
    color: #777;
    text-decoration: line-through;
    font-size: 13px;
}

.ecomlabs-sticky-cart__price .show_discount .discount {
    background: #d92626;
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.ecomlabs-sticky-cart__price .tax-shipping-delivery-label,
.ecomlabs-sticky-cart__price .product-unit-price,
.ecomlabs-sticky-cart__price .available_stock,
.ecomlabs-sticky-cart__price .product-without-taxes,
.ecomlabs-sticky-cart__price .price-ecotax,
.ecomlabs-sticky-cart__price .container-before-price {
    display: none !important;
}

.ecomlabs-sticky-cart__actions {
    flex: 0 0 auto;
}

.ecomlabs-sticky-cart__add {
    font-weight: 600;
    padding: 12px 28px;
    font-size: 16px;
    white-space: nowrap;
}

/* ---- Tabs row (desktop only) ---- */
.ecomlabs-sticky-cart__tabs-bar {
    background-color: var(--color_font);
    color: #fff;
}

.ecomlabs-sticky-cart__tabs {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 16px;
}

.ecomlabs-sticky-cart__tabs-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
    flex: 1 1 auto;
}

.ecomlabs-sticky-cart__tabs-list li {
    display: flex;
}

.ecomlabs-sticky-cart__tabs-list a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    color: #d6d8dd;
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color .15s, border-color .15s;
}

.ecomlabs-sticky-cart__tabs-list a:hover,
.ecomlabs-sticky-cart__tabs-list a:focus {
    color: #fff;
    border-bottom-color: var(--primary_color, #fff);
    text-decoration: none;
}

.ecomlabs-sticky-cart__tabs-list a.is-active {
    color: #fff;
    font-weight: 700;
    border-bottom-color: var(--primary_color, #fff);
}

.ecomlabs-sticky-cart__tabs-list li[hidden] {
    display: none;
}

.ecomlabs-sticky-cart__tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 11px;
    color: var(--button_p_color);
    background-color: var(--button_p_bk);
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.ecomlabs-sticky-cart__top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: transparent;
    border: 0;
    color: #d6d8dd;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
}

.ecomlabs-sticky-cart__top:hover,
.ecomlabs-sticky-cart__top:focus {
    color: #fff;
}

.ecomlabs-sticky-cart__top-arrow {
    font-size: 16px;
    line-height: 1;
}

/* ---------- Mobile bottom bar ---------- */
.ecomlabs-sticky-cart-mobile {
    bottom: 0;
    transform: translateY(100%);
    border-top: 1px solid #e5e5e5;
    padding: 10px 12px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0));
    display: flex;
    align-items: center;
    gap: 10px;
}

.ecomlabs-sticky-cart-mobile.is-visible {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .ecomlabs-sticky-cart-mobile {
        display: none !important;
    }
}

.ecomlabs-sticky-cart-mobile__wa {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    color: #25D366;
    background: #fff;
    cursor: pointer;
    text-decoration: none;
}

.ecomlabs-sticky-cart-mobile__wa svg {
    width: 28px;
    height: 28px;
}

.ecomlabs-sticky-cart-mobile__add {
    flex: 1 1 auto;
    font-weight: 600;
    font-size: 18px;
    padding: 14px 16px;
    height: 56px;
}
