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

.category-section{
    margin:40px 0;
    direction:rtl;
}


/* Heading */

.category-heading{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin-bottom:28px;
}

.category-title{
    position:relative;
    margin:0;
    padding-right:16px;
    color:#222;
    font-size:20px;
    font-weight:800;
    line-height:1.7;
}

.category-title::before{
    content:"";
    position:absolute;
    top:50%;
    right:0;
    width:4px;
    height:24px;
    border-radius:20px;
    background:#D32F2F;
    transform:translateY(-50%);
}

.category-subtitle{
    color:#999;
    font-size:12px;
    font-weight:500;
}


/* Category Card */

.category-card{
    display:flex;
    flex-direction:column;
    height:100%;
    overflow:hidden;
    border:1px solid #eee;
    border-radius:12px;
    background:#fff;
    color:#333;
    text-decoration:none;
    box-shadow:0 3px 15px rgba(0,0,0,.035);
    transition:
        transform .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}

.category-card:hover{
    border-color:#e4e4e4;
    color:#333;
    box-shadow:0 12px 30px rgba(0,0,0,.08);
    transform:translateY(-5px);
}


/* Category Image */

.category-image-box{
    position:relative;
    overflow:hidden;
    aspect-ratio:4 / 3;
    background:#f8f8f8;
}

.category-image{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
    transition:transform .45s ease;
}

.category-card:hover .category-image{
    transform:scale(1.06);
}


/* Category Footer */

.category-card-footer{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    padding:14px;
}

.category-info{
    min-width:0;
}

.category-name{
    display:block;
    margin-bottom:3px;
    overflow:hidden;
    color:#222;
    font-size:13px;
    font-weight:800;
    white-space:nowrap;
    text-overflow:ellipsis;
    transition:color .25s ease;
}

.category-card:hover .category-name{
    color:#D32F2F;
}

.category-info small{
    display:block;
    color:#aaa;
    font-size:10px;
}


/* Category Arrow */

.category-arrow{
    display:flex;
    align-items:center;
    justify-content:center;
    flex:0 0 35px;
    width:35px;
    height:35px;
    border-radius:50%;
    background:#f5f5f5;
    color:#444;
    font-size:15px;
    transition:.25s ease;
}

.category-card:hover .category-arrow{
    background:#D32F2F;
    color:#fff;
    transform:translateX(-3px);
}


/* =========================================================
   SECTION TITLES
========================================================= */

section.product-slider{
    margin-top:40px;
    direction:rtl;
    text-align:right;
}

section.product-slider h2,
section.brand h2,
section.content h2{
    position:relative;
    margin:0 0 28px;
    padding-right:16px;
    color:#222;
    font-size:20px;
    font-weight:800;
    text-align:right;
}

section.product-slider h2::before,
section.brand h2::before,
section.content h2::before{
    content:"";
    position:absolute;
    top:50%;
    right:0;
    width:4px;
    height:23px;
    border-radius:20px;
    background:#D32F2F;
    transform:translateY(-50%);
}


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

section.product-slider .item{
    position:relative;
    display:flex;
    flex-direction:column;
    height:430px;
    overflow:hidden;
    border:1px solid #ececec;
    border-radius:14px;
    background:#fff;
    box-shadow:0 4px 18px rgba(0,0,0,.04);
    transition:
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}

section.product-slider .item:hover{
    border-color:#ddd;
    box-shadow:0 15px 35px rgba(0,0,0,.09);
    transform:translateY(-6px);
}


/* =========================================================
   PRODUCT IMAGE
========================================================= */

section.product-slider .product-image{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    height:245px;
    margin:0;
    padding:20px;
    overflow:hidden;
    border-bottom:1px solid #f2f2f2;
    background:#fafafa;
}

section.product-slider .product-image img{
    display:block;
    width:100%;
    height:100%;
    padding:0;
    object-fit:contain;
    transition:transform .4s ease;
}

section.product-slider .item:hover .product-image img{
    transform:scale(1.07);
}


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

section.product-slider .item span.offer{
    position:absolute;
    top:13px;
    right:13px;
    z-index:5;
    display:flex;
    align-items:center;
    justify-content:center;
    min-width:45px;
    height:28px;
    margin:0;
    padding:0 9px;
    border-radius:7px;
    background:#D32F2F;
    color:#fff;
    font-size:11px;
    font-weight:800;
    line-height:1;
    box-shadow:0 4px 10px rgba(211,47,47,.25);
}


/* =========================================================
   PRODUCT DETAILS
========================================================= */

section.product-slider .item-details{
    position:relative;
    display:flex;
    flex:1;
    flex-direction:column;
    padding:15px;
}


/* Product Title */

section.product-slider .item a.product-title{
    order:1;
    display:-webkit-box;
    min-height:46px;
    margin:0 0 8px;
    padding:0;
    overflow:hidden;
    direction:rtl;
    color:#292929;
    font-size:13px;
    font-weight:700;
    line-height:23px;
    text-align:right;
    text-decoration:none;
    -webkit-line-clamp:2;
    -webkit-box-orient:vertical;
    transition:color .25s ease;
}

section.product-slider .item:hover a.product-title{
    color:#D32F2F;
}


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

section.product-slider .price{
    order:2;
    display:flex;
    align-items:baseline;
    justify-content:flex-start;
    flex-wrap:wrap;
    gap:8px;
    width:100%;
    margin:0;
    padding:0;
    direction:rtl;
    text-align:right;
}

section.product-slider .price del{
    order:2;
    margin:0;
    padding:0;
    color:#aaa;
    font-size:11px;
    font-weight:500;
    text-decoration-color:#D32F2F;
}

section.product-slider .price del .woocommerce-Price-amount{
    color:#aaa;
    font-size:11px;
    font-weight:500;
}

section.product-slider .price .new-price{
  order: 1;
  display: inline-block;
  margin: 0;
  padding: 0;
  color: #23254e;
  font-size: 15px;
  font-weight: bold;
  line-height: 3.8;
}

section.product-slider .price .new-price .woocommerce-Price-amount{
    color:inherit;
    font-size:inherit;
    font-weight:inherit;
}

section.product-slider .price .woocommerce-Price-currencySymbol{
    margin-right:3px;
    font-size:10px;
    font-weight:500;
}


/* =========================================================
   PRODUCT BUTTONS
========================================================= */

section.product-slider .item .item-btn{
    position:absolute;
    right:auto;
    bottom:14px;
    left:14px;
    display:flex;
    align-items:center;
    gap:7px;
}

section.product-slider .item a.add-to-cart,
section.product-slider .item a.add-to-heart{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    width:37px;
    height:37px;
    margin:0;
    padding:0;
    overflow:hidden;
    border:1px solid #e8e8e8;
    border-radius:9px;
    background:#f7f7f7;
    color:#333;
    font-size:16px;
    text-decoration:none;
    transition:
        background .25s ease,
        border-color .25s ease,
        color .25s ease,
        transform .25s ease;
}

section.product-slider .item a.add-to-cart:hover{
    border-color:#D32F2F;
    background:#D32F2F;
    color:#fff;
    transform:translateY(-2px);
}

section.product-slider .item a.add-to-heart:hover{
    border-color:#D32F2F;
    background:#fff0f0;
    color:#D32F2F;
    transform:translateY(-2px);
}


/* =========================================================
   ADD TO CART LOADING
========================================================= */

section.product-slider .item a.add-to-cart.loading{
    border-color:#D32F2F;
    background:#D32F2F;
    color:#fff;
    pointer-events:none;
    transform:none;
}

/* Bag icon */

section.product-slider .item a.add-to-cart i{
    opacity:1;
    transition:opacity .15s ease;
}

section.product-slider .item a.add-to-cart.loading i{
    opacity:0;
}


/* Spinner */

section.product-slider .item a.add-to-cart.loading::after{
    content:"" !important;
    position:absolute !important;
    top:50% !important;
    left:50% !important;
    right:auto !important;

    width:17px !important;
    height:17px !important;

    margin:0 !important;

    border:2px solid rgba(255,255,255,.4) !important;
    border-top-color:#fff !important;
    border-radius:50% !important;

    background:none !important;

    transform:translate(-50%,-50%);

    animation:igt-cart-loading .65s linear infinite !important;
}

@keyframes igt-cart-loading{
    from{
        transform:translate(-50%,-50%) rotate(0deg);
    }

    to{
        transform:translate(-50%,-50%) rotate(360deg);
    }
}


/* =========================================================
   ADDED TO CART
========================================================= */

section.product-slider .item a.add-to-cart.added{
    border-color:#4BB650;
    background:#4BB650;
    color:#fff;
}

/*
 * WooCommerce بعد از Add To Cart یک لینک
 * "مشاهده سبد خرید" تولید می‌کند.
 * چون Side Cart خودکار باز می‌شود به آن نیازی نداریم.
 */

section.product-slider .added_to_cart,
section.product-slider .added_to_cart.wc-forward{
    display:none !important;
}


/* =========================================================
   OWL PRODUCT SLIDER
========================================================= */

section.product-slider .owl-stage{
    display:flex;
    padding:8px 0 24px;
}

section.product-slider .owl-item{
    display:flex;
}

section.product-slider .owl-item .item{
    width:100%;
}


/* =========================================================
   BANNER
========================================================= */

section.banner{
    margin:40px 0;
}

section.banner .row{
    row-gap:20px;
}

.banner a{
    display:block;
}

.banner img{
    display:block;
    width:100%;
    padding:0;
    border-radius:12px;
    box-shadow:0 5px 20px rgba(0,0,0,.05);
    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.banner a:hover img{
    box-shadow:0 12px 30px rgba(0,0,0,.1);
    transform:translateY(-3px);
}


/* =========================================================
   BRAND
========================================================= */

section.brand{
    margin:40px 0;
}

section.brand .item{
    position:relative;
    padding:18px;
    border:1px solid #eee;
    border-radius:12px;
    background:#fff;
    box-shadow:0 3px 15px rgba(0,0,0,.035);
    transition:
        transform .3s ease,
        border-color .3s ease,
        box-shadow .3s ease;
}

section.brand .item:hover{
    border-color:#ddd;
    box-shadow:0 10px 25px rgba(0,0,0,.07);
    transform:translateY(-4px);
}


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

section.content{
    margin:40px 0;
}

section.content p{
    margin-bottom:15px;
    direction:rtl;
    color:#555;
    font-size:14px;
    line-height:2.2;
    text-align:justify;
}


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

@media(max-width:991.98px){

    section.product-slider .item{
        height:410px;
    }

    section.product-slider .product-image{
        height:225px;
    }

}


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

@media(max-width:767.98px){

    .category-section,
    section.product-slider,
    section.banner,
    section.brand,
    section.content{
        margin:28px 0;
    }


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

    .category-heading{
        display:block;
        margin-bottom:20px;
    }

    .category-title{
        padding-right:13px;
        font-size:17px;
    }

    .category-title::before{
        width:3px;
        height:19px;
    }

    .category-subtitle{
        display:block;
        margin-top:4px;
        padding-right:13px;
        font-size:10px;
    }

    .category-card{
        border-radius:10px;
    }

    .category-card-footer{
        gap:7px;
        padding:10px;
    }

    .category-name{
        font-size:11px;
    }

    .category-info small{
        font-size:9px;
    }

    .category-arrow{
        flex-basis:29px;
        width:29px;
        height:29px;
        font-size:12px;
    }


    /* =====================================================
       TITLES
    ===================================================== */

    section.product-slider h2,
    section.brand h2,
    section.content h2{
        margin-bottom:20px;
        padding-right:13px;
        font-size:17px;
    }

    section.product-slider h2::before,
    section.brand h2::before,
    section.content h2::before{
        width:3px;
        height:19px;
    }


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

    section.product-slider .item{
        height:390px;
        border-radius:11px;
    }

    section.product-slider .product-image{
        height:210px;
        padding:14px;
    }

    section.product-slider .item-details{
        padding:12px;
    }

    section.product-slider .item a.product-title{
        order:1;
        min-height:42px;
        margin-bottom:6px;
        font-size:11px;
        line-height:21px;
    }


    /* Price */

    section.product-slider .price{
        order:2;
        gap:5px;
    }

    section.product-slider .price .new-price{
        font-size:14px;
    }

    section.product-slider .price del,
    section.product-slider .price del .woocommerce-Price-amount{
        font-size:9px;
    }


    /* Discount */

    section.product-slider .item span.offer{
        top:9px;
        right:9px;
        min-width:39px;
        height:24px;
        padding:0 7px;
        font-size:9px;
    }


    /* Buttons */

    section.product-slider .item .item-btn{
        bottom:11px;
        left:11px;
        gap:5px;
    }

    section.product-slider .item a.add-to-cart,
    section.product-slider .item a.add-to-heart{
        width:31px;
        height:31px;
        border-radius:7px;
        font-size:13px;
    }


    /* Cart Loader */

    section.product-slider .item a.add-to-cart.loading::after{
        width:14px !important;
        height:14px !important;
        border-width:2px !important;
    }


    /* =====================================================
       BANNER
    ===================================================== */

    .banner img{
        border-radius:9px;
    }


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

    section.content p{
        font-size:13px;
        line-height:2;
    }

}


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

@media(max-width:575.98px){

    .category-section,
    section.product-slider,
    section.banner,
    section.brand,
    section.content{
        margin:25px 0;
    }

    .category-heading{
        margin-bottom:17px;
    }

    .category-title{
        font-size:16px;
    }

    .category-card-footer{
        padding:9px;
    }

    .category-name{
        font-size:10px;
    }

    .category-info small{
        font-size:8px;
    }

    .category-arrow{
        flex-basis:27px;
        width:27px;
        height:27px;
        font-size:11px;
    }

    section.product-slider h2,
    section.brand h2,
    section.content h2{
        margin-bottom:17px;
        font-size:16px;
    }

}