/* General Reset & Desktop Styles ... */
.awh-wrapper { width: 100%; position: relative; font-family: inherit; direction: rtl; background: #fff; z-index: 99999; }
.awh-wrapper * { box-sizing: border-box; }
.awh-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 15px; }
.awh-flex-row { display: flex; align-items: center; }
.awh-space-between { justify-content: space-between; }

/* Overlay */
.awh-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    z-index: 99990; opacity: 0; visibility: hidden; transition: all 0.3s ease;
}
.awh-overlay.active { opacity: 1; visibility: visible; }

/* Desktop Styles */
.awh-desktop-view { display: block; position: relative; z-index: 99999; background: #fff; }
.awh-row-1 { padding: 15px 0; border-bottom: 1px solid #eee; }
.awh-row-1 .awh-flex-row { justify-content: space-between; }
.awh-search-area { flex-grow: 1; margin: 0 30px; position: relative; display: flex; }
.awh-search-input { width: 100%; padding: 10px 15px; border: 1px solid #ddd; border-radius: 5px; }
.awh-search-btn { position: absolute; left: 5px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; }
.awh-actions-area { display: flex; gap: 15px; } 

.awh-row-2 { padding: 10px 0; background: #fff; position: relative; z-index: 100000; box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
.awh-row-2 .awh-flex-row { gap: 30px; }
.awh-cat-menu-trigger { font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.awh-cat-menu-trigger i { transition: transform 0.3s ease; }
.awh-cat-menu-trigger.active i { transform: rotate(180deg); }
.awh-main-nav ul { list-style: none; padding: 0; margin: 0; display: flex; gap: 20px; }
.awh-main-nav a { text-decoration: none; color: #333; }

/* Mega Dropdown */
.awh-mega-dropdown {
    position: absolute; top: 100%; left: 0; width: 100%; background: #fff; z-index: 99998;
    box-shadow: 0 15px 30px rgba(0,0,0,0.1); opacity: 0; visibility: hidden;
    transform: translateY(-10px); transition: all 0.3s ease; border-top: 1px solid #f0f0f0;
}
.awh-mega-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.awh-dropdown-content { padding: 30px 0; min-height: 200px; }
.awh-dd-inner { display: none; }
.awh-dd-inner.active { display: block; }

/* Glassmorphism Header Actions (Desktop) */
:root {
    --glass-bg: rgba(255, 255, 255, 0.25);
    --glass-border: rgba(255, 255, 255, 0.5);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    --awh-primary-color: #fb743e; 
    --awh-primary-glow: rgba(251, 116, 62, 0.5);
    --awh-text-color: #2c3e50;
    --awh-glass-bg-mob: rgba(255, 255, 255, 0.85);
}

.glass-header-actions { display: flex; align-items: center; gap: 20px; }
.glass-header-actions a { text-decoration: none; }
.glass-btn {
    display: flex; align-items: center; gap: 12px; height: 50px; padding: 0 15px; 
    box-sizing: border-box; border-radius: 16px; background: var(--glass-bg);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
    transition: all 0.3s ease; cursor: pointer; position: relative;
}
.glass-btn:hover { background: rgba(255, 255, 255, 0.55); transform: translateY(-3px); border-color: #fff; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
.glass-btn .icon-box {
    position: relative; display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; background: #fff; border-radius: 12px;
    color: var(--awh-primary-color); font-size: 18px; transition: 0.3s;
}
.glass-btn:hover .icon-box { background: var(--awh-primary-color); color: #fff; }
.glass-btn .info-col { display: flex; flex-direction: column; line-height: 1.4; justify-content: center; }
.glass-btn .label { font-size: 12px; color: #555; font-weight: 500; }
.glass-btn .value { font-size: 14px; color: #333; font-weight: 800; }
.glass-btn .price-text { color: #b94a1d; }
.glass-btn .badge-count {
    position: absolute; top: -6px; right: -6px; background: var(--awh-primary-color);
    color: white; font-size: 11px; font-weight: bold; width: 18px; height: 18px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.glass-btn:hover .badge-count { background: #fff; color: var(--awh-primary-color); }

/* ================= MOBILE STYLES (Breakpoint: 1024px) ================= */
.awh-mobile-view { display: none; }

@media (max-width: 1024px) {
    .awh-desktop-view { display: none; }
    .awh-mobile-view { display: block; }
    
    body { padding-top: 40px;}

    /* Top Header */
    .awh-new-top-header {
        position: fixed; top: 0; left: 0; right: 0; height: 60px;
        display: flex; justify-content: space-between; align-items: center;
        padding: 0 24px; background: var(--awh-glass-bg-mob);
        backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--glass-border);
        z-index: 100000; transition: all 0.3s ease;
    }
    .awh-new-brand-container { display: flex; align-items: center; gap: 12px; }
    .awh-new-logo-box { height: 40px; display: flex; align-items: center; justify-content: center; }
    .awh-new-logo-img { max-height: 35px; width: auto; }
    .awh-new-hamburger-menu { font-size: 28px; color: var(--awh-text-color); cursor: pointer; transition: transform 0.2s; }
    .awh-new-hamburger-menu:active { transform: scale(0.9); }

    /* Bottom Navigation */
    .awh-new-bottom-nav-container {
        position: fixed; bottom: 10px; left: 10px; right: 10px;
        width: auto; z-index: 100000;
    }
    .awh-new-bottom-nav {
        display: flex; justify-content: space-between; align-items: center;
        background: var(--awh-glass-bg-mob);
        backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
        padding: 12px 25px; border-radius: 24px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
        border: 1px solid rgba(255,255,255,0.6);
    }
    .awh-new-nav-item {
        position: relative; color: #9aa0a6; font-size: 24px; text-decoration: none;
        display: flex; flex-direction: column; align-items: center;
        transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        width: 40px; height: 40px; justify-content: center; border-radius: 12px;
    }
    .awh-new-nav-item:hover, .awh-new-nav-item.active { color: var(--awh-primary-color); transform: translateY(-5px); }

    /* Home Button */
    .awh-new-nav-item.awh-new-home-btn {
        background: var(--awh-primary-color); color: white;
        box-shadow: 0 10px 25px var(--awh-primary-glow); 
        width: 50px; height: 50px; border-radius: 16px; margin-top: -25px; font-size: 26px;
    }
    .awh-new-nav-item.awh-new-home-btn:hover {
        transform: translateY(-30px) scale(1.05); background: #ff7043;
        box-shadow: 0 15px 30px rgba(251, 116, 62, 0.7);
    }

    /* -----------------------------------------------------------------
       FIX: Icon Wrapper & Badge Positioning
       این بخش دقیقاً بر اساس کلاس‌های موجود در کد شما اصلاح شد
    ----------------------------------------------------------------- */
    
    /* 1. Wrapper باید Relative باشد تا بج نسبت به آن سنجیده شود */
    .awh-icon-wrapper {
        position: relative !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        vertical-align: middle;
        width: auto !important;
        height: auto !important;
    }
    
    .awh-icon-wrapper i, 
    .awh-new-nav-item[data-mob-target="cart"] i {
        font-size: 24px !important;
    }

    /* 2. استایل دهی به کلاسی که ووکامرس/کد شما تولید می‌کند (awh-mob-badge) */
    .awh-mob-badge, 
    .awh-new-cart-badge {
        position: absolute !important; 
        
        /* تنظیم موقعیت دقیق گوشه بالا سمت راست */
        top: -8px !important; 
        right: -10px !important; 
        left: auto !important; /* خنثی کردن اثر RTL */
        
        /* استایل ظاهری دایره */
        background: var(--awh-primary-color) !important; 
        color: white !important;
        font-size: 10px !important; 
        font-weight: bold !important; 
        width: 18px !important; 
        height: 18px !important;
        
        /* وسط‌چین کردن عدد داخل دایره */
        display: flex !important; 
        align-items: center; 
        justify-content: center;
        
        border-radius: 50% !important; 
        border: 2px solid white !important;
        z-index: 100 !important;
        line-height: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
        
        /* انیمیشن چشمک */
        animation: awh-pulse-ring 2s infinite;
    }

    @keyframes awh-pulse-ring {
        0% { box-shadow: 0 0 0 0 rgba(251, 116, 62, 0.7); }
        70% { box-shadow: 0 0 0 6px rgba(251, 116, 62, 0); }
        100% { box-shadow: 0 0 0 0 rgba(251, 116, 62, 0); }
    }
    
    .awh-new-nav-item.active::after {
        content: ''; position: absolute; bottom: 2px;
        width: 4px; height: 4px; background: var(--awh-primary-color);
        border-radius: 50%;
    }
    .awh-new-nav-item.awh-new-home-btn.active::after { display: none; }

    /* Slider Overlay */
    .awh-mob-slider-overlay {
        position: fixed; top: 0; right: 0; bottom: 0; left: 0; 
        width: 100vw; height: 100vh; height: 100dvh;
        background: #fff; z-index: 100005; 
        transform: translateX(100%); transition: transform 0.3s ease-in-out; 
        display: flex; flex-direction: column;
    }
    .awh-mob-slider-overlay.active { transform: translateX(0); }
    .awh-mob-slider-header { padding: 15px; border-bottom: 1px solid #eee; display: flex; justify-content: space-between; align-items: center; font-weight: bold; flex-shrink: 0; }
    .awh-mob-slider-content { padding: 0; flex-grow: 1; overflow: hidden; display: flex; flex-direction: column; }
    .awh-mob-slide-inner { display: none; height: 100%; overflow-y: auto; flex-direction: column; position: relative; }
    .awh-mob-slide-inner.active { display: flex; }
    #mob-slide-cart { overflow: hidden; }
}

/* FIX 2: Mobile Search Icon Styling */
#mob-slide-search .awh-search-input-wrapper {
    display: flex;
    align-items: center;
    background: #f5f5f5; /* رنگ پس زمینه اینپوت */
    border-radius: 8px;
    padding: 5px;
    border: 1px solid #eee;
}

#mob-slide-search .awh-search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    padding: 8px 10px;
    outline: none;
}

#mob-slide-search .awh-search-icon-wrapper {
    background: var(--awh-primary-color, #ff6b00); /* استفاده از متغیر رنگ اصلی یا رنگ پیشفرض نارنجی */
    color: white;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px; /* گوشه‌های کمی گرد برای حالت مربعی */
    margin-left: 2px;
    font-size: 18px;
}

/* استایل نوار حساب کاربری دسکتاپ */
.awh-account-bar {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
    padding: 8px 0; /* ارتفاع کم */
    position: relative;
    z-index: 999;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.awh-account-menu-list {
    display: flex;
    justify-content: flex-start; /* راست چین شدن آیتم ها */
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 20px;
}

.awh-account-menu-list li a {
    text-decoration: none;
    color: #555;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.awh-account-menu-list li a:hover,
.awh-account-menu-list li.is-active a {
    color: var(--awh-primary-color, #ff6b00);
}

/* برای اینکه نوار جدید روی عناصر دیگر نیفتد یا تداخل نکند */
.awh-desktop-view {
    position: relative;
}