/* Shopping Cart Styles */

/* Floating Cart Button */
.cart-float-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cart-icon {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
}

.cart-float-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 188, 212, 0.5);
}

.cart-float-btn:active {
    transform: translateY(-2px) scale(0.98);
}

/* Cart Badge */
.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff5722;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

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

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(3px);
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 100%;
    max-width: 450px;
    height: 100vh;
    background: white;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
    transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

/* Cart Header */
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.cart-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.cart-close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    line-height: 1;
}

.cart-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Cart Items Container */
.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

/* Empty Cart */
.cart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    text-align: center;
    color: #999;
    height: 100%;
}

.cart-empty-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.cart-empty p {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.cart-empty small {
    color: #999;
}

/* Cart Item */
.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.cart-item:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-cyan);
}

.cart-item-image {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    background: #f5f2ed;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cart-item-details h4 {
    font-size: 1rem;
    color: var(--text-dark);
    margin: 0;
    font-weight: 600;
    line-height: 1.3;
}

.cart-item-price {
    color: var(--primary-green);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Quantity Controls */
.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 2px solid var(--primary-cyan);
    background: white;
    color: var(--primary-cyan);
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.qty-btn:hover {
    background: var(--primary-cyan);
    color: white;
    transform: scale(1.1);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-value {
    min-width: 30px;
    text-align: center;
    font-weight: 600;
    color: var(--text-dark);
}

/* Cart Item Total */
.cart-item-total {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.5rem;
}

.cart-item-subtotal {
    font-weight: bold;
    color: var(--text-dark);
    font-size: 1.1rem;
}

.cart-item-remove {
    background: transparent;
    border: none;
    color: #ff5722;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.cart-item-remove:hover {
    background: #fff3f0;
    color: #d84315;
}

/* Cart Footer */
.cart-footer {
    padding: 1.5rem;
    background: #fafafa;
    border-top: 2px solid #e0e0e0;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.cart-total span:first-child {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
}

.cart-total-amount {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-green);
}

.cart-checkout-btn,
.cart-clear-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.cart-checkout-btn {
    margin-bottom: 0.8rem;
}

.cart-clear-btn {
    background: transparent;
    color: #666;
    border: 2px solid #ddd;
}

.cart-clear-btn:hover {
    background: #f5f5f5;
    border-color: #ccc;
    color: #333;
}

/* Notification Toast */
.cart-notification {
    position: fixed;
    top: 100px;
    right: 30px;
    background: var(--primary-green);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1002;
    transform: translateX(500px);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cart-notification::before {
    content: '✓';
    font-size: 1.5rem;
    font-weight: bold;
}

.cart-notification.show {
    transform: translateX(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cart-sidebar {
        max-width: 100%;
        right: -100%;
    }

    .cart-float-btn {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }

    .cart-badge {
        width: 22px;
        height: 22px;
        font-size: 0.7rem;
    }

    .cart-item {
        flex-wrap: wrap;
    }

    .cart-item-image {
        width: 70px;
        height: 70px;
    }

    .cart-item-total {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .cart-notification {
        right: 20px;
        top: 90px;
        max-width: calc(100% - 40px);
    }
}

@media (max-width: 480px) {
    .cart-header h3 {
        font-size: 1.3rem;
    }

    .cart-item-details h4 {
        font-size: 0.95rem;
    }

    .cart-total-amount {
        font-size: 1.5rem;
    }
}
