/* ==========================================================
   DIGBANG — RECIPE CATEGORY SLIDER
========================================================== */

.db-recipe-category {
    width: 100%;
    min-height: 413px;

    margin-top: 88px;

    background: #FFFFFF;

    direction: rtl;

    box-sizing: border-box;
}

.db-recipe-category,
.db-recipe-category * {
    box-sizing: border-box;
}


.db-recipe-category__inner {
    width: calc(100% - 120px);
    max-width: 1320px;

    margin-inline: auto;
}


/* ==========================================================
   HEADER
========================================================== */

.db-recipe-category__header {
    display: flex;
    align-items: center;
    justify-content: flex-start;

    width: 100%;
    min-height: 48px;

    direction: rtl;
}


.db-recipe-category__title {
    margin: 0;

    color: #8E7D71;

    font-family: "Vazirmatn", sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.5;

    text-align: right;
}


.db-recipe-category__all-link {
    margin-right: 38px;

    color: #CC5200;

    text-decoration: none;

    font-family: "Vazirmatn", sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;

    white-space: nowrap;

    transition: color 0.2s ease;
}


.db-recipe-category__all-link:hover,
.db-recipe-category__all-link:focus-visible {
    color: #FF6600;
}


/* ==========================================================
   SURFACE
========================================================== */

.db-recipe-category__surface {
    width: 100%;

    margin-top: 40px;

    background: #FFFFFF;
}


/* ==========================================================
   SLIDER
========================================================== */

.db-recipe-category__slider {
    display: grid;

    grid-template-columns: 24px 1203.2px 24px;

    column-gap: 34.4px;

    align-items: center;

    width: 1320px;

    direction: rtl;
}


.db-recipe-category__viewport {
    width: 1203.2px;

    overflow: hidden;
}


.db-recipe-category__track {
    display: flex;
    align-items: flex-start;

    width: max-content;

    gap: 34.4px;

    direction: rtl;

    transition: transform 0.35s ease;

    will-change: transform;
}


.db-recipe-category__track > .db-recipe-card {
    flex: 0 0 275px;
}


/* ==========================================================
   ARROWS
========================================================== */

.db-recipe-category__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    margin: 0;
    padding: 0;

    background: transparent;

    border: 0;

    cursor: pointer;

    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}


.db-recipe-category__arrow img {
    display: block;

    width: 24px;
    height: 24px;

    pointer-events: none;
}


.db-recipe-category__arrow:hover:not(:disabled) {
    transform: scale(1.08);
}


.db-recipe-category__arrow:focus-visible {
    outline: 2px solid rgba(255, 102, 0, 0.45);

    outline-offset: 4px;

    border-radius: 4px;
}


.db-recipe-category__arrow:disabled {
    opacity: 0.28;

    cursor: default;

    transform: none;
}


/* ==========================================================
   CREAM VERSION
========================================================== */

.db-recipe-category--cream {
    background: #FFFFFF;
}


.db-recipe-category--cream
.db-recipe-category__surface {
    padding-top: 32px;
    padding-bottom: 40px;

    background: #F6EDDE;
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 1399px) {

    .db-recipe-category__inner {
        width: calc(100% - 64px);
    }


    .db-recipe-category__slider {
        grid-template-columns:
            24px
            minmax(0, 1fr)
            24px;

        width: 100%;
    }


    .db-recipe-category__viewport {
        width: 100%;
    }

}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767px) {

    .db-recipe-category {
        width: 100%;
        min-height: 0;

        margin-top: 56px;

        padding-bottom: 32px;

        overflow: hidden;
    }


    .db-recipe-category__inner {
        width: calc(100% - 32px);

        max-width: none;
    }


    /* HEADER */

    .db-recipe-category__header {
        display: flex;
        align-items: baseline;

        flex-wrap: nowrap;

        min-height: 0;

        gap: 16px;
    }


    .db-recipe-category__title {
        font-size: 24px;
        line-height: 1.5;

        white-space: nowrap;
    }


    .db-recipe-category__all-link {
        margin-right: 0;

        font-size: 13px;
        line-height: 1.5;
    }


    /* SURFACE */

    .db-recipe-category__surface {
        width: 100%;

        margin-top: 24px;
    }


    /* SLIDER */

    .db-recipe-category__slider {
        display: block;

        width: 100%;

        margin: 0;
    }


    /* فلش‌ها در موبایل لازم نیست */

    .db-recipe-category__arrow {
        display: none;
    }


    /* ناحیه اسکرول */

    .db-recipe-category__viewport {
        width: 100%;

        overflow-x: auto;
        overflow-y: hidden;

        scrollbar-width: none;

        -webkit-overflow-scrolling: touch;
    }


    .db-recipe-category__viewport::-webkit-scrollbar {
        display: none;
    }


    /* کارت‌ها */

    .db-recipe-category__track {
        display: flex;

        width: max-content;

        gap: 16px;

        padding-bottom: 4px;

        transform: none !important;

        transition: none;

        will-change: auto;
    }


    .db-recipe-category__track > .db-recipe-card {
        flex: 0 0 240px;
    }


    /* CREAM */

    .db-recipe-category--cream
    .db-recipe-category__surface {
        padding-top: 24px;
        padding-bottom: 24px;
    }

}