.cart-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: var(--blue);
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    border: none;
}

.cart-float-btn:hover {
    background-color: #1a252f;
    transform: scale(1.1) rotate(10deg);
}

.cart-float-btn .cart-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #ffb531;
    color: #000000;
    font-size: 14px;
    font-weight: bold;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
}

.cart-sidebar {
    position: fixed;
    right: -450px;
    top: 0;
    width: 380px;
    height: 100vh;
    background-color: #f8f9fa;
    box-shadow: -8px 0 25px rgba(0, 0, 0, 0.15);
    transition: right 0.4s cubic-bezier(0.18, 0.89, 0.32, 1.28);
    z-index: 1100;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
}

.cart-body {
    flex: 1;
    overflow-y: auto;
    padding: 25px;
    padding-bottom: 100px;
}

.cart-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 20px 0px;
}

.cart-footer {
    position: sticky;
    bottom: 0;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
    padding: 20px 25px;
    flex-shrink: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #7f8c8d;
    transition: all 0.3s;
    padding: 5px;
}

.close-btn:hover {
    color: #e74c3c;
    transform: rotate(90deg);
}

.checkout-btn {
    width: 100%;
    padding: 15px;
    background: #0096ff;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.checkout-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    position: relative;
    transition: all 0.3s;
    overflow: hidden;
    background-color: #f1f1f1;
    border-radius: 10px;
}

.cart-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: 20px;
    border: 1px solid #eee;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-price {
    color: #064a79;
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-item-remove {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.3rem;
    margin-left: 15px;
    padding: 8px;
    border-radius: 50%;
}

.cart-item-remove:hover {
    background-color: #fdedec;
    transform: rotate(15deg) scale(1.2);
}

.cart-empty {
    text-align: center;
    padding: 60px 0;
}

.cart-empty i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 20px;
    opacity: 0.6;
}

.cart-empty p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-top: 15px;
}

@keyframes slideIn {
    from { 
    transform: translateX(30px); 
    opacity: 0; 
    }
    to { 
    transform: translateX(0); 
    opacity: 1; 
    }
}

@keyframes flyToCart {
    0% { 
    transform: translate(0, 0) scale(1); 
    opacity: 1; 
    }
    50% { 
    transform: translate(var(--translate-x), var(--translate-y)) scale(0.5); 
    opacity: 0.7; 
    }
    100% { 
    transform: translate(var(--translate-end-x), var(--translate-end-y)) scale(0.1); 
    opacity: 0; 
    }
}

@keyframes throwToTrash {
    0% { 
    transform: translate(0, 0) rotate(0deg); 
    opacity: 1; 
    }
    100% { 
    transform: translate(var(--trash-translate-x), var(--trash-translate-y)) rotate(90deg); 
    opacity: 0; 
    }
}

.cart-item.removing {
    animation: throwToTrash 0.6s forwards;
}

.fly-effect {
    position: fixed;
    pointer-events: none;
    z-index: 2000;
    animation: flyToCart 0.8s forwards;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
}

.trash-can {
    position: fixed;
    bottom: 30px;
    left: 30px;
    font-size: 40px;
    color: #e74c3c;
    opacity: 0;
    transition: all 0.3s;
    z-index: 1200;
    transform: scale(0.8);
}

.trash-can.active {
    opacity: 1;
    animation: trashBounce 0.5s ease;
}

@keyframes trashBounce {
    0%, 100% { transform: scale(0.8); }
    50% { transform: scale(1); }
}

.cart-items::-webkit-scrollbar {
    width: 8px;
}

.cart-items::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb {
    background: #bdc3c7;
    border-radius: 10px;
}

.cart-items::-webkit-scrollbar-thumb:hover {
    background: #95a5a6;
}

@media (max-width: 992px) {
    .cart-float-btn { bottom: 100px; }
}