/* filename: assets/css/cart.css */

/* ================================
   تنظیمات صفحه سبد خرید
================================ */

.cart-container {
    width: 100%;
    max-width: 1180px;
    margin: 30px auto 60px;
    padding: 0 20px;
    box-sizing: border-box;
    direction: rtl;
    font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
}

/* عنوان صفحه */
.cart-title {
    margin: 0 0 25px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    font-size: 28px;
    font-weight: 800;
    line-height: 1.7;
}

/* ================================
   وضعیت سبد خالی
================================ */

.cart-empty {
    width: 100%;
    margin: 25px 0 20px;
    padding: 50px 25px;
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background-color: #ffffff;
    color: #64748b;
    font-size: 16px;
    line-height: 2;
    text-align: center;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.cart-empty-actions {
    width: 100%;
    margin: 20px 0 35px;
    text-align: center;
}

.cart-store-button {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 9px;
    background-color: #6366f1;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.8;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cart-store-button:hover {
    background-color: #4f46e5;
    transform: translateY(-1px);
}

/* ================================
   فهرست محصولات
================================ */

.cart-items-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

/* کارت محصول */
.cart-item {
    display: flex;
    align-items: center;
    gap: 22px;
    width: 100%;
    min-height: 155px;
    padding: 20px;
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cart-item:hover {
    border-color: #c7d2fe;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.10);
}

/* تصویر محصول */
.cart-item-image {
    width: 130px;
    height: 130px;
    flex: 0 0 130px;
    object-fit: contain;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    background-color: #f8fafc;
}

/* بخش جزئیات محصول */
.cart-item-details {
    flex: 1 1 auto;
    min-width: 0;
}

/* نام محصول */
.cart-item-name {
    margin: 0 0 12px;
    color: #0f172a;
    font-size: 19px;
    font-weight: 700;
    line-height: 1.8;
}

/* قیمت محصول */
.cart-item-price {
    margin: 0 0 9px;
    color: #4f46e5;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.8;
}

/* تعداد محصول */
.cart-item-quantity {
    margin: 0 0 15px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.8;
}

/* فرم تغییر تعداد */
.cart-item-form {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
}

/* دکمه‌های افزایش و کاهش */
.qty-btn {
    min-width: 70px;
    min-height: 37px;
    padding: 7px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: #ffffff;
    color: #475569;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.5;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.qty-btn:hover {
    border-color: #6366f1;
    background-color: #eef2ff;
    color: #4f46e5;
}

/* دکمه حذف */
.cart-remove-button {
    border-color: #fecaca;
    color: #ef4444;
}

.cart-remove-button:hover {
    border-color: #ef4444;
    background-color: #fef2f2;
    color: #dc2626;
}

/* ================================
   خلاصه سفارش
================================ */

.cart-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    width: 100%;
    margin: 25px 0 35px;
    padding: 22px 24px;
    box-sizing: border-box;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.cart-summary-total {
    margin: 0;
    color: #334155;
    font-size: 17px;
    font-weight: 700;
    line-height: 2;
}

.cart-summary-total strong {
    color: #4f46e5;
    font-size: 18px;
    font-weight: 800;
}

/* دکمه ادامه خرید */
.cart-continue-button {
    display: inline-block;
    min-width: 205px;
    padding: 13px 24px;
    box-sizing: border-box;
    border: 0;
    border-radius: 9px;
    background-color: #6366f1;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.8;
    text-align: center;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.cart-continue-button:hover {
    background-color: #4f46e5;
    transform: translateY(-1px);
}

/* ================================
   واکنش‌گرایی
================================ */

@media (max-width: 768px) {
    .cart-container {
        margin-top: 24px;
        padding: 0 15px;
    }

    .cart-title {
        font-size: 24px;
    }

    .cart-item {
        align-items: flex-start;
        gap: 16px;
        padding: 16px;
    }

    .cart-item-image {
        width: 110px;
        height: 110px;
        flex-basis: 110px;
    }

    .cart-item-name {
        font-size: 17px;
    }

    .cart-item-price {
        font-size: 16px;
    }

    .cart-summary {
        padding: 20px;
    }
}

@media (max-width: 560px) {
    .cart-container {
        margin: 20px auto 40px;
        padding: 0 10px;
    }

    .cart-title {
        margin-bottom: 18px;
        font-size: 22px;
    }

    .cart-item {
        display: block;
        min-height: 0;
        padding: 15px;
        text-align: right;
    }

    .cart-item-image {
        display: block;
        width: 150px;
        height: 150px;
        margin: 0 auto 16px;
    }

    .cart-item-name {
        font-size: 16px;
    }

    .cart-item-price {
        font-size: 15px;
    }

    .cart-summary {
        display: block;
        padding: 18px;
        text-align: center;
    }

    .cart-summary-total {
        margin-bottom: 18px;
        font-size: 15px;
    }

    .cart-summary-total strong {
        font-size: 16px;
    }

    .cart-continue-button {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .cart-empty {
        padding: 38px 18px;
        font-size: 14px;
    }
}
