/* ============================================
   FLOATING CART BUTTON
   Mobile only - Bottom LEFT position
   Shows when cart has items
   ============================================ */

:root {
    --floating-cart-bottom: 80px;
    --floating-cart-left: 20px;
    --floating-cart-z-index: 99999;
    --floating-cart-bg: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
    --floating-cart-bg-hover: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    --floating-cart-shadow: 0 8px 24px rgba(147, 51, 234, 0.4);
    --floating-cart-shadow-hover: 0 12px 32px rgba(147, 51, 234, 0.5);
    --floating-cart-badge-bg: #ef4444;
    --floating-cart-badge-border: 2px solid white;
    --floating-cart-transition: all 0.3s ease;
    --floating-cart-mobile-breakpoint: 768px;
}

.floating-cart-button {
    position: fixed;
    bottom: var(--floating-cart-bottom);
    left: var(--floating-cart-left);
    z-index: var(--floating-cart-z-index);

    display: none;
    align-items: center;
    gap: 8px;

    padding: 14px 20px;
    background: var(--floating-cart-bg);
    color: white;
    border-radius: 50px;

    box-shadow: var(--floating-cart-shadow);

    cursor: pointer;
    transition: var(--floating-cart-transition);

    opacity: 1;
    transform: scale(1);
}

/* Mobile only */
@media (max-width: 768px) {
    .floating-cart-button {
        display: flex !important;
        bottom: 20px;
        left: 16px;
    }

    .floating-cart-button:not(.visible) {
        opacity: 0 !important;
        pointer-events: none !important;
        transform: scale(0.8) !important;
    }

    .floating-cart-button.visible {
        opacity: 1 !important;
        pointer-events: all !important;
        transform: scale(1) !important;
    }
}

/* Icon */
.floating-cart-button i {
    font-size: 18px;
}

@media (max-width: 768px) {
    .floating-cart-button i {
        font-size: 16px;
    }
}

/* Cart count badge */
.floating-cart-button .cart-count {
    position: absolute;
    top: -6px;
    right: -6px;

    background: var(--floating-cart-badge-bg);
    color: white;

    min-width: 24px;
    height: 24px;

    display: none;
    align-items: center;
    justify-content: center;

    border-radius: 12px;
    padding: 0 6px;

    font-size: 11px;
    font-weight: 700;

    border: var(--floating-cart-badge-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.floating-cart-button .cart-count:not(:empty) {
    display: flex !important;
}

@media (max-width: 768px) {
    .floating-cart-button .cart-count {
        min-width: 20px;
        height: 20px;
        font-size: 10px;
        top: -4px;
        right: -4px;
    }
}

/* Hover effect */
.floating-cart-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--floating-cart-shadow-hover);
    background: var(--floating-cart-bg-hover);
}

/* Active state */
.floating-cart-button:active {
    transform: translateY(-2px) scale(0.98);
}

/* Pulse animation */
.floating-cart-button.cart-pulse {
    animation: cart-pulse 0.6s ease-in-out;
}

@keyframes cart-pulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.1); }
    50% { transform: scale(0.95); }
    75% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Extra small screens - icon only */
@media (max-width: 480px) {
    .floating-cart-button {
        width: 56px;
        height: 56px;
        padding: 0;
        justify-content: center;
        border-radius: 50%;
    }

    .floating-cart-button i {
        font-size: 20px;
    }
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .floating-cart-button {
        background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
        box-shadow: 0 8px 24px rgba(168, 85, 247, 0.4);
    }

    .floating-cart-button:hover {
        background: linear-gradient(135deg, #9333ea 0%, #7c3aed 100%);
        box-shadow: 0 12px 32px rgba(168, 85, 247, 0.5);
    }
}
