/* ===== فونت وزیر ===== */
@font-face {
    font-family: 'Vazir';
    src: url('fonts/Vazir.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Vazir';
    src: url('fonts/Vazir-Bold.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

/* اعمال فونت روی کل سایت */
* {
    font-family: 'Vazir', Tahoma, sans-serif;
}

/* ===========================
   تنظیمات عمومی
=========================== */

a{
    text-decoration:none;
}

.container{
    max-width:1200px;
    margin:auto;
    padding:20px;
}

/* ================= HEADER ================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #fff;
    margin: -7px -10px;
    padding: 8px 10px;
    width: calc(100% + 20px);
}

/* ===== ردیف اول ===== */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 35px;
    height: 75px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-shrink: 0;
}

.logo img {
    height: 70px;
    margin: 10px 0 0 0;
}

.header-search {
    width: 500px;
    height: 44px;
    background: #f6f6f6;
    border-radius: 30px;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.header-search input {
    flex: 1;
    border: none;
    background: none;
    outline: none;
    padding: 0 15px;
    font-size: 13px;
}

.header-search button {
    width: 50px;
    height: 100%;
    border: none;
    background: none;
    font-size: 16px;
    cursor: pointer;
    color: #999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search button:hover {
    color: #625f5f;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
}

.icon-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    color: #868686;
    transition: .25s;
    position: relative;
}

.icon-btn:hover {
    color: #625f5f;
}

.cart-count {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ff2d55;
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #333;
}

/* ===== ردیف دوم: منو ===== */
.header-nav {
    background: #fff;
    padding: 0 35px;
    display: flex;
    justify-content: flex-start;
}

.header-nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
    height: 50px;
}

.header-nav li {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.header-nav > ul > li > a {
    display: flex;
    align-items: center;
    padding: 0 5px;
    color: #444;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: .25s;
    height: 100%;
    white-space: nowrap;
}

.header-nav > ul > li > a:hover {
    color: #ff5722;
}

/* ==============================================
   HEADER - ریسپانسیو کامل
   ============================================== */

/* ===== دسکتاپ بزرگ (بالای 1200px) ===== */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 35px;
    height: 75px;
    gap: 20px;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-shrink: 0;
}

.logo img {
    height: 70px;
}

.header-search-wrapper {
    flex: 1;
    max-width: 500px;
}

.header-search {
    width: 100%;
    height: 44px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-shrink: 0;
    margin-right: auto;
}

.icon-btn {
    width: 42px;
    height: 42px;
    font-size: 20px;
}

/* ==============================================
   دسکتاپ کوچک و تبلت بزرگ (992px تا 1199px)
   ============================================== */
@media (max-width: 1199px) {
    .header-top {
        padding: 10px 25px;
    }
    
    .header-left {
        gap: 20px;
    }
    
    .header-search-wrapper {
        max-width: 350px;
    }
    
    .header-actions {
        gap: 12px;
    }
    
    .icon-btn {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}

/* ==============================================
   تبلت (769px تا 991px)
   ============================================== */
@media (max-width: 991px) and (min-width: 769px) {
    .header-top {
        padding: 12px 20px;
        height: auto;
        min-height: 70px;
        gap: 15px;
    }
    
    .header-left {
        gap: 15px;
    }
    
    .logo img {
        height: 58px;
        margin: 10px 0 0 0;
    }
    
    .header-search-wrapper {
        flex: 1;
        max-width: 300px;
        min-width: 180px;
    }
    
    .header-search {
        height: 40px;
    }
    
    .header-search input {
        font-size: 13px;
        padding: 0 12px;
    }
    
    .header-search button {
        width: 40px;
        font-size: 14px;
    }
    
    .header-actions {
        gap: 8px;
        margin-right: auto;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }
    
    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -3px;
        left: -3px;
    }
}

/* ==============================================
   موبایل (زیر 768px)
   ============================================== */
@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 15px;
        gap: 10px;
    }
    
    .header-left {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }
    
    .logo img {
        height: 45px;
        margin: 0;
    }
    
    /* جستجو مخفی بشه، از Drawer استفاده کنه */
    .header-search-wrapper.header-search-desktop {
        display: none !important;
    }
    
    .header-actions {
        gap: 8px;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }
    
    .header-nav {
        display: none;
    }
}

/* ==============================================
   MEGA MENU (بهینه‌شده)
=============================================== */

.category-mega {
    position: relative;
}

.mega-menu {
    position: absolute;
    top: 100%;
    right: 0;
    width: 820px;
    max-width: 90vw;
    height: 480px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, .12);
    display: flex;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 9999;
}

.category-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

/* ===== ستون دسته‌بندی‌ها (راست) ===== */
.mega-categories {
    width: 240px;
    background: #fafafa;
    border-left: 1px solid #eee;
    overflow-y: auto;
    flex-shrink: 0;
}

.mega-category {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    transition: 0.25s;
    color: #444;
    position: relative;
}

/* ===== آیکون (تصویر یا ایموجی) ===== */
.mega-category img,
.mega-category > span:first-child {
    order: 3; /* ← رفتن به آخر (سمت راست) */
    flex-shrink: 0;
}

/* ===== اسم دسته‌بندی ===== */
.mega-category > span:first-of-type {
    order: 1; /* ← اول (سمت چپ) */
    flex: 1;
    font-size: 14px;
    text-align: right;
}

/* ===== فلش ===== */
.mega-category i {
    order: 2; /* ← وسط */
    font-size: 12px;
    color: #ccc;
    transition: 0.3s;
}

.mega-category:hover {
    background: #fff;
    color: #ff5722;
}

.mega-category.active {
    background: #fff;
    color: #ff5722;
    border-right: 3px solid #ff5722;
}

.mega-category img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.mega-category span:first-of-type {
    flex: 1;
    font-size: 14px;
}
/* 
.category-count {
    font-size: 11px;
    color: #999;
    background: #f0f0f0;
    padding: 0 8px;
    border-radius: 20px;
    font-weight: 400;
}

.mega-category.active .category-count {
    background: #fff0ed;
    color: #ff5722;
} */

.mega-category i {
    font-size: 12px;
    color: #ccc;
    transition: 0.3s;
}

.mega-category:hover i,
.mega-category.active i {
    color: #ff5722;
}

/* ===== پنل فروشگاه‌ها (چپ) ===== */
.mega-content {
    flex: 1;
    background: #fff;
    position: relative;
}

.mega-panel {
    position: absolute;
    inset: 0;
    padding: 20px 25px;
    display: none;
    overflow-y: auto;
}

.mega-panel.active {
    display: block;
}

.mega-panel::-webkit-scrollbar {
    width: 4px;
}

.mega-panel::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

/* ===== هدر پنل ===== */
.mega-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f5f5f5;
}

.mega-panel-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.view-all-link {
    font-size: 13px;
    color: #ff5722;
    text-decoration: none;
    font-weight: 500;
    transition: 0.3s;
}

.view-all-link:hover {
    color: #e64a19;
}

.view-all-link i {
    font-size: 12px;
    transition: 0.3s;
}

.view-all-link:hover i {
    transform: translateX(-3px);
}

/* ===== گرید فروشگاه‌ها ===== */
.restaurant-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-height: 340px;
    overflow-y: auto;
}

.restaurant-grid::-webkit-scrollbar {
    width: 4px;
}

.restaurant-grid::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 10px;
}

/* ===== آیتم فروشگاه ===== */
.mega-restaurant {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 12px;
    text-decoration: none;
    color: #333;
    transition: 0.25s;
}

.mega-restaurant:hover {
    background: #f7f7f7;
}

.mega-restaurant img {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mega-restaurant strong {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #222;
}

.mega-restaurant small {
    display: block;
    color: #888;
    font-size: 11px;
    margin-top: 2px;
}

.empty-restaurants {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px 0;
    color: #999;
    font-size: 14px;
}

.empty-restaurants i {
    display: block;
    font-size: 32px;
    margin-bottom: 10px;
    color: #ddd;
}

/* ==============================================
   ریسپانسیو
=============================================== */
@media (max-width: 1024px) {
    .mega-menu {
        width: 700px;
        height: 420px;
    }
    .mega-categories {
        width: 200px;
    }
    .restaurant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        max-height: 280px;
    }
    .mega-panel {
        padding: 16px 20px;
    }
}

@media (max-width: 768px) {
    .mega-menu {
        position: static;
        width: 100%;
        height: auto;
        max-height: 400px;
        border-radius: 0;
        flex-direction: column;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        display: none;
    }

    .category-mega:hover .mega-menu {
        display: flex;
    }

    .mega-categories {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid #eee;
        max-height: 200px;
        overflow-y: auto;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .mega-category {
        padding: 10px 14px;
        border-right: 1px solid #f0f0f0;
        border-bottom: 1px solid #f0f0f0;
    }

    .mega-category.active {
        border-right: none;
        border-right: 3px solid #ff5722;
    }

    .mega-content {
        min-height: 200px;
    }

    .mega-panel {
        position: static;
        display: none;
        padding: 14px 16px;
    }

    .mega-panel.active {
        display: block;
    }

    .restaurant-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        max-height: 200px;
        overflow-y: auto;
    }

    .mega-panel-header h3 {
        font-size: 16px;
    }

    .mega-restaurant img {
        width: 36px;
        height: 36px;
    }

    .mega-restaurant strong {
        font-size: 12px;
    }

    .mega-restaurant small {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .mega-categories {
        grid-template-columns: 1fr;
    }
    .restaurant-grid {
        grid-template-columns: 1fr;
    }
    .mega-category {
        padding: 8px 12px;
    }
    .mega-category span:first-of-type {
        font-size: 13px;
    }
}

/* ==============================================
   همبرگری
=============================================== */

.hamburger {
    display: none;
    background: none;
    border: none;
    color: #4b4747;
    font-size: 20px;
    cursor: pointer;
}

/* ==============================================
   ریسپانسیو
=============================================== */

@media (max-width: 1024px) {
    .header-search {
        width: 280px;
    }
    .header-nav ul {
        gap: 20px;
    }
    .header-nav > ul > li > a {
        font-size: 13px;
    }
    .header-nav .dropdown-menu {
        width: 600px;
        right: -140px;
    }
    .category-header {
        width: 160px;
        padding: 6px 12px;
        font-size: 13px;
    }
    .dropdown-restaurant-item {
        width: calc(50% - 10px);
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        height: auto;
        padding: 12px 20px;
        gap: 12px;
    }

    .header-left {
        flex: 1;
        gap: 15px;
        min-width: 0;
        margin: -6px -5px 0 0;
    }

    .header-search {
        width: 100%;
        max-width: 300px;
    }

    .header-nav {
        display: none;
        padding: 0 20px;
    }

    .header-nav.open {
        display: block;
    }

    .header-nav ul {
        flex-direction: column;
        height: auto;
        gap: 0;
        padding: 10px 0;
    }

    .header-nav > ul > li {
        height: auto;
        width: 100%;
    }

    .header-nav > ul > li > a {
        padding: 12px 0;
        height: auto;
        border-bottom: 1px solid #f5f5f5;
        width: 100%;
    }

    .header-nav .dropdown-menu {
        position: static !important;
        width: 100% !important;
        max-width: 100% !important;
box-shadow: none !important;
        padding: 0 15px !important;
        border-radius: 0 !important;
        background: #f9f9f9 !important;
        opacity: 1 !important;
        visibility: visible !important;
        display: none !important;
        flex-direction: column !important;
        gap: 0 !important;
        min-height: unset !important;
        pointer-events: auto !important;
        right: 0 !important;
    }

    .has-dropdown:hover > .dropdown-menu {
        display: flex !important;
    }

    .category-wrapper {
        flex-direction: column !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 5px;
    }

    .category-header {
        width: 100%;
        justify-content: space-between;
        padding: 10px 14px;
    }

    .category-restaurants {
        border-right: none;
        padding-right: 30px;
        padding-left: 10px;
    }

    .category-wrapper:hover .category-restaurants {
        display: flex;
    }

    .dropdown-restaurant-item {
        width: 100% !important;
        padding: 6px 10px !important;
        border-bottom: 1px solid #eee;
    }

    .hamburger {
        display: block;
    }
}

@media (max-width: 480px) {
    .header-left {
        flex-wrap: wrap;
        gap: 10px;
    }

    .header-search {
        max-width: 100%;
        height: 40px;
    }

    .header-search input {
        font-size: 13px;
        padding: 0 12px;
    }

    .header-search button {
        width: 40px;
        font-size: 16px;
    }

    .logo img {
        height: 35px;
    }

    .icon-btn {
        width: 36px;
        height: 36px;
        font-size: 17px;
    }

    .cart-count {
        width: 18px;
        height: 18px;
        font-size: 10px;
        top: -3px;
        left: -3px;
    }

    .category-header {
        font-size: 13px;
        padding: 8px 12px;
    }

    .category-header img,
    .category-header .category-icon-placeholder {
        width: 24px;
        height: 24px;
        font-size: 14px;
    }

    .dropdown-restaurant-item img {
        width: 28px !important;
        height: 28px !important;
    }

    .dropdown-restaurant-item .name {
        font-size: 12px !important;
    }
}

/* ===========================
   منوی موبایل
=========================== */

/* #drawerOverlay{

    position:fixed;

    inset:0;

    background:rgba(0,0,0,.45);

    display:none;

    z-index:1999;

}

#drawerMenu{

    position:fixed;

    top:0;

    right:-100%;

    width:300px;

    height:100%;

    background:#222;

    transition:.35s;

    z-index:2000;

    overflow:auto;

    padding:20px;

}

#closeDrawer{

    background:none;

    border:none;

    color:#fff;

    font-size:25px;

    cursor:pointer;

    margin-bottom:30px;

}

.mobile-links{

    display:flex;

    flex-direction:column;

    gap:12px;

}

.mobile-links a{

    color:#fff;

    padding:12px;

    border-radius:8px;

    transition:.3s;

}

.mobile-links a:hover{

    background:#ff5722;

}

.mobile-user{

    color:#fff;

    font-weight:bold;

    margin-bottom:10px;

    padding:10px;

    border-bottom:1px solid rgba(255,255,255,.2);

} */

/* ==========================================
   FOOTER
========================================== */

.site-footer {
background: #1a1a2e;
  color: #e0e0e0;
  padding: 50px 40px 0;
  margin: 60px -8px -8px -8px;
  border-top: 4px solid #ff5722;
}

.footer-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
}

/* ===== ستون‌ها ===== */
.footer-col h4 {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: #ff5722;
    border-radius: 4px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #c0c0c0;
    text-decoration: none;
    transition: 0.3s;
    font-size: 14px;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: #ff5722;
    transform: translateX(-4px);
}

/* ===== برند ===== */
.footer-brand .footer-logo a {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
}

.footer-desc {
    font-size: 14px;
    line-height: 1.8;
    color: #b0b0b0;
    margin: 12px 0 20px;
    max-width: 300px;
}

/* ===== شبکه‌های اجتماعی ===== */
.footer-social {
    display: flex;
    gap: 12px;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    transition: 0.3s;
    text-decoration: none;
}

.footer-social a:hover {
    background: #ff5722;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(255, 87, 34, 0.3);
}

/* ===== تماس ===== */
.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #c0c0c0;
    font-size: 14px;
}

.footer-contact li i {
    width: 20px;
    color: #ff5722;
    font-size: 16px;
}

.footer-contact li a {
    color: #c0c0c0;
    text-decoration: none;
    transition: 0.3s;
}

.footer-contact li a:hover {
    color: #ff5722;
}

/* ===== کپی‌رایت ===== */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 20px 0;
    margin-top: 40px;
    text-align: center;
}

.footer-bottom p {
    font-size: 13px;
    color: #888;
    margin: 0;
}

.footer-bottom a {
    color: #ff5722;
    text-decoration: none;
}

.footer-bottom a:hover {
    text-decoration: underline;
}

/* ===== فلش کشویی ===== */
.footer-arrow {
    display: none;
    font-size: 14px;
    transition: 0.3s;
    color: #888;
}

/* ==========================================
   RESPONSIVE FOOTER
========================================== */

@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 35px 15px 0;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
    }

    /* ===== ستون اول (برند) بدون کشویی ===== */
    .footer-brand {
        padding: 15px 0 25px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        margin-bottom: 5px;
    }
    .footer-brand .footer-desc {
        max-width: 100%;
        margin: 12px 0 20px;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-brand .footer-logo {
        text-align: center;
    }
    .footer-col h4::after {
        right: 50%;
        transform: translateX(50%);
    }

    /* ===== ستون‌های کشویی ===== */
    .footer-collapsible {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
        padding: 0;
    }

    .footer-col-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 0;
        cursor: pointer;
        user-select: none;
    }
.footer-col-header h4 {
        margin: 0;
        padding: 0;
        font-size: 16px;
    }

    .footer-col-header h4::after {
        display: none;
    }

    .footer-arrow {
        display: block;
        font-size: 16px;
        color: #888;
        transition: 0.3s;
    }

    .footer-col-body {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        padding: 0 0 0 10px;
    }

    .footer-col-body.open {
        max-height: 400px;
        padding: 0 0 15px 10px;
    }

    .footer-contact li {
        justify-content: flex-start;
    }

    .footer-bottom {
        margin-top: 25px;
        padding: 15px 0;
    }
}

@media (max-width: 480px) {
    .footer-contact li {
        justify-content: center;
        font-size: 13px;
    }
    .footer-col-header h4 {
        font-size: 15px;
    }
    .footer-desc {
        font-size: 13px;
        text-align: center;
    }
}

/* ================= Mobile Header ================= */

@media (max-width:768px){

    .header-search{
        display:none;
    }

    .site-header{
        padding:0 15px;
        height:65px;
    }

    .logo img{
        height:58px;
    }

    .header-left{
        gap:12px;
    }

    .header-actions{
        gap:10px;
        margin-left: 20px;
    }

    .icon-btn{
        width:38px;
        height:38px;
        font-size:18px;
        margin-top: -17px;
    }

    .hamburger{
        display:flex;
        align-items:center;
        justify-content:center;
    }

}


/* ================================================================
   Live Search
   ================================================================ */

   .header-search-wrapper {
    position: relative;
    width: 500px;
}

.live-search-results {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    max-height: 500px;
    overflow-y: auto;
    z-index: 9999;
    display: none;
    border: 1px solid #f0f0f0;
}

.live-search-results.active {
    display: block;
    animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.live-search-header {
    padding: 12px 18px;
    border-bottom: 1px solid #f5f5f5;
    font-size: 12px;
    color: #999;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.live-search-header strong {
    color: #1a1a2e;
    font-size: 13px;
}

.live-search-section {
    border-bottom: 1px solid #f5f5f5;
}

.live-search-section:last-child {
    border-bottom: none;
}

.live-search-section-title {
    padding: 10px 18px 6px;
    font-size: 11px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.live-search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 18px;
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

.live-search-item:hover {
    background: #f8f9ff;
}

.live-search-item-image {
    width: 45px;
    height: 45px;
    min-width: 45px;
    border-radius: 10px;
    background: #f5f5f5;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
    font-size: 18px;
}

.live-search-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-search-item-info {
    flex: 1;
    min-width: 0;
}

.live-search-item-name {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-search-item-subtitle {
    font-size: 11px;
    color: #999;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.live-search-item-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
    color: white;
}

.live-search-item-badge.open {
    background: #4caf50;
}

.live-search-item-badge.closed {
    background: #9e9e9e;
}

.live-search-item-rating {
    font-size: 12px;
    color: #ff9800;
    font-weight: 700;
    white-space: nowrap;
}

.live-search-item-price {
    font-size: 13px;
    font-weight: 800;
    color: #ff5722;
    text-align: left;
    direction: rtl;
    white-space: nowrap;
}

.live-search-item-price-old {
    font-size: 11px;
    color: #ccc;
    text-decoration: line-through;
    display: block;
}

.live-search-view-all {
    display: block;
    padding: 14px 18px;
    text-align: center;
    background: #f8f9ff;
    color: #11998e;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    border-top: 1px solid #f0f0f0;
    transition: 0.2s;
    border-radius: 0 0 16px 16px;
}

.live-search-view-all:hover {
    background: #eef2ff;
}

.live-search-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

.live-search-empty-icon {
    font-size: 40px;
    margin-bottom: 10px;
    opacity: 0.4;
}

.live-search-empty-title {
    font-size: 14px;
    font-weight: 700;
    color: #666;
    margin-bottom: 5px;
}

.live-search-empty-text {
    font-size: 12px;
}

.live-search-loading {
    padding: 30px;
    text-align: center;
    color: #999;
}

.live-search-loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f0f0f0;
    border-top-color: #11998e;
    border-radius: 50%;
    margin: 0 auto 10px;
animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .header-search-wrapper {
        width: 100%;
    }
    
    .live-search-results {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 20px 20px 0 0;
        max-height: 70vh;
    }
}


/* ==============================================
Drawer جستجو (فقط موبایل)
============================================== */

/* دسکتاپ: مخفی */
.search-drawer,
.search-drawer-overlay,
.search-toggle-btn {
display: none;
}

@media (max-width: 768px) {
/* ===== آیکون جستجو در هدر ===== */
.search-toggle-btn {
display: flex !important;
}

/* ===== Overlay ===== */
.search-drawer-overlay {
display: block;
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 99998;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s;
}

.search-drawer-overlay.active {
opacity: 1;
visibility: visible;
}

/* ===== Drawer ===== */
.search-drawer {
display: flex;
flex-direction: column;
position: fixed;
top: 0;
right: 0;
bottom: 0;
width: 90%;
max-width: 420px;
background: #fff;
z-index: 99999;
transform: translateX(100%);
transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

.search-drawer.active {
transform: translateX(0);
}

/* ===== هدر Drawer ===== */
.search-drawer-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 18px 20px;
border-bottom: 1px solid #f0f0f0;
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
flex-shrink: 0;
}

.search-drawer-header h3 {
display: flex;
align-items: center;
gap: 10px;
font-size: 16px;
font-weight: 700;
margin: 0;
}

.search-drawer-header h3 i {
font-size: 18px;
}

.search-drawer-close {
width: 36px;
height: 36px;
border-radius: 50%;
border: none;
background: rgba(255, 255, 255, 0.2);
color: white;
font-size: 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: 0.2s;
}

.search-drawer-close:hover {
background: rgba(255, 255, 255, 0.3);
transform: rotate(90deg);
}

/* ===== فرم جستجو ===== */
.search-drawer-form-wrapper {
padding: 15px 20px;
background: #f8f9ff;
flex-shrink: 0;
}

.search-drawer-form {
display: flex;
align-items: center;
width: 100%;
height: 46px;
background: white;
border-radius: 23px;
overflow: hidden;
border: 1.5px solid #e8eaf0;
transition: 0.3s;
}

.search-drawer-form:focus-within {
border-color: #667eea;
box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.search-drawer-form button[type="submit"] {
width: 48px;
height: 100%;
border: none;
background: none;
color: #667eea;
font-size: 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}

.search-drawer-form input {
flex: 1;
border: none;
background: none;
outline: none;
padding: 0 10px;
font-size: 14px;
height: 100%;
box-sizing: border-box;
min-width: 0;
font-family: inherit;
}

.search-drawer-clear {
width: 40px;
height: 100%;
border: none;
background: none;
color: #bbb;
font-size: 16px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
}

.search-drawer-clear:hover {
color: #f44336;
}

/* ===== محتوای Drawer ===== */
.search-drawer-content {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}

/* ===== حالت پیش‌فرض ===== */
.search-drawer-default {
padding: 20px;
}

.search-suggestions-section {
margin-bottom: 25px;
}

.search-suggestions-section:last-child {
margin-bottom: 0;
}

.search-suggestions-title {
display: flex;
align-items: center;
gap: 8px;
font-size: 13px;
font-weight: 700;
color: #1a1a2e;
margin-bottom: 12px;
}

.search-suggestions-title i {
color: #667eea;
font-size: 14px;
}

.search-suggestions-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
}

.search-suggestion-chip {
padding: 8px 14px;
background: #f5f8ff;
color: #667eea;
border-radius: 20px;
text-decoration: none;
font-size: 13px;
font-weight: 600;
transition: 0.2s;
}

.search-suggestion-chip:hover {
background: #667eea;
color: white;
transform: translateY(-2px);
}

.search-categories-list {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 10px;
}

.search-category-item {
display: flex;
flex-direction: column;
align-items: center;
gap: 6px;
padding: 12px 8px;
background: #fafbff;
border: 1.5px solid #eef0f7;
border-radius: 12px;
text-decoration: none;
color: #333;
transition: 0.2s;
}

.search-category-item:hover {
border-color: #667eea;
background: white;
transform: translateY(-2px);
}

.search-category-icon {
width: 40px;
height: 40px;
border-radius: 10px;
background: white;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
border: 1px solid #f0f0f0;
}

.search-category-icon img {
width: 100%;
height: 100%;
object-fit: contain;
padding: 6px;
}

.search-category-icon i {
color: #667eea;
font-size: 18px;
}

.search-category-item span {
font-size: 11px;
font-weight: 600;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
max-width: 100%;
}

/* ===== نتایج جستجو ===== */
.search-drawer-results {
padding: 0;
}

.search-drawer-results .live-search-header {
padding: 12px 20px;
border-bottom: 1px solid #f5f5f5;
font-size: 12px;
color: #999;
background: #fafbff;
}

.search-drawer-results .live-search-header strong {
color: #1a1a2e;
font-size: 13px;
}

.search-drawer-results .live-search-section {
border-bottom: 1px solid #f5f5f5;
padding: 5px 0;
}

.search-drawer-results .live-search-section:last-child {
border-bottom: none;
}

.search-drawer-results .live-search-section-title {
padding: 12px 20px 6px;
font-size: 11px;
font-weight: 700;
color: #999;
text-transform: uppercase;
letter-spacing: 0.5px;
}

.search-drawer-results .live-search-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 20px;
text-decoration: none;
color: inherit;
transition: 0.2s;
}

.search-drawer-results .live-search-item:hover,
.search-drawer-results .live-search-item:active {
background: #f8f9ff;
}

.search-drawer-results .live-search-item-image {
width: 44px;
height: 44px;
min-width: 44px;
border-radius: 10px;
background: #f5f5f5;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
color: #ccc;
font-size: 16px;
}

.search-drawer-results .live-search-item-image img {
width: 100%;
height: 100%;
object-fit: cover;
}

.search-drawer-results .live-search-item-info {
flex: 1;
min-width: 0;
}

.search-drawer-results .live-search-item-name {
font-size: 13px;
font-weight: 700;
color: #1a1a2e;
margin-bottom: 3px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.search-drawer-results .live-search-item-subtitle {
font-size: 11px;
color: #999;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.search-drawer-results .live-search-item-badge {
padding: 3px 9px;
border-radius: 20px;
font-size: 10px;
font-weight: 700;
color: white;
white-space: nowrap;
}

.search-drawer-results .live-search-item-badge.open {
background: #4caf50;
}

.search-drawer-results .live-search-item-badge.closed {
background: #9e9e9e;
}

.search-drawer-results .live-search-item-rating {
font-size: 12px;
color: #ff9800;
font-weight: 700;
white-space: nowrap;
}

.search-drawer-results .live-search-item-price {
font-size: 13px;
font-weight: 800;
color: #ff5722;
text-align: left;
direction: rtl;
white-space: nowrap;
}

.search-drawer-results .live-search-item-price-old {
font-size: 11px;
color: #ccc;
text-decoration: line-through;
display: block;
}

.search-drawer-results .live-search-view-all {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
padding: 15px 20px;
background: linear-gradient(135deg, #667eea, #764ba2);
color: white;
text-decoration: none;
font-size: 13px;
font-weight: 700;
margin: 15px 20px;
border-radius: 12px;
transition: 0.3s;
}

.search-drawer-results .live-search-view-all:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

/* ===== Loading ===== */
.search-drawer-loading {
padding: 60px 20px;
text-align: center;
color: #999;
}

.search-drawer-spinner {
width: 36px;
height: 36px;
border: 3px solid #f0f0f0;
border-top-color: #667eea;
border-radius: 50%;
margin: 0 auto 15px;
animation: spin 0.8s linear infinite;
}

@keyframes spin {
to { transform: rotate(360deg); }
}

/* ===== حالت خالی ===== */
.search-drawer-empty {
padding: 60px 20px;
text-align: center;
color: #999;
}

.search-drawer-empty-icon {
font-size: 60px;
margin-bottom: 15px;
opacity: 0.4;
}

.search-drawer-empty-title {
font-size: 16px;
font-weight: 700;
color: #666;
margin-bottom: 8px;
}

.search-drawer-empty-text {
font-size: 13px;
}

/* ===== مخفی کردن باکس جستجوی دسکتاپ ===== */
.header-search-wrapper.header-search-desktop {
display: none !important;
}

/* منوی اصلی مخفی */
.header-nav {
display: none !important;
}
}