/* =========================================================
   DIDAF SHOP - FINAL DESIGN
========================================================= */

:root{
    --didaf-red:#ed1c24;
    --didaf-text:#222;
    --didaf-muted:#777;
    --didaf-border:#eeeeee;
    --didaf-light:#f7f7f7;
}


/* =========================================================
   SHOP HEADER
========================================================= */

.didaf-shop-header{
    width:100%;
    background:#fff;
    padding:35px 20px 20px;
    box-sizing:border-box;
}

.didaf-shop-header-inner{
    width:1200px;
    max-width:100%;
    margin:0 auto;
    text-align:right;
    direction:rtl;
}

.didaf-shop-title{
    margin:0 0 18px;
    font-size:25px;
    line-height:1.5;
    font-weight:800;
    color:#202020;
}


/* =========================================================
   CATEGORY PILLS
========================================================= */

.didaf-shop-categories{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:8px;
}

.didaf-shop-category{
    display:inline-flex;
    align-items:center;
    justify-content:center;

    min-height:32px;
    padding:0 14px;

    background:#f7f7f7;
    border:1px solid #f0f0f0;
    border-radius:18px;

    color:#777;
    text-decoration:none;

    font-size:11px;
    line-height:1;

    transition:
        background .25s ease,
        color .25s ease,
        border-color .25s ease,
        transform .25s ease;
}

.didaf-shop-category:hover{
    background:#fff;
    border-color:var(--didaf-red);
    color:var(--didaf-red);
    transform:translateY(-2px);
}


/* =========================================================
   MAIN SHOP WRAPPER
========================================================= */

.shop-wrapper{
    width:1200px;
    max-width:calc(100% - 40px);

    margin:0 auto;

    display:grid;

    grid-template-columns:minmax(0,1fr) 250px;

    gap:35px;

    align-items:start;

    direction:ltr;

    padding:25px 0 80px;
}

.shop-main{
    min-width:0;
    direction:rtl;
}

.shop-sidebar{
    width:250px;
    min-width:250px;
    direction:rtl;
}


/* =========================================================
   TOP BAR
========================================================= */

.wc-topbar{
    width:100%;

    min-height:42px;

    display:flex;
    align-items:center;
    justify-content:space-between;

    gap:20px;

    margin-bottom:20px;

    direction:rtl;
}

.wc-topbar-right{
    flex:1;
    min-width:0;
}


.wc-topbar-right .woocommerce-breadcrumb a{
    color:#777;
    text-decoration:none;
}

.wc-topbar-left{
    display:flex;
    align-items:center;
    direction:rtl;
}


/* =========================================================
   REMOVE PER PAGE NUMBERS
========================================================= */

.wc-per-page{
    display:none !important;
}


/* =========================================================
   SORTING
========================================================= */

.woocommerce-ordering{
    margin:0 !important;
    float:none !important;
}

.woocommerce-ordering select{
    width:175px;
    height:36px;

    border:1px solid #eeeeee;
    border-radius:18px;

    background:#fafafa;

    color:#777;

    padding:0 13px;

    font-family:inherit;
    font-size:11px;

    outline:none;

    cursor:pointer;
}

.woocommerce-ordering select:focus{
    border-color:#ddd;
}


/* =========================================================
   PRODUCT GRID
========================================================= */

.products-grid{
    width:100%;

    display:grid;

    grid-template-columns:
        repeat(3,minmax(0,1fr));

    gap:18px;

    align-items:start;
}


/* =========================================================
   PRODUCT CARD
========================================================= */

.product-card{
    position:relative;

    width:100%;

    min-width:0;

    background:#fff;

    border:1px solid #eeeeee;

    border-radius:12px;

    padding:20px 10px 42px;

    box-sizing:border-box;

    overflow:hidden;

    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

.product-card:hover{
    transform:translateY(5px);

    border-color:#e8e8e8;

    box-shadow:
        0 12px 30px rgba(0,0,0,.06);
}


/* =========================================================
   PRODUCT IMAGE
   بدون کادر قرمز
========================================================= */

.product-image-link{
    display:block;

    text-decoration:none;

    color:inherit;
}

.product-image{
    width:100%;
    height:185px;

    display:flex;
    align-items:center;
    justify-content:center;

    background:#fff;

    border:0 !important;

    border-radius:8px;

    overflow:hidden;

    box-sizing:border-box;
}

.product-image img{
    width:100%;
    height:100%;

    object-fit:contain;

    padding:8px;

    border:0 !important;

    display:block;

    transition:transform .35s ease;
}

.product-card:hover .product-image img{
   transform:none !important;
}


/* =========================================================
   PRODUCT CONTENT
========================================================= */

.product-card-content{
    padding:0 5px;
    direction:rtl;
}


/* =========================================================
   TITLE
========================================================= */

.product-title{
    margin:10px 0 7px;

    min-height:38px;

    font-size:12px;

    line-height:1.8;

    font-weight:700;

    text-align:right;
}

.product-title a{
    color:#292929;

    text-decoration:none;

    transition:color .2s ease;
}

.product-title a:hover{
    color:var(--didaf-red);
}


/* =========================================================
   SHORT DESCRIPTION
========================================================= */

.product-short-description{
    height:45px;

    overflow:hidden;

    margin:0 0 8px;

    color:#888;

    font-size:10px;

    line-height:1.9;

    text-align:right;
}


/* =========================================================
   PRICE
========================================================= */

.product-price{
    min-height:20px;

    margin:4px 0 5px;

    text-align:right;

    font-size:11px;

    font-weight:700;
}

.product-price del{
    color:#aaa;

    font-size:9px;

    margin-left:4px;
}

.product-price ins{
    color:var(--didaf-red);

    text-decoration:none;
}


/* =========================================================
   PLUS BUTTON
========================================================= */

.product-more-btn{
    position:absolute;

    left:10px;
    bottom:10px;

    width:32px;
    height:32px;

    display:flex;

    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:#f4f4f4;

    color:#777;

    text-decoration:none;

    transition:
        background .25s ease,
        color .25s ease,
        transform .25s ease;
}

.product-more-btn span{
    display:block;

    font-size:20px;

    font-weight:300;

    line-height:1;

    margin-top:-2px;
}

.product-more-btn:hover{
    background:var(--didaf-red);

    color:#fff;

    transform:scale(1.08);
}


/* =========================================================
   DISCOUNT
========================================================= */

.discount-badge{
    position:absolute;

    top:12px;
    right:12px;

    z-index:5;

    background:var(--didaf-red);

    color:#fff;

    font-size:9px;

    padding:4px 7px;

    border-radius:10px;
}


/* =========================================================
   SIDEBAR
========================================================= */

.shop-sidebar{

    width:296px !important;
    min-width:296px !important;

    direction:rtl;

  
    top:20px;

    box-sizing:border-box;
}


/* =========================================================
   GENERAL BOX
========================================================= */

.shop-sidebar .sidebar-box{

    width:296px;

    margin:0 0 27px;
    padding:0;

    box-sizing:border-box;

    background:#f2f2f2;

    border:1px solid #dcdcdc;

    border-radius:17px;

    overflow:hidden;
}


/* =========================================================
   SEARCH BOX
========================================================= */

.shop-sidebar .sidebar-search-box{

    height:92px;

    padding:14px;

    background:#f1f1f1;

    border:1px solid #dcdcdc;
}


/* فرم */

.sidebar-search-form{

    width:100%;
    height:62px;

    position:relative;
}


/* =========================================================
   SEARCH FORM
========================================================= */

.sidebar-search-form form{

    width:100%;
    height:62px;

    margin:0;
    padding:0;

    position:relative;
}


/* =========================================================
   SEARCH INPUT
========================================================= */

.sidebar-search-form input[type="search"]{

    width:100% !important;
    height:62px !important;

    padding:0 18px 0 68px !important;

    box-sizing:border-box;

    border:0 !important;

    border-radius:14px !important;

    background:#fff !important;

    color:#333 !important;

    font-family:inherit !important;

    font-size:13px !important;

    text-align:right !important;

    outline:none !important;

    box-shadow:none !important;
}


.sidebar-search-form input[type="search"]::placeholder{

    color:#777;

    opacity:1;
}


/* =========================================================
   SEARCH BUTTON
========================================================= */

.sidebar-search-form button{

    position:absolute !important;

    left:5px !important;
    top:50% !important;

    transform:translateY(-50%) !important;

    width:52px !important;
    height:52px !important;

    padding:0 !important;
    margin:0 !important;

    border:0 !important;

    border-radius:50% !important;

    background:#ed1c24 !important;

    color:transparent !important;

    font-size:0 !important;

    display:flex !important;

    align-items:center !important;
    justify-content:center !important;

    cursor:pointer;

    z-index:10;
}


/* ذره بین */

.sidebar-search-form button::before{

    content:"";

    width:19px;
    height:19px;

    border:2px solid #fff;

    border-radius:50%;

    box-sizing:border-box;
}


/* دسته ذره بین */

.sidebar-search-form button::after{

    content:"";

    position:absolute;

    width:8px;
    height:2px;

    background:#fff;

    border-radius:2px;

    left:32px;
    top:34px;

    transform:rotate(45deg);
}


/* =========================================================
   PRICE FILTER
========================================================= */

.shop-sidebar .sidebar-price-box{

    min-height:231px;

    padding:0;

    background:#f3f3f3;
}


/* خود ویجت */

.sidebar-price-box .widget_price_filter{

    margin:0 !important;

    padding:0 !important;

    background:transparent !important;

    border:0 !important;
}


/* =========================================================
   PRICE TITLE
========================================================= */

.sidebar-price-box .widget_price_filter .widget-title{

    width:100%;

    min-height:90px;

    margin:0 !important;

    padding:18px 20px !important;

    box-sizing:border-box;

    display:flex;

    align-items:center;
    justify-content:center;

    border:0 !important;

    border-bottom:1px solid #d5d5d5 !important;

    color:#222 !important;

    font-family:inherit !important;

    font-size:16px !important;

    font-weight:700 !important;

    line-height:1.5 !important;

    text-align:center !important;
}


/* =========================================================
   PRICE CONTENT
========================================================= */

.sidebar-price-box .price_slider_wrapper{

    padding:20px 12px 15px !important;

    background:transparent !important;

    box-sizing:border-box;
}


/* =========================================================
   PRICE SLIDER
========================================================= */

.sidebar-price-box .price_slider{

    height:10px !important;

    margin:0 0 25px !important;

    background:#d1d1d1 !important;

    border:0 !important;

    border-radius:0 !important;

    box-shadow:none !important;
}


/* محدوده */

.sidebar-price-box .price_slider .ui-slider-range{

    height:10px !important;

    background:#cfcfcf !important;

    border:0 !important;

    border-radius:0 !important;
}


/* دستگیره */

.sidebar-price-box .price_slider .ui-slider-handle{

    width:16px !important;
    height:16px !important;

    top:-3px !important;

    margin:0 !important;

    box-sizing:border-box;

    background:#fff !important;

    border:2px solid #c7c7c7 !important;

    border-radius:50% !important;

    box-shadow:none !important;
}


/* =========================================================
   PRICE AMOUNT
========================================================= */

.sidebar-price-box .price_slider_amount{

    display:flex !important;

    align-items:center !important;

    justify-content:space-between !important;

    gap:8px;

    margin:0 !important;

    padding:0 !important;
}


/* قیمت */

.sidebar-price-box .price_label{

    color:#777 !important;

    font-family:inherit !important;

    font-size:10px !important;

    line-height:1.8;
}


/* دکمه فیلتر */

.sidebar-price-box .price_slider_amount .button{

    height:34px !important;

    padding:0 15px !important;

    margin:0 !important;

    border:0 !important;

    border-radius:17px !important;

    background:#e8e8e8 !important;

    color:#555 !important;

    font-family:inherit !important;

    font-size:10px !important;

    box-shadow:none !important;
}


/* =========================================================
   BEST SELLING PRODUCTS
========================================================= */

.shop-sidebar .sidebar-products-box{

    min-height:180px;

    padding:0;

    background:#f1f1f1;

    border:1px solid #e0e0e0;

    border-radius:17px;
}


/* =========================================================
   PRODUCTS TITLE
========================================================= */

.sidebar-custom-title{

    width:100%;

    min-height:70px;

    margin:0;

    padding:0 15px;

    box-sizing:border-box;

    display:flex;

    align-items:center;
    justify-content:center;

    color:#222;

    font-family:inherit;

    font-size:16px;

    font-weight:700;

    text-align:center;
}


/* =========================================================
   PRODUCTS WIDGET
========================================================= */

.sidebar-products-box .widget_products{

    margin:0 !important;

    padding:0 17px 15px !important;

    background:transparent !important;

    border:0 !important;
}


/* عنوان داخلی ووکامرس حذف */

.sidebar-products-box .widget_products .widget-title{

    display:none !important;
}


/* =========================================================
   PRODUCT LIST
========================================================= */

.sidebar-products-box ul.product_list_widget{

    margin:0 !important;

    padding:0 !important;

    list-style:none !important;
}


/* هر محصول */

.sidebar-products-box ul.product_list_widget li{

    display:flex !important;

    align-items:center !important;

    gap:10px;

    min-height:75px;

    padding:10px 0 !important;

    margin:0 !important;

    border-bottom:1px solid #ddd !important;

    box-sizing:border-box;
}


/* آخرین */

.sidebar-products-box ul.product_list_widget li:last-child{

    border-bottom:0 !important;
}


/* تصویر */

.sidebar-products-box ul.product_list_widget li img{

    width:55px !important;
    height:55px !important;

    margin:0 !important;

    object-fit:contain !important;

    background:#fff;

    border-radius:7px;
}


/* متن */

.sidebar-products-box ul.product_list_widget li a{

    flex:1;

    color:#555 !important;

    font-family:inherit !important;

    font-size:11px !important;

    line-height:1.8 !important;

    text-decoration:none !important;
}


.sidebar-products-box ul.product_list_widget li a:hover{

    color:#ed1c24 !important;
}


/* قیمت */

.sidebar-products-box .woocommerce-Price-amount{

    font-size:10px;
}


/* =========================================================
   CLOSE BUTTON
========================================================= */

.close-sidebar{

    display:none;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width:1100px){

    .shop-sidebar{

        width:250px !important;
        min-width:250px !important;
    }


    .shop-sidebar .sidebar-box{

        width:250px;
    }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width:850px){

    .shop-sidebar{

        position:fixed;

        top:0;
        right:-320px;

        width:300px !important;
        min-width:300px !important;

        height:100vh;

        padding:60px 2px 25px;

        box-sizing:border-box;

        background:#fff;

        z-index:99999;

        overflow-y:auto;

        box-shadow:-8px 0 30px rgba(0,0,0,.12);

        transition:right .3s ease;
    }


    body.filter-open .shop-sidebar{

        right:0;
    }


    .shop-sidebar .sidebar-box{

        width:296px;

        margin-left:auto;
        margin-right:auto;
    }


    .close-sidebar{

        display:block;

        position:absolute;

        top:15px;
        right:15px;

        padding:7px 13px;

        border:0;

        border-radius:20px;

        background:#f5f5f5;

        color:#555;

        font-family:inherit;

        font-size:11px;

        cursor:pointer;
    }

}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width:330px){

    .shop-sidebar{

        width:100% !important;
        min-width:100% !important;

        right:-100%;
    }


    .shop-sidebar .sidebar-box{

        width:calc(100% - 20px);
    }

}
/* =========================================================
   PAGINATION
========================================================= */
.pagination {
    margin-top: 65px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* حذف استایل پیش فرض ووکامرس */
.pagination .woocommerce-pagination ul.page-numbers {
    list-style: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

/* هر آیتم */
.pagination .woocommerce-pagination ul.page-numbers li {
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* دایره‌ها */
.pagination .woocommerce-pagination ul.page-numbers li a,
.pagination .woocommerce-pagination ul.page-numbers li span {
    width: 43px !important;
    height: 43px !important;
    min-width: 43px !important;
    min-height: 43px !important;

    padding: 0 !important;
    margin: 0 !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    box-sizing: border-box !important;

    border: 0 !important;
    border-radius: 50% !important;

    background: #f2f2f2 !important;
    color: #888 !important;

    text-decoration: none !important;
    font-size: 13px !important;
    line-height: 1 !important;
}

/* شماره صفحه فعال */
.pagination .woocommerce-pagination ul.page-numbers li span.current {
    background: #eee !important;
    color: #555 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,.06);
}
/* =========================================================
   EMPTY
========================================================= */

.custom-empty-products{
    width:100%;

    min-height:180px;

    display:flex;

    align-items:center;
    justify-content:center;

    background:#fafafa;

    border:1px solid #eee;

    border-radius:15px;

    color:#777;

    font-size:13px;
}


/* =========================================================
   CATEGORY DESCRIPTION
========================================================= */

.archive-category-description{
    margin-top:30px;

    padding:25px;

    background:#fafafa;

    border:1px solid #eee;

    border-radius:14px;

    color:#666;

    line-height:2;

    font-size:12px;
}


/* =========================================================
   MOBILE FILTER
========================================================= */

.mobile-filter-btn{
    display:none;
}

.close-sidebar{
    display:none;
}

/* =========================================================
   RESPONSIVE - TABLET
========================================================= */

@media (max-width: 1100px) {

    .shop-wrapper {
        width: 100%;
        max-width: calc(100% - 30px);
        grid-template-columns: minmax(0, 1fr) 220px;
        gap: 22px;
    }

    .shop-sidebar {
        width: 220px !important;
        min-width: 220px !important;
    }

    .shop-sidebar .sidebar-box {
        width: 220px;
    }

    .products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .product-image {
        height: 180px;
    }

    .didaf-shop-header {
        padding-left: 15px;
        padding-right: 15px;
    }

}


/* =========================================================
   TABLET / MOBILE
   SIDEBAR -> DRAWER
========================================================= */

@media (max-width: 850px) {

    /* =========================
       SHOP HEADER
    ========================= */

    .didaf-shop-header {
        padding: 25px 15px 15px;
    }

    .didaf-shop-header-inner {
        width: 100%;
    }

    .didaf-shop-title {
        font-size: 20px;
        margin-bottom: 15px;
    }


    /* =========================
       CATEGORY SCROLL
    ========================= */

    .didaf-shop-categories {

        width: 100%;

        display: flex;

        flex-wrap: nowrap;

        overflow-x: auto;

        overflow-y: hidden;

        justify-content: flex-start;

        gap: 8px;

        padding-bottom: 7px;

        scrollbar-width: none;

        -ms-overflow-style: none;
    }

    .didaf-shop-categories::-webkit-scrollbar {
        display: none;
    }

    .didaf-shop-category {
        flex: 0 0 auto;
        white-space: nowrap;
    }


    /* =========================
       MAIN WRAPPER
    ========================= */

    .shop-wrapper {

        width: 100%;

        max-width: calc(100% - 30px);

        margin: 0 auto;

        display: block;

        padding: 20px 0 60px;
    }


    /* =========================
       MAIN
    ========================= */

    .shop-main {
        width: 100%;
        min-width: 0;
    }


    /* =========================
       TOP BAR
    ========================= */

    .wc-topbar {

        width: 100%;

        display: flex;

        flex-direction: column;

        align-items: stretch;

        justify-content: flex-start;

        gap: 12px;

        margin-bottom: 15px;
    }

    .wc-topbar-right {
        width: 100%;
    }

    .wc-topbar-left {

        width: 100%;

        display: flex;

        justify-content: flex-start;
    }

    .woocommerce-ordering {
        width: 100%;
    }

    .woocommerce-ordering select {

        width: 100%;

        height: 40px;
    }


    /* =========================
       FILTER BUTTON
    ========================= */

    .mobile-filter-btn {

        display: flex;

        width: 100%;

        height: 44px;

        align-items: center;

        justify-content: center;

        margin: 0 0 18px;

        padding: 0 15px;

        border: 1px solid #e5e5e5;

        border-radius: 22px;

        background: #f5f5f5;

        color: #555;

        font-family: inherit;

        font-size: 12px;

        font-weight: 600;

        cursor: pointer;

        transition: .2s ease;
    }

    .mobile-filter-btn:hover {

        background: #ed1c24;

        border-color: #ed1c24;

        color: #fff;
    }


    /* =========================
       PRODUCTS
    ========================= */

    .products-grid {

        width: 100%;

        display: grid;

        grid-template-columns: repeat(2, minmax(0, 1fr));

        gap: 14px;
    }

    .product-card {

        width: 100%;

        min-width: 0;

        padding: 15px 9px 42px;

        border-radius: 14px;
    }

    .product-image {

        width: 100%;

        height: 180px;
    }

    .product-image img {

        width: 100%;

        height: 100%;

        padding: 7px;
    }

    .product-title {

        font-size: 12px;

        line-height: 1.8;

        min-height: 42px;
    }

    .product-short-description {

        font-size: 10px;

        line-height: 1.8;
    }


    /* =========================
       SIDEBAR DRAWER
    ========================= */

    .shop-sidebar {

        position: fixed !important;

        top: 0;

        right: -320px;

        width: 300px !important;

        min-width: 300px !important;

        height: 100vh;

        padding: 60px 15px 30px;

        margin: 0;

        background: #fff;

        z-index: 99999;

        overflow-x: hidden;

        overflow-y: auto;

        box-shadow: -8px 0 30px rgba(0,0,0,.15);

        transition: right .3s ease;
    }

    body.filter-open .shop-sidebar {

        right: 0;
    }


    /* =========================
       SIDEBAR BOX
    ========================= */

    .shop-sidebar .sidebar-box {

        width: 100% !important;

        max-width: 100%;

        margin-left: 0;

        margin-right: 0;
    }


    /* =========================
       CLOSE BUTTON
    ========================= */

    .close-sidebar {

        display: flex !important;

        position: absolute;

        top: 15px;

        right: 15px;

        width: auto;

        min-height: 34px;

        align-items: center;

        justify-content: center;

        padding: 6px 13px;

        border: 0;

        border-radius: 20px;

        background: #f2f2f2;

        color: #555;

        font-family: inherit;

        font-size: 11px;

        cursor: pointer;

        z-index: 20;
    }


    /* =========================
       OVERLAY
    ========================= */

    .didaf-filter-overlay {

        position: fixed;

        inset: 0;

        background: rgba(0,0,0,.35);

        z-index: 99998;

        opacity: 0;

        visibility: hidden;

        pointer-events: none;

        transition: .3s ease;
    }

    body.filter-open .didaf-filter-overlay {

        opacity: 1;

        visibility: visible;

        pointer-events: auto;
    }


    /* =========================
       BODY
    ========================= */

    body.filter-open {

        overflow: hidden;
    }


    /* =========================
       PAGINATION
    ========================= */

    .pagination {

        margin-top: 40px;
    }

    .pagination .woocommerce-pagination ul.page-numbers {

        gap: 7px !important;

        flex-wrap: wrap;
    }

}

