/**
 * Cart List Page Styles
 * استایل‌های صفحه سبد خرید
 */

/* Loading Box */
.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-box .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #310ffb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-box p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Error Box */
.error-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.error-box .icon {
    width: 80px;
    height: 80px;
    background: #fee;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.error-box .icon i {
    font-size: 40px;
    color: #e74c3c;
}

.error-box h6 {
    color: #333;
    font-size: 18px;
    margin-bottom: 20px;
}

.error-box .btns-action {
    margin-top: 10px;
}

/* Cart Item Enhancements */
.cart-item {
    position: relative;
    transition: all 0.3s ease;
}

.cart-item:hover {
    background: #f9f9f9;
}

.cart-item .btn-delete {
    background: transparent;
    border: 1px solid #ddd;
    color: #e74c3c;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cart-item .btn-delete:hover {
    background: #fee;
    border-color: #e74c3c;
}

.cart-item .btn-delete i {
    font-size: 18px;
}

/* Quantity Controls */
.number-products {
    display: flex;
    align-items: center;
    gap: 10px;
}

.number-inner {
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.number-inner .btn-plus {
    background: transparent;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #666;
}

.number-inner .btn-plus:hover {
    background: #f5f5f5;
    color: #310ffb;
}

.number-inner .btn-plus:active {
    background: #e8e8e8;
}

.number-inner .quantity-input {
    width: 50px;
    text-align: center;
    border: none;
    border-left: 1px solid #ddd;
    border-right: 1px solid #ddd;
    padding: 8px 5px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

/* Price Content */
.price-content {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.price-content .discount {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-content .discount .del {
    text-decoration: line-through;
    color: #999;
    font-size: 14px;
    font-weight: 400;
}

.price-content .discount .percentage {
    background: #e74c3c;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.price-content h3 {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
}

/* Property List */
.property-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 12px 0;
}

.property-list .color {
    display: flex;
    align-items: center;
    gap: 8px;
}

.property-list .color .circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #ddd;
}

.property-list .color .desc,
.property-list ul li {
    font-size: 14px;
    color: #666;
}

.property-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.property-list ul li {
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-list ul li i {
    font-size: 14px;
    color: #999;
}

/* Summary Enhancements */
.checkout-side {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
}

.price-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.price-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.price-list li:last-child {
    border-bottom: none;
}

.price-list li .title {
    font-size: 14px;
    color: #666;
}

.price-list li .number {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.price-list li .number.red {
    color: #e74c3c;
}

.price-list li .number.small {
    font-size: 14px;
    font-weight: 400;
    color: #999;
}

.total-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-top: 2px solid #310ffb;
    border-bottom: 2px solid #310ffb;
    margin-bottom: 15px;
}

.total-price .title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.total-price .number {
    font-size: 22px;
    font-weight: 700;
    color: #310ffb;
}

.cart-msg {
    display: block;
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .cart-item .data {
        padding: 15px;
    }

    .cart-item .name {
        font-size: 14px;
    }

    .info-inner {
        flex-direction: column;
        gap: 15px;
    }

    .number-products {
        width: 100%;
        justify-content: space-between;
    }

    .price-content {
        width: 100%;
        align-items: flex-start;
    }

    .price-content h3 {
        font-size: 18px;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cart-item {
    animation: fadeIn 0.3s ease;
}

/* Disabled State */
.cart-item.loading {
    opacity: 0.6;
    pointer-events: none;
}

.cart-item.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}