﻿.old-price {
    font-size: 13px;
    color: #999;
    text-decoration: line-through;
}


.new-price {
    font-size: 16px;
    color: #3556e5;
    font-weight: 700;
}

.product-card-wrapper {
    padding: 8px;
}

.product-card {
    background: #fff;
    border: 1px solid rgba(135, 86, 146, 0.12);
    border-radius: 22px;
    overflow: hidden;
    transition: 0.3s;
    box-shadow: 0 8px 22px rgba(47, 22, 55, 0.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    padding: 12px;
}

    .product-card:hover {
        transform: translateY(-7px);
        box-shadow: 0 18px 35px rgba(135, 86, 146, 0.18);
        border-color: #875692;
    }

.product-thumb {
    width: 100%;
    height: 180px; /* از 220px کاهش دادم */
    background: #fff;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}


    .product-thumb img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        object-position: center;
        display: block;
        padding: 10px;
    }


.wishlist-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    /* اگر RTL هست بذار right */
    background: white;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    cursor: pointer;
    display: none;
    /*display: flex;*/
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    font-size: 18px;
    color: #aaa;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

    .wishlist-btn:hover {
        transform: scale(1.1);
    }

    .wishlist-btn.active {
        color: gold;
    }



.product-body {
    padding: 10px; /* از 14px کاهش دادم */
}



.price-box {
    display: flex;
    align-items: center;
    gap: 6px; /* از 8px کاهش دادم */
    flex-wrap: wrap;
    margin-bottom: 8px; /* اضافه کردم برای فاصله از دکمه‌ها */
}

.product-actions {
    margin-top: 10px; /* از 14px کاهش دادم */
    display: flex;
    gap: 8px; /* از 10px کاهش دادم */
}




/* =========================
   تلفیق کارت جدید با دکمه Wishlist
========================= */

.product-card {
    position: relative; /* برای قرارگیری مطلق دکمه لایک و بج تخفیف */
}

/* استایل دکمه لایک روی کارت جدید */
.wishlist-btn {
    position: absolute;
    top: 20px;
    right: 20px; /* چون RTL هستیم، دکمه ستاره بالا سمت راست قرار می‌گیرد */
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: none;
    /*display: flex;*/
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 16px;
    color: #875692; /* رنگ بنفش هماهنگ با تم */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    z-index: 11;
}

    .wishlist-btn:hover {
        transform: scale(1.1);
        background: #fff;
        box-shadow: 0 6px 15px rgba(135, 86, 146, 0.2);
    }

    .wishlist-btn.active {
        color: #f1c40f; /* رنگ طلایی ستاره روشن */
    }

/* بج تخفیف بالا سمت چپ قرار می‌گیرد تا با دکمه لایک تداخل نداشته باشد */
.product-discount-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b85cff, #875692);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 8px 20px rgba(135, 86, 146, 0.3);
}

/* استایل اصلی دکمه‌های پایین کارت */
.product-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    width: 100%;
}

.product-btn {
    flex: 1;
    height: 40px;
    border: none;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    transition: 0.25s;
}

.btn-view-product {
    background: #f4edf6;
    color: #6d3d78;
}

    .btn-view-product:hover {
        background: #e8d8ed;
    }

.btn-add-cart {
    background: linear-gradient(135deg, #6d3d78, #875692);
    color: #fff;
}

    .btn-add-cart:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(135, 86, 146, 0.3);
    }

.product-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* بهبود ریسپانسیو دکمه‌ها در موبایل */
@media (max-width: 576px) {
    .wishlist-btn {
        top: 12px;
        right: 12px;
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .product-discount-badge {
        top: 12px;
        left: 12px;
        width: 34px;
        height: 34px;
        font-size: 10px;
    }
}

.product-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
    overflow: hidden;
    background: #faf7fb;
    border-radius: 18px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

    .product-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: 0.35s;
    }

.product-card:hover .product-image img {
    transform: scale(1.07);
}


/* تخفیف */
.product-discount-badge {
    position: absolute;
    top: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #b85cff, #875692);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    z-index: 10;
    box-shadow: 0 8px 20px rgba(135, 86, 146, 0.35);
}

/* محتوا */
.product-info {
    padding: 10px 6px 6px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

/* عنوان */
.product-title {
    margin: 0;
    color: #2f1637;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

/* قیمت */
.product-price-box {
    background: #faf7fb;
    border-radius: 14px;
    padding: 9px 10px;
}

.product-price-row {
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
}

.price-details {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}

.main-price {
    color: #875692;
    font-size: 17px;
    font-weight: 900;
    line-height: 1;
}

.price-unit {
    color: #666;
    font-size: 11px;
    margin-right: 3px;
    line-height: 1.2;
}


/* تبلت */
@media (max-width: 992px) {
    .product-card {
        border-radius: 20px;
    }

    .main-price {
        font-size: 16px;
    }
}

/* موبایل */
@media (max-width: 576px) {
    .products-section {
        margin: 32px auto;
        width: min(1100px, 94%);
    }

    .product-card-wrapper {
        padding: 6px;
    }

    .product-card {
        padding: 10px;
        border-radius: 18px;
        min-height: 100%;
    }

    .product-image {
        border-radius: 14px;
        margin-bottom: 8px;
        aspect-ratio: 1 / 1;
    }

    .product-info {
        gap: 8px;
        padding: 4px 2px 2px;
    }

    .product-title {
        font-size: 12px;
        line-height: 1.7;
        -webkit-line-clamp: 2;
    }

    .product-price-box {
        padding: 8px;
        border-radius: 12px;
    }

    .old-price {
        font-size: 9px;
    }

    .main-price {
        font-size: 13px;
    }

    .price-unit {
        font-size: 9px;
        margin-right: 2px;
    }

    .product-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

        .product-actions .product-btn {
            display: flex !important;
            flex: 0 0 calc(50% - 4px) !important;
            width: calc(50% - 4px) !important;
            max-width: calc(50% - 4px) !important;
            min-width: 0 !important;
            height: 36px;
            padding: 0 6px;
            font-size: 11px;
            border-radius: 12px;
            gap: 4px;
            white-space: nowrap;
            align-items: center;
            justify-content: center;
        }

    .product-btn i,
    .product-btn svg {
        font-size: 13px;
        width: 13px;
        height: 13px;
        flex-shrink: 0;
    }

    .product-btn span {
        display: inline !important;
        font-size: 10px;
        line-height: 1;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .product-discount-badge {
        top: 16px;
        left: 16px;
        width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 10px;
    }
}




/* =========================
   Empty State
========================= */
.empty-state {
    width: min(1100px, 92%);
    margin: 16px auto 0;
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px dashed #ddd;
    color: #666;
    text-align: center;
    font-size: 14px;
}


@media (max-width: 992px) {


    .product-card {
        border-radius: 20px;
    }

    .main-price {
        font-size: 16px;
    }
}

@media (max-width: 576px) {


    .product-card {
        padding: 10px;
        border-radius: 18px;
    }

    .product-badge {
        top: 10px;
        right: 10px;
        font-size: 10px;
        padding: 6px 8px;
    }

    .product-discount-badge {
        top: 10px;
        left: 10px;
        min-width: 36px;
        height: 36px;
        border-radius: 12px;
        font-size: 10px;
    }

    .product-image {
        border-radius: 14px;
    }

    .product-info {
        gap: 8px;
        padding-top: 12px;
    }


    .product-meta {
        gap: 6px;
    }

    .product-rating,
    .product-stock {
        font-size: 10px;
        padding: 4px 8px;
    }

    .product-price-box {
        padding: 10px;
        border-radius: 14px;
    }

    .main-price {
        font-size: 14px;
    }

    .old-price {
        font-size: 10.5px;
    }

    .price-unit,
    .product-price-note {
        font-size: 10px;
    }

    .product-actions {
        flex-direction: column;
        gap: 8px;
    }

    .product-btn {
        width: 100%;
        height: 38px;
        font-size: 11px;
        border-radius: 12px;
        gap: 6px;
    }
}


