﻿/* =========================
   Main Navigation
========================= */

.main-nav {
    width: 100%;
    background: #fff;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}



.nav-inner {
    display: flex;
    justify-content: center;
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 20px; /* ← این خط را اضافه کنید */
    margin: 0;
    padding: 0;
    list-style: none;
}

    .nav-list > li {
        position: relative;
        list-style: none;
    }

        .nav-list > li > a {
            display: flex;
            align-items: center;
            gap: 7px;
            padding: 16px 20px;
            color: #333;
            text-decoration: none;
            white-space: nowrap;
            font-weight: 500;
            transition: all .2s ease;
        }

            .nav-list > li > a:hover {
                color: #178047;
            }

        /* خانه فعال با خط سبز */
        .nav-list > li.active > a {
            color: #178047;
            border-bottom: 3px solid #178047;
            padding-bottom: 13px;
        }

    /* =========================
   دکمه سبز دسته‌بندی محصولات
========================= */

    .nav-list .nav-category-btn {
        background: #178047;
        border-radius: 8px;
        margin: 6px 10px 6px 0;
    }

        .nav-list .nav-category-btn a.category-menu-btn {
            color: #fff;
            padding: 10px 18px;
            gap: 10px;
            font-weight: 600;
        }

            .nav-list .nav-category-btn a.category-menu-btn:hover {
                color: #fff;
                background: #146a3a;
                border-radius: 8px;
            }

        .nav-list .nav-category-btn .fa-chevron-down {
            font-size: 10px;
        }

/* =========================
   Mega Menu
========================= */

.has-mega-menu {
    position: static !important;
}

.mega-menu {
    margin-top: 5px;
    position: absolute;
    top: 100%;
    right: 27%;
    left: 0;
    width: 46%;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .12);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .25s ease, visibility .25s ease, transform .25s ease;
    padding: 0;
}

.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-menu-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 30px 35px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ستون‌های دسته‌بندی */
.mega-menu-column {
    flex: 1;
    min-width: 170px;
    padding: 0 20px;
    border-left: 1px solid #f0f0f0;
}

    /* حذف border-left از آخرین ستون */
    .mega-menu-column:nth-last-of-type(-n+2) {
        border-left: none;
    }


.mega-menu-title {
    color: #333;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 14px 0;
    padding: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .mega-menu-title i {
        font-size: 18px;
        color: #178047;
    }

.mega-menu-list {
    max-height: 250px;
    overflow-y: auto;
}

    .mega-menu-list li {
        margin: 0;
        padding: 0;
    }

        .mega-menu-list li a {
            display: block;
            padding: 4px 0;
            color: #555;
            font-size: 13px;
            text-decoration: none;
            transition: all .2s ease;
            border: none;
            background: transparent;
        }

            .mega-menu-list li a:hover {
                color: #178047;
                padding-right: 5px;
            }

        .mega-menu-list li.view-all {
            margin-top: 6px;
        }

            .mega-menu-list li.view-all a.view-all-link {
                color: #178047;
                font-weight: 600;
                font-size: 13px;
            }

                .mega-menu-list li.view-all a.view-all-link:hover {
                    padding-right: 5px;
                }

/* =========================
   پنل ویژه (محصولات پرفروش)
========================= */

.mega-menu-featured {
    flex: 0 0 260px;
    min-width: 220px;
    padding: 0 0 0 20px;
    border-left: none !important;
}

.featured-box {
    background: linear-gradient(145deg, #f8fff9, #eaf5ed);
    border-radius: 12px;
    padding: 20px 22px;
    border: 1px solid #d4e8da;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-badge {
    display: inline-block;
    background: #178047;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.featured-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 2px 0;
}

.featured-desc {
    font-size: 12px;
    color: #888;
    margin: 0 0 14px 0;
}

.featured-list {
    list-style: none;
    padding: 0;
    margin: 0 0 14px 0;
}

    .featured-list li {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 4px 0;
        font-size: 13px;
        color: #444;
    }

        .featured-list li i {
            font-size: 14px;
            color: #178047;
        }

.featured-btn {
    display: inline-block;
    background: #178047;
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s ease;
}

    .featured-btn:hover {
        background: #146a3a;
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(23, 128, 71, .3);
    }

/* =========================
   Mobile Actions
========================= */

.mobile-actions {
    display: none;
}

/* =========================
   Desktop
========================= */

@media (min-width: 992px) {
    .nav-list {
        display: flex;
    }

    .mobile-actions {
        display: none !important;
    }
}

/* =========================
   Tablet / Mobile
========================= */

@media (max-width: 991px) {
    .main-nav {
        display: none;
    }

        .main-nav.open {
            display: block;
        }

    .nav-list {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        max-height: 80vh;
        overflow-y: auto;
    }

        .nav-list > li {
            width: 100%;
            position: relative;
        }

            .nav-list > li > a {
                justify-content: space-between;
                width: 100%;
                padding: 13px 15px;
                border-bottom: 1px solid #f0f0f0;
            }

        .nav-list .nav-category-btn {
            margin: 0;
            border-radius: 0;
        }

            .nav-list .nav-category-btn a.category-menu-btn {
                border-radius: 0;
                padding: 13px 15px;
            }

                .nav-list .nav-category-btn a.category-menu-btn:hover {
                    border-radius: 0;
                }

    .mobile-actions {
        display: flex !important;
        flex-direction: column;
        border-bottom: 1px solid #eee;
    }

        .mobile-actions a {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 13px 15px;
            color: #333;
            text-decoration: none;
            border-bottom: 1px solid #f0f0f0;
        }

    /* Mega Menu Mobile */
    .has-mega-menu {
        position: relative !important;
    }

    .mega-menu {
        position: static !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        display: block !important;
        background: #f8f9fa !important;
        padding: 0 !important;
        transition: none !important;
    }

    .mega-menu-container {
        flex-direction: column;
        padding: 10px 15px !important;
        gap: 15px !important;
    }

    .mega-menu-column {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        padding: 0 !important;
        border-left: none !important;
        border-bottom: 1px solid #eee;
        padding-bottom: 10px !important;
    }

        .mega-menu-column:last-of-type {
            border-bottom: none;
            padding-bottom: 0;
        }

    .mega-menu-featured {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        padding: 0 !important;
    }

    .featured-box {
        padding: 15px 18px;
    }

    .has-mega-menu .mega-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .nav-list > li.active > a {
        border-bottom: none;
        padding-bottom: 13px;
    }
}

/* =========================
   Cart Badge
========================= */

.cart-badge-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 50%;
    background: #178047;
    color: #fff;
    font-size: 11px;
}

/* =========================
   Prevent Bootstrap
========================= */

.main-nav ul,
.main-nav li {
    margin: 0;
    padding: 0;
}

.main-nav ul {
    list-style: none;
}

.main-nav a {
    text-decoration: none;
}
/* =========================
   پنل ویژه (محصولات پرفروش) با بنر
========================= */

.mega-menu-featured {
    flex: 0 0 260px;
    min-width: 220px;
    padding: 0 0 0 20px;
}

.featured-box {
    background: linear-gradient(145deg, #f8fff9, #eaf5ed);
    border-radius: 12px;
    padding: 20px 22px;
    border: 1px solid #d4e8da;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-header {
    margin-bottom: 12px;
}

.featured-badge {
    display: inline-block;
    background: #178047;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.featured-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 2px 0;
}

.featured-desc {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* =========================
   بنر تصویر در پنل ویژه
========================= */

.side-banner-menu {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0 14px 0;
    width: 100%;
    aspect-ratio: 16/10;
    background: #e8f5e9;
}

    .side-banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .3s ease;
    }

.featured-box:hover .side-banner img {
    transform: scale(1.03);
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 15px 15px 12px 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

    .banner-overlay .banner-title {
        font-size: 15px;
        font-weight: 700;
        display: block;
    }

    .banner-overlay .banner-subtitle {
        font-size: 12px;
        font-weight: 400;
        opacity: 0.9;
        display: block;
    }

/* =========================
   دکمه مشاهده همه
========================= */

.featured-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #178047;
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s ease;
    margin-top: auto;
    width: 100%;
    text-align: center;
}

    .featured-btn:hover {
        background: #146a3a;
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(23, 128, 71, .3);
    }

/* =========================
   ریسپانسیو برای موبایل
========================= */

@media (max-width: 991px) {
    .mega-menu-featured {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        padding: 0 !important;
    }

    .featured-box {
        padding: 15px 18px;
    }

    .side-banner-menu {
        aspect-ratio: 16/8;
        margin: 8px 0 12px 0;
    }

    .banner-overlay {
        padding: 12px 15px 10px 15px;
    }

        .banner-overlay .banner-title {
            font-size: 14px;
        }

        .banner-overlay .banner-subtitle {
            font-size: 11px;
        }

    .featured-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .side-banner-menu {
        aspect-ratio: 16/7;
    }

    .banner-overlay .banner-title {
        font-size: 13px;
    }

    .banner-overlay .banner-subtitle {
        font-size: 10px;
    }
}

.menu-banner {
    position: relative;
    min-height: 190px;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}


/* =========================
   پنل ویژه (محصولات پرفروش) با بنر
========================= */

.mega-menu-featured {
    flex: 0 0 260px;
    min-width: 220px;
    padding: 0 0 0 20px;
    border-left: none !important; /* حذف border-left از ستون آخر */
}

.featured-box {
    background: linear-gradient(145deg, #f8fff9, #eaf5ed);
    border-radius: 12px;
    padding: 20px 22px;
    border: 1px solid #d4e8da;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.featured-header {
    margin-bottom: 12px;
}

.featured-badge {
    display: inline-block;
    background: #178047;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 12px;
    border-radius: 20px;
    margin-bottom: 6px;
}

.featured-title {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 2px 0;
}

.featured-desc {
    font-size: 12px;
    color: #888;
    margin: 0;
}

/* =========================
   بنر تصویر در پنل ویژه
========================= */

.side-banner-menu {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0 14px 0;
    width: 100%;
    aspect-ratio: 16/10;
    background: #e8f5e9;
}

    .side-banner img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        transition: transform .3s ease;
    }

.featured-box:hover .side-banner img {
    transform: scale(1.03);
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 15px 15px 12px 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

    .banner-overlay .banner-title {
        font-size: 15px;
        font-weight: 700;
        display: block;
    }

    .banner-overlay .banner-subtitle {
        font-size: 12px;
        font-weight: 400;
        opacity: 0.9;
        display: block;
    }

/* =========================
   دکمه مشاهده همه - روی عکس
========================= */

.featured-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #178047;
    color: #fff;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all .2s ease;
    text-align: center;
    margin-top: 10px;
    width: 100%;
}

    .featured-btn:hover {
        background: #146a3a;
        color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(23, 128, 71, .3);
    }

/* =========================
   ریسپانسیو برای موبایل
========================= */

@media (max-width: 991px) {
    .mega-menu-featured {
        flex: 0 0 100% !important;
        min-width: 100% !important;
        padding: 0 !important;
        border-left: none !important;
    }

    .featured-box {
        padding: 15px 18px;
    }

    .side-banner-menu {
        aspect-ratio: 16/8;
        margin: 8px 0 12px 0;
    }

    .banner-overlay {
        padding: 12px 15px 10px 15px;
    }

        .banner-overlay .banner-title {
            font-size: 14px;
        }

        .banner-overlay .banner-subtitle {
            font-size: 11px;
        }

    .featured-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .side-banner-menu {
        aspect-ratio: 16/7;
    }

    .banner-overlay .banner-title {
        font-size: 13px;
    }

    .banner-overlay .banner-subtitle {
        font-size: 10px;
    }
}

.menu-banner {
    position: relative;
    min-height: 190px;
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

