/* ================================
   کامپیوتر (Base Styles)
   (بدون تغییر از کد شما)
================================ */

/* ================================
   باکس اصلی محصول (محفظه سفید)
================================ */
.woocommerce.archive .site-main {
    background:white;
    border-radius:0px 0px 15px 15px;
    box-shadow:0px 10px 30px 10px rgba(0,0,0,0.12);
    padding:30px;
    margin-top: 55px;
}

/* =========================
Breadcrumb
========================= */

.woocommerce.archive .woocommerce-breadcrumb {
    background: #FBEED5;
    padding: 13px;
    border-radius: 15px 15px 0px 0px;
    box-shadow: 0 0px 30px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #47331B;
    margin-top: -76px;
    margin-left: -30px;
    width: auto;
    float: inline-end; /* یا همان float:right */
}

.woocommerce.archive .woocommerce-breadcrumb a{
    color:#88571C;
    text-decoration:none;
    font-weight:500;
}

.woocommerce.archive .woocommerce-breadcrumb a:hover{
    color:#241708;
}

.woocommerce.archive .woocommerce-breadcrumb{
    display:inline-block;
}


/* =========================
Title (قرینه breadcrumb)
========================= */

.woocommerce-products-header__title {
    background: #FBEED5;
    padding: 15px;
    border-radius: 15px 15px 0px 0px;
    box-shadow: 0 0px 30px rgba(0, 0, 0, 0.1);
    font-size: 14px;
    color: #47331B;
    display: inline-block;
    float: inline-start; /* یا همان float:left */
    font-weight: 500;
    width: auto;
    margin-top: -76px;
    margin-right: -30px;
}

/* =========================
سورت محصولات
========================= */
.woocommerce.archive .woocommerce-ordering select{
    border:2px solid #88571C;
    border-radius:8px;
    padding:6px 10px;
    color:#47331B;
    background:#fff;
}

/* =========================
شمارش تعداد محصول
========================= */
.woocommerce.archive .woocommerce-result-count{
    color:#47331B;
    font-size:14px;
    margin-top:10px;
}

/* =========================
بخش محصولات (ul.products)
========================= */
.woocommerce .products ul,
.woocommerce ul.products {
    margin: 7em 0 0 0;
    /* این margin بالا برای ایجاد فاصله از sort و result است */
}


/* ---------- Product Card (li.product) ---------- */

.woocommerce.archive ul.products li.product{
    background: #FBEED5;
    border-radius: 18px;
    box-sizing: border-box;
    padding: 18px;
    margin: 0px 5px 30px 5px; /* فاصله بین محصولات */
    text-align: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    transition: all .3s ease;
    height: 420px;
    width: calc(25% - 10px); /* این عرض برای دسکتاپ (4 ستونه) است */
}

.woocommerce.archive ul.products li.product:hover{
    transform:translateY(-4px);
    box-shadow:0 8px 20px rgba(0,0,0,0.08);
}


/* تصویر */
.woocommerce.archive ul.products li.product img{
    width:100%;
    height:auto;
    border-radius:12px;
    margin-bottom:14px;
}

/* عنوان محصول */
.woocommerce.archive ul.products li.product .woocommerce-loop-product__title{
    font-size:15px;
    font-weight:600;
    line-height:1.6;
    color:#3D2B1F;
    margin-bottom:10px;
    min-height:48px;
}

/* قیمت */
.woocommerce.archive ul.products li.product .price{
    color:#88571C;
    font-size:16px;
    font-weight:700;
    margin-bottom:14px;
}

/* دکمه */
.woocommerce.archive ul.products li.product .button{
    margin-top:auto;
    background:#88571C;
    color:#fff;
    border:none;
    border-radius:10px;
    padding:10px 14px;
    font-size:14px;
    font-weight:600;
    text-align:center;
    transition:all .25s ease;
}

.woocommerce.archive ul.products li.product .button:hover{
    background:#6F4516;
    color:#fff;
}

/* ======================
pagination
====================== */
.woocommerce nav.woocommerce-pagination{
    margin-top:30px;
}

.woocommerce nav.woocommerce-pagination ul{
    border:none;
}

.woocommerce nav.woocommerce-pagination ul li{
    border:none;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span{
    background:#fff;
    border:1px solid #e2d3b4;
    padding:8px 12px;
    border-radius:8px;
    color:#47331B;
}

.woocommerce nav.woocommerce-pagination ul li span.current{
    background:#88571C;
    color:#fff;
    border-color:#88571C;
}

/* =========================
   Category Divider
   خط چین بعد از محصولات
========================= */

.woocommerce.archive .term-description{
    border-top:4px dashed #3D2B1F; /* قهوه‌ای سوخته تیره */
    padding-top:25px;
}

/* =========================
   Category Description Text
   متن زیر خط چین
========================= */

.woocommerce.archive .term-description{
    font-size:14px;
    line-height:1.9;
    color:#47331B;
    text-align:justify;
}

/* ================================
   تبلت (Tablet - max-width: 1024px)
   ووکامرس ستون‌ها را مدیریت می‌کند
================================ */
@media (max-width:1024px){

    /* باکس اصلی محصول */
    .woocommerce.archive .site-main{
        padding:25px;
        margin-top:60px;
    }

    /* breadcrumb */
    .woocommerce.archive .woocommerce-breadcrumb{
        font-size:13px;
        padding:12px;
        margin-top:-69px;
        margin-left:-25px;
    }

    /* title */
    .woocommerce-products-header__title{
        font-size:13px;
        padding:12px;
        margin-top:-65px;
        margin-right:-25px;
    }

    /* کارت محصولات */
    .woocommerce.archive ul.products li.product{
        height: 430px;
        width: 48%;
        margin: 0 5px 25px 5px;
    }

    /* فاصله بخش محصولات */
    .woocommerce .products ul,
    .woocommerce ul.products{
        margin-top:6em;
    }

}

/* ================================
   موبایل (Mobile - max-width: 767px)
   ووکامرس ستون‌ها را مدیریت می‌کند
================================ */
@media (max-width:767px){

    /* باکس اصلی محصول */
    .woocommerce.archive .site-main{
        padding:20px;
        margin-top:50px;
        border-radius:0 0 12px 12px;
    }

    /* breadcrumb */
    .woocommerce.archive .woocommerce-breadcrumb{
        display:block;
        width:auto; /* عرض خودکار */
        margin: -60px -20px 0 0;
        font-size:13px;
        text-align:center;
        border-radius:12px 12px 0 0;
        padding:10px;
        float: inline-start; /* یا همان float:left */

    }

    /* title */
    .woocommerce-products-header__title{
        display:block;
        width:auto; /* عرض خودکار */
        margin:0 0 10px 0;
        font-size:13px;
        text-align:center;
        border-radius:12px 12px 0 0;
        padding:10px;
        float: inline-end; /* یا همان float:left */
        margin:-55px 0 0 -20px;
    }

    /* sort + result */
    .woocommerce-ordering,
    .woocommerce-result-count{
        float:none;
        text-align:center;
        width:100%;
    }

    .woocommerce-ordering{
        margin-bottom:10px;
    }

    /* کارت محصولات */
    .woocommerce.archive ul.products li.product{
        height:550px;
        width:100%;
        margin:0 auto 20px auto; /* محصولات در مرکز قرار بگیرند */
    }

    /* فاصله لیست محصولات */
    .woocommerce .products ul,
    .woocommerce ul.products{
        margin-top:4em;
    }

}
