/* ========================================
   TIN ERA — IMPORTED GOODS
======================================== */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}


html {

    scroll-behavior: smooth;

}


body {

    min-height: 100vh;

    overflow-x: hidden;

    background:

        radial-gradient(circle at 50% 0%,
            rgba(120, 10, 25, 0.28),
            transparent 35rem),

        radial-gradient(circle at 100% 55%,
            rgba(90, 8, 20, 0.18),
            transparent 28rem),

        #080808;

    color: #fff;

    font-family: "Vazirmatn", sans-serif;

}


a {

    color: inherit;

    text-decoration: none;

}


button {

    font-family: inherit;

}



/* ========================================
   HEADER
======================================== */

.products-header {

    width: 100%;

    padding:
        1.7rem 5vw;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.08);

    background:
        rgba(8, 8, 8, 0.7);

    backdrop-filter:
        blur(0.8rem);

}


.products-logo {

    font-family: "Cinzel", serif;

    font-size: 1.35rem;

    letter-spacing: 0.45rem;

}


.back-home {

    display: flex;

    align-items: center;

    gap: 0.5rem;

    font-size: 0.7rem;

    color:
        rgba(255, 255, 255, 0.55);

    transition:
        color 0.3s ease;

}


.back-home i {

    transition:
        transform 0.3s ease;

}


.back-home:hover {

    color: #fff;

}


.back-home:hover i {

    transform:
        translateX(0.3rem);

}



/* ========================================
   MAIN
======================================== */

.products-page {

    width: min(78rem,
            88%);

    margin:
        0 auto;

    padding:
        7rem 0 4rem;

}



/* ========================================
   INTRO
======================================== */

.products-intro {

    position: relative;

    max-width: 42rem;

    margin:
        0 auto 5rem;

    text-align: center;

}


.chapter-label {

    display: inline-flex;

    align-items: center;

    gap: 0.7rem;

    font-family: "Cinzel", serif;

    font-size: 0.55rem;

    letter-spacing: 0.28rem;

    color:
        rgba(255, 255, 255, 0.42);

}


.chapter-label span {

    color: #a9182b;

    font-size: 0.7rem;

}


.products-intro h1 {

    margin-top: 1.5rem;

    font-family: "Cinzel", serif;

    font-size:
        clamp(2.5rem,
            5vw,
            4.5rem);

    font-weight: 400;

    letter-spacing: 0.12rem;

    line-height: 1.1;

}


.products-intro h2 {

    margin-top: 0.8rem;

    font-size: 1.15rem;

    font-weight: 400;

    color:
        rgba(255, 255, 255, 0.75);

}


.products-intro p {

    max-width: 35rem;

    margin:
        1.5rem auto 0;

    font-size: 0.75rem;

    font-weight: 300;

    line-height: 2.2;

    color:
        rgba(255, 255, 255, 0.48);

}


.products-intro p span {

    font-family: "Cinzel", serif;

    letter-spacing: 0.15rem;

    color:
        rgba(255, 255, 255, 0.8);

}


.intro-cross {

    margin-top: 2rem;

    font-size: 0.85rem;

    color: #a9182b;

}



/* ========================================
   TOOLBAR
======================================== */

.products-toolbar {

    margin-bottom: 1.8rem;

    padding-bottom: 1rem;

    display: flex;

    align-items: center;

    justify-content: space-between;

    direction: ltr;

    border-bottom:
        1px solid rgba(255, 255, 255, 0.1);

}


.products-count {

    display: flex;

    align-items: center;

    gap: 0.7rem;

    font-family: "Cinzel", serif;

    font-size: 0.55rem;

    letter-spacing: 0.18rem;

}


.products-count span {

    color:
        rgba(255, 255, 255, 0.3);

}


.products-count strong {

    font-weight: 400;

    color: #fff;

}


.products-total {

    font-family: "Cinzel", serif;

    font-size: 0.65rem;

    letter-spacing: 0.15rem;

    color:
        rgba(255, 255, 255, 0.7);

}


.products-total span {

    font-size: 0.5rem;

    color:
        rgba(255, 255, 255, 0.3);

}



/* ========================================
   IMPORTED CATEGORIES
======================================== */

.imported-categories {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 1rem;

    margin-bottom: 4rem;

}


.category-link {

    min-height: 6rem;

    padding: 1.3rem;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 0.45rem;

    border:
        1px solid rgba(255, 255, 255, 0.1);

    background:
        rgba(255, 255, 255, 0.02);

    font-family: "Cinzel", serif;

    font-size: 0.7rem;

    letter-spacing: 0.14rem;

    transition:

        border-color 0.3s ease,

        background 0.3s ease,

        transform 0.3s ease;

}


.category-link span {

    font-family: "Vazirmatn", sans-serif;

    font-size: 0.65rem;

    letter-spacing: 0;

    color:
        rgba(255, 255, 255, 0.4);

}


.category-link:hover {

    border-color:
        rgba(169, 24, 43, 0.65);

    background:
        rgba(169, 24, 43, 0.08);

    transform:
        translateY(-0.2rem);

}



/* ========================================
   PRODUCT GRID
======================================== */

.products-grid {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap:
        3.4rem 0.9rem;

}

/* ========================================
   PRODUCT CARD
======================================== */

.product-card {

    min-width: 0;

}


.product-image {

    position: relative;

    width: 100%;

    aspect-ratio:
        0.82;

    overflow: hidden;

    background: #111;

    border-radius:
        0.6rem;

}


.product-image img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: block;

    filter:
        brightness(0.88);

    transition:

        transform 0.8s cubic-bezier(.2, .7, .2, 1),

        filter 0.5s ease;

}


.product-card:hover .product-image img {

    transform:
        scale(1.08);

    filter:
        brightness(0.62);

}



/* ========================================
   IMAGE OVERLAY
======================================== */

.product-image::after {

    content: "";

    position: absolute;

    inset: 0;

    background:

        linear-gradient(180deg,
            transparent 50%,
            rgba(0, 0, 0, 0.65));

    opacity: 0;

    transition:
        opacity 0.5s ease;

}


.product-card:hover .product-image::after {

    opacity: 1;

}


.image-overlay {

    position: absolute;

    left: 1.2rem;

    bottom: 1.1rem;

    z-index: 2;

    display: flex;

    align-items: center;

    gap: 0.6rem;

    font-family: "Cinzel", serif;

    font-size: 0.5rem;

    letter-spacing: 0.16rem;

    opacity: 0;

    transform:
        translateY(0.6rem);

    transition:

        opacity 0.4s ease,

        transform 0.5s ease;

}


.product-card:hover .image-overlay {

    opacity: 1;

    transform:
        translateY(0);

}



/* ========================================
   CROSS
======================================== */

.product-cross {

    position: absolute;

    top: 1rem;

    right: 1rem;

    z-index: 3;

    font-size: 0.85rem;

    color:
        rgba(255, 255, 255, 0.8);

}



/* ========================================
   PRODUCT INDEX
======================================== */

.product-index {

    position: absolute;

    top: 1rem;

    left: 1rem;

    z-index: 3;

    font-family: "Cinzel", serif;

    font-size: 0.5rem;

    letter-spacing: 0.12rem;

    color:
        rgba(255, 255, 255, 0.55);

}



/* ========================================
   PRODUCT META
======================================== */

.product-meta {

    padding-top: 1rem;

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 1rem;

    direction: rtl;

}


.product-category {

    display: block;

    margin-bottom: 0.45rem;

    font-family: "Cinzel", serif;

    font-size: 0.48rem;

    letter-spacing: 0.18rem;

    color:
        rgba(255, 255, 255, 0.35);

}


.product-meta h3 {

    font-family: "Cinzel", serif;

    font-size: 0.85rem;

    font-weight: 400;

}


.product-meta p {

    margin-top: 0.3rem;

    font-size: 0.65rem;

    font-weight: 300;

    color:
        rgba(255, 255, 255, 0.42);

}


.product-price {

    white-space: nowrap;

    font-size: 0.68rem;

    font-weight: 400;

    color:
        rgba(255, 255, 255, 0.7);

}



/* ========================================
   FOOTER
======================================== */

.products-footer {

    width: min(78rem,
            88%);

    margin:
        3rem auto 0;

    padding:
        1.8rem 0 2.5rem;

    display: flex;

    align-items: center;

    justify-content: space-between;

    border-top:
        1px solid rgba(255, 255, 255, 0.08);

    font-family: "Cinzel", serif;

    font-size: 0.48rem;

    letter-spacing: 0.18rem;

    color:
        rgba(255, 255, 255, 0.3);

}



/* ========================================
   TABLET
======================================== */

@media (max-width: 900px) {

    .products-page {

        width: 90%;

        padding-top: 5rem;

    }


    .imported-categories {

        gap: 0.8rem;

    }


    .products-grid {

        gap:
            3rem 1.2rem;

    }


    .products-intro {

        margin-bottom: 4rem;

    }

}



/* ========================================
   MOBILE
======================================== */

@media (max-width: 600px) {

    .products-header {

        padding:
            1.3rem 5vw;

    }


    .products-logo {

        font-size: 1rem;

        letter-spacing: 0.3rem;

    }


    .back-home {

        font-size: 0.6rem;

    }


    .products-page {

        width: 90%;

        padding:
            4rem 0 3rem;

    }


    .products-intro {

        margin-bottom: 3rem;

    }


    .chapter-label {

        font-size: 0.45rem;

        letter-spacing: 0.18rem;

    }


    .products-intro h1 {

        font-size:
            clamp(2rem,
                10vw,
                3rem);

    }


    .products-intro h2 {

        font-size: 0.95rem;

    }


    .products-intro p {

        font-size: 0.65rem;

        line-height: 2;

        padding:
            0 0.5rem;

    }


    .products-toolbar {

        margin-bottom: 1.3rem;

    }


    .imported-categories {

        grid-template-columns:
            1fr;

        gap: 0.7rem;

        margin-bottom: 3rem;

    }


    .category-link {

        min-height: 5rem;

    }


    .products-grid {

        grid-template-columns:
            repeat(2,
                minmax(0, 1fr));

        gap:
            2.5rem 0.8rem;

    }


    .product-image {

        aspect-ratio:
            0.88 / 1;

    }


    .product-cross {

        top: 0.7rem;

        right: 0.7rem;

        font-size: 0.7rem;

    }


    .product-index {

        top: 0.7rem;

        left: 0.7rem;

        font-size: 0.4rem;

    }


    .image-overlay {

        left: 0.7rem;

        bottom: 0.7rem;

        font-size: 0.4rem;

    }


    .product-meta {

        padding-top: 0.7rem;

        gap: 0.5rem;

    }


    .product-category {

        font-size: 0.38rem;

        letter-spacing: 0.1rem;

    }


    .product-meta h3 {

        font-size: 0.7rem;

    }


    .product-meta p {

        font-size: 0.5rem;

    }


    .product-price {

        font-size: 0.52rem;

    }


    .products-footer {

        width: 90%;

        flex-direction: column;

        gap: 0.8rem;

        text-align: center;

        font-size: 0.4rem;

    }

}