/* ===== WRAPPER (SPACE LEFT & RIGHT) ===== */
.wc-modern-wrapper {
    padding: 0 14px;
}

/* ===== GRID ===== */
.wc-modern-grid {
    display: grid !important;
    gap: 24px;
}

/* DESKTOP */
.wc-modern-grid.wc-cols-4 { grid-template-columns: repeat(4,1fr); }
.wc-modern-grid.wc-cols-3 { grid-template-columns: repeat(3,1fr); }
.wc-modern-grid.wc-cols-2 { grid-template-columns: repeat(2,1fr); }

/* ===== CARD ===== */
.wc-modern-card {
    background: #fff;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    transition: .3s;
}

.wc-modern-card:hover {
    transform: translateY(-5px);
}

/* ===== SALE BADGE ===== */
.wc-sale-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg,#dc2626,#ef4444);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    z-index: 3;
}

/* ===== IMAGE (ELEMENTOR FIX) ===== */
.wc-modern-image img,
.elementor .wc-modern-image img {
    width: 100% !important;
    height: 150px !important;
    max-height: 170px !important;
    object-fit: cover !important;
    display: block;
}

/* ===== CONTENT (ALIGN FIX) ===== */
.wc-modern-content {
    padding: 14px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 175px;
}

/* TITLE */
.wc-modern-title {
    font-size: 15px;
    line-height: 1.6em;
    min-height: 40px;
}

.wc-modern-title a {
    color: #1f2937;
    text-decoration: none;
}

/* PRICE */
.wc-modern-price {
    margin: 8px 0 16px; /* CHANGE: افزایش margin پایین برای فاصله بیشتر از دکمه */
    font-size: 15px;
    padding-bottom: 10px;
}

.price-sale {
    color: #dc2626;
    font-weight: 700;
    padding-bottom: 10px;
}

.price-regular {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 13px;
    padding-bottom: 10px;
}

.price-normal {
    font-weight: 700;
}

/* CATEGORY BUTTON */
.wc-cat-btn {
    align-self: center;
    padding: 6px 18px;
    border-radius: 20px;
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    margin-top: 10px; /* CHANGE: اضافه کردن margin بالا برای فاصله از قیمت */
}

/* PSYCHOLOGY COLORS */
.wc-modern-card:nth-child(3n+1) .wc-cat-btn {
    background: linear-gradient(135deg,#16a34a,#22c55e);
    

}
.wc-modern-card:nth-child(3n+2) .wc-cat-btn {
    background: linear-gradient(135deg,#dc2626,#ef4444);

}
.wc-modern-card:nth-child(3n+3) .wc-cat-btn {
    background: linear-gradient(135deg,#facc15,#fde047);
    color:#78350f !important;
   
}

/* ===== MOBILE – ALWAYS 2 COLUMNS (FINAL) ===== */
@media (max-width: 767px) {

    .wc-modern-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 14px;
       
    }

    .wc-modern-wrapper {
        padding: 0 10px;
    }
    
    .wc-modern-pagination {
        margin: 20px 0 10px; /* CHANGE: کاهش margin برای موبایل */
        text-align: center;
    }

    .wc-modern-pagination .page-numbers {
        display: inline-block;
        margin: 0 8px; /* CHANGE: افزایش margin برای جلوگیری از چسبندگی در موبایل */
        padding: 6px 12px; /* CHANGE: کاهش padding برای اندازه کوچکتر در موبایل */
        border-radius: 10px;
        border: 1px solid #ddd;
        text-decoration: none;
        color: #333;
        background: #fff;
        font-size: 14px; /* CHANGE: کاهش اندازه فونت اگر لازم باشد */
    }

    .wc-modern-pagination .current {
        background: #2e7d32;
        color: #fff;
        border-color: #2e7d32;
    }

    /* CHANGE: تقویت فاصله در کارت‌ها برای موبایل */
    .wc-modern-price {
        margin: 8px 0px 10px; /* افزایش بیشتر margin پایین د
        ر موبایل */
       
    }

    .wc-cat-btn {
        margin-top: 20px; /* افزایش margin بالا در موبایل */
    }

}