/* Global styles to prevent horizontal overflow */
* {
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
    margin: 0;
    padding: 0;
}

body, html {
    overflow-x: hidden; /* Prevent horizontal scrolling */
    width: 100%;
}

/* Ensure all elements are within the viewport width */
header, nav, main, footer, .container, .product {
    max-width: 100%;
    overflow-x: hidden;
}

/* Basic styles */

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.logo {
    display: flex;
}

.nav-left {
    display: flex;
    align-items: center;
}

.logo img {
    height: 155px;
    width: auto;
}

header {
    color: #050000;
    padding: 2rem;
    text-align: center;
    top: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    position: relative;
    flex-wrap: nowrap;
}


.menu-icon {
    display: none;
    font-size: 2rem;
    cursor: pointer;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding-left: 100px;
    padding-top: 8px;
}

nav li {
    display: flex;
    margin: 0.5rem 0;
}

nav a {
    display: flex;
    text-decoration: none;
    color: #696868;
    font-weight: bold;
    direction: ltr;
    align-items: center;
    padding: 3px;
    width: 100%;
}

nav ul li a:hover {
    color: #000000; /* رنگ سفید برای حالت هاور */
    text-decoration: none;
}

nav {
    justify-content: left;
    width: 60%;
}

@media (max-width: 768px) {
    .logo {
        position: absolute;
        top: -6px;
    }
    .logo img {
        height: 87px;
        width: auto;
    }
    #menu-icon {
        display: block;
        position: absolute;
        top: 1rem;
        left: 1rem;
    }

    #menu {
        padding: 16px;
    }



    header {
        justify-content: center; /* قرار دادن محتوای سربرگ در مرکز */
    }

    nav ul {
        display: none;
        justify-content: center;
        flex-direction: column;
        position: static; /* ensure menu appears below header */
        width: 100%;
        align-items: center;
    }

    nav ul.show {
        display: flex;
    }

    nav li {
        margin: 2rem 0;
        text-align: left;
    }
}

@media (min-width: 769px) {
    nav ul {
        flex-direction: row;
    }

    nav a {
        align-items: center;
    }


    nav li {
        margin: 0 1rem;
    }

}


main {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 2em;
    align-items: center;
}


.social-media {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 2rem;
    margin-top: 50px;
}

.social-media a {
    text-decoration: none;
    color: #333;
    padding: 0.5rem 1rem;
    background-color: #ddd;
    border-radius: 5px;
}

.social-media a:hover {
    color: #070462; /* رنگ سفید برای حالت هاور */
    text-decoration: none;
}

footer {
    text-align: center;
    padding: 1em;
    background-color: #333;
    color: white;
    margin-top: auto;
}

/*products*/

#product-title {
    text-align: center;
    margin-top: 2rem;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center; /* قرار دادن محصولات در وسط صفحه */
    width: 100%;
    padding: 20px;
}

.product {
    display: flex;
    flex-direction: row; /* نمایش افقی عکس و متن */
    margin-bottom: 2rem; /* فاصله بین محصولات */
    align-items: center; /* مرکزیت عمودی */
    width: 100%; /* تنظیم عرض باکس محصولات به اندازه کوچکتر */
    opacity: 0; /* شروع از حالت نامرئی */
}

.product.left-align {
    flex-direction: row-reverse; /* متن در سمت چپ و تصویر در سمت راست */
    animation: slideInFromLeft 1s forwards;
}

.product.right-align {
    flex-direction: row; /* متن در سمت راست و تصویر در سمت چپ */
    animation: slideInFromRight 1s forwards;
}

.product img {
    width: 100%; /* تنظیم عرض ثابت برای تصاویر */
    height: auto; /* تنظیم ارتفاع ثابت برای تصاویر */
}

.product-details {
    flex: 1; /* اجازه به توضیحات که فضای باقی مانده را پر کند */
    text-align: center; /* چپ چین کردن متن */
    font-size: 15px;
}

.product h2 {
    margin-top: 0;
    font-weight: bold; /* بولد کردن متن */
    padding: 16px;
    color: #7dcdcc;
    font-size: 29px;
}

button.see-more {
    margin-top: 1rem;
    color: black;
    border: none;
    cursor: pointer;
    border-radius: 30px;
    font-size: 12px;
    padding: 16px 32px;
}

button.see-more:hover {
    color: #7dcdcc;
}

@keyframes slideInFromLeft {
    0% {
        transform: translateX(-100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.product-img {
    width: 70%;
    margin-left: 20px;
    margin-right: 20px;
}

@media (max-width: 1000px) {
    .product {
        display: inline;
        overflow: hidden;
    }

    .product img {
        width: 100%; /* عرض کامل تصویر در حالت گوشی */
        height: auto; /* حفظ نسبت تصویر */
    }

    .product-details {
        width: 100%; /* عرض کامل برای متن */
        text-align: center; /* مرکزیت متن */
        margin-top: 1rem; /* فاصله بین عکس و متن */
    }

    .product-img {
        width: 100%;
        margin-left: unset;
        margin-right: unset;
    }

    .product p {
        font-size: 14px;
    }

    button.see-more {
        padding: 12px;
    }

}






