html{
    scroll-behavior: smooth;
}
body{
    text-align: right;
    font-family: 'Vazir', sans-serif;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* header */
header {
    display: flex;
    justify-content: space-between;
    align-items:center;
    padding: 0 20px;
    margin: 0;
    height: 110px;
    background-image: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
    font-family: 'Tahoma', sans-serif;
}

.logo {
    height: 120px;
    width: 100px;
}

.menu {
    list-style: none;
    display: flex;
    gap: 30px;
}

.menu a {
    text-decoration: none;
    color: black;
    padding: 8px 12px;
    transition: color 0.3s;
}

.menu a:hover {
    color: gray;
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background-image: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
    min-width: 160px;
    border-radius: 5px;
    overflow: hidden;
    list-style: none;
    z-index: 1000;
}

.dropdown-content li {
    border-bottom: 0px solid white;
}

.dropdown-content li:last-child {
    border-bottom: none;
}

.dropdown-content li a {
    display: block;
    padding: 10px 15px;
    color: black;
    text-decoration: none;
}

.dropdown-content li a:hover {
    background-color: rgba(159,182,193,0.61);
}
.menu a:hover {
    color: gray;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.search-box input {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    outline: none;

}
.dropdown .dropdown-content {
    display: none;
}

/* وقتی کلاس active گرفته منو نمایش داده شود */
.dropdown.active .dropdown-content {
    display: block;
}
/* responsive */
@media (max-width: 768px) {
    header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        flex-direction: row;
        height: auto;
        gap: 10px;
    }

    .logo {
        width: 45px; /* سایز لوگو کوچیک‌تر و مناسب */
        height: auto;
        order: 2; /* لوگو وسط */
    }

    nav {
        order: 1; /* منو سمت راست */
    }

    .search-box {
        order:0; /* سرچ سمت چپ */
        width: auto;
    }

    .search-box input {
        width: 90px; /* کوچیک برای موبایل */
        height: 30px;
        font-size: 12px;
        border-radius: 6px;
    }

    .menu {
        display: flex;
        flex-direction: row;
        gap: 8px;
        align-items: center;
        justify-content: center;
    }

    .menu li a {
        font-size: 12px;
        padding: 4px 6px;
    }

    /* دراپ‌داون‌ها روی موبایل بهتر دیده بشن */
    .dropdown-content {
        position: absolute;
        right: 0;
        background: #fff;
        border-radius: 6px;
        padding: 5px 0;
        top: 35px;
    }

    .dropdown:hover .dropdown-content {
        display: block;
    }
}
/*body*/
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 2fr);
    gap: 15px;
    max-width: 900px;
    margin: 30px auto;
    direction: rtl;
}

.product-box {
    background: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.product-box img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    margin-bottom: 10px;
}


.product-box h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.product-box button {
    background: #007bff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    width: 40%;
}
.product-box button a {
    text-decoration: none;
    color: white;
}

.product-box button:hover {
    background: #0056b3;
}
.product-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-box:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    cursor: pointer;
}
.product-box img {
    transition: 0.35s ease;
}

.product-box:hover img {
    transform: scale(1.08);
}


/* responsive */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: 1fr;
    }
}


/*footer*/
.footer {
    background-image: linear-gradient(to top, #cfd9df 0%, #e2ebf0 100%);
    color: #333;
    padding: 30px 20px;
    font-family: "IRANSans", sans-serif;
    border-top: 1px solid #ddd;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
}


.footer-brand h2 {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #222;
}

.footer-brand p {
    font-size: 15px;
    line-height: 1.8;
    max-width: 500px;
}


.footer-menus {
    display: flex;
    justify-content: center;
    gap: 80px;
}

.footer-menus h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: #111;
}

.footer-menus ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-menus li {
    margin-bottom: 8px;
}

.footer-menus a {
    text-decoration: none;
    color: #555;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-menus a:hover {
    color: #e74c3c;
}


.footer-contact {
    text-align: center ;
    font-size: 14px;
    color: #444;
}
@media (min-width: 1000px) {
    .footer-container {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }
    .footer-brand {
        width: 35%;
        text-align: right;
    }
    .footer-menus {
        width: 40%;
        justify-content: center;
    }
    .footer-contact {
        width: 25%;
        text-align: right;
    }
    ul,li{
        margin-top: 10px;
        list-style-type: none;
    }
}

