/**
 * Fixed Add to Cart Styles
 * This file handles the sticky add to cart functionality
 */


/* Fixed cart clone - base styles */
.fixed-cart-clone {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    background: var(--cs-color-site-bg) !important;
    padding: 5px 10px !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1) !important;
    z-index: 999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    border-top: 1px solid var(--cs-color-border) !important;
    box-sizing: border-box !important;
    transition: opacity 0.3s ease, transform 0.3s ease !important;
    margin: 0 !important;
    opacity: 0 !important;
}

/* Bottom position */
.fixed-cart-clone[data-position="bottom"] {
    bottom: var(--bottom-offset, 20px) !important;
    top: auto !important;
    transform: translateY(100%) !important;
}

/* Top position */
.fixed-cart-clone[data-position="top"] {
    top: 0 !important;
    bottom: auto !important;
    transform: translateY(-100%) !important;
}

/* Show state */
.fixed-cart-clone.show {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Hide state */
.fixed-cart-clone:not(.show) {
    pointer-events: none !important;
}

.fixed-cart-clone button.single_add_to_cart_button, 
.fixed-cart-clone button.buy-now-button
{
    padding: 10px !important;
}
.fixed-cart-clone button.single_add_to_cart_button.button.alt {
    width: auto;
}
.fixed-cart-clone button.buy-now-button:disabled,
.fixed-cart-clone button.buy-now-button:disabled:hover,
.fixed-cart-clone button.single_add_to_cart_button.button.alt:disabled, 
.fixed-cart-clone button.single_add_to_cart_button.button.alt:disabled:hover
{
    background-color: var(--cs-color-text-primary) !important;
    color: var(--cs-color-surface) !important;
}

.fixed-cart-clone button.buy-now-button {
    width: 50%;
}

/* Responsive styles */
@media (max-width: 768px) {
    .fixed-cart-clone {
        padding: 10px !important;
        gap: 10px !important;
        flex-wrap: wrap !important;
    }

    .fixed-cart-clone .quantity {
        margin-right: 0 !important;
        display: inline-flex !important;
        align-items: center !important;
    }


    .fixed-cart-clone .single_add_to_cart_button {
        margin: 0 !important;
        min-width: auto !important;
        white-space: nowrap !important;
    }
    .fixed-cart-clone button.buy-now-button {
        width: 100%;
    }

    .fixed-cart-selected-variations {
        max-width: 150px;
    }
}

@media (max-width: 400px) {
    .fixed-cart-clone {
        gap: 8px !important;
    }

    .fixed-cart-clone .quantity {
        width: 30% !important;
        justify-content: center !important;
    }

    .fixed-cart-clone button.single_add_to_cart_button.button.alt {
        width: 65% !important;
        white-space: normal !important;
    }
    .fixed-cart-clone button.buy-now-button {
        width: 100% !important;
    }

    .fixed-cart-selected-variations {
        max-width: 100%;
        white-space: normal;
        text-align: center;
        margin: 5px 0;
    }
}