/* =============== KRÁSNÝ FLOATING CART =============== */

.floating-cart {
    position: fixed;
    bottom: -200px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

.floating-cart.show {
    bottom: 25px;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.floating-cart-content {
    background: linear-gradient(145deg, 
        rgba(10, 10, 10, 0.95) 0%,
        rgba(20, 20, 20, 0.93) 50%,
        rgba(5, 5, 5, 0.95) 100%
    );
    backdrop-filter: blur(25px);
    border: 2px solid;
    border-image: linear-gradient(135deg, #FFD700, #FFA500, #FF8C00) 1;
    border-radius: 20px;
    padding: 20px 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 380px;
    max-width: 420px;
    position: relative;
    overflow: hidden;
}

/* Glowing border animation */
.floating-cart-content::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #FFD700, #FFA500, #FF8C00, #FFD700);
    background-size: 400% 400%;
    border-radius: 22px;
    z-index: -1;
    animation: borderGlow 3s ease-in-out infinite;
}

@keyframes borderGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.floating-cart-close {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ff4757, #ff3838);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 71, 87, 0.4);
}

.floating-cart-close:hover {
    background: linear-gradient(135deg, #ff3838, #ff2f2f);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 6px 16px rgba(255, 71, 87, 0.6);
}

/* =============== INFO SECTION =============== */
.floating-cart-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: 8px;
}

.floating-cart-title {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.floating-cart-price {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    color: #000;
    font-weight: 800;
    font-size: 1.3rem;
    padding: 8px 16px;
    border-radius: 12px;
    display: inline-block;
    text-shadow: none;
    box-shadow: 
        0 6px 16px rgba(255, 215, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =============== VARIANT SELECTOR =============== */
.floating-variant-selector {
    width: 100%;
    margin-bottom: 4px;
}

.floating-variant-selector label {
    display: block;
    font-size: 0.9rem;
    color: #FFD700;
    font-weight: 600;
    margin-bottom: 6px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.floating-variant-select {
    width: 100%;
    padding: 12px 16px;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.08) 0%, 
        rgba(255, 255, 255, 0.03) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 12px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    outline: none;
    backdrop-filter: blur(10px);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.floating-variant-select:hover {
    border-color: rgba(255, 215, 0, 0.6);
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.12) 0%, 
        rgba(255, 255, 255, 0.06) 100%);
    transform: translateY(-1px);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 4px 12px rgba(255, 215, 0, 0.2);
}

.floating-variant-select:focus {
    border-color: #FFD700;
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.15) 0%, 
        rgba(255, 255, 255, 0.08) 100%);
    box-shadow: 
        inset 0 2px 4px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(255, 215, 0, 0.3);
}

.floating-variant-select option {
    background: #1a1a1a;
    color: #ffffff;
    padding: 12px;
    border-radius: 4px;
}

/* =============== CART ACTIONS =============== */
.floating-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.floating-quantity-controls {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, 
        rgba(0, 0, 0, 0.4) 0%, 
        rgba(20, 20, 20, 0.4) 100%);
    border: 2px solid rgba(255, 215, 0, 0.3);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.floating-qty-btn {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #000;
    border: none;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.floating-qty-btn:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 100%);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.4);
}

.floating-qty-btn:active {
    transform: scale(0.95);
}

.floating-qty-input {
    border: none;
    background: transparent;
    color: #ffffff;
    text-align: center;
    width: 50px;
    height: 44px;
    font-size: 1.1rem;
    font-weight: 700;
    outline: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.floating-add-to-cart {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FF8C00 100%);
    color: #000;
    border: none;
    padding: 14px 24px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        0 4px 8px rgba(255, 215, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.floating-add-to-cart:hover {
    background: linear-gradient(135deg, #FFA500 0%, #FF8C00 50%, #FF7700 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 25px rgba(0, 0, 0, 0.4),
        0 6px 12px rgba(255, 165, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.floating-add-to-cart:active {
    transform: translateY(0);
}

/* Button states */
.floating-add-to-cart:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* =============== MOBILE RESPONSIVE =============== */
@media (max-width: 480px) {
    .floating-cart {
        left: 15px;
        right: 15px;
        bottom: -180px;
        transform: none;
    }
    
    .floating-cart.show {
        bottom: 20px;
    }
    
    .floating-cart-content {
        min-width: auto;
        max-width: none;
        width: 100%;
        padding: 16px 18px;
        gap: 14px;
        border-radius: 16px;
    }
    
    .floating-cart-content::before {
        border-radius: 18px;
    }
    
    .floating-cart-title {
        font-size: 1rem;
    }
    
    .floating-cart-price {
        font-size: 1.1rem;
        padding: 6px 12px;
    }
    
    .floating-variant-select {
        padding: 10px 14px;
        font-size: 13px;
    }
    
    .floating-cart-actions {
        gap: 12px;
    }
    
    .floating-qty-btn {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .floating-qty-input {
        width: 45px;
        height: 40px;
        font-size: 1rem;
    }
    
    .floating-add-to-cart {
        padding: 12px 20px;
        font-size: 0.9rem;
        min-width: 180px;
    }
    
    .floating-cart-close {
        width: 28px;
        height: 28px;
        top: -6px;
        right: -6px;
        font-size: 0.8rem;
    }
}

@media (max-width: 360px) {
    .floating-cart-content {
        padding: 14px 16px;
        gap: 12px;
    }
    
    .floating-cart-title {
        font-size: 0.95rem;
    }
    
    .floating-cart-price {
        font-size: 1rem;
        padding: 5px 10px;
    }
    
    .floating-add-to-cart {
        font-size: 0.85rem;
        padding: 10px 18px;
        min-width: 160px;
    }
}

/* =============== ANIMATIONS =============== */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.floating-cart-content.pulse {
    animation: pulse 0.6s ease-in-out;
}

/* =============== LOADING STATES =============== */
.floating-add-to-cart .fas.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Success state */
.floating-add-to-cart.success {
    background: linear-gradient(135deg, #00ff88 0%, #00cc66 100%) !important;
    color: #000 !important;
}

/* Error state */
.floating-add-to-cart.error {
    background: linear-gradient(135deg, #ff4757 0%, #ff3838 100%) !important;
    color: #fff !important;
}

/* =============== ACCESSIBILITY =============== */
@media (prefers-reduced-motion: reduce) {
    .floating-cart {
        transition: opacity 0.3s ease;
    }
    
    .floating-cart-content::before {
        animation: none;
    }
    
    .floating-cart-content.pulse {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .floating-cart-content {
        border: 3px solid #FFD700;
        background: #000;
    }
    
    .floating-variant-select {
        border: 2px solid #FFD700;
        background: #000;
    }
}