body {
    margin: 0;
    font-family: 'vazir', sans-serif;
    line-height: 1.6;
    background-color: #f4f4f4;
    color: #333;
}

header {
    background-color: #1e90ff;
    color: #ffffff;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
}

header{
    position: sticky;
    top: 0;
    z-index: 1000;
    
}



nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 1rem;
}

nav ul li {
    display: inline;
}

nav ul li a {
    color: white;
    text-decoration: none;
}

nav ul li a:hover{
    color: #333;
    transition: 0.5s ;
    text-shadow: 2px 0 12px  white;
    border-bottom: 2px  solid #0073e6;
}

.profile-box{
    width: 15rem;
    height: 20rem;
    border-radius: 15px;
    background-color: #1e90ff;
    display: none;
    animation: box 1s forwards;
    position: fixed;
    text-align: center;
    padding-top: 15px;
    color: white;
    box-shadow: -5px -5px 10px rgba(0, 0, 0, 0.1);

}
#profile-bt:checked + .profile-box{
    display: block;
}

.hero {
    padding: 2rem;
    text-align: center;
    background: linear-gradient(135deg, #1e90ff, #ff6347);
    color: white;

}

.hero h1 {
    margin: 0;
    animation: hero infinite forwards;

    font-size: 2.5rem;

    
}

.hero p {
    margin: 1rem 0;
}

.products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 2rem;
    row-gap: 3rem;
    
}

/*.product {
    background: white;
    padding: 1rem;
    width: 16rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
}
*/
.product img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.product h3 {
    margin: 0.5rem 0;
}

.product button {
    background: #1e90ff;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
}

.product button:hover {
    background: #4682b4;
}



@media (max-width: 768px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    .products{
        display: flex;
        justify-content: center; /* وسط‌چین کردن افقی */
        align-items: center;    /* وسط‌چین کردن عمودی */
        flex-wrap: wrap;       /* برای ریسپانسیو کردن */
        min-height: 100vh;     /* ارتفاع حداقل برای مرکز عمودی */
        column-gap: 4rem;
    }
    .profile{
        display: none;
    }
    header{
        text-align: center;
        align-items: center;
        font-size: small;
    }
}

.search-box {
    display: flex;
    align-items: center;
    gap: 5px;
}

.search-box input {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.search-box button {
    padding: 5px 10px;
    border: none;
    background-color: #0073e6;
    color: white;
    border-radius: 4px;
    cursor: pointer;
}

.search-box button:hover {
    background-color: #005bb5;
}


footer {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    background: #b8b8b8;
    color: white;
    margin-top: 6rem;
}
.footer-box{
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-direction: column;
    background-color: #1e90ff;
    width: 50rem;
    height: 8rem;
    border-radius: 30px;
    box-shadow: 5px 5px 15px #c7c7c7;
    padding: 1rem;
    margin-top: -6rem;
}

.ms{
    width: 8rem;
    height: 3rem;
    border-radius: 15px;
    background-color: #ff6347;
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
    position: fixed;
    z-index: +3;
    right: 15rem;
    bottom: 20rem;
    font-size: 30px;
    display: none;
    animation: error 4s forwards;
}

#like-bt:checked + .ms{
    display: block;
}

@keyframes error {
    0%{opacity: 1;}
    50%{opacity: 1;}
    100% {opacity: 0;}
}
@keyframes box {
    0%{opacity: 0;}
    10%{opacity: 0;}
    100% {opacity: 1;}
}

/* @keyframes hero {
    0%{background: linear-gradient( #005bb6, #ff6347);}
    100%{background:  linear-gradient(#1e90ff, #ff6347);}
} */



/* استایل دکمه همبرگری */
.hamburger-menu {
    font-size: 2rem;
    cursor: pointer;
    display: none;
    color: white;
    margin-left: 1rem;
}

/* تغییر استایل منو در حالت موبایل */
@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 60px;
        right: 0;
        background-color: #1e90ff;
        width: 100%;
        text-align: center;
        padding: 0;
    }

    nav ul li {
        padding: 1rem;
        border-bottom: 1px solid white;
    }

    /* نمایش منو زمانی که همبرگر کلیک شده است */
    #menu-toggle:checked + .hamburger-menu + nav ul {
        display: flex;
    }
}