/* css/cart-style.css */
.cart-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

.cart-overlay.active {
    display: block;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 450px;
    height: 100%;
    background: #fff;
    z-index: 9999;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -2px 0 15px rgba(0, 0, 0, 0.1);
}

.cart-sidebar.active {
    right: 0;
}

.cart-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #4a4c70;
    color: #fff;
    flex-shrink: 0;
}

.cart-sidebar-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.cart-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    padding: 0 5px;
}

.cart-close-btn:hover {
    opacity: 0.7;
}

.cart-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.cart-empty {
    text-align: center;
    padding: 60px 20px;
}

.cart-empty i {
    color: #ddd;
    margin-bottom: 20px;
}

.cart-empty p {
    color: #777;
    margin-bottom: 20px;
    font-size: 16px;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.cart-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f5f5f5;
    gap: 15px;
}

.cart-item-image {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    background: #f9f9f9;
    border-radius: 5px;
    overflow: hidden;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-details {
    flex: 1;
    min-width: 0;
}

.cart-item-details h6 {
    margin: 0 0 3px 0;
    font-size: 14px;
    font-weight: 600;
    color: #4a4c70;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-code {
    font-size: 12px;
    color: #999;
    margin: 0 0 8px 0;
}

.cart-item-quantity {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a4c70;
}

.qty-btn:hover {
    background: #f5f5f5;
}

.qty-value {
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.cart-item-total {
    text-align: right;
    flex-shrink: 0;
}

.cart-item-total p {
    font-weight: 600;
    color: #4a4c70;
    margin: 0 0 5px 0;
    font-size: 14px;
}

.remove-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 14px;
    padding: 0;
}

.remove-btn:hover {
    color: #c82333;
}

.cart-sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    background: #fafafa;
    flex-shrink: 0;
}

.cart-subtotal {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 600;
    color: #4a4c70;
    margin-bottom: 5px;
}

.cart-taxes {
    font-size: 12px;
    color: #999;
    margin-bottom: 15px;
}

.cart-actions {
    display: flex;
    gap: 10px;
}

.cart-actions .btn {
    flex: 1;
    padding: 12px;
    font-weight: 600;
    border-radius: 5px;
    font-size: 14px;
}

.cart-actions .btn-outline-secondary {
    background: #fff;
    color: #4a4c70;
    border: 2px solid #4a4c70;
}

.cart-actions .btn-outline-secondary:hover {
    background: #4a4c70;
    color: #fff;
}

.cart-actions .btn-primary {
    background: #FDBE33;
    border: 2px solid #FDBE33;
    color: #4a4c70;
}

.cart-actions .btn-primary:hover {
    background: #e6ab2e;
    border-color: #e6ab2e;
}

/* Cart Icon in Menu */
.cart-icon {
    position: relative;
    display: inline-block;
    cursor: pointer;
    color: #fff;
    font-size: 20px;
    padding: 8px 10px;
}

.cart-icon:hover {
    color: #FDBE33;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FDBE33;
    color: #4a4c70;
    border-radius: 50%;
    padding: 1px 6px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
    display: none;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .cart-item {
        flex-wrap: wrap;
    }
    
    .cart-item-total {
        width: 100%;
        text-align: left;
        padding-left: 85px;
    }
    
    .cart-actions {
        flex-direction: column;
    }
}