:root {
    --color-primary: #9b1c04;
    --color-primary-hover: #c22a0c; /* Slightly lighter for hover */
    --color-background: #111827;
    --color-surface: #1F2937;
    --color-border: #374151;
    --color-text: #F3F4F6;
    --color-text-muted: #9CA3AF;
    --font-sans: 'Poppins', sans-serif;
    --font-serif: 'Georgia', serif;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --radius: 0.5rem;
}
/* 
  Remove the `overflow-x: hidden;` from the `body` rule if you added it.
  Then, add this new block of code near the top of your CSS file.
*/

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* The rest of your body rule should look like this: */
body {
    font-family: var(--font-sans);
    margin: 0;
    background-color: var(--color-background);
    color: var(--color-text);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* The overflow-x property is now in the rule above */
}
body.nav-open {
    overflow: hidden;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 20px;
}
h1, h2, h3, h4 {
    color: var(--color-text);
    font-weight: 600;
    line-height: 1.3;
}
h1 { font-size: 3em; font-family: var(--font-serif); }
h2 { font-size: 2.5em; }
h3 { font-size: 1.25em; }
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}
a:hover { color: var(--color-primary-hover); }
header {
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 100;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 80px;
}
.logo img { max-height: 45px; width: auto; display: block; }
#nav-menu {
    display: flex;
    align-items: center;
    gap: 35px;
}
nav ul { list-style: none; display: flex; margin: 0; padding: 0; gap: 35px; }
nav ul li a {
    color: var(--color-text-muted);
    font-weight: 500;
    transition: color 0.2s;
}
nav ul li a:hover { color: var(--color-text); }
.lang-switcher { display: flex; gap: 5px; }
.lang-switcher a {
    font-weight: 600;
    color: var(--color-text-muted);
    padding: 6px 12px;
    border: 1px solid var(--color-border);
    border-radius: 99px;
    transition: all 0.2s;
    font-size: 0.9em;
}
.lang-switcher a.active, .lang-switcher a:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-background);
}
.hero {
    position: relative;
    color: white;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}
.hero-content { position: relative; z-index: 1; padding: 20px; }
.hero h1 { font-size: 4em; margin-bottom: 1rem; }
.hero p { font-size: 1.25em; max-width: 700px; margin: 0 auto 2.5rem auto; color: var(--color-text-muted); }
.btn {
    padding: 1rem 2.5rem;
    border-radius: 99px;
    font-weight: 600;
    transition: all 0.3s;
    font-size: 1em;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.btn-primary { background-color: var(--color-primary); color: var(--color-background); }
.btn-primary:hover { background-color: var(--color-primary-hover); transform: translateY(-3px) scale(1.05); }
.section-header, .page-header {
    text-align: center;
    margin-bottom: 60px;
}
.section-header h2, .page-header h1 {
    font-family: var(--font-serif);
    margin-bottom: 1rem;
}
.section-header p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--color-text-muted);
}
.section-bg { background-color: var(--color-surface); }
.page-container {
    background-color: var(--color-surface);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}
.page-container h1 { margin-top: 0; text-align: center; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 30px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    text-align: center;
}
.card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
}
.card .card-icon {
    color: var(--color-primary);
    margin-bottom: 20px;
    width: 50px; height: 50px;
    margin-left: auto; margin-right: auto;
}
.card .card-icon svg { width: 100%; height: 100%; }
.card h3 { margin-top: 0; margin-bottom: 10px; }
.card p { color: var(--color-text-muted); line-height: 1.6; }
.product-category h2 {
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 15px;
    margin-bottom: 30px;
    font-family: var(--font-serif);
}
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 30px;
}
.product-card {
    border-radius: var(--radius);
    overflow: hidden;
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--color-border);
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 0 25px rgba(155, 28, 4, 0.2);
}
.product-card img { width: 100%; height: 220px; object-fit: cover; display: block; }
.product-card-content { padding: 20px; border-top: 1px solid var(--color-border); }
.product-card h3 { font-size: 1.1em; font-weight: 600; margin: 0 0 10px 0; }
.product-card .price { margin: 0; color: var(--color-text-muted); font-weight: 500; }
.product-details-container, .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: flex-start;
}
.product-image-section img { width: 100%; border-radius: var(--radius); }
.product-info-section h1 { margin-top: 0; font-size: 2.5em; }
.product-info-section .price { font-size: 1.5em; font-weight: 600; color: var(--color-primary); margin-bottom: 20px; }
.product-info-section .description { margin-bottom: 30px; line-height: 1.8; color: var(--color-text-muted); }
.contact-card { background-color: var(--color-surface); padding: 40px; border-radius: var(--radius); border: 1px solid var(--color-border); }
.contact-card h3 { margin-top: 0; border-bottom: 1px solid var(--color-border); padding-bottom: 15px; margin-bottom: 20px; }
.contact-card p { margin-bottom: 15px; color: var(--color-text-muted); }
.contact-card strong { color: var(--color-text); }
.map-container { margin-top: 30px; border-radius: var(--radius); overflow: hidden; height: 300px; }
.map-container iframe { width: 100%; height: 100%; border: 0; filter: invert(90%) hue-rotate(180deg); }
.form-row { display: flex; gap: 20px; }
.form-group { flex: 1; margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; font-size: 0.9em; color: var(--color-text-muted); }
.form-group input, .form-group textarea {
    width: 100%; padding: 12px; border: 1px solid var(--color-border); border-radius: var(--radius); box-sizing: border-box; font-family: var(--font-sans); background-color: var(--color-background); color: var(--color-text); transition: border-color 0.2s, box-shadow 0.2s;
}
.form-group input:focus, .form-group textarea:focus {
    border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(155, 28, 4, 0.3); outline: none;
}
.form-group textarea { min-height: 150px; resize: vertical; }
.form-message { padding: 15px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 500; border: 1px solid transparent; }
.form-message.success { background-color: #166534; color: #A7F3D0; border-color: #15803D; }
.form-message.error { background-color: #991B1B; color: #FEE2E2; border-color: #B91C1C; }
.site-footer {
    background-color: #000;
    color: var(--color-text-muted);
    padding: 60px 20px 20px;
    font-size: 0.95em;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 40px;
}
.footer-logo { max-height: 50px; width: auto; margin-bottom: 20px; filter: brightness(0) invert(1); }
.footer-column h4 { color: white; font-weight: 600; margin-bottom: 20px; font-size: 1.1em; }
.footer-column p, .footer-column a { color: var(--color-text-muted); }
.footer-column a:hover { color: white; }
.footer-column ul { list-style: none; padding: 0; }
.footer-column ul li { margin-bottom: 10px; }
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    max-width: 1200px;
    margin: 0 auto;
}
#burger-menu {
    display: none;
    cursor: pointer;
    z-index: 101;
    padding: 10px;
}
#burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background-color: var(--color-text);
    transition: all 0.3s ease-in-out;
}

/* Replace the entire existing @media screen block with this one */
@media screen and (max-width: 992px) {
    .contact-grid, .product-details-container {
        grid-template-columns: 1fr;
    }
    
    #burger-menu {
        display: block;
    }

    /* --- CORRECTED MOBILE NAVIGATION --- */
    
    /* 1. Position the menu off-screen by default instead of using display:none */
     #nav-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: 70%;
        max-width: 320px;
        background-color: var(--color-surface);
        flex-direction: column;
        
        /* CHANGE THIS LINE: from 'center' to 'flex-start' */
        justify-content: flex-start; 
        
        align-items: center;
        gap: 0;
        padding: 60px 0;
        border-left: 1px solid var(--color-border);
        transform: translateX(100%);
        transition: transform 0.4s ease-in-out;
        z-index: 999;
        /* ADD THIS to prevent issues on iOS */
        box-sizing: border-box; 
    }

    /* ... other rules ... */

    #nav-menu .lang-switcher {
        /* REMOVE these two lines */
        /* position: absolute; */
        /* bottom: 40px; */

        /* ADD this line */
        margin-top: auto; 
        
        /* ADD this for spacing */
        padding-bottom: 20px; 
    }

    /* RTL support for the initial off-screen state */
    html[dir="rtl"] #nav-menu {
        right: auto;
        left: 0;
        border-left: none;
        border-right: 1px solid var(--color-border);
        transform: translateX(-100%);
    }

    /* 2. When the body has the 'nav-open' class, slide the menu into view */
    body.nav-open #nav-menu {
        transform: translateX(0);
    }

    /* --- End of Correction --- */
    
    #nav-menu ul {
        flex-direction: column;
        gap: 0;
        text-align: center;
        width: 100%;
    }
    
    #nav-menu ul li {
        margin: 0;
        width: 100%;
    }
    
    #nav-menu ul li a {
        display: block;
        padding: 15px 0;
        font-size: 1.1em;
    }
    
   
    
    body.nav-open #burger-menu span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    body.nav-open #burger-menu span:nth-child(2) {
        opacity: 0;
    }
    
    body.nav-open #burger-menu span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}
