/* Custom Cart Styles */

.custom-cart-wrapper {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    direction: rtl;
    text-align: right;
}

.custom-cart-title {
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    font-size: 24px;
    color: #333;
}

.custom-cart-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
    font-size: 18px;
}

.custom-cart-items {
    margin-bottom: 20px;
}

.custom-cart-item {
    display: flex;
    align-items: center;
    padding: 15px;
    margin-bottom: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e8e8e8;
    transition: all 0.3s ease;
    position: relative;
}

.custom-cart-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-color: #d0d0d0;
}

.custom-cart-item-image {
    width: 80px;
    height: 80px;
    margin-left: 15px;
    flex-shrink: 0;
}

.custom-cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.custom-cart-item-details {
    flex: 1;
    min-width: 0;
}

.custom-cart-item-name {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
}

.custom-cart-item-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.custom-cart-item-name a:hover {
    color: #0073aa;
}

.custom-cart-item-price {
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.custom-cart-quantity {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.custom-cart-quantity:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.custom-cart-remove {
    background: #dc3545;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.custom-cart-remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.custom-cart-footer {
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.custom-cart-total {
    font-size: 20px;
    color: #333;
}

.custom-cart-count {
    font-size: 14px;
    color: #666;
    font-weight: normal;
    margin-right: 10px;
}

.custom-cart-checkout-btn,
.custom-cart-clear-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.custom-cart-checkout-btn {
    background: #28a745;
    color: white;
}

.custom-cart-checkout-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.custom-cart-clear-btn {
    background: #6c757d;
    color: white;
}

.custom-cart-clear-btn:hover {
    background: #5a6268;
}

/* Add to Cart Button */
.custom-cart-add-btn {
    padding: 10px 20px;
    background: #0073aa;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    direction: rtl;
}

.custom-cart-add-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 115, 170, 0.3);
}

.custom-cart-add-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

/* Loading state */
.custom-cart-loading {
    opacity: 0.6;
    pointer-events: none;
}

.custom-cart-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0073aa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success message */
.custom-cart-message {
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-size: 14px;
}

.custom-cart-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.custom-cart-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 768px) {
    .custom-cart-wrapper {
        padding: 15px;
    }
    
    .custom-cart-item {
        flex-wrap: wrap;
    }
    
    .custom-cart-item-image {
        width: 60px;
        height: 60px;
    }
    
    .custom-cart-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .custom-cart-checkout-btn,
    .custom-cart-clear-btn {
        width: 100%;
    }
}

