/**
 * LuxaLife v0.17 — sticky order shortcut, only on WooCommerce product pages.
 * Desktop: a compact floating product card at the lower-right.
 * Mobile: a full-width bottom bar with safe-area protection.
 */
body.single-product .luxalife-sticky-cart[hidden] {
    display: none !important;
}

body.single-product .luxalife-sticky-cart {
    position: fixed;
    z-index: 90;
    right: max(20px, env(safe-area-inset-right));
    bottom: max(20px, env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: min(355px, calc(100vw - 40px));
    padding: 15px;
    border: 1px solid #e8e2d9;
    border-radius: 16px;
    background: #fff;
    color: #242320;
    box-shadow: 0 15px 42px rgb(27 22 17 / .19);
    text-align: left;
    animation: luxalife-sticky-cart-in .2s ease both;
}

body.single-product .luxalife-sticky-cart__product {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding-right: 15px;
}

body.single-product .luxalife-sticky-cart__media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    overflow: hidden;
    border: 1px solid #ede8e0;
    border-radius: 10px;
    background: #fff;
}

body.single-product .luxalife-sticky-cart__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

body.single-product .luxalife-sticky-cart__details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    gap: 5px;
}

body.single-product .luxalife-sticky-cart__name {
    display: -webkit-box;
    width: 100%;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    color: #282622;
    font-size: 14px;
    font-weight: 750;
    line-height: 1.3;
}

body.single-product .luxalife-sticky-cart__price,
body.single-product .luxalife-sticky-cart__price .price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px 7px;
    min-width: 0;
    margin: 0;
    color: #1f1e1b;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
}

body.single-product .luxalife-sticky-cart__price del {
    color: #928a81;
    font-size: 12px;
    font-weight: 450;
    opacity: 1;
}
body.single-product .luxalife-sticky-cart__price ins {
    color: #1f1e1b;
    text-decoration: none;
}
body.single-product .luxalife-sticky-cart__price .woocommerce-Price-amount {
    white-space: nowrap;
}

body.single-product .luxalife-sticky-cart__close {
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #79736b;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
}
body.single-product .luxalife-sticky-cart__close:hover {
    background: #f5f1eb;
    color: #242320;
}

body.single-product .luxalife-sticky-cart__buy {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 44px;
    margin: 0;
    padding: 10px 14px;
    border: 1px solid #232321;
    border-bottom: 2px solid #caa75d;
    border-radius: 7px;
    background: #232321;
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
body.single-product .luxalife-sticky-cart__buy svg {
    flex: 0 0 19px;
    color: #d2b36e;
}
body.single-product .luxalife-sticky-cart__buy:hover {
    background: #37352f;
    border-color: #37352f;
    border-bottom-color: #d2b36e;
}
body.single-product .luxalife-sticky-cart__buy:focus-visible,
body.single-product .luxalife-sticky-cart__close:focus-visible {
    outline: 3px solid #d1aa5f;
    outline-offset: 3px;
}

@keyframes luxalife-sticky-cart-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Smaller screens use the full-width mobile bar, not a floating overlay. */
@media (max-width: 767px) {
    body.single-product .luxalife-sticky-cart {
        right: 0;
        bottom: 0;
        left: 0;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(130px, 47%);
        align-items: center;
        gap: 12px;
        width: 100%;
        padding: 10px max(14px, env(safe-area-inset-right))
                 calc(10px + env(safe-area-inset-bottom))
                 max(14px, env(safe-area-inset-left));
        border: 0;
        border-top: 1px solid #e9e3d9;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -7px 28px rgb(26 22 18 / .13);
        animation-duration: .18s;
    }

    body.single-product .luxalife-sticky-cart__product {
        display: block;
        min-width: 0;
        padding: 0;
    }
    body.single-product .luxalife-sticky-cart__media,
    body.single-product .luxalife-sticky-cart__close {
        display: none;
    }
    body.single-product .luxalife-sticky-cart__details {
        gap: 3px;
    }
    /* Compacte mobiele versie zoals het voorbeeld: prijs links, CTA rechts. */
    body.single-product .luxalife-sticky-cart__name {
        display: none;
    }
    body.single-product .luxalife-sticky-cart__price,
    body.single-product .luxalife-sticky-cart__price .price {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: nowrap;
        gap: 2px;
        font-size: clamp(17px, 4.5vw, 23px);
        font-weight: 850;
        line-height: 1.04;
    }
    body.single-product .luxalife-sticky-cart__price del {
        display: inline-flex;
        align-items: baseline;
        gap: 3px;
        font-size: 11px;
        font-weight: 450;
    }
    body.single-product .luxalife-sticky-cart--sale .luxalife-sticky-cart__price del::before {
        content: 'Van';
        text-decoration: line-through;
    }
    body.single-product .luxalife-sticky-cart--sale .luxalife-sticky-cart__price ins {
        display: flex;
        flex-direction: column;
        gap: 2px;
        color: var(--luxa-sticky-accent, #ae8334);
        font-weight: 850;
        text-decoration: none;
    }
    body.single-product .luxalife-sticky-cart--sale .luxalife-sticky-cart__price ins::before {
        content: 'VOOR';
        font-size: 10px;
        font-weight: 900;
        letter-spacing: .04em;
        line-height: 1;
    }
    body.single-product .luxalife-sticky-cart--sale .luxalife-sticky-cart__price ins .woocommerce-Price-amount {
        color: var(--luxa-sticky-accent, #ae8334);
    }
    body.single-product .luxalife-sticky-cart__buy {
        min-height: 48px;
        gap: 5px;
        padding: 10px 7px;
        font-size: clamp(11px, 3.3vw, 14px);
        white-space: nowrap;
    }
    body.single-product .luxalife-sticky-cart__buy svg {
        flex-basis: 17px;
        width: 17px;
        height: 17px;
    }
    /* The last footer link must remain reachable behind the fixed bar. */
    body.single-product.luxalife-sticky-cart-active {
        padding-bottom: calc(105px + env(safe-area-inset-bottom));
    }
}
@media (prefers-reduced-motion: reduce) {
    body.single-product .luxalife-sticky-cart {
        animation: none;
    }
    body.single-product .luxalife-sticky-cart__buy {
        transition: none;
    }
}
