/* Header Styles */

.site-header {
    background: #fff;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  /*  position: sticky; */
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
  /*  max-width: 1400px; 
      padding: 15px 20px;
  */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Logo Row Styles */
.header-logo-row {
    width: 100%;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
}

.logo-image {
    max-height: 50px;
    width: auto;
    height: auto;
    display: block;
}

.logo-text {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    display: block;
}
/* Hide the title */
h1 {
    display: none;
}
/* Navigation Row Styles */
.header-nav-row {
    width: 100%;
    height: 50px;
    display: flex;
    justify-content: space-between; /* Space between nav menu and search box */
    align-items: center;
    gap: 20px;
    background: linear-gradient(0deg, #e2e2e2 0%, #ffffff 75%);
    overflow: hidden; /* Prevents content from wrapping */
}

/* Hamburger Menu Button */
.hamburger-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    margin-left: 10px; /* In RTL, margin-left is visually on the right */
}

.hamburger-menu-btn:hover {
    height: 26px;
}

.hamburger-line {
    width: 100%;
    height: 2px;
    background-color: #d6291dff; /* Red color */
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger-menu-btn:hover .hamburger-line {
    background-color: #c4161d;
}

/* Navigation Menu Styles */
.main-navigation {
    display: flex;
    justify-content: flex-start; /* In RTL, flex-start is visually on the right */
    flex: 1;
    min-width: 0; /* Allows flex item to shrink below content size */
    overflow-x: auto; /* Allow horizontal scrolling if needed */
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.main-navigation::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Cart Icon Styles */
.header-cart-container {
    flex-shrink: 0;
    margin-left: 15px;
    position: relative;
}

.header-cart-link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    position: relative;
}

.header-cart-link:hover {
    background-color: #f5f5f5;
}

.header-cart-link.active {
    background-color: #0066cc;
    color: white;
}

.cart-icon-large {
    font-size: 24px;
    line-height: 1;
}

.cart-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
}

/* Search Box Styles */
.header-search-container {
    flex-shrink: 0;
    margin-left: 15px; /* In RTL, margin-left pushes to the left side visually */
}

.header-search-form {
    position: relative;
    display: flex;
    align-items: center;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

.header-search-input {
    padding: 8px 40px 8px 12px; /* More padding on right for icon, less on left */
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 14px;
    width: 250px;
    background: #fff;
    box-sizing: border-box;
    direction: rtl;
}

.header-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.header-search-input::placeholder {
    color: #999;
}

.header-search-button {
    position: absolute;
    left: 8px; /* In RTL, right is visually left */
    top: 50%;
    width: 20px;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: end;
    color: #666;
    transition: color 0.2s;
}

.header-search-button:hover {
  /*  color: #007bff;*/
  background-color: #fff;
}

.header-search-button svg {
    display: block;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 5px;
    align-items: center;
    justify-content: flex-end;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.nav-menu::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.nav-item {
    margin: 0;
    padding: 0;
}

.nav-link {
    font-family: "Open Sans";
    font-size: 26px;
    font-weight: 500;
    color: #111111;
    line-height: 1.92;
    letter-spacing: 0.5px;
    display: block;
    padding: 0 16px;
    text-decoration: none;
    text-transform:none;
    position: relative;
    -webkit-transition: color .2s ease,background .2s ease;
    transition: color .2s ease,background .2s ease;
    
  /*  border-radius: 4px; */
    white-space: nowrap;
    flex-shrink: 0;

}

.nav-link:hover {
    background-color: #f5f5f5;
    color: #b40f0f;
}

.nav-link:active {
    background-color: #e9ecef;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-container {
        gap: 15px;
        padding: 15px;
    }
    
    .header-logo-row {
        width: 100%;
    }
    
    .header-nav-row {
        width: 100%;
        flex-direction: column;
        gap: 15px;
    }
    
    .main-navigation {
        width: 100%;
        justify-content: flex-start; /* Keep items aligned to start for scrolling */
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu {
        justify-content: flex-start; /* Allow scrolling from start */
        gap: 3px;
        flex-wrap: nowrap;
    }
    
    .nav-link {
        padding: 8px 12px;
        font-size: 20px;
        flex-shrink: 0;
    }
    
    .header-search-container {
        width: 100%;
        margin-right: 0;
    }
    
    .header-search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .header-container {
        padding: 10px;
    }
    
    .logo-image {
        max-height: 40px;
    }
    
    .logo-text {
        font-size: 24px;
    }
    
    .main-navigation {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu {
        flex-wrap: nowrap;
        gap: 2px;
        justify-content: flex-start; /* Allow scrolling from start */
    }
    
    .nav-link {
        padding: 6px 10px;
        font-size: 18px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .main-navigation {
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    .nav-menu {
        flex-direction: row;
        flex-wrap: nowrap;
        width: 100%;
        overflow-x: auto;
        justify-content: flex-start; /* Allow scrolling from start */
    }
    
    .nav-item {
        flex-shrink: 0;
    }
    
    .nav-link {
        width: auto;
        text-align: center;
        padding: 8px 10px;
        font-size: 16px;
    }
}

/* Mobile Vertical Menu Styles */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: flex;
    opacity: 1;
}

.mobile-menu-content {
    background: #fff;
    width: 300px;
    height: 100%;
    margin-right: auto; /* In RTL, margin-right pushes to the left side visually */
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from {
        transform: translateX(-100%); /* In RTL, slide from left side visually */
    }
    to {
        transform: translateX(0);
    }
}

.mobile-menu-search {
    padding: 15px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.mobile-search-form {
    position: relative;
    display: flex;
    align-items: center;
}

.mobile-search-input {
    width: 100%;
    padding: 10px 40px 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    direction: rtl;
}

.mobile-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.1);
}

.mobile-search-input::placeholder {
    color: #999;
}

.mobile-search-button {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
}

.mobile-search-button svg {
    display: block;
}

.mobile-menu-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-item {
    margin: 0;
    padding: 0;
}

.mobile-menu-link {
    display: block;
    padding: 15px 20px;
    color: #111;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    text-align: right;
}

.mobile-menu-link:hover {
    background-color: #f5f5f5;
    color: #b40f0f;
}

.mobile-menu-link:active {
    background-color: #e9ecef;
}

