* {
    box-sizing: border-box;
    font-family: my-yekan;
}

html, body {
    margin: 0;
    padding: 0;
}

/* استایل‌های هدر */
.top-navbar {
    position: fixed;
    background-color: #ffffff;
    width: 100%;
    z-index: 100;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* اضافه کردن سایه برای زیبایی */
}

.top-navbar .logo {
    height: auto;
    max-width: 150px; /* تنظیم عرض مناسب برای موبایل */
}

.user-info {
    display: flex;
    color: black;
    font-weight: bold;
    font-size: 16px;
    align-items: center;
    margin-right: auto;
}

.cart-icon {
    display: flex;
    align-items: center;
    font-size: 14px;
}

.cart-icon a {
    color: black;
    text-decoration: none;
    font-size: 18px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

.cart-icon a:hover {
    color: #e23625; /* تغییر رنگ هنگام هاور */
}

/* منوی اصلی */
.menu {
    background-color: #e23625;
    box-shadow: 1px 1px 1px #494949;
    display: flex;
    position: fixed;
    justify-content: flex-start;
    width: 100%;
    top: 60px;
    z-index: 99;
    margin-top: 0;
}

.menu a {
    color: #f2f2f2;
    text-align: center;
    padding: 10px 12px;
    text-decoration: none;
    font-size: 17px;
    display: flex;
    align-items: center;
}

.dropdown {
    position: relative;
    display: block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 1;
    flex-direction: column;
    top: 100%;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: right;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.menu a:hover {
    background-color: #d5d2d2;
    color: black;
}

.menu a.active {
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .top-navbar {
        flex-wrap: wrap;
        text-align: center;
        padding: 10px;
    }

    .top-navbar .logo {
        max-width: 100px;
        margin-bottom: 10px;
    }

    .user-info {
        justify-content: center;
        margin-bottom: 10px;
    }

    .cart-icon {
        justify-content: center;
    }

    .search-box {
        width: 90%;
        position: relative;
        transform: none;
        margin: 10px 0;
    }

    .menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .menu a {
        font-size: 14px;
        padding: 10px;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
    }
}

@media (max-width: 600px) {
    .search-box {
        display: none; /* مخفی کردن جعبه جستجو در موبایل‌های بسیار کوچک */
    }
}
dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    flex-direction: column; /* اضافه شده برای نمایش ستونی */
    top: 100%;
}

.dropdown-content a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    text-align: right; /* اضافه شده برای تنظیم متن */
}

.dropdown:hover .dropdown-content {
    display: block; /* تغییر از block به flex برای نمایش ستونی */
}

/* Change the color of links on hover */
.menu a:hover {
    background-color: #d5d2d2;
    color: black;
}

/* Add a color to the active/current link */
.menu a.active {
    background-color: rgba(0, 0, 0, 0.75);
    color: white;
}

@media only screen and (max-width: 600px) {
    .search-box{
        display: none;
    }
}

