header {
    background: linear-gradient(90deg, #fff3ea, #f7fdff) !important;
    background-size: 400% 400%;
    animation: gradient 10s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.co-2 {
    margin: auto;
    direction: rtl;
    max-width: 1580px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px;
}

.ali-logo img {
    cursor: pointer;
    max-width: 100px;
}

.navopt {
    justify-self: end;
    display: flex;
    align-items: center;
}

.accbtn {
    cursor: pointer;
    background: #ff6600;
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 999px;
}

.accbtn:hover {
    background: #d04a0a;
}

.navopt ul {
    display: flex;
    gap: 15px;
    align-items: center;
}

.navopt li {
    display: flex;
    align-items: center;
    list-style: none;
    font-weight: 400;
    font-size: 0.9rem;
}

.navopt a {
    color: #222;
    text-decoration: none;
}

.navopt svg {
    color: #222;
    height: 30px;
    cursor: pointer;
}

.cart {
    position: relative;
}

.badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ff3b3b;
    color: #fff;
    font-size: 0.8rem;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 300;
    align-content: center;
}

.ali-right {
    justify-self: start;
    width: 100%;
    justify-content: right;
    align-items: center;
    display: flex;
}

.ali-left {
    justify-self: end;
    width: 100%;
    justify-content: left;
    align-items: center;
    flex-direction: row-reverse;
    display: flex;
}

.reverse ul {
    flex-direction: row-reverse;
}

.pl li {
    padding: 5px 8px;
}

.co-1 {
    margin: auto;
    direction: rtl;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 20px;
    align-items: center;
    justify-content: center;
}

.searchopt {
    display: flex;
    align-items: center;
    justify-self: center;
}

.searchopt ul {
    display: flex;
    gap: 25px;
}

.searchopt ul a {
    color: #222;
    text-decoration: none;
}

.searchopt li {
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.searchbox {
    margin: auto;
    width: 100%;
    max-width: 950px;
    background: #fff;
    border: solid 2px #ff6600;
    border-radius: 18px;
    box-shadow: 0 0 4px 0 rgba(0, 0, 0, .05), 0 1px 10px 0 rgba(0, 0, 0, .1);
}

.searchbox .inp {
    width: 100%;
    margin: 5px;
    outline: none;
    padding: 15px;
    background: #ffffff00;
    border: none;
}

.searchbtn {
    display: flex;
    flex-direction: row-reverse;
    cursor: pointer;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: fit-content;
    padding: 15px 20px;
    background: -webkit-linear-gradient(187deg, #ff2d0d 2.73%, #ff5e1a 26.36%, #ff6400 50%, #ff7e0d 73.64%, #ffab1a 97.27%);
    border: none;
    border-radius: 999px;
    color: #fff;
    margin: 10px;
}

.searchinfo {
    display: flex;
    font-size: 0.8rem;
    flex-direction: row-reverse;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: fit-content;
    padding: 15px 20px;
    background: #fff8f3;
    border: solid 1px #fff0e6;
    border-radius: 999px;
    color: #fff;
    margin: 10px;
}

.button-text {
    background: -webkit-linear-gradient(187deg, #ff8a24 2.73%, #f24d0c 55.82%, #e53601 97.27%);
    background-clip: inherit;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.searchinfo img {
    width: 25px;
}

.searchbox .co-2 {
    padding: 0;
    max-width: auto;
    min-width: auto;
}

.infobox {
    display: flex;
    justify-self: end;
    flex-direction: row-reverse;
}

/* iOS Switch - 40x20 */
.ios-switch {
    display: inline-block;
    position: relative;
    width: 40px;
    height: 20px;
}

.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

/* Track */
.ios-switch .slider {
    position: absolute;
    inset: 0;
    cursor: pointer;
    background-color: #e5e5ea;
    border-radius: 999px;
    transition: background-color 0.18s ease;
}

/* Knob */
.ios-switch .slider::before {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    background-color: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
    transition: transform 0.18s ease;
}

/* ON */
.ios-switch input:checked+.slider {
    background-color: #ff6600;
}

.ios-switch input:checked+.slider::before {
    transform: translateX(20px);
}

/* Disabled */
.ios-switch input:disabled+.slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.gray {
    background: #f8f8f8;
}

.graynav ul {
    display: flex;
    justify-self: end;
}

.graynav li {
    cursor: pointer;
    border-left: 1px solid #ccc;
    padding: 0px 15px;
    list-style: none;
}

.graynav li:last-child {
    border: none;
}

/* ================== دکمه ================== */
.catopt {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

/* ================== مگا منو ================== */
.mega-menu {
    display: none;
    position: fixed;
    top: 150px;
    left: 0;
    width: 100vw;
    height: 300px;
    max-height: calc(100vh - 150px);
    background: #fff;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 999;
}

.mega-menu.active {
    display: flex;
}

/* ================== ستون‌ها ================== */
.mega-sidebar,
.mega-content {
    overflow-y: auto;
}

/* =================================================
   سایدبار (25%) — لیستی واقعی، عمودی، بدون افقی
   ================================================= */
.mega-sidebar {
    width: 25%;
    background: #f5f5f5;
    padding: 15px;

    overflow-y: auto;
    overflow-x: hidden;
}

/* لیست */
.mega-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: block;
    /* مهم */
}

/* آیتم‌ها */
.mega-sidebar li {
    display: block;
    /* مهم */
    width: 100%;
    padding: 10px 12px;

    font-size: 14px;
    color: #333;
    cursor: pointer;

    white-space: normal;
    /* شکستن خط */
    word-break: break-word;
}

.mega-sidebar li:hover,
.mega-sidebar li.active {
    background: #e0e0e0;
    font-weight: 600;
}

/* =================================================
   محتوا (75%) — آیتم‌ها کنار هم
   ================================================= */
.mega-content {
    width: 75%;
    padding: 20px 25px;
}

/* هر گروه محتوا */
.content-group {
    display: none;
    margin-bottom: 30px;
}

.content-group.active {
    display: block;
}

/* عنوان */
.content-group h4 {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #222;
}

/* آیتم‌ها کنار هم (Grid) */
.content-group ul {
    list-style: none;
    margin: 0;
    padding: 0;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px 15px;
}

/* آیتم زیرمجموعه */
.content-group li {
    font-size: 13px;
    color: #777;
    cursor: pointer;
    white-space: nowrap;
}

.content-group li:hover {
    color: #000;
}

/* ================== اسکرول تمیز (اختیاری) ================== */
.mega-sidebar::-webkit-scrollbar,
.mega-content::-webkit-scrollbar {
    width: 6px;
}

.mega-sidebar::-webkit-scrollbar-thumb,
.mega-content::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

/* Mobile */
.co-2m {
    display: grid;
    grid-template-columns: 1fr 4fr;
}

.headmob {
    background: #fff;
    border-bottom: solid 1px #e2e2e2;
    gap: 0.4rem;
}

.co-2m>.ali-logo img {
    margin: 0.5rem;
}

.co-2m>.search .searchinp {
    background-color: #f8f8f8;
    padding: 0.8rem;
    width: 100%;
    border: none;
    border-radius: 0px 999px 999px 0px;
    text-align: right;
    direction: rtl;
    outline: none;
}

.co-2m>.search .searchbtn {
    background: #f8f8f8;
    padding: 0.7rem;
    color: #222;
    margin: 0 0 0 0.7rem;
    border-radius: 999px 0px 0px 999px;
}

.mobile .co-1 {
    padding: 0;
}

.mobile>.co-1 .searchopt {
    justify-self: start;
}

.mobile>.co-1>.searchopt ul {
    gap: 0.4rem;
}

.mobile>.co-1>.searchopt li {
    font-size: 0.9rem;
    padding: 0.8rem 0.7rem;
}
.mobile>.co-1>.searchopt li:first-child {
    margin-right: 0.4rem;
}
@media (max-width: 768px) {
    .desktop {
        display: none;
    }
    header{
        margin-bottom: 2rem;
    }
}

@media (min-width: 769px) {
    .mobile {
        display: none;
    }
    header{
        margin-bottom: 3rem;
    }
}

/* ===============================
   MEGA MENU - FINAL VERSION
   allHeaderIndex2
   =============================== */

/* هدر مرجع عرض */
.allHeaderIndex2 .desktop {
  position: relative;
}

/* wrapper دکمه */
.allHeaderIndex2 .category-wrapper {
}

/* ===== کانتینر اصلی مگا منو ===== */
.allHeaderIndex2 .category-wrapper .linkCats {
    position: absolute;
    top: 140px;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100%;
    min-width: 960px;
    height: 0;
    background: var(--back1-color);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 0 0 12px 12px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 9999;
    overflow: hidden;
}


/* ===== نمایش منو ===== */
.allHeaderIndex2 .category-wrapper:hover .linkCats,
.allHeaderIndex2 .linkCats.active {
  visibility: visible;
  opacity: 1;
  height: 33rem;
}

/* ===== ساختار داخلی ===== */
.allHeaderIndex2 .linkCats {
  display: block;
}

/* هر دسته مادر */
.allHeaderIndex2 .linkCats .linkCat {
  display: grid;
  grid-template-columns: 15rem 1fr;
}

/* ===== عنوان دسته مادر ===== */
.allHeaderIndex2 .linkCatTitle {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0.3rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #000;
    border-bottom: 1px solid #eee;
    background: var(--back1-color);
    position: relative;
    transition: background 0.3s ease;
}

/* آیکن فلش (دست نخورده) */
.allHeaderIndex2 .linkCatTitle i {
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.inja {
  width: 0.8rem;
  height: 0.8rem;
  fill: var(--green-color);
}

/* hover روی دسته مادر */
.allHeaderIndex2 .linkCat:hover .linkCatTitle {
  background: var(--back2-color);
}

.allHeaderIndex2 .linkCat:hover .linkCatTitle i {
  opacity: 1;
  visibility: visible;
}

/* ===== لیست زیر دسته‌ها ===== */
.allHeaderIndex2 .linkCatLists {
  position: absolute;
  right: 15rem;
  top: 0;
  width: calc(100% - 15rem);
  height: 33rem;
  padding: 1.5rem 2rem;
  background: var(--back1-color);
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.5rem 2rem;
  visibility: hidden;
  transition: all 0.2s ease;
}

/* نمایش پیش‌فرض دسته اول */
.allHeaderIndex2 .linkCat:first-child .linkCatLists {
  visibility: visible;
}

/* نمایش در hover */
.allHeaderIndex2 .linkCat:hover .linkCatLists {
  visibility: visible;
}

/* لینک‌ها */
.allHeaderIndex2 .linkCatLists a {
  width: 11rem;
  font-size: 0.8rem;
  font-weight: 300;
  color: #000;
  margin: 0.4rem 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: all 0.2s ease;
}

.allHeaderIndex2 .linkCatLists a:hover {
  color: var(--green-color);
}

/* لینک فعال */
.allHeaderIndex2 .linkCatLists .active {
  font-weight: 600;
  font-size: 0.8rem;
  position: relative;
}

.allHeaderIndex2 .linkCatLists .active::before {
  content: "";
  width: 3px;
  height: 16px;
  background: var(--green-color);
  border-radius: 3px;
}

/* =========================
   SEARCH RESULT LIST - FIXED
   ========================= */

/* والد */
.searchbox {
  position: relative;
}

/* لیست نتایج */
.searchbox ul {
    position: absolute;
    top: calc(50%);
    right: 0;
    left: 0;
    width: 100%;
    background: #fff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    max-height: 26rem;
    overflow-y: auto;
    z-index: 200;
    border-radius: 0 0 8px 8px;
    margin: 0;
    padding: 0;
}

/* آیتم */
.searchbox ul li {
  list-style: none;
}

/* لینک */
.searchbox ul li a {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  text-decoration: none;
  transition: background 0.2s ease;
}

/* hover */
.searchbox ul li a:hover {
  background: #f5f5f5;
}

/* تصویر */
.searchbox ul li .pic img {
  width: 3rem;
  height: 3rem;
  object-fit: contain;
  border-radius: 5px;
}

/* عنوان */
.searchbox ul li .subject h3 {
  font-size: 0.9rem;
  font-weight: 400;
  margin: 0;
}

/* کد */
.searchbox ul li .subject h5 {
  font-size: 0.75rem;
  color: #666;
  margin-top: 0.15rem;
}

/* قیمت */
.searchbox ul li .price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--green-color);
  white-space: nowrap;
}

/* zebra */
.searchbox ul li:nth-child(2n) a {
  background: rgba(0,0,0,0.02);
}

.allSellerDetail .width .left .swiper-slide a .title3{
    font-size: 0.9rem;
    font-weight: 500;
}
