
@font-face {
    font-family: bnazanin;
    src: url(../fonts/BNazanin.ttf);
}

/* تنظیمات عمومی */

* {
    box-sizing: border-box;
}

html {
    width: 100%;
}

body {
    margin: 0;
    width: 100%;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
}


/* هدر */

header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

header input[type="search"] {
    background-color: #f1f2f4;
    border: none;
    border-radius: 8px;
    padding: 12px;
}

header input[type="search"]:focus {
    background-color: #f1f2f4;
    box-shadow: 0 0 0 2px rgba(239, 57, 78, 0.15);
}

header .nav-link {
    color: #555;
    transition: 0.3s;
}

header .nav-link:hover {
    color: #ef394e;
}

header .btn-outline-secondary {
    border-radius: 8px;
    font-size: 13px;
}


/* منوی کشویی */

.dropdown-menu {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    text-align: right;
}

.dropdown-item {
    text-align: right;
    transition: 0.2s;
}

.dropdown-item:hover {
    background-color: #f5f5f5;
    color: #ef394e;
}

.mega-menu {
    width: 400px;
    padding: 15px;
    border: none;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.mega-menu .dropdown-item {
    padding: 10px;
}

@media (min-width: 992px) {
    .nav-item.dropdown:hover > .mega-menu {
        display: block;
    }
}


/* تصاویر میانبر */

.middle-images {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    width: 100%;
    padding: 20px 40px;
}

.image-item {
    width: 70px;
    text-align: center;
}

.image-item img {
    width: 45px;
    height: 45px;
    object-fit: contain;
}

.image-item p {
    font-size: 14px;
    margin-top: 10px;
    color: #555;
}


/* تصویر اصلی */

.head-image img {
    width: 100%;
    height: auto;
    display: block;
}


/* بخش تخفیف اول و دوم */

.off,
.off2 {
    width: 78%;
    height: auto;
    margin: 10px auto;
    border-radius: 10px;
    display: flex;
    align-items: stretch;
    gap: 5px;
    flex-wrap: nowrap;
}

.off {
    background-color: #d52d4e;
}

.off2 {
    background-color: #6CB928;
}

/* کارت محصولات */

.card h5 {
    font-family: bnazanin;
    font-size: large;
}

.off .card,
.off2 .card {
    flex: 0 0 18rem;
    margin: 10px 0;
}

/* بخش سمت راست تخفیف */

.rightest {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 5px;
    gap: 15px;
}

.off2 .rightest {
    padding: 10px 5px;
    gap: 5px;
}

.darsad-img img {
    display: block;
    width: 64px;
    margin: 0 auto;
}

.segeft-img img {
    display: block;
    width: 110px;
    margin: 0 auto;
}

.rightest button {
    width: 120px;
}


/* تبلیغات */

.tabligh {
    width: 78%;
    height: auto;
    margin: 10px auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
}

.tabligh img {
    width: 23%;
    height: auto;
    margin: 5px 0;
    border-radius: 20px;
}


/* تبلیغات دوم */

.tabligh2 {
    display: flex;
    width: 100%;
    height: auto;
    border: solid 2px black;
}


/* دسته بندی ها */

.categories {
    width: 95%;
    margin: 30px auto;
    padding: 10px;
}

.categories h3 {
    font-size: 22px;
    text-align: right;
    margin-bottom: 35px;
}

.categories-list {
    display: grid;
    grid-template-columns: repeat(9, minmax(0, 1fr));
    row-gap: 25px;
    column-gap: 10px;
}

.category {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.category-img {
    width: 95px;
    height: 95px;
    border-radius: 50%;
    background-color: #eeeeee;
    border: 2px solid #eeeeee;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.category p {
    font-size: 14px;
    margin-top: 8px;
    color: #222;
}


/* نمایشگرهای متوسط */

@media (max-width: 1200px) {

    .off,
    .off2 {
        width: 95%;
        flex-wrap: wrap;
        justify-content: center;
    }

    .off .card,
    .off2 .card {
        flex: 1 1 220px;
        max-width: 18rem;
    }

    .categories-list {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }

    .tabligh {
        width: 95%;
    }
}


/* تبلت */

@media (max-width: 768px) {

    .middle-images {
        flex-wrap: wrap;
        gap: 20px;
        padding: 20px;
    }

    .off,
    .off2 {
        width: 95%;
        padding: 10px;
    }

    .off .card,
    .off2 .card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .off .rightest,
    .off2 .rightest {
        flex: 1 1 100%;
    }

    .categories-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .tabligh {
        width: 95%;
    }

    .tabligh img {
        width: 48%;
    }
}


/* موبایل */

@media (max-width: 480px) {

    .middle-images {
        justify-content: center;
        gap: 15px;
    }

    .image-item {
        width: 65px;
    }

    .image-item img {
        width: 40px;
        height: 40px;
    }

    .categories {
        width: 100%;
    }

    .categories h3 {
        font-size: 19px;
        margin-bottom: 25px;
    }

    .categories-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px 5px;
    }

    .category-img {
        width: 75px;
        height: 75px;
    }

    .category p {
        font-size: 12px;
    }

    .tabligh img {
        width: 48%;
    }
}

.tabligh2 {
    display: flex;
    width: 78%;
    margin: 20px auto;
    gap: 15px;
    border: none;
}

.tabligh2 img {
    width: calc(50% - 7.5px);
    height: auto;
    border-radius: 15px;
}

@media (max-width: 768px) {
    .tabligh2 {
        width: 95%;
        flex-wrap: wrap;
    }

    .tabligh2 img {
        width: 100%;
    }
}