/* ===============================
   استایل کلی هدر
   =============================== */

.gs-header {
    background: #c80000; /* قرمز پررنگ */
    color: #fff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 999;
}

.gs-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

/* لوگو */
.gs-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.gs-logo img {
    height: 32px !important;  /* کنترل اندازه لوگو */
    width: auto !important;
    object-fit: contain;
    display: block;
}

.site-name {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

/* ===============================
   منو
   =============================== */

.gs-nav {
    display: flex;
}

.gs-menu {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.gs-menu-item {
    position: relative;
}

.gs-menu-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    white-space: nowrap;
}

/* ===============================
   سمت راست هدر: جستجو + سبد خرید + تلفن
   =============================== */

.gs-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* فرم جستجو */
.gs-search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
}

.gs-search-input {
    border: none;
    padding: 4px 10px;
    font-size: 13px;
    min-width: 140px;
    outline: none;
    direction: rtl;
}

.gs-search-button {
    border: none;
    background: #c80000;
    color: #fff;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
}

/* سبد خرید */
.gs-cart-link {
    position: relative;
    text-decoration: none;
    color: #fff;
    font-size: 20px;
}

.gs-cart-count {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #000;
    color: #fff;
    font-size: 11px;
    padding: 1px 5px;
    border-radius: 999px;
}

/* تلفن */
.gs-phone a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    direction: ltr; /* برای خواندن درست شماره */
}

/* ===============================
   دکمه منوی موبایل
   =============================== */

.gs-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.5);
    border-radius: 4px;
    width: 32px;
    height: 28px;
    cursor: pointer;
}

.gs-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    background: #fff;
}

/* ===============================
   ریسپانسیو موبایل
   =============================== */

@media (max-width: 900px) {

    .gs-header-inner {
        gap: 10px;
    }

    .gs-header-right {
        gap: 8px;
    }

    .gs-search-input {
        min-width: 110px;
    }
}

@media (max-width: 768px) {

    .gs-menu-toggle {
        display: flex;
    }

    /* منو در موبایل به صورت کشویی */
    .gs-nav {
        display: none;
        position: absolute;
        top: 60px;
        right: 0;
        width: 100%;
        background: #c80000;
        padding: 15px;
    }

    .gs-nav.active {
        display: block;
    }

    .gs-menu {
        flex-direction: column;
        gap: 12px;
    }

    /* چیدمان کلی: لوگو بالا، بقیه جمع‌وجور */
    .gs-header-inner {
        justify-content: space-between;
    }

    .gs-header-right {
        gap: 8px;
    }

    .gs-search-input {
        min-width: 100px;
        font-size: 12px;
    }

    .gs-phone a {
        font-size: 12px;
    }
}
/* زیرمنو مخفی در حالت عادی */
.gs-submenu {
    display: none;
    position: absolute;
    background: #fff;
    color: #333;
    right: 0;
    top: 100%;
    min-width: 180px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 10px 0;
    z-index: 99;
}

.gs-submenu-item a {
    display: block;
    padding: 8px 12px;
    text-decoration: none;
    color: #333;
}

.gs-submenu-item a:hover {
    background: #eee;
}

/* باز شدن زیرمنو در دسکتاپ با هاور */
@media (min-width: 769px) {
    .gs-menu-item.has-children:hover > .gs-submenu {
        display: block;
    }
}

/* موبایل → باز و بسته شدن با کلیک */
@media (max-width: 768px) {
    .gs-menu-item.has-children > .gs-submenu {
        display: none;
        position: static;
        box-shadow: none;
        background: #fff;
    }

    .gs-menu-item.has-children.open > .gs-submenu {
        display: block;
    }
}

