/* ==========================================================================
   Chrome مشترک سایت — هدر، فوتر، پاپ‌آپ‌ها و کشوها.
   تنها منبع استایل برای Views/Shared/_Header.cshtml و _Footer.cshtml و
   کشوهای مشترک؛ توسط _Layout و هر چهار layout پنل بارگذاری می‌شود تا
   ظاهر هدر/فوتر در کل سایت دقیقاً مطابق صفحه نخست باشد.
   المنت‌های <header> و <footer> با کلاس‌های .site-header و .site-footer
   اسکوپ شده‌اند تا روی نوار ابزار پنل‌ها (adm-top/sel-top/cr-head) اثر
   نگذارند.
   ========================================================================== */

:root {
    --primary: #f8c811;
    --primary-dark: #e7b700;
    --secondary: #d9a22a;
    --dark: #2d3436;
    --light: #f5f6fa;
    --white: #ffffff;
    --gray: #61757d;
    --text: #2d3436;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.5);
    --footer-bg-start: #2d3e50;
    --footer-bg-end: #34495e;
    --gold: #f8c710;
    --gold-light: #f3e5ab;
    --light-gray: #adadad;
    --medium-gray: #747474;
    --dark-gray: #555555;
    --font-vazir: 'Vazirmatn', sans-serif;
}

/* --- Header --- */
.site-header { background: var(--white); padding: 15px; display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; z-index: 1000; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* scrollIntoView و پیوندهای # زیر هدر چسبان پنهان نشوند */
html { scroll-padding-top: 80px; }

/* --- کادر جستجوی سایت (Views/Shared/_SiteSearchBar.cshtml) ---
   جزو هدر نیست: نخستین بخش محتوای همه‌ی صفحه‌ها، روی زمینه‌ی صفحه و همراه صفحه پیمایش می‌شود.
   رنگ‌ها عمداً ثابت‌اند تا متغیرهای اختصاصی صفحه‌ها (مثلاً --primary قرمز صفحه‌ی کالا) رویش اثر نگذارند. */
.site-search { position: relative; padding: 14px 15px 6px; }
.site-search-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 46px;
    padding: 10px 15px;
    border: 1px solid #e3e6ec;
    border-radius: 14px;
    background: #ffffff;
    color: #61757d;
    box-shadow: 0 2px 8px rgba(20, 20, 20, .05);
    font-family: inherit;
    font-size: 14px;
    text-align: right;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.site-search-trigger:hover { border-color: rgba(248, 199, 16, .75); box-shadow: 0 4px 14px rgba(20, 20, 20, .08); }
.site-search-trigger:focus-visible { outline: 2px solid #f8c710; outline-offset: 2px; }
.site-search-trigger i { flex: 0 0 auto; font-size: 17px; color: #61757d; }
.site-search-trigger span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-btn, .cart-btn, .wallet-header-btn { font-size: 24px; color: var(--medium-gray); cursor: pointer; background: none; border: none; position: relative; }
.wallet-header-btn { display: inline-flex; align-items: center; text-decoration: none; transition: color 0.3s; }
.wallet-header-btn:hover { color: var(--gold-light); }
.cart-btn .notif-badge { top: -5px; left: -9px; }
.nav-cart-icon { position: relative; display: inline-flex; }
.nav-cart-icon .notif-badge { top: -7px; left: -8px; }
.logo { font-size: 14px; font-weight: 900;  display: flex; align-items: center; gap: 10px; min-width: 0; }
    /* وقتی نام کسب‌وکار به‌جای «دلیج» می‌نشیند، اسم‌های بلند به‌جای برهم‌ریختن هدر سه‌نقطه می‌شوند */
    .logo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .logo img {
        height: 38px;
        width: auto;
        display: block;
        flex-shrink: 0;
        border-radius: 5px;
    }
.header-icons { display: flex; align-items: center; gap: 15px; }
.header-icons i { font-size: 20px; color: var(--medium-gray); cursor: pointer; transition: color 0.3s; }
.header-icons i:hover { color: var(--dark-gray); }

/* --- دکمه‌های ویژه‌ی موبایل هدر (جستجو و فلش پنل کیف پول/اعلان/سبد) ---
   پایه‌شان برای دسکتاپ است: دو دکمه مخفی و پنل display: contents، یعنی
   زنگوله، سبد و کیف پول دقیقاً مثل پیش در ردیف آیکن‌های هدر می‌مانند.
   حالت موبایل در انتهای همین فایل داخل @media (max-width: 1023px) آمده است. */
.header-search-btn, .header-more-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border: none; background: none; color: var(--medium-gray); font-size: 20px; cursor: pointer; }
.header-more-panel { display: contents; }
.hm-label { display: none; }

.desktop-nav { display: none; gap: 25px; align-items: center; }
.nav-link { color: var(--medium-gray); font-size: 14px; font-weight: 500; display: flex; align-items: center; gap: 6px; cursor: pointer; transition: color 0.3s, transform 0.2s; }
.nav-link:hover { color: var(--gold); transform: translateY(-2px); }
.nav-link i { font-size: 14px; }

/* --- Notifications Popup (bell, works on mobile + desktop) --- */
.notif-menu-wrap { position: relative; display: flex; align-items: center; }
.notif-btn { position: relative; background: none; border: none; padding: 0; cursor: pointer; display: flex; align-items: center; }
.notif-badge { position: absolute; top: -6px; left: -8px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--primary); color: #fff; font-size: 10px; font-weight: bold; display: flex; align-items: center; justify-content: center; border: 2px solid var(--footer-bg-start); }
.notif-badge.hidden { display: none; }
/* In RTL the header icons sit at the LEFT edge, so the popup must open toward the right. */
.notif-popup { position: absolute; top: calc(100% + 18px); left: -10px; width: min(320px, calc(100vw - 30px)); background: var(--white); border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.25); z-index: 200; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease; }
.notif-popup.active { opacity: 1; visibility: visible; transform: translateY(0); }
.notif-popup::before { content: ''; position: absolute; top: -7px; left: 16px; width: 14px; height: 14px; background: var(--white); transform: rotate(45deg); border-radius: 3px 0 0 0; }
.notif-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 15px; border-bottom: 1px solid rgba(0,0,0,0.07); position: relative; background: var(--white); border-radius: 16px 16px 0 0; }
.notif-head h4 { font-size: 15px; color: var(--dark); display: flex; align-items: center; gap: 8px; }
.notif-head h4 i { color: var(--primary); font-size: 14px; }
.notif-mark-read { background: none; border: none; font-family: inherit; font-size: 12px; color: var(--primary); cursor: pointer; padding: 4px; }
.notif-mark-read:disabled { color: var(--gray); cursor: default; }
.notif-list { max-height: 320px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.notif-item { display: flex; gap: 11px; padding: 13px 15px; border-bottom: 1px solid rgba(0,0,0,0.05); cursor: pointer; transition: background 0.2s; }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--light); }
.notif-item.unread { background: rgba(239, 58, 75, 0.05); }
.notif-item.unread:hover { background: rgba(239, 58, 75, 0.09); }
.notif-icon { width: 36px; height: 36px; border-radius: 10px; background: var(--light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 700; color: var(--dark); margin-bottom: 3px; display: flex; align-items: center; gap: 6px; }
.notif-title .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); flex-shrink: 0; }
.notif-text { font-size: 12px; color: #666; line-height: 1.6; }
.notif-time { font-size: 11px; color: var(--gray); margin-top: 5px; display: flex; align-items: center; gap: 5px; }
.notif-empty { padding: 35px 15px; text-align: center; color: var(--gray); font-size: 13px; }
.notif-empty i { font-size: 32px; color: #dfe3e6; display: block; margin-bottom: 10px; }
.notif-footer { padding: 11px; text-align: center; border-top: 1px solid rgba(0,0,0,0.07); background: var(--light); border-radius: 0 0 16px 16px; }
.notif-footer span, .notif-footer a { font-size: 13px; color: var(--primary); font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: color 0.2s; }
.notif-footer a:hover { color: var(--primary-dark); }
.notif-footer a i { font-size: 11px; }

/* --- Desktop User Popup (avatar on the left of the header) --- */
.user-menu-wrap { position: relative; display: none; }
.user-avatar-btn { width: 38px; height: 38px; padding: 0; border-radius: 50%; border: 2px solid var(--gold); background: none; cursor: pointer; display: block; overflow: hidden; transition: transform 0.2s, box-shadow 0.2s; }
.user-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }
.user-avatar-btn:hover { transform: scale(1.05); box-shadow: 0 0 0 3px rgba(248, 202, 27, 0.25); }
.user-popup { position: absolute; top: calc(100% + 14px); left: 0; width: 290px; background: var(--white); border-radius: 16px; box-shadow: 0 15px 40px rgba(0,0,0,0.25); padding: 15px; z-index: 200; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease; max-height: 500px; overflow-y: auto; }
    .user-popup::-webkit-scrollbar {
        width: 10px;
    }

    .user-popup::-webkit-scrollbar-track {
        background-color: var(--white);
    }

    .user-popup::-webkit-scrollbar-thumb {
        box-shadow: inset 0 0 20px var(--gold);
    }
.user-popup.active { opacity: 1; visibility: visible; transform: translateY(0); }
.user-popup::before { content: ''; position: absolute; top: -7px; left: 14px; width: 14px; height: 14px; background: var(--white); transform: rotate(45deg); border-radius: 3px 0 0 0; }
.user-popup-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid rgba(0,0,0,0.07); }
.user-popup-head img { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); }
.user-popup-head h4 { font-size: 14px; color: var(--dark); margin-bottom: 3px; }
.user-popup-head p { font-size: 12px; color: var(--gray); direction: ltr; text-align: right; }
.user-popup-menu { margin-top: 8px; }
.user-popup-item { display: flex; align-items: center; gap: 12px; padding: 11px 8px; font-size: 14px; color: var(--dark); cursor: pointer; border-radius: 10px; transition: background 0.2s, color 0.2s; }
.user-popup-item:hover { background: var(--light); color: var(--primary); }
.user-popup-item i { width: 18px; text-align: center; color: var(--gray); font-size: 15px; transition: color 0.2s; }
.user-popup-item:hover i { color: var(--primary); }
    .user-popup-item.logout {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        background: var(--medium-gray);
        color: var(--white);
        border: none;
        padding: 12px;
        border-radius: 10px;
        cursor: pointer;
        font-family: inherit;
        font-size: 14px;
        font-weight: bold;
        transition: background 0.3s;
        margin-bottom: 20px;
    }
.user-popup-item.logout i { color: var(--primary); }

/* --- Wallet Card (shared: desktop popup + mobile drawer) --- */
.wallet-card {
    background: var(--gold);
    border-radius: 14px;
    padding: 14px;
    color: var(--footer-bg-start);
    box-shadow: 0 6px 18px rgb(65 65 65 / 30%);
}
.wallet-label { font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 7px; opacity: 0.85; }
.wallet-balance { font-size: 20px; font-weight: 800; margin: 8px 0 12px; }
.wallet-balance span { font-size: 12px; font-weight: 500; }
/* افزایش موجودی: سبز با علامت مثبت — دریافت وجه: قرمز با علامت منفی */
.wallet-charge-btn {
    width: 100%;
    background: var(--white);
    color: var(--medium-gray);
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    padding: 9px;
    font-family: inherit;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background 0.3s;
}
    .wallet-charge-btn:hover i {
        color: var(--white);
    }
.wallet-charge-btn:hover {
    background: #178a44;
    color: var(--white);
}
.wallet-payout-btn:hover i{
    color: var(--white);
}
.wallet-actions {
    margin-top: 10px;
}
.wallet-actions.with-payout {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}
.wallet-payout-btn { width: 100%; background: var(--white); color: var(--medium-gray); border: 1px solid var(--light-gray); border-radius: 10px; padding: 9px 6px; font-family: inherit; font-size: 12px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.3s, color 0.3s; }
.wallet-payout-btn:hover { background: #d42d3d; color:var(--white);}

/* --- Overlays & Drawers Common --- */
.drawer-overlay { position: fixed; top: 0; right: 0; left: 0; bottom: 0; background: rgba(0,0,0,0.3); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
.drawer-overlay.active { opacity: 1; visibility: visible; }

/* --- Main Drawer --- */
.drawer { position: fixed; top: 0; bottom: 0; right: -300px; width: 280px; z-index: 1001; transition: right 0.3s ease; padding: 20px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; background: var(--white); border-left: 1px solid var(--light-gray); box-shadow: -5px 0 20px rgba(0,0,0,0.3); }
.drawer.active { right: 0; }
.drawer-header { display: flex; align-items: center; gap: 10px; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(212, 175, 55, 0.3); }
.drawer-header img { width: 50px; height: 50px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.drawer-header h3 { font-size: 16px; color: var(--dark-gray); }
.drawer-header p { font-size: 12px; color: var(--medium-gray); }
.drawer-menu-item { display: flex; align-items: center; gap: 15px; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,0.1); cursor: pointer; color: var(--medium-gray); transition: all 0.3s ease; }
.drawer-menu-item:hover { color: var(--gold); padding-right: 10px; }
.drawer-menu-item i { color: var(--medium-gray); width: 20px; text-align: center; }
.drawer-section-title { margin-top: 20px; font-size: 14px; color: var(--medium-gray); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }

/* نمادهای فوتر در عرض محدود کشوی اصلی، دو ستون دارند. */
.drawer .footer-badges { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0 8px; }
.drawer .badge-placeholder { box-sizing: border-box; width: 100%; min-width: 0; height: 100px; box-shadow: 0 2px 8px rgba(0,0,0,.12); }

.drawer-newsletter-text { font-size: 12px; color: var(--dark-gray); line-height: 1.8; margin-bottom: 12px; }
.drawer-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--medium-gray);
    color: var(--white);
    border: none;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: bold;
    transition: background 0.3s;
    margin-top: 20px;
}
.drawer-logout i { color: var(--primary); }
.drawer-logout:hover, .drawer-logout:hover i { color: var(--primary-dark); }
.footer-info-drawer { font-size: 12px; color: var(--medium-gray); line-height: 1.8; margin-top: 20px; }
.footer-info-drawer h4 { color: var(--dark-gray); margin-bottom: 5px; }
.footer-info-drawer i { color: var(--gold); }
.drawer-social { margin-top: 15px; display: flex; gap: 18px; }
.drawer-social a { color: inherit; text-decoration: none; display: inline-flex; }
.drawer-social i { font-size: 36px; color: var(--gold); cursor: pointer; transition: color 0.3s, transform 0.2s; }
.drawer-social i:hover { color: var(--gold-light); transform: translateY(-2px); }

/* --- Search Drawer --- */
/* چیدمان ستونی: سر (ورودی) و نوار حالت ثابت، .search-content تنها بخش اسکرول‌خور،
   دکمه‌ی «جستجو کن» در انتهای جریان (نه absolute) تا هرگز روی آیتم‌ها نیفتد. */
.search-drawer { position: fixed; top: 0; bottom: 0; right: 0; left: 0; z-index: 1001; transform: translateY(-100%); transition: transform 0.3s ease; background: var(--glass-bg); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 20px 20px calc(20px + env(safe-area-inset-bottom, 0px)); display: flex; flex-direction: column; }
.search-drawer.active { transform: translateY(0); }
.search-drawer-head { display: flex; gap: 10px; margin-bottom: 20px; flex-shrink: 0; }
.search-drawer-input { flex: 1; display: flex; align-items: center; background: rgba(255,255,255,0.6); border-radius: 15px; padding: 12px 15px; border: 1px solid var(--glass-border); }
.search-drawer-input input { border: none; background: none; outline: none; width: 100%; font-family: inherit; font-size: 16px; color: var(--dark); }
.search-drawer-input i { color: var(--gray); font-size: 18px; margin-left: 10px; }
.search-close-btn { background: var(--primary); color: white; border: none; border-radius: 12px; padding: 0 15px; font-size: 18px; cursor: pointer; }
/* دامنه‌ی کشوهای فیلتر صفحه‌ی کسب‌وکار و فروشگاه: جستجو فقط در همان کسب‌وکار */
.search-scope { flex-shrink: 0; display: flex; align-items: center; gap: 8px; margin: -8px 0 8px; padding: 7px 12px; border-radius: 12px; background: rgba(255,255,255,0.55); border: 1px solid var(--glass-border); font-size: 12.5px; color: var(--gray); }
.search-scope img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: #fff; }
.search-scope span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-scope b { color: var(--dark); }
.search-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; padding: 5px 5px 16px; }
.search-title { font-size: 14px; color: var(--gray); margin: 20px 0 10px; }
.search-tags { display: flex; flex-wrap: nowrap; gap: 10px; padding-bottom: 5px; }
.search-tag { background: rgba(255,255,255,0.6); padding: 8px 15px; border-radius: 20px; font-size: 13px; color: var(--dark); border: 1px solid var(--glass-border); flex-shrink: 0; white-space: nowrap; cursor: pointer; transition: all 0.2s; }
.search-tag:active { transform: scale(0.95); background: var(--primary); color: white; }

/* Horizontal drag-scroll utility (stories, search tags) */
/* touch-action عمداً pan-x نیست: آن مقدار زنجیره اسکرول عمودی به صفحه را
   برای لمسی که از این عنصر شروع می‌شود کاملاً قطع می‌کرد و صفحه اصلاً
   اسکرول نمی‌خورد. با auto (پیش‌فرض) مرورگر بر اساس جهت غالب انگشت خودش
   تصمیم می‌گیرد: افقی → این نوار، عمودی → صفحه. */
.drag-scroll { overflow-x: auto; scroll-behavior: smooth; }
.drag-scroll.dragging { scroll-behavior: auto; cursor: grabbing; user-select: none; }
.drag-scroll.dragging * { pointer-events: none; }
@media (hover: hover) and (pointer: fine) { .drag-scroll { cursor: grab; } }

/* Location Selectors (inside the shared search drawer) */
.location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.glass-select { width: 100%; padding: 12px 15px; border-radius: 15px; background: rgba(255,255,255,0.6); border: 1px solid var(--glass-border); font-family: inherit; font-size: 14px; color: var(--dark); outline: none; cursor: pointer; appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b2bec3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: left 15px center; background-size: 14px; }

/* --- Category Grid (inside the shared search drawer) --- */
.category-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: rgba(255,255,255,0.5); border: 1px solid var(--glass-border); border-radius: 15px; padding: 15px 5px; cursor: pointer; transition: all 0.2s ease; position: relative; }
.cat-item i { font-size: 24px; color: var(--primary); transition: color 0.2s ease; }
.cat-item span { font-size: 12px; color: var(--dark); text-align: center; font-weight: 500; }
.cat-item.selected { background: var(--primary); border-color: var(--primary-dark); box-shadow: 0 4px 10px rgba(239, 58, 75, 0.3); }
.cat-item.selected i, .cat-item.selected span { color: white; }
.cat-item .check-icon { position: absolute; top: 5px; left: 5px; color: white; font-size: 12px; display: none; }
.cat-item.selected .check-icon { display: block; }

.apply-filters-btn { position: relative; flex-shrink: 0; width: 100%; margin-top: 12px; background: var(--primary); color: white; border: none; padding: 15px; border-radius: 15px; font-family: inherit; font-size: 16px; font-weight: bold; cursor: pointer; box-shadow: 0 10px 20px rgba(239, 58, 75, 0.3); display: flex; align-items: center; justify-content: center; gap: 10px; }

/* --- Cart Drawer: تمام استایل سبد فقط در style-cart.css (کلاس ریشه‌ی .dlj-cart) --- */

/* --- Desktop Footer & Wave --- */
.footer-wave { display: none; line-height: 0; }
.footer-wave svg { width: 100%; height: 80px; display: block; }
.site-footer { display: none; background: var(--white); color: var(--dark-gray); padding: 0 5% 40px; }
.site-footer .footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 40px; max-width: 1200px; margin: 0 auto; padding-top: 20px; }
.site-footer h4 { color: var(--medium-gray); font-size: 18px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }

.site-footer ul { list-style: none; }
.site-footer ul li { margin-bottom: 12px; font-size: 14px; color: var(--medium-gray); cursor: pointer; display: flex; align-items: center; gap: 10px; transition: color 0.3s, padding-right 0.3s; }
.site-footer ul li:hover { color: var(--gold); padding-right: 5px; }
.site-footer ul li i { color: var(--medium-gray); width: 16px; text-align: center; }

.footer-social {
    margin-top: 20px;
    display: flex;
    gap: 15px;
    font-size: 24px;
}
.footer-social a { color: var(--medium-gray); cursor: pointer; }
.footer-contact li {
    align-items: flex-start;
}
.newsletter-form { display: flex; background: rgba(255,255,255,0.1); border-radius: 10px; padding: 5px; margin-bottom: 20px; border: 1px solid rgba(212, 175, 55, 0.3); }
.newsletter-form input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: white; padding: 10px; font-family: inherit; font-size: 14px; }
.newsletter-form input::placeholder { color: #aaa; }
.newsletter-form button { flex-shrink: 0; background: var(--gold); color: var(--footer-bg-start); border: none; padding: 0 15px; border-radius: 8px; cursor: pointer; font-family: inherit; font-weight: bold; transition: background 0.3s; }
.newsletter-form button:hover { background: var(--gold-light); }
.newsletter-form input:disabled, .newsletter-form button:disabled { opacity: .6; cursor: default; }
/* کاربر واردشده شماره‌اش را از قبل دارد؛ به‌جای فرم فقط همین دکمه دیده می‌شود (ماده ۵) */
.newsletter-subscribe-btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; background: var(--light-gray); color: var(--footer-bg-start); border: none; padding: 12px; border-radius: 10px; cursor: pointer; font-family: inherit; font-size: 14px; font-weight: bold; transition: background 0.3s; margin-bottom: 20px; }
.newsletter-subscribe-btn:hover { background: var(--gold-light); }
.newsletter-subscribe-btn:disabled { opacity: .6; cursor: default; }
.footer-badges { display: flex; gap: 15px; margin-top: 20px; }
.badge-placeholder { width: 90px; height: 100px; background: white; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 10px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.badge-placeholder i { font-size: 30px; color: #555; margin-bottom: 5px; }
.badge-placeholder span { font-size: 10px; color: #333; font-weight: bold; }
.badge-placeholder { text-decoration: none; }
.badge-placeholder img { max-width: 100%; max-height: 100%; object-fit: contain; }
.footer-copyright { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 13px; color: #888; }

/* --- Bottom Navigation (کشوی مشترک موبایل — _BottomNav.cshtml) --- */
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 600px; background: var(--white); display: flex; justify-content: space-around; padding: 10px 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.2); z-index: 1000; }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--medium-gray); cursor: pointer; }
.nav-item i { font-size: 20px; }
.nav-item span { font-size: 10px; }
.nav-item.active { color: var(--gold); }

@media (min-width: 768px) {
    .site-header { max-width: 100%; padding: 15px 5%; }
    .site-search { padding: 20px 5% 6px; }
}

/* Real desktop only: horizontal top menu replaces the drawer, bottom-nav
   gives way to the full footer. Tablet keeps the mobile-style bottom-nav + drawer. */
@media (min-width: 1024px) {
    .menu-btn { display: none; }
    .desktop-nav { display: flex; }
    .user-menu-wrap { display: block; }
    .bottom-nav { display: none; }
    .footer-wave, .site-footer { display: block; }

    /* Global search is a centered modal on desktop instead of a full-screen drawer. */
    .search-drawer {
        top: 50%;
        right: auto;
        bottom: auto;
        left: 50%;
        width: min(800px, calc(100% - 40px));
        transition: transform 0.3s ease;
        max-height: calc(100vh - 40px);
        max-height: calc(100dvh - 40px);
        border-radius: 20px;
        overflow: hidden;
        display: none;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
        transform: translate(-50%, calc(-50% - 20px));
    }

        /* flex (نه block) تا .search-content در نمایشگرهای کوتاه اسکرول بخورد */
        .search-drawer.active {
            display: flex;
            transform: translate(-50%, calc(-50% - 20px));
        }
}

/* --- موبایل/تبلت: هدر ۴ تایی (همبرگری، لوگو، فلش پنل، جستجو) ---
   آیکن جستجو و فلش نمایان می‌شوند و کیف پول/اعلان/سبد از حالت ردیفی بیرون
   می‌آیند تا فقط وقتی پنل زیر فلش باز می‌شود دیده شوند. */
@media (max-width: 1023px) {
    .header-search-btn, .header-more-btn { display: inline-flex; }

    /* نوار جستجوی زیر هدر جای خود را به آیکن جستجوی هدر می‌دهد تا دو بار تکرار نشود؛
       #searchTrigger در DOM می‌ماند و آیکن هدر همان را کلیک می‌کند. */
    .site-search { display: none; }

    .header-icons { position: relative; }

    .header-more-panel {
        position: absolute;
        top: calc(100% + 14px);
        left: 0;
        display: none;
        flex-direction: column;
        gap: 2px;
        min-width: min(280px, calc(100vw - 30px));
        max-height: calc(100vh - 84px);
        overflow-y: auto;
        padding: 8px;
        background: var(--white);
        border-radius: 16px;
        box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
        z-index: 220;
    }

        .header-more-panel.open { display: flex; }

    /* سطر زنگوله + لیستش روی هم (ستون) تا لیست کنار آیکن نیفتد */
    .header-more-panel .notif-menu-wrap { position: static; flex-direction: column; align-items: stretch; width: 100%; }

        .header-more-panel .notif-btn,
        .header-more-panel .cart-btn,
        .header-more-panel .wallet-header-btn {
            position: relative;
            width: 100%;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 11px 12px;
            border-radius: 12px;
            font-size: 19px;
            text-align: right;
            font-family: inherit;
        }

        .header-more-panel .notif-btn:hover,
        .header-more-panel .cart-btn:hover,
        .header-more-panel .wallet-header-btn:hover { background: var(--light); }

    .hm-label { display: inline; flex: 1 1 auto; font-size: 13.5px; font-weight: 600; color: var(--dark); }

    /* نشان عدد در انتهای سطر (سمت چپ) می‌نشیند، نه روی آیکن */
    .header-more-panel .notif-badge,
    .header-more-panel .cart-btn .notif-badge {
        position: static;
        flex: 0 0 auto;
        min-width: 20px;
        height: 20px;
        font-size: 11px;
        border-color: var(--white);
    }

    /* لیست اعلان‌ها به‌جای شناور بیرون پنل، همین‌جا زیر آیکن زنگوله باز می‌شود */
    .header-more-panel .notif-popup {
        position: static;
        width: 100%;
        margin-top: 4px;
        box-shadow: none;
        border: 1px solid rgba(0, 0, 0, 0.07);
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

        .header-more-panel .notif-popup.active { display: block; }
        .header-more-panel .notif-popup::before { display: none; }
        .header-more-panel .notif-popup .notif-list { max-height: 240px; }
}
