/**
 * Universal Sticky Cart Styles
 * Uses Elementor global CSS variables for consistency
 */

/* Body padding when sticky cart is visible */
body.has-sticky-cart {
    padding-bottom: 90px;
}

@media (max-width: 768px) {
    body.has-sticky-cart {
        padding-bottom: 155px;
    }
}

/* Base Sticky Cart */
.snapskins-sticky-cart {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--e-global-color-3e47553);
    border-top: 1px solid var(--e-global-color-f29c2c5);
    padding: 20px 0;
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(15, 8, 32, 0.08);
}

.sticky-cart-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

/* Selections */
.cart-selections {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
}

.selection-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.selection-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--e-global-color-ff9a990);
}

.selection-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--e-global-color-text);
}

.selection-value.empty {
    color: var(--e-global-color-accent);
    font-weight: 500;
    font-style: italic;
}

/* Cart Actions */
.cart-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cart-price {
    font-size: 28px;
    font-weight: 700;
    color: var(--e-global-color-primary);
    white-space: nowrap;
}

.sticky-add-to-cart-btn-wrapper {
    flex-shrink: 0;
}

/* Sticky button inherits from global .elementor-button */
.sticky-add-to-cart-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* General Product Variant */
.snapskins-sticky-cart.general-product .selection-item.product-info {
    flex-direction: row;
    align-items: center;
}

.snapskins-sticky-cart.general-product .selection-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--e-global-color-text);
    text-transform: none;
    letter-spacing: 0;
}

/* Hide add to cart in related products section */
.related.products .add_to_cart_button,
.upsells.products .add_to_cart_button,
.cross-sells .add_to_cart_button {
    display: none !important;
}

/* Tablet */
@media (max-width: 921px) {
    .cart-selections {
        gap: 20px;
    }
    
    .cart-price {
        font-size: 22px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .snapskins-sticky-cart {
        padding: 16px 0;
    }

    .sticky-cart-container {
        padding: 0 20px;
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .cart-selections {
        gap: 12px;
        overflow-x: auto;
        flex-wrap: nowrap;
        justify-content: space-evenly;
    }

    .selection-item {
        min-width: fit-content;
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .cart-actions {
        gap: 12px;
        justify-content: space-evenly;
    }

    .cart-price {
        font-size: 24px;
        flex: 0 0 auto;
        min-width: fit-content;
    }

    .sticky-add-to-cart-btn {
        flex: 1;
    }
}

@media (max-width: 480px) {
    .selection-label {
        font-size: 10px;
    }

    .selection-value {
        font-size: 12px;
    }

    .cart-price {
        font-size: 20px;
    }
}
