/* =========================================================
   SHANI FOOD — CATEGORY PRODUCTS
   Desktop: 3 columns
   Tablet : 2 columns
   Mobile : 1 column
   ========================================================= */


/* =========================================================
   PAGE VARIABLES
   ========================================================= */

.category-page {
    --cat-red: #f03840;
    --cat-red-dark: #aa1029;
    --cat-bg: #f7f4f0;
    --cat-ink: #171615;
    --cat-text: #68615c;
    --cat-muted: #968e88;
    --cat-line: rgba(22, 20, 19, .09);

    margin: 0;
    background: var(--cat-bg);
    color: var(--cat-ink);
}


.category-main {
    width: 100%;
    overflow: hidden;
    background: var(--cat-bg);
}


/* =========================================================
   CONTAINER
   ========================================================= */

.category-container {
    width: min(1380px, calc(100% - 80px));
    margin-inline: auto;
}



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

.category-hero {
    position: relative;

    min-height: 350px;

    padding: 132px 0 92px;

    display: flex;
    align-items: center;

    overflow: hidden;
    isolation: isolate;

    color: #fff;

    background:
        radial-gradient(
            circle at 72% 26%,
            rgba(255,255,255,.18),
            transparent 31%
        ),
        linear-gradient(
            125deg,
            var(--cat-red-dark) 0%,
            #d71934 45%,
            #f33e48 100%
        );
}


.category-hero::before {
    content: "";

    position: absolute;
    inset: 0;

    z-index: -2;

    opacity: .15;

    background-image:
        linear-gradient(
            rgba(255,255,255,.18) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,.18) 1px,
            transparent 1px
        );

    background-size: 60px 60px;

    -webkit-mask-image:
        linear-gradient(
            to bottom,
            transparent,
            #000 35%,
            transparent
        );

    mask-image:
        linear-gradient(
            to bottom,
            transparent,
            #000 35%,
            transparent
        );
}


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

.category-hero__content {
    position: relative;

    z-index: 3;

    text-align: center;
}


.category-hero__eyebrow {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 12px;

    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 800;

    letter-spacing: .25em;

    opacity: .78;
}


.category-hero__eyebrow::before,
.category-hero__eyebrow::after {
    content: "";

    width: 25px;
    height: 1px;

    background: currentColor;

    opacity: .65;
}


.category-hero h1 {
    margin: 0;

    color: #fff;

    font-size: 44px;
    font-weight: 900;

    line-height: 1.2;

    letter-spacing: -.045em;
}


.category-hero p {
    margin: 15px 0 0;

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

    font-size: 16px;

    line-height: 2;
}



/* =========================================================
   HERO BIG WORD
   ========================================================= */

.category-hero__word {
    position: absolute;

    top: 50%;
    left: 50%;

    z-index: -1;

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

    color: transparent;

    font-family: Arial, sans-serif;

    font-size:
        clamp(95px, 15vw, 205px);

    font-weight: 900;

    line-height: 1;

    letter-spacing: -.075em;

    white-space: nowrap;

    -webkit-text-stroke:
        1px rgba(35, 10, 15, .18);

    pointer-events: none;
}



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

.category-hero__ring {
    position: absolute;

    z-index: -1;

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

    border-radius: 50%;
}


.category-hero__ring--1 {
    width: 310px;
    height: 310px;

    top: -155px;
    right: 8%;
}


.category-hero__ring--2 {
    width: 165px;
    height: 165px;

    left: 14%;
    bottom: -78px;
}



/* =========================================================
   HERO BOTTOM CURVE
   ========================================================= */

.category-hero__curve {
    position: absolute;

    right: -5%;
    bottom: -1px;
    left: -5%;

    z-index: 4;

    height: 38px;

    background: var(--cat-bg);

    clip-path:
        ellipse(55% 100% at 50% 100%);
}



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

.category-products {
    position: relative;

    padding: 82px 0 250px;
}



/* =========================================================
   PRODUCTS BACKGROUND WORD
   ========================================================= */

.category-products__ghost {
    position: absolute;

    top: 88px;
    right: -20px;

    z-index: 0;

    color: transparent;

    font-family: Arial, sans-serif;

    font-size:
        clamp(105px, 15vw, 230px);

    font-weight: 900;

    line-height: 1;

    letter-spacing: -.07em;

    white-space: nowrap;

    -webkit-text-stroke:
        1px rgba(240, 56, 64, .045);

    pointer-events: none;
}



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

.category-products__head {
    position: relative;

    z-index: 2;

    display: grid;

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

    gap: 36px;

    align-items: end;

    margin-bottom: 46px;
}



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

.category-products__count {
    padding-bottom: 8px;
}


.category-products__count strong {
    display: block;

    font-family: Arial, sans-serif;

    font-size: 34px;
    font-weight: 900;

    line-height: 1;

    letter-spacing: -.05em;
}


.category-products__count span {
    display: block;

    margin-top: 8px;

    color: var(--cat-muted);

    font-size: 11px;
    font-weight: 700;
}



/* =========================================================
   PRODUCTS HEADING CENTER
   ========================================================= */

.category-products__heading {
    text-align: center;
}


.category-products__eyebrow {
    display: block;

    margin-bottom: 9px;

    color: var(--cat-red);

    font-family: Arial, sans-serif;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: .18em;
}


.category-products__heading h2 {
    margin: 0;

    font-size:
        clamp(32px, 3.7vw, 52px);

    font-weight: 900;

    line-height: 1.28;

    letter-spacing: -.045em;
}


.category-products__heading p {
    max-width: 680px;

    margin: 14px auto 0;

    color: var(--cat-text);

    font-size: 13px;

    line-height: 2.05;
}



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

.category-products__section-no {
    display: flex;

    align-items: center;

    gap: 11px;

    padding-bottom: 10px;

    color: var(--cat-red);

    direction: ltr;
}


.category-products__section-no::before {
    content: "";

    width: 48px;
    height: 1px;

    background: currentColor;

    opacity: .35;
}


.category-products__section-no span {
    font-family: Arial, sans-serif;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: .15em;

    white-space: nowrap;
}



/* =========================================================
   PRODUCT GRID
   DESKTOP = 3 PRODUCTS
   ========================================================= */

.category-page .category-grid {
    position: relative;

    z-index: 2;

    display: grid !important;

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

    gap: 40px !important;

    width: 100%;
}



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

.category-card {
    --accent: #eda21b;
    --accent-soft: rgba(237, 162, 27, .16);

    position: relative;

    min-width: 0;

    height: 450px;

    overflow: hidden;

    isolation: isolate;

    border:
        1px solid rgba(28, 23, 20, .07);

    border-radius: 34px;

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(255,255,255,.98) 0 18%,
            rgba(255,255,255,0) 50%
        ),
        linear-gradient(
            145deg,
            #fff 0%,
            #f4eee6 100%
        );

    box-shadow:
        0 24px 70px
        rgba(50, 31, 22, .07);
}



/* =========================================================
   CHERRY CARD
   ========================================================= */

.category-card--cherry {
    --accent: #bd264b;
    --accent-soft: rgba(189, 38, 75, .14);

    background:
        radial-gradient(
            circle at 50% 38%,
            rgba(255,255,255,.98) 0 18%,
            rgba(255,255,255,0) 50%
        ),
        linear-gradient(
            145deg,
            #fff 0%,
            #f5e9ec 100%
        );
}



/* =========================================================
   CARD DECORATION — TOP CIRCLE
   ========================================================= */

.category-card::before {
    content: "";

    position: absolute;

    z-index: -1;

    width: 310px;
    height: 310px;

    top: -108px;
    right: -105px;

    border-radius: 50%;

    background:
        var(--accent-soft);
}



/* =========================================================
   CARD DECORATION — BOTTOM CIRCLE
   ========================================================= */

.category-card::after {
    content: "";

    position: absolute;

    z-index: -1;

    width: 135px;
    height: 135px;

    left: -55px;
    bottom: 100px;

    border:
        1px solid
        color-mix(
            in srgb,
            var(--accent) 26%,
            transparent
        );

    border-radius: 50%;
}



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

.category-card__number {
    position: absolute;

    top: 23px;
    left: 25px;

    z-index: 1;

    color: transparent;

    font-family: Arial, sans-serif;

    font-size: 74px;
    font-weight: 900;

    line-height: 1;

    letter-spacing: -.08em;

    -webkit-text-stroke:
        1px rgba(23, 22, 21, .07);

    pointer-events: none;
}



/* =========================================================
   NEW PRODUCT BADGE
   ========================================================= */

.category-card__badge {
    position: absolute;

    top: 23px;
    right: 23px;

    z-index: 4;

    display: inline-flex;

    align-items: center;

    gap: 7px;

    min-height: 30px;

    padding: 0 12px;

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

    border-radius: 999px;

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

    backdrop-filter:
        blur(12px);

    -webkit-backdrop-filter:
        blur(12px);

    color: var(--accent);

    font-size: 9px;
    font-weight: 850;
}


.category-card__badge::before {
    content: "";

    width: 6px;
    height: 6px;

    flex: 0 0 6px;

    border-radius: 50%;

    background:
        currentColor;

    box-shadow:
        0 0 0 4px
        color-mix(
            in srgb,
            currentColor 11%,
            transparent
        );
}



/* =========================================================
   PRODUCT VISUAL AREA
   ========================================================= */

.category-card__visual {
    position: absolute;

    top: 50px;
    right: 22px;
    bottom: 116px;
    left: 22px;

    display: block;

    overflow: visible;
}



/* =========================================================
   PRODUCT BACKGROUND CIRCLE
   ========================================================= */

.category-card__circle {
    position: absolute;

    top: 50%;
    left: 50%;

    width: min(82%, 285px);

    aspect-ratio: 1;

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

    border:
        1px solid rgba(22, 20, 19, .055);

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(255,255,255,.96) 0 42%,
            rgba(255,255,255,.28) 43% 61%,
            transparent 62%
        );

    box-shadow:
        inset 0 0 0 18px
        rgba(255,255,255,.15);

    transition:
        transform .6s
        cubic-bezier(.2,.8,.2,1);
}


.category-card__circle::after {
    content: "";

    position: absolute;

    inset: -14%;

    border:
        1px dashed
        rgba(22,20,19,.065);

    border-radius: 50%;
}



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

   IMPORTANT:
   محصول از پایین قفل شده است.
   بنابراین با تغییر عرض کارت بالا و پایین نمی‌پرد.
   ========================================================= */

.category-card__image {
    position: absolute;
    z-index: 2;
    left: 50%;
    bottom: -9%;
    width: 90%;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    transform: translateX(-50%);
    transform-origin: center center;
    filter: drop-shadow(0 27px 23px rgba(45, 28, 22, .22));
    transition: transform .6s cubic-bezier(.2, .8, .2, 1), filter .6s ease;
}



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

.category-card__shadow {
    position: absolute;

    left: 50%;
    bottom: 5px;

    width: 44%;
    height: 28px;

    transform:
        translateX(-50%);

    border-radius: 50%;

    background:
        rgba(42, 27, 21, .14);

    filter:
        blur(15px);

    transition:
        transform .6s ease,
        opacity .6s ease;
}



/* =========================================================
   CARD FOOTER
   ========================================================= */

.category-card__footer {
    position: absolute;

    right: 0;
    bottom: 0;
    left: 0;

    z-index: 5;

    min-height: 116px;

    padding:
        20px 20px 21px;

    display: grid;

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

    gap: 13px;

    align-items: end;

    border-top:
        1px solid
        rgba(28, 23, 20, .075);

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

    backdrop-filter:
        blur(18px);

    -webkit-backdrop-filter:
        blur(18px);
}



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

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


.category-card__title small {
   display: block;
    margin-bottom: 7px;
    overflow: hidden;
    color: #727272;
    font-size: 12px;
    letter-spacing: .11em;
    line-height: 1.4;
    direction: ltr;
    text-align: right;
    white-space: nowrap;
    text-overflow: ellipsis;
}


.category-card__title h3 {
    margin: 0;

    color: var(--cat-ink);

    font-size:
        clamp(17px, 1.35vw, 21px);

    font-weight: 900;

    line-height: 1.45;

    letter-spacing: -.025em;
}



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

.category-card__link {
    width: 44px;
    height: 44px;

    display: grid;

    place-items: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: #171615;

    color: #fff;

    text-decoration: none;

    font-size: 18px;

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


.category-card__link:hover,
.category-card__link:focus-visible {
    background:
        var(--cat-red);

    transform:
        rotate(-8deg)
        translateY(-2px);
}



/* =========================================================
   CARD HOVER — PRODUCT
   ========================================================= */

.category-card:hover .category-card__image {
    transform:
        translateX(-50%)
        rotate(-5deg)
        scale(1.055);

    filter:
        drop-shadow(
            0 36px 28px
            rgba(45, 28, 22, .27)
        );
}



/* =========================================================
   CARD HOVER — CIRCLE
   ========================================================= */

.category-card:hover .category-card__circle {
    transform:
        translate(-50%, -50%)
        scale(1.055)
        rotate(4deg);
}



/* =========================================================
   CARD HOVER — SHADOW
   ========================================================= */

.category-card:hover .category-card__shadow {
    opacity: .72;

    transform:
        translateX(-50%)
        scaleX(.84);
}



/* =========================================================
   TABLET
   2 COLUMNS
   ========================================================= */

@media (max-width: 1024px) {

    .category-container {
        width:
            min(100% - 44px, 1380px);
    }


    .category-products__head {
        grid-template-columns:
            100px minmax(0, 1fr) 140px;

        gap: 24px;
    }


    .category-page .category-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr))
            !important;

        gap: 28px !important;
    }


    .category-card {
        height: 500px;
    }


    .category-card__image {
        height: 255px;

        max-width: 72%;

        bottom: 20px;
    }


    .category-card__circle {
        width: min(80%, 300px);
    }

}



/* =========================================================
   MOBILE
   1 COLUMN
   ========================================================= */

@media (max-width: 680px) {

    .category-container {
        width:
            min(100% - 28px, 1380px);
    }


    /* HERO */

    .category-hero {
        min-height: 275px;

        padding:
            104px 0 68px;
    }


    .category-hero h1 {
        font-size: 37px;
    }


    .category-hero p {
        font-size: 13px;
    }


    .category-hero__word {
        font-size: 70px;
    }


    /* PRODUCTS */

    .category-products {
        padding:
            60px 0 95px;
    }


    .category-products__head {
        display: flex;

        flex-wrap: wrap;

        align-items: flex-end;

        justify-content:
            space-between;

        gap: 18px;

        margin-bottom: 30px;
    }


    .category-products__heading {
        order: 3;

        flex: 0 0 100%;

        text-align: right;
    }


    .category-products__heading h2 {
        font-size: 33px;
    }


    .category-products__heading p {
        margin-inline: 0;
    }


    .category-products__section-no::before {
        width: 30px;
    }


    .category-products__ghost {
        display: none;
    }


    /* GRID */

    .category-page .category-grid {
        grid-template-columns:
            1fr !important;

        gap:
            18px !important;
    }


    /* CARD */

    .category-card {
        height: 500px;

        border-radius: 30px;
    }


    .category-card__visual {
        top: 50px;
        right: 16px;
        bottom: 114px;
        left: 16px;
    }


    .category-card__image {
        width: auto;

        height: 255px;

        max-width: 72%;

        bottom: 18px;
    }


    .category-card__circle {
        width:
            min(78%, 290px);
    }

}



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

@media (max-width: 400px) {

    .category-card {
        height: 470px;
    }


    .category-card__visual {
        top: 50px;
        right: 16px;
        bottom: 114px;
        left: 16px;
    }


    .category-card__image {
        width: auto;

        height: 225px;

        max-width: 74%;

        bottom: 18px;
    }


    .category-card__circle {
        width:
            min(80%, 255px);
    }


    .category-card__title h3 {
        font-size: 19px;
    }

}



/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .category-card__image,
    .category-card__circle,
    .category-card__shadow,
    .category-card__link {
        transition:
            none !important;
    }

}