body {
    font-family: system-ui;
    margin: 0;
    padding: 0;
    background-color: #f7f7f7;
    direction: rtl;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}


header {
    background-color: #2a9d8f;
    color: white;
    padding: 1vw;
    text-align: center;
    
}


h1 {
    margin: 0;
    font-size: 2.5em;
}


nav {
    background-color: #264653;
    color: white;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5vw 0vw;
    box-shadow: 0 0.2vw 0.3vw rgba(0, 0, 0, 0.1);
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1vw;
    top:2.5vw
}

.nav-links li {
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: white;
    font-size: 1.44em;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    padding: 0.4vw 0.75vw;
    border-radius: 0.25vw;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.nav-links a:hover, .nav-links a.active {
    background-color: #2a9d8f;
    color: white;
}

.nav-toggle {
display: none;
background: #2a9d8f;
border: none;
color: white;
font-size: 1.5em;
cursor: pointer;
position: absolute;
top: 0vw;
right: 2vw; /* מיקום בצד ימין */
z-index: 1100;
padding: 0.5vw;
border-radius: 0.25vw;
box-shadow: 0 0.1vw 0.2vw rgba(0, 0, 0, 0.2);
}

.container {
    width: 90%;
    margin: 1vw auto 0;
    padding: 1vw;
}

.category {
    margin-bottom: 2vw;
}

.category h3 {
    background-color: #264653;
    color: white;
    padding: 0.5vw;
    border-radius: 0.25vw;
    font-size: 1.3vw;
    text-align: center;
}


.product-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5vw;
    margin-top: 0.5vw;
}

.product-item {
    background-color: white;
    padding: 0.75vw;
    border-radius: 0.4vw;
    box-shadow: 0 0.2vw 0.4vw rgba(0, 0, 0, 0.1);
    width: 22%;
    text-align: center;
    transition: transform 0.3s;
    margin-bottom: 1vw;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.product-item:hover {
    transform: scale(1.05);
}
.product-item a {
    display: block;
    text-decoration: none;
    color: #264653;
    margin-top: 0.5vw;
    font-weight: bold;
    text-align: center;
}

.product-item img {
    width: 100%;
    height: 12.5vw; /* הגדלנו את גובה התמונות */
    object-fit: contain; /* מתאים לתצוגת תמונות שלמות במובייל */
    border-radius: 0.25vw;
}

.product-item h3 {
    margin-top: 0.5vw; /* רווח אחיד בין התמונה לשם המוצר */
}

.back-to-top {
    position: fixed;
    bottom: 1vw;
    right: 1vw;
    background-color: #2a9d8f;
    color: white;
    border: none;
    border-radius: 50%;
    width: 3.5vw;
    height: 3.5vw;
    text-align: center;
    font-size: 2.5em;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}


footer {
    background-color: #264653;
    color: white;
    padding: 0.5vw;
    text-align: center;
}

/* Media Queries for mobile and tablet devices */
@media (max-width: 1200px) {
    .product-item {
    width: 30%; /* במכשירים טאבלט ורוחב בינוני, נקטין את רוחב המוצר */
    }
    .nav{
        padding: 1vw 0vw;
    }
    .nav-links a {
    font-size: 2vw;
    }

    .category h3 {
    font-size: 4vw;
    }   
}
/* Responsive Styles */
@media (max-width: 768px) {

    h1 {
        font-size: 1.7em; /* בגודל מסך קטן יותר, נקטין את גודל הכותרת */
        margin-top: 6vw;
    }

    h2 {
        font-size: 1.4em; /* בגודל מסך קטן יותר, נקטין את גודל הכותרת */
       
    }

    .category h3 {
        font-size: 4vw;
        
    }

    .product-item {
        width: 41vw; /* יש בכל שורה 2 מוצרים ,במוביל*/
        
    }
    .product-item:hover{
        transform: none;
    }
    .product-list {
        gap: 4.5vw; /* נקטין את המרווח בין המוצרים */
        justify-content: center;
    }
    .product-item a {
        padding: 1.3vw;
    }

    .product-item img {
        height: 40vw; /* התאמה אוטומטית של גובה התמונות במובייל */
        width: 38vw;
        object-fit: fill;
    }
    nav {
        padding: 0 0;
        }

 .nav-links {
    display: none;
    flex-direction: column;
    background-color: #264653;
    position: absolute;
    top: 7.7vw;
    right: 10vw;
    width: 72vw;
    border-radius: 0.25vw;
    box-shadow: 0 0.2vw 0.3vw rgba(0, 0, 0, 0.2);
    gap: 4.5vw;
    padding: 4.5vw;
    text-align: center;
}
    .nav-links a {
    text-decoration: none;
    color: white;
    font-size: 5.6VW;
    font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
    padding: 1.3vw 1.75vw;
    border-radius: 1.25vw;
    transition: background-color 0.3s ease, color 0.3s ease;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-toggle {
        display: contents;

    }

    .back-to-top {
       
        bottom: 4vw;
        width: 11.5vw;
        height: 10.5vw;
        font-size: 2.5em;
        
    }
}

