@font-face {
font-family: 'iranyekan';
src: url('../fonts/iranyekanr.woff2') format('woff2');
font-weight: normal;
font-style: normal;
font-feature-settings: "ss02";
font-display: swap;

}

@font-face {
font-family: 'iranyekan';
src: url('../fonts/iranyekanb.woff2') format('woff2');
font-weight: bold;
font-style: normal;
font-feature-settings: "ss02";
font-display: swap;

}


.header {
 display:flex;
    align-items:center;
    justify-content:space-between;
    background:#fff;
    padding:15px 40px;
}
/* ستون ها */
.header-right,
.header-center,
.header-left{
    display:flex;
    align-items:center;
}
/* سمت راست */
.header-right{
    flex:1;
    justify-content:flex-start;
}

/* وسط */
.header-center{
    flex:0 0 auto;
    justify-content:center;
}

/* سمت چپ */
.header-left{
    flex:1;
    justify-content:flex-end;
    gap:18px;
}
/* منوی اصلی */
.main-menu{
    display:flex;
    align-items:center;
    gap:22px;
    list-style:none;
    margin:0;
    padding:0;
}

.main-menu a {
color: #151515;
text-decoration: none;
font-size: 14px;
}
/* لینک آیتم فعال */
.main-menu .current-menu-item > a,
.main-menu .current_page_item > a,
.main-menu .current-menu-ancestor > a,
.main-menu .current-menu-parent > a {
color: #000 !important;

}
/* لوگو */
.logo{
    display:block;
    width:170px;
    height:auto;
    margin:0;
}

/*** ایکونهای هدر ****/
.header-icons{
    display:flex;
    align-items:center;
    gap:8px;
}
.icon-btn {
display: flex;
color: #6e715c;
font-size: 15px;
text-decoration: none;
margin-left: 3px;
}

.header-icons {
display: flex;
gap: 6px;
align-items: center;
}

.icon-separator {
color: #6e715c !important;
font-size: 18px !important;
font-weight: bold !important;
opacity: 0.6 !important;
margin: 0 4px !important; /* فاصله کمتر */
}
.wishlist-header ,
.cart-header ,
.compare-header,
.account-header {
position: relative;
display: inline-block;
}
.wishlist-header,.compare-header {
padding-left:10px;
}
.wishlist-link ,
.compare-link ,
.cart-link,
.account-link {
display: flex;
align-items: center;
gap: 6px;
text-decoration: none;
color: #030302e8;
}

.account-link {
display: flex;
align-items: center;
gap: 6px;
text-decoration: none;
color: #151515;
border-radius: 14px;
padding: 7px;
}
.account-link:hover {
background-color:#ced4da;
color:#4c312d;
}
.cart-icon ,
.wishlist-icon ,
.compare-icon,
.account-icon{
width: 25px;
height: 25px;
flex-shrink: 0;
}

.cart-count , #wishlist-count , #compare-count{
background: #ab0000;
color: white;
border-radius: 50%;
width: 18px;
height: 18px;
font-size: 12px;
position: absolute;
top: -10px;
right: -8px;
display: flex;
align-items: center;
justify-content: center;
}

/* cart-total هدر تغییر */
.cart-header .cart-total .woocommerce-Price-amount.amount {
font-size: 15px !important;
}

.wishlist-text ,
.compare-text ,
.account-text{
font-size: 14px;
font-weight: 500;
color: #030302e8;
margin-left: 4px;
}



.account-header{
    display:flex;
    align-items:center;
}
/*********************** بخش سرچ هدر *****************************/
.search-toggle{
    background:none;
    border:none;
    cursor:pointer;
    padding:0;
    color:#151515;
    display:flex;
    align-items:center;
    justify-content:center;
}

.search-toggle:hover{
    color:#000;
}
body.search-open{
    overflow:hidden;
}
/* Overlay */

.search-overlay{
    position:fixed;
    top:120px;       /* ارتفاع هدر */
    left:0;
    right:0;
    bottom:0;

    background:#fff;
    z-index:9999;
overflow-y:auto;
    overflow-x:hidden;
    opacity:0;
    visibility:hidden;
    transition:.35s;
}

.search-overlay.active{
    opacity:1;
    visibility:visible;
}

.search-popup{
    width:70%;
    max-width:900px;
    margin:40px auto ;
}

.search-popup h2{
    text-align:center;
    font-size:42px;
    margin-bottom:35px;
    font-weight:bold;
}

.search-box input{
    width:100%;
    border:none;
    border-bottom:1px solid #ddd;
    font-size:18px;
    padding:18px 5px;
    background:none;
    outline:none;
}


.search-close{

    position:absolute;

    top:35px;
    left:35px;

    border:none;
    background:none;

    font-size:48px;

    cursor:pointer;

    color:#333;
}
.search-results{
    margin-top:35px;
    text-align:center;
}

.live-search-list{
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:28px;
    list-style:none;
    padding:0;
    margin:0;
}

.live-search-item{
    list-style:none;
}

.live-search-item a{
    display:block;
    text-decoration:none;
    color:#222;
    transition:.3s;
}

.live-search-item a:hover{
    transform:translateY(-4px);
}

.live-search-thumb{
    width:100%;
    aspect-ratio:1/1;
    overflow:hidden;
    background:#fafafa;
    border-radius:10px;
    margin-bottom:15px;
}

.live-search-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    transition:.35s;
}

.live-search-item:hover img{
    transform:scale(1.06);
}

.live-search-info{
    margin:0;
}

.live-search-title{
    display:block;
    font-size:15px;
    font-weight:500;
    color:#222;
    line-height:1.7;
    white-space:normal;
    overflow:visible;
    margin-bottom:8px;
}

.live-search-price{
    font-size:18px;
    font-weight:bold;
    color:#842c00;
}

.search-view-all{
    margin-top:40px;
}

.search-view-all a{

    display:inline-flex;

    align-items:center;

    justify-content:center;

    padding:14px 38px;

    border:1px solid #222;

    color:#222;

    text-decoration:none;

    text-transform:uppercase;

    letter-spacing:1px;

    transition:.3s;
}

.search-view-all a:hover{
    background:#222;
    color:#fff;
}
@media (max-width: 768px) {
.search-box {
position: relative;
flex: 1;
}

.search-box input {
width: 100%;
padding: 15px; 
border-radius: 55px;
border: 2px solid #6e715c;
font-size: 14px;
font-family: 'iranyekan' !important;
background-color:#F8F9FA;
}

.search-icon {
position: absolute;
top: 57%;
left: 5px;
transform: translateY(-50%);
background: transparent;
border: none;
cursor: pointer;
color: #6e715c;
font-size: 18px;

text
padding: 9px 12px !important;
}

.search-icon:hover {
color: #efefef;
}

.search-box input:focus {
border-color: #d1d4da !important; 
background: #ffffff !important; 
outline: none !important; 
} 

}
/* *********************finish top header ***************************8*/

.category-wrapper {
position: relative;
}

.category-wrapper {
position: relative;
}

/* دکمه */
.category-btn {
border: none !important;
box-shadow: none !important;
background: #fff;
font-family: 'iranyekan' !important;
}
.category-btn {
background: #fff;
border: none;
padding: 12px 20px;
border-radius: 50px;
cursor: pointer;
font-size: 14px;
display: flex;
align-items: center;
gap: 8px;

}

/* منوی اصلی */
.category-list {
position: absolute;
top: 100%;
right: 0;
width: 260px;
background: #f3f3f3;
list-style: none;
margin: 0;
padding: 0;
border-radius: 6px;
box-shadow: 0 15px 35px rgba(0,0,0,0.15);
opacity: 0;
visibility: hidden;
transition: 0.25s;
z-index: 998;
}

/* باز شدن با هاور */
.category-wrapper:hover .category-list {
opacity: 1;
visibility: visible;
}

/* آیتم های اصلی */
.category-list > li {
position: relative;
border-bottom: 1px solid #e5e5e5;
}

.category-list > li > a {
display: block;
padding: 19px 18px;
text-decoration: none;
color: #333;
font-size: 14px;
background: #f3f3f3;
transition: 0.2s;
}

/* فلش */
.category-list > li > a::before {
content: "›";
position: absolute;
left: 15px;
font-size: 18px;
color: #4c312d;
}

/* هاور دسته اصلی */
.category-list > li:hover > a {
background: #e9e9e9;
}

/* ساب منو */
.sub-menu {
position: absolute;
top: 0;
right: 100%;
width: 260px;
background: #fff;
list-style: none;
margin: 0;
padding: 10px 0;
border-radius: 6px;
box-shadow: 0 15px 35px rgba(0,0,0,0.15);
opacity: 0;
visibility: hidden;
transition: 0.25s;
}

/* باز شدن ساب */
.category-list > li:hover > .sub-menu {
opacity: 1;
visibility: visible;
}

/* آیتم های ساب */
.sub-menu li a {
display: block;
padding: 12px 18px;
text-decoration: none;
color: #444;
font-size: 13px;
transition: 0.2s;
border-bottom:#9e0707;

}

.sub-menu li a:hover {
background: #f5f7ff;
padding-right: 22px;
}


/* سطح سوم - زیرمجموعه‌های ساب‌منو */
.sub-menu .sub-menu {
    background: #f8f9ff;
    border-left: 3px solid #4c312d;
}

.sub-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
}

/* استایل آیتم‌های سطح سوم */
.sub-menu .sub-menu li a {
    font-size: 12.5px;
    padding: 11px 18px 11px 25px; /* indent بیشتر */
    background: #f8f9ff;
    border-bottom: 1px solid #eee;
    position: relative;
}

.sub-menu li:has(.sub-menu) > a::before {
    content: "›";
    position: absolute;
    left: 18px;
    font-size: 20px;
    color: #4c312d;
}

/* هاور والد سطح سوم */
.sub-menu li:has(.sub-menu):hover > a {
    padding-right: 25px;
}

/* استایل نوه‌ها (سطح سوم) */
.sub-menu .sub-menu li a {
    font-size: 12.5px;
    padding: 11px 18px 11px 35px; /* indent بیشتر */
    background: #f8f9ff;
    border-bottom: 1px solid #eee;
}

.sub-menu .sub-menu li a:hover {
    background: #e8ecff;
    padding-right: 28px;
}



.category-wrapper {
position: relative;
z-index: 1100;
}

.category-list {
z-index: 1200;
}

.category-section {
position: relative;
z-index: 1;
}
.category-card {
z-index: 1;
}


/* اصلاح تداخل نمایش */
@media (min-width: 769px) {
    .mobile-header, .mobile-panel, .mobile-overlay, .top-bar-announcement {
        display: none !important;
    }
}
/* فقط در حالت موبایل نمایش داده شود */
@media (max-width: 768px) {

.header-top,
.header-bottom,
.main-header,
.desktop-header {
  display:none !important;
}


.mobile-header {
    display: flex!important;
    justify-content: space-between;
    align-items: center;
    padding: 15px 15px;
    background: #fff;
    position: relative;
    border-bottom: 1px solid #eee;
}
.mobile-logo{
  position:absolute;
  left:50%;
  transform:translateX(-50%);
 

}

.mobile-logo img{
         max-height: 77px;
        height: 100%;
        width: auto;

}
/* آیکون های سمت راست (جستجو و پروفایل) */
.mobile-header-left {
    display: flex;
    align-items: center;
    gap: 15px; /* فاصله بین دو آیکون */
}

.mobile-header-left svg {
    display: block;
    color: #000; /* رنگ مشکی خالص */
    transition: 0.3s;
}

.mobile-header-left a, 
.mobile-header-left button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    line-height: 0;
}
.mobile-menu-btn {
    display: flex;
    align-items: center; /* تراز عمودی متن و آیکون */
    gap: 5px; /* فاصله بین آیکون و کلمه منو */
    background:#9ea48e;
    border: none;
    padding: 4px 7px;
    cursor: pointer;
    color: #f8f8f8; /* رنگ دلخواه */ 
    border-radius: 30px;
}

.mobile-menu-btn i {
    font-style: normal;
    font-size: 24px; /* سایز آیکون همبرگری */
    line-height: 1;
    background-color:#f4f4f4 ;
    border-radius: 50px;
    color: #000;
    padding: 7px;
}

.mobile-menu-btn span {
    font-size: 14px; /* سایز کلمه منو */
    font-weight: bold;
    font-family: inherit;
}

/* overlay */
.mobile-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.4);
  opacity:0;
  visibility:hidden;
  transition:.3s;
  z-index:9998;
}

.mobile-overlay.active{
  opacity:1;
  visibility:visible;
}

.mobile-panel {
    position: fixed;
    top: 0;
    left: 0; 
    width: 280px; /* پیشنهاد می‌کنم به جای درصد، عرض ثابت بده که کنترلش راحت‌تر باشه */
    max-width: 85%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    /* تغییر مهم اینجاست: */
    transform: translateX(-101%); /* عدد 101 درصد اطمینان میده که حتی سایه پنل هم بیرون نمیمونه */
    transition: transform .3s ease-in-out;
    display: flex;
    flex-direction: column;
    box-shadow: none; /* وقتی بسته است سایه نداشته باشه */
}

.mobile-panel.active {
    transform: translateX(0);
    box-shadow: 5px 0 15px rgba(0,0,0,0.1); /* فقط وقتی باز شد سایه بدهد */
}

/* top */
.mobile-panel-top{
  display:flex;
  align-items:center;
  gap:10px;
  padding:10px;
  border-bottom:1px solid #eee;
}




.close-panel{
background:none;
 color:#9ea48e;
  border:none;
  font-size:20px;
 
}

/* tabs */
.panel-tabs{
  display:flex;
  border-bottom:1px solid #eee;
}

.panel-tabs button{
  flex:1;
  padding:12px;
  border:none;
  background:#f5f5f5;
  color: #000;
  font-size: 12px;
  font-weight: bold;
}

.panel-tabs button.active{
  background:#fff;
  border-bottom:2px solid #9ea48e;
  font-weight:bold;
}

/* content */
.panel-content{
  flex:1;
  overflow-y:auto;
}

.tab-content{
  display:none;
}

.tab-content.active{
  display:block;
}

}
@media (max-width: 768px) {
.mobile-menu, .mobile-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block !important;
}

.mobile-menu li, .mobile-cats li {
    border-bottom: 1px solid #eee;
    width: 100%;
    display: block; 
}

.mobile-menu li a, .mobile-cats li a {
    display: block;
    padding: 15px;
    color: #333 !important;
    text-decoration: none;
    font-size: 14px;
    text-align: right; /* تراز راست برای زبان فارسی */
    transition: 0.3s;
}

/* افکت ساده هنگام لمس یا هاور */
.mobile-menu li a:active, .mobile-cats li a:active {
    background-color: #f9f9f9;
}
.cat-item-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse; /* برای قرار گرفتن فلش در سمت چپ در سایت فارسی */
    border-bottom: 1px solid #eee;
}

.cat-item-wrapper a {
    flex: 1;
    padding: 14px;
    border-bottom: none !important;
}

.toggle-child {
    background: #f1f1f1;
    border: none;
    border-left: 1px solid #eee;
    width: 45px;
    height: 50px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 12px;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* استایل زیرمنوها */
.sub-cats {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #f9f9f9;
}

.sub-cats li a {
    padding: 12px 30px 12px 15px !important; 
    font-size: 13px;
    color: #555;
}


.toggle-child.open {
    transform: rotate(90deg);
    background: #ae0000;
    color: #fff;
}
.sub-cats {
        list-style: none;
        padding: 0;
        margin: 0;
        background: #f9f9f9;
    }

    .sub-cats li a {
        display: block;
        padding: 12px 30px 12px 15px !important;
        font-size: 13px;
        color: #555;
    }

    /* برای سطح سوم کمی تو رفتگی بیشتر */
    .sub-cats .sub-cats li a {
        padding-right: 45px !important;
        background: #fff;
    }
.uder-header-mobile {
    margin: 20px;
}

