/* =========================================================
   WHOLESALE PAGE
   سرزمین ابزار / فروش عمده
========================================================= */

.wholesale-page {
    width: 100%;
    max-width: 1400px;

    margin: 0 auto;

    padding: 30px 25px 70px;

    box-sizing: border-box;

    font-family: inherit;

    color: #252525;

    direction: rtl;
}


/* =========================================================
   COLOR VARIABLES
========================================================= */

.wholesale-page {
    --wholesale-red: #e51f3f;
    --wholesale-red-dark: #c91432;
    --wholesale-red-light: #fff1f3;

    --wholesale-gray: #666;
    --wholesale-dark: #252525;
    --wholesale-light-gray: #f5f5f5;
    --wholesale-border: #e8e8e8;

    --wholesale-white: #fff;
}


/* =========================================================
   PAGE HEADER / HERO
========================================================= */

.wholesale-header {

    position: relative;

    width: 100%;

    min-height: 190px;

    margin-bottom: 28px;

    overflow: hidden;

    border-radius: 22px;

    background:
        linear-gradient(
            135deg,
            #242424 0%,
            #303030 58%,
            #3b3b3b 100%
        );

    box-shadow:
        0 10px 35px rgba(0,0,0,.10);
}


/* red decorative side */

.wholesale-header::before {

    content: "";

    position: absolute;

    top: -80px;
    left: -55px;

    width: 280px;
    height: 280px;

    border-radius: 50%;

    background:
        var(--wholesale-red);

    opacity: .95;
}


/* second decorative circle */

.wholesale-header::after {

    content: "";

    position: absolute;

    top: -120px;
    right: 27%;

    width: 240px;
    height: 240px;

    border-radius: 50%;

    border: 35px solid rgba(255,255,255,.035);

    box-sizing: border-box;
}


/* inner */

.wholesale-header-inner {

    position: relative;

    z-index: 3;

    min-height: 190px;

    display: flex;

    align-items: center;

    justify-content: flex-start;

    padding: 25px 45px;

    box-sizing: border-box;
}


/* text */

.wholesale-header-text {

    position: relative;

    z-index: 5;

    text-align: right;

    color: #fff;
}


/* small title */

.wholesale-small-title {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    margin-bottom: 7px;

    color: rgba(255,255,255,.65);

    font-size: 12px;

    font-weight: 500;
}


.wholesale-small-title::before {

    content: "";

    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: var(--wholesale-red);
}


/* H1 */

.wholesale-header h1 {

    margin: 0 0 8px;

    color: #fff;

    font-size: 32px;

    line-height: 1.35;

    font-weight: 900;
}


/* description */

.wholesale-header p {

    margin: 0;

    color: rgba(255,255,255,.72);

    font-size: 13px;

    line-height: 1.9;
}


/* decorative white card */

.wholesale-header-text::after {

    content: "خرید عمده";

    position: absolute;

    right: -125px;

    top: 5px;

    width: 90px;

    height: 90px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 18px;

    background: rgba(255,255,255,.08);

    border: 1px solid rgba(255,255,255,.09);

    color: rgba(255,255,255,.08);

    font-size: 18px;

    font-weight: 900;

    transform: rotate(-8deg);

}


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

.wholesale-categories-wrapper {

    width: 100%;

    margin-bottom: 32px;
}


.wholesale-categories {

    display: flex;

    align-items: center;

    gap: 9px;

    width: 100%;

    overflow-x: auto;

    padding: 3px 2px 10px;

    scrollbar-width: none;
}


.wholesale-categories::-webkit-scrollbar {

    display: none;
}


.wholesale-category-link {

    flex: 0 0 auto;

    height: 39px;

    min-width: 72px;

    padding: 0 18px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    box-sizing: border-box;

    border: 1px solid #dedede;

    border-radius: 20px;

    background: #fff;

    color: #555;

    text-decoration: none;

    font-size: 12px;

    font-weight: 500;

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


.wholesale-category-link:hover {

    color: var(--wholesale-red);

    border-color: var(--wholesale-red);

    transform: translateY(-1px);
}


.wholesale-category-link.active {

    background: var(--wholesale-red);

    border-color: var(--wholesale-red);

    color: #fff;

    box-shadow:
        0 5px 15px rgba(229,31,63,.18);
}


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

.wholesale-content {

    width: 100%;
}


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

.wholesale-category-section {

    width: 100%;

    margin-bottom: 42px;

    scroll-margin-top: 100px;
}


/* =========================================================
   SECTION HEADER
========================================================= */

.wholesale-section-header {

    display: flex;

    align-items: center;

    justify-content: space-between;

    width: 100%;

    margin-bottom: 14px;
}


/* title */

.wholesale-section-title {

    display: flex;

    align-items: center;

    gap: 9px;
}


.wholesale-section-title h2 {

    margin: 0;

    color: var(--wholesale-dark);

    font-size: 19px;

    line-height: 1.5;

    font-weight: 900;
}


/* red line */

.wholesale-title-line {

    width: 5px;

    height: 25px;

    border-radius: 6px;

    background: var(--wholesale-red);
}


/* =========================================================
   SLIDER CONTROLS
========================================================= */

.wholesale-slider-controls {

    display: flex;

    align-items: center;

    gap: 6px;
}


.wholesale-slider-btn {

    width: 34px;
    height: 34px;

    padding: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border: 1px solid #ddd;

    border-radius: 50%;

    background: #fff;

    color: #555;

    cursor: pointer;

    font-size: 16px;

    transition:
        all .2s ease;
}


.wholesale-slider-btn:hover {

    background: var(--wholesale-red);

    border-color: var(--wholesale-red);

    color: #fff;
}


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

.wholesale-products-wrapper {

    position: relative;

    width: 100%;

    overflow: hidden;
}


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

.wholesale-products {

    width: 100%;

    display: flex;

    flex-direction: row;

    gap: 12px;

    overflow-x: auto;

    overflow-y: hidden;

    padding: 4px 2px 12px;

    box-sizing: border-box;

    scroll-behavior: smooth;

    scroll-snap-type: x proximity;

    scrollbar-width: none;
}


.wholesale-products::-webkit-scrollbar {

    display: none;
}


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

.wholesale-product-card {

    position: relative;

    flex: 0 0 calc(25% - 9px);

    min-width: 0;

    box-sizing: border-box;

    padding: 9px;

    background: #fff;

    border: 1px solid var(--wholesale-border);

    border-radius: 17px;

    overflow: hidden;

    scroll-snap-align: start;

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


.wholesale-product-card:hover {

    transform: translateY(-3px);

    border-color: #ddd;

    box-shadow:
        0 10px 30px rgba(0,0,0,.08);
}


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

.wholesale-product-image {

    position: relative;

    width: 100%;

    height: 190px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: #fff;

    border-radius: 13px;

    overflow: hidden;
}


/* image link */

.wholesale-product-image-link {

    width: 100%;
    height: 100%;

    display: flex;

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

    text-decoration: none;
}


/* image */

.wholesale-product-image img {

    width: 100%;
    height: 100%;

    display: block;

    object-fit: contain;

    transition:
        transform .25s ease;
}


.wholesale-product-card:hover
.wholesale-product-image img {

    transform: scale(1.035);
}


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

.wholesale-discount-badge {

    position: absolute;

    top: 8px;

    left: 8px;

    z-index: 10;

    min-width: 44px;

    height: 25px;

    padding: 0 9px;

    display: flex;

    align-items: center;

    justify-content: center;

    box-sizing: border-box;

    border-radius: 8px;

    background: var(--wholesale-red);

    color: #fff;

    font-size: 11px;

    font-weight: 800;

    line-height: 1;

    direction: rtl;

    box-shadow:
        0 3px 8px rgba(229,31,63,.18);
}


/* =========================================================
   MINIMUM QUANTITY BADGE
========================================================= */

.wholesale-minimum-badge {

    position: absolute;

    top: 38px;

    left: 8px;

    z-index: 10;

    min-width: 44px;

    height: 25px;

    padding: 0 9px;

    display: flex;

    align-items: center;

    justify-content: center;

    box-sizing: border-box;

    border-radius: 8px;

    background: #555;

    color: #fff;

    font-size: 11px;

    font-weight: 800;

    line-height: 1;

    direction: ltr;

    box-shadow:
        0 3px 8px rgba(0,0,0,.10);
}


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

.wholesale-product-info {

    position: relative;

    padding: 8px 5px 5px;

    box-sizing: border-box;
}


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

.wholesale-product-title {

    display: -webkit-box;

    width: 100%;

    height: 46px;

    margin: 0;

    overflow: hidden;

    color: #333;

    font-size: 14px;

    font-weight: 600;

    line-height: 1.8;

    text-align: right;

    text-decoration: none;

    -webkit-line-clamp: 2;

    -webkit-box-orient: vertical;

    transition:
        color .2s ease;
}


.wholesale-product-title:hover {

    color: var(--wholesale-red);
}


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

.wholesale-price-area {

    display: flex;

    flex-direction: column;

    align-items: flex-start;

    gap: 1px;

    margin-top: 6px;

    padding-left: 45px;

    min-height: 48px;

    box-sizing: border-box;
}


/* =========================================================
   NORMAL / OLD PRICE
   قیمت عادی بالا - کوچک - خط خورده
========================================================= */

.wholesale-product-old-price {

    order: 1;

    margin: 0;

    color: #a5a5a5;

    font-size: 10px;

    font-weight: 400;

    line-height: 1.5;

    text-decoration: line-through;

    direction: rtl;
}


.wholesale-product-old-price .woocommerce-Price-currencySymbol {

    font-size: 8px;
}


/* =========================================================
   WHOLESALE PRICE
   قیمت عمده پایین - بزرگ - بولد
========================================================= */

.wholesale-product-price {

    order: 2;

    margin: 0;

    color: var(--wholesale-dark);

    font-size: 15px;

    font-weight: 900;

    line-height: 1.6;

    direction: rtl;
}


.wholesale-product-price .woocommerce-Price-currencySymbol {

    margin-right: 3px;

    color: #555;

    font-size: 9px;

    font-weight: 600;
}


/* =========================================================
   ADD TO CART BUTTON
========================================================= */

.wholesale-add-btn {

    position: absolute;

    right: 8px;

    bottom: 8px;

    z-index: 20;

    width: 39px;

    height: 39px;

    padding: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    box-sizing: border-box;

    border: 1.5px solid var(--wholesale-red);

    border-radius: 50%;

    background: #fff;

    color: var(--wholesale-red);

    cursor: pointer;

    box-shadow:
        0 3px 10px rgba(0,0,0,.06);

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


.wholesale-add-btn span {

    display: block;

    margin-top: -2px;

    font-size: 25px;

    font-weight: 300;

    line-height: 1;
}


.wholesale-add-btn:hover {

    background: var(--wholesale-red);

    color: #fff;

    transform: scale(1.07);
}


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

.wholesale-add-btn.loading {

    opacity: .6;

    pointer-events: none;

    transform: none !important;
}


.wholesale-add-btn.loading span {

    font-size: 12px;
}


/* =========================================================
   EMPTY
========================================================= */

.wholesale-empty {

    width: 100%;

    min-height: 350px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    text-align: center;

    color: #777;
}


.wholesale-empty h3 {

    margin: 0 0 8px;

    color: #333;

    font-size: 20px;
}


.wholesale-empty p {

    margin: 0;

    font-size: 13px;
}


/* =========================================================
   CART SUCCESS MESSAGE
========================================================= */

.wholesale-cart-message {

    position: fixed;

    right: 25px;

    bottom: 25px;

    z-index: 999999;

    max-width: 320px;

    padding: 13px 18px;

    border-radius: 10px;

    background: #252525;

    color: #fff;

    font-size: 13px;

    line-height: 1.8;

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

    opacity: 0;

    visibility: hidden;

    transform:
        translateY(15px);

    transition:
        opacity .25s ease,
        transform .25s ease,
        visibility .25s ease;
}


.wholesale-cart-message.show {

    opacity: 1;

    visibility: visible;

    transform:
        translateY(0);
}


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

@media (max-width: 1100px) {

    .wholesale-page {

        padding-left: 18px;

        padding-right: 18px;
    }


    .wholesale-header {

        min-height: 175px;
    }


    .wholesale-header-inner {

        min-height: 175px;

        padding:
            25px 35px;
    }


    .wholesale-header h1 {

        font-size: 28px;
    }


    .wholesale-product-card {

        flex: 0 0 calc(33.333% - 8px);
    }


    .wholesale-product-image {

        height: 165px;
    }


    .wholesale-product-title {

        font-size: 13px;
    }

}


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

@media (max-width: 767px) {

    .wholesale-page {

        padding:
            15px 10px 45px;
    }


    /* =========================================
       HERO
    ========================================= */

    .wholesale-header {

        min-height: 155px;

        margin-bottom: 20px;

        border-radius: 17px;
    }


    .wholesale-header::before {

        top: -55px;

        left: -65px;

        width: 190px;

        height: 190px;
    }


    .wholesale-header::after {

        display: none;
    }


    .wholesale-header-inner {

        min-height: 155px;

        padding:
            22px 22px;
    }


    .wholesale-header h1 {

        margin-bottom: 5px;

        font-size: 23px;
    }


    .wholesale-small-title {

        margin-bottom: 4px;

        font-size: 10px;
    }


    .wholesale-header p {

        max-width: 220px;

        font-size: 10px;

        line-height: 1.8;
    }


    .wholesale-header-text::after {

        right: -45px;

        top: 0;

        width: 70px;

        height: 70px;

        font-size: 12px;
    }


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

    .wholesale-categories-wrapper {

        margin-bottom: 22px;
    }


    .wholesale-categories {

        gap: 7px;

        padding-bottom: 7px;
    }


    .wholesale-category-link {

        height: 33px;

        min-width: 58px;

        padding:
            0 12px;

        font-size: 10px;
    }


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

    .wholesale-category-section {

        margin-bottom: 29px;
    }


    .wholesale-section-header {

        margin-bottom: 9px;
    }


    .wholesale-section-title {

        gap: 6px;
    }


    .wholesale-title-line {

        width: 3px;

        height: 19px;
    }


    .wholesale-section-title h2 {

        font-size: 15px;
    }


    /* Hide slider buttons */

    .wholesale-slider-controls {

        display: none;
    }


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

    .wholesale-products {

        gap: 8px;

        padding:
            3px 2px 9px;
    }


    .wholesale-product-card {

        flex: 0 0 calc(50% - 4px);

        padding: 6px;

        border-radius: 13px;
    }


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

    .wholesale-product-image {

        height: 135px;

        border-radius: 10px;
    }


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

    .wholesale-discount-badge {

        top: 6px;

        left: 6px;

        min-width: 34px;

        height: 20px;

        padding:
            0 6px;

        border-radius: 6px;

        font-size: 8px;
    }


    /* =========================================
       MINIMUM
    ========================================= */

    .wholesale-minimum-badge {

        top: 30px;

        left: 6px;

        min-width: 34px;

        height: 20px;

        padding:
            0 6px;

        border-radius: 6px;

        font-size: 8px;
    }


    /* =========================================
       INFO
    ========================================= */

    .wholesale-product-info {

        padding:
            6px 3px 4px;
    }


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

    .wholesale-product-title {

        height: 42px;

        font-size: 11px;

        font-weight: 600;

        line-height: 1.9;
    }


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

    .wholesale-price-area {

        margin-top: 4px;

        padding-left: 34px;

        min-height: 43px;
    }


    /* OLD */

    .wholesale-product-old-price {

        font-size: 8px;
    }


    .wholesale-product-old-price
    .woocommerce-Price-currencySymbol {

        font-size: 7px;
    }


    /* WHOLESALE */

    .wholesale-product-price {

        font-size: 12px;

        font-weight: 900;
    }


    .wholesale-product-price
    .woocommerce-Price-currencySymbol {

        font-size: 7px;
    }


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

    .wholesale-add-btn {

        right: 6px;

        bottom: 6px;

        width: 29px;

        height: 29px;
    }


    .wholesale-add-btn span {

        font-size: 19px;
    }


    /* =========================================
       CART MESSAGE
    ========================================= */

    .wholesale-cart-message {

        right: 10px;

        left: 10px;

        bottom: 15px;

        max-width: none;

        text-align: center;

        font-size: 11px;
    }

}


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

@media (max-width: 390px) {

    .wholesale-product-card {

        flex: 0 0 calc(50% - 4px);
    }


    .wholesale-product-image {

        height: 125px;
    }


    .wholesale-product-title {

        font-size: 10px;

        height: 40px;
    }


    .wholesale-product-price {

        font-size: 11px;
    }

}


/* =========================================================
   REMOVE UNWANTED OLD STYLES
========================================================= */

.wholesale-page a {

    text-decoration-thickness: auto;
}


.wholesale-page button {

    font-family: inherit;
}