* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    direction: rtl;
}

body.rbx-menu-open {
    overflow: hidden;
}

.rbx-header .container {
    max-width: 1320px;
    padding-inline: 12px;
    margin: 0 auto;
}

/* ================= HEADER ================= */

.rbx-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.rbx-header-top {
    padding: 12px 0;
    background: #ffffff;
}

.rbx-header-top-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.rbx-header-logo {
    flex-shrink: 0;
}

.rbx-logo-img {
    display: block;
    height: 40px;
    width: auto;
}

/* ================= SEARCH ================= */

.rbx-header-search {
    flex: 1;
    max-width: 520px;
}

.rbx-header-search form {
    display: flex;
    align-items: center;
    background: #f3f5f7;
    border-radius: 50px;
    overflow: hidden;
    border: 1px solid transparent;
    transition: all 0.25s ease;
}

.rbx-header-search form:focus-within {
    background: #ffffff;
    border-color: #f60;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.15);
}

.rbx-header-search input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 18px;
    font-size: 14px;
    outline: none;
    color: #333;
}

.rbx-header-search button {
    border: none;
    background: #f60;
    color: #ffffff;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50px 0 0 50px;
}

.rbx-header-search button:hover {
    background: #e55a00;
}

/* ================= ACTIONS ================= */

.rbx-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.rbx-auth-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 30px;
    background: #f4f6f8;
    color: #333;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.rbx-auth-link:hover {
    background: #fff3e6;
    color: #f60;
}

.rbx-wishlist-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f4f6f8;
    color: #333;
    font-size: 18px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.rbx-wishlist-link:hover {
    background: #fff3e6;
    color: #f60;
}

.rbx-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    border-radius: 30px;
    background: #f60;
    color: #ffffff;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

/* ================= CART ================= */

.cart-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 95px;
    height: 42px;
    padding: 0 18px;
    border-radius: 30px;
    background: #f60;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

.cart-toggle i {
    font-size: 18px;
}

.cart-toggle:hover {
    background: #e55a00;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 102, 0, 0.3);
    color: #ffffff;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    min-width: 20px;
    height: 20px;
    border-radius: 30px;
    background: #dc3545;
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

/* ================= DESKTOP NAV ================= */

.rbx-header-nav {
    border-top: 1px solid #eef1f4;
    border-bottom: 1px solid #eef1f4;
    background: #f9fafb;
}

.rbx-header-nav .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.rbx-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.rbx-nav-menu > li {
    position: relative;
}

.rbx-nav-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.25s ease;
}

.rbx-nav-menu > li > a:hover {
    background: #fff3e6;
    color: #f60;
}

/* ================= MEGA MENU ================= */

.rbx-mega-parent {
    position: static !important;
}

.rbx-mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    width: min(820px, calc(100vw - 32px)); /* کوچکتر از قبل */
    background: #fff;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border-top: 3px solid #f60;
    padding: 16px 18px; /* کمتر شد */
    z-index: 1500;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
}

.rbx-mega-parent:hover .rbx-mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.rbx-mega-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px 10px; /* فاصله کمتر */
}


/* دکمه‌های دسته‌بندی مثل دکمه‌های صفحه اصلی */
.rbx-category-btn {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 12px;
    background: #f8fafc;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.6;
    transition: all 0.25s ease;
    border: 1px solid #edf0f3;
}

.rbx-category-btn {
    display: flex;
    align-items: center;
    justify-content: center;  /* از چپ به وسط */
    min-height: 34px;          /* ارتفاع کمتر */
    padding: 6px 10px;         /* پدینگ کمتر */
    border-radius: 8px;        /* نرم‌تر و کوچک‌تر */
    background: #f8fafc;
    color: #333;
    text-decoration: none;
    font-size: 13px;           /* فونت کوچکتر */
    font-weight: 500;          /* سبک‌تر */
    transition: all 0.2s ease;
    border: 1px solid #edf0f3;
}
.rbx-category-btn:hover {
    background: #f60;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(255,102,0,0.18);
    border-color: #f60;
}

/* اگر خواستی دقیقا شبیه عکس ساده‌تر باشد، این‌ها را فعال کن */
/*
.rbx-category-btn {
    background: transparent;
    border-color: transparent;
    border-radius: 8px;
    justify-content: center;
}
.rbx-category-btn:hover {
    background: #fff3e6;
    color: #f60;
    box-shadow: none;
    transform: none;
}
*/

/* ================= MOBILE TOGGLE ================= */

.rbx-mobile-menu-toggle {
    display: none;
    border: none;
    background: #f60;
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.rbx-mobile-menu-toggle:hover {
    background: #e55a00;
}

/* ================= MOBILE MENU ================= */

.rbx-mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
}

.rbx-mobile-menu-overlay.show {
    opacity: 1;
    visibility: visible;
}

.rbx-mobile-menu {
    position: fixed;
    top: 0;
    right: -310px;
    width: 300px;
    max-width: 88vw;
    height: 100%;
    background: #ffffff;
    z-index: 9999;
    box-shadow: -2px 0 18px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.28s ease;
}

.rbx-mobile-menu.show {
    right: 0;
}

.rbx-mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: #f60;
    color: #ffffff;
    font-weight: 700;
}

.rbx-mobile-menu-close {
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
}

.rbx-mobile-menu-body {
    flex: 1;
    overflow-y: auto;
}

.rbx-mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 8px 0;
}

.rbx-mobile-nav-menu > li {
    border-bottom: 1px solid #f1f3f5;
}

.rbx-mobile-nav-menu a,
.rbx-mobile-submenu-toggle {
    width: 100%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 13px 18px;
    font-size: 14px;
    color: #444;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.rbx-mobile-nav-menu a:hover,
.rbx-mobile-submenu-toggle:hover {
    background: #fff3e6;
    color: #f60;
    padding-right: 24px;
}

.rbx-mobile-submenu-toggle i {
    transition: transform 0.25s ease;
}

.rbx-has-submenu.open .rbx-mobile-submenu-toggle i {
    transform: rotate(-90deg);
}

.rbx-mobile-sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #f8fafc;
    display: none;
}

.rbx-mobile-sub-menu.open {
    display: block;
}

.rbx-mobile-sub-menu li a {
    padding: 11px 28px 11px 18px;
    font-size: 13px;
    color: #555;
}

.rbx-mobile-sub-menu li a::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #f60;
    border-radius: 50%;
    margin-left: 8px;
}

/* ================= ANIMATION ================= */

@keyframes rbx-bounce {
    0% {
        transform: scale(1);
    }

    40% {
        transform: scale(1.25);
    }

    100% {
        transform: scale(1);
    }
}

/* ================= RESPONSIVE ================= */

@media (max-width: 992px) {
    .rbx-header-top-inner {
        flex-wrap: wrap;
    }

    .rbx-header-logo {
        order: 1;
    }

    .rbx-header-actions {
        order: 2;
        margin-right: auto;
    }

    .rbx-header-search {
        order: 3;
        width: 100%;
        max-width: 100%;
    }

    .rbx-header-nav {
        display: none;
    }

    .rbx-mobile-menu-toggle {
        display: inline-flex;
    }

    .cart-toggle {
        min-width: 42px;
        width: 42px;
        height: 42px;
        padding: 0;
        justify-content: center;
    }

    .cart-toggle span {
        display: none;
    }

    .rbx-auth-link {
        width: 38px;
        height: 38px;
        padding: 0;
        justify-content: center;
    }

    .rbx-auth-link span {
        display: none;
    }
}

@media (max-width: 576px) {
    .rbx-header-top {
        padding: 10px 0;
    }

    .rbx-logo-img {
        height: 34px;
    }

    .rbx-header-top-inner {
        gap: 8px;
    }

    .rbx-header-actions {
        gap: 6px;
    }

    .rbx-header-search input {
        padding: 10px 14px;
        font-size: 13px;
    }

    .rbx-header-search button {
        padding: 10px 16px;
    }

    .rbx-wishlist-link,
    .rbx-auth-link {
        width: 36px;
        height: 36px;
    }

    .cart-toggle {
        width: 38px;
        height: 38px;
        min-width: 38px;
    }

    .rbx-mobile-menu-toggle {
        width: 38px;
        height: 38px;
    }
}

@media (min-width: 993px) {
    .rbx-mobile-menu,
    .rbx-mobile-menu-overlay {
        display: none !important;
    }
}