﻿:root {
    --mhd-bs-red: #ef394e;
    --mhd-bs-red-hover: #d32f42;
    --accent: #ef394e; /* قرمز مهد ابزار */
    --accent-hover: #d32f42;
    --installment-bg-light: #fff0f1; /* پس‌زمینه قرمز بسیار روشن برای دسکتاپ */
    --secondary: #62666d;
    --white: #ffffff;
    --text-dark: #000000; /* متن‌های اصلی مشکی */
    --radial-bg: radial-gradient(circle at center, #ffffff 0%, #f4f6f8 100%);
    --mhd-border: #e2e8f0;
}

.btn-primary {
    background-color: var(--mhd-bs-red);
    border-color: var(--mhd-bs-red);
}

    .btn-primary:hover, .btn-primary:focus, .btn-primary:active {
        background-color: var(--mhd-bs-red-hover) !important;
        border-color: var(--mhd-bs-red-hover) !important;
        box-shadow: 0 0 0 0.2rem rgba(239,57,78,0.35) !important;
    }

.btn-outline-primary {
    color: var(--mhd-bs-red);
    border-color: var(--mhd-bs-red);
}

    .btn-outline-primary:hover {
        background-color: var(--mhd-bs-red);
        border-color: var(--mhd-bs-red);
    }

.text-primary {
    color: var(--mhd-bs-red) !important;
}

.bg-primary {
    background-color: var(--mhd-bs-red) !important;
}

.border-primary {
    border-color: var(--mhd-bs-red) !important;
}

.badge-primary {
    background-color: var(--mhd-bs-red);
}

.page-link {
    color: var(--mhd-bs-red);
}

.page-item.active .page-link {
    background-color: var(--mhd-bs-red);
    border-color: var(--mhd-bs-red);
}

a {
    color: var(--mhd-bs-red);
}

    a:hover {
        color: var(--mhd-bs-red-hover);
    }

/* --- انیمیشن‌های جلب توجه قرمز --- */
@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 57, 78, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(239, 57, 78, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(239, 57, 78, 0);
    }
}

@keyframes shake-gentle {
    0%, 100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-2px);
    }

    75% {
        transform: translateX(2px);
    }
}

/* --- استایل دسکتاپ --- */
.header-main-container {
    background: var(--white);
    border-bottom: 1px solid #e0e0e0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/*.container {
    width: 92%;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}*/

.desktop-only {
    display: block;
}

.mobile-only {
    display: none;
}

.mobile-drawer {
    display: none !important;
}

.row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
    border-bottom: 1px solid #f5f5f5;
}

.logo img {
    height: 50px;
}

.search-wrapper {
    flex: 0 1 600px;
}

.search-inner input {
    width: 100%;
    background: #f0f0f2;
    border: 1px solid transparent;
    padding: 12px 20px;
    border-radius: 10px;
    outline: none;
}

.actions {
    display: flex;
    gap: 20px;
    align-items: center;
}

.btn-login {
    text-decoration: none;
    color: var(--secondary);
    font-weight: bold;
    font-size: 14px;
}

.btn-cart {
    background: var(--accent);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 900;
    cursor: pointer;
    position: relative;
}

.nav-row {
    display: flex;
    height: 55px;
    align-items: center;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 30px;
    height: 100%;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 6px;
    transition: 0.3s;
}

    /* استایل اختصاصی قرمز برای خرید اقساطی دسکتاپ */
    .nav-link.installment-special {
        background-color: var(--installment-bg-light);
        color: var(--accent) !important;
        border: 1px solid var(--accent);
        animation: pulse-red 2s infinite;
    }

        .nav-link.installment-special:hover {
            background-color: var(--accent);
            color: #fff !important;
        }

/* مگا منو دسکتاپ */
.nav-item-main {
    position: static;
}

.mega-panel {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 400px;
    background: var(--white);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    display: grid;
    grid-template-columns: 260px 1fr 260px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-bottom: 4px solid var(--accent);
}

.nav-item-main:hover .mega-panel {
    opacity: 1;
    visibility: visible;
}

.mega-sidebar {
    background: #f9f9f9;
    border-left: 1px solid #eee;
    overflow-y: auto;
}

.cat-item {
    padding: 15px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    color: #000;
    font-weight: 600;
}

    .cat-item:hover, .cat-item.active {
        background: #fff;
        color: var(--accent);
        border-right: 3px solid var(--accent);
    }

.mega-main-content {
    padding: 25px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    overflow-y: auto;
}

.sub-group h4 {
    font-size: 14px;
    color: #000;
    margin-bottom: 10px;
    border-right: 3px solid var(--accent);
    padding-right: 8px;
}

.sub-group a {
    display: block;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    margin-bottom: 8px;
    transition: 0.2s;
}

    .sub-group a:hover {
        color: var(--accent);
        padding-right: 5px;
    }

/* --- استایل رسپانسیو موبایل --- */
@media (max-width: 1024px) {
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    .mobile-row-1 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 15px;
        background: #fff;
    }

    .mobile-logo img {
        height: 35px;
    }

    .mobile-actions-top {
        display: flex;
        gap: 20px;
        align-items: center;
    }

    .mobile-icon-btn {
        font-size: 24px;
        text-decoration: none;
        color: #333;
    }

    .mobile-row-2 {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 15px;
        background: #fff;
        border-top: 1px solid #f0f0f0;
    }

    .hamburger-trigger {
        background: var(--accent);
        width: 45px;
        height: 40px;
        border-radius: 6px;
        border: none;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        cursor: pointer;
    }

        .hamburger-trigger span {
            width: 25px;
            height: 3px;
            background: #fff;
            border-radius: 2px;
        }

    .mobile-search-box {
        flex: 1;
    }

        .mobile-search-box input {
            width: 100%;
            padding: 10px 15px;
            border-radius: 8px;
            border: 1px solid #ddd;
            background: #f5f5f5;
            outline: none;
            color: #000;
        }

    .mobile-drawer {
        display: block !important;
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.6);
        z-index: 9999;
        transition: 0.4s ease;
        visibility: hidden;
    }

        .mobile-drawer.open {
            right: 0;
            visibility: visible;
        }

    .drawer-content {
        width: 85%;
        height: 100%;
        background: #f4f4f4;
        position: absolute;
        right: 0;
        overflow-y: auto;
        padding-bottom: 50px;
    }

    .drawer-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px;
        background: #fff;
        border-bottom: 1px solid #ddd;
    }

    .btn-close-drawer {
        font-size: 30px;
        border: none;
        background: none;
        cursor: pointer;
        color: var(--accent);
    }

    .m-nav-list {
        list-style: none;
        padding: 10px;
    }

    .m-nav-item {
        border-bottom: 1px solid #e0e0e0;
        background: #fff;
        margin-bottom: 8px;
        border-radius: 8px;
        overflow: hidden;
    }

    .m-nav-label {
        padding: 15px 10px;
        display: flex;
        justify-content: space-between;
        font-weight: bold;
        color: #000;
        cursor: pointer;
    }

    /* استایل قرمز مهد ابزار برای اقساط در موبایل */
    .m-nav-item.installment-special {
        background: linear-gradient(135deg, var(--accent), #b31d2d);
        border: none;
        animation: shake-gentle 3s infinite;
    }

        .m-nav-item.installment-special .m-nav-label {
            color: #fff !important;
        }

    .m-submenu {
        display: none;
        background: #f9f9f9;
        padding: 5px 15px;
        border-top: 1px solid #eee;
    }

        .m-submenu.active {
            display: block;
        }

    .m-sub-link {
        display: block;
        padding: 12px 0;
        text-decoration: none;
        color: #000;
        font-size: 13px;
        border-bottom: 1px dotted #ddd;
        font-weight: 500;
    }
}

.mahd-boxed-footer, .mahd-boxed-footer * {
    box-sizing: border-box;
}

.mahd-boxed-footer {
    padding: 80px 0 40px;
    background: radial-gradient(circle, #ef394e 0%, #ce1b2f 100%);
    direction: rtl;
}

.footer-wrapper-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-main-card-radial {
    background: var(--radial-bg);
    border-radius: 50px;
    padding: 50px;
    border: 1px solid var(--mhd-border);
    box-shadow: 0 30px 60px rgba(0,0,0,0.04);
}

/* ویژگی‌ها */
.footer-features-row {
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.f-item {
    text-align: center;
}

.f-icon-circle {
    width: 65px;
    height: 65px;
    background: #fff;
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.03);
}

.f-item img {
    width: 35px;
}

.f-item span {
    font-size: 13px;
    font-weight: 800;
    color: #334155;
}

.footer-divider-glow {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
    margin: 40px 0;
}

/* Column layout now handled by Bootstrap's .row / .col-* grid classes in the markup */
.footer-content-grid {
    row-gap: 25px;
}

.footer-col h4 {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 20px;
    color: #1e293b;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .footer-col ul li {
        margin-bottom: 10px;
    }

        .footer-col ul li a {
            color: #64748b;
            text-decoration: none;
            font-size: 14px;
            transition: 0.3s;
        }

            .footer-col ul li a:hover {
                color: var(--mhd-bs-red);
                padding-right: 5px;
            }

.support-info p {
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
    line-height: 1.7;
}

.online-tag {
    color: var(--mhd-bs-red) !important;
    font-weight: 800;
}

/* درباره ما و خبرنامه */
.footer-lower-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    margin-top: 20px;
}

.about-text-footer h4 {
    font-size: 16px;
    font-weight: 900;
    margin-bottom: 15px;
}

.about-text-footer p {
    font-size: 13px;
    color: #64748b;
    line-height: 1.8;
    text-align: justify;
}

.mhd-input-group {
    display: flex;
    background: #fff;
    padding: 5px;
    border-radius: 15px;
    border: 1px solid #cbd5e1;
    margin-bottom: 15px;
}

    .mhd-input-group input {
        border: none;
        outline: none;
        padding: 8px 12px;
        flex: 1;
        font-size: 13px;
    }

    .mhd-input-group button {
        background: var(--mhd-bs-red);
        color: #fff;
        border: none;
        padding: 0 20px;
        border-radius: 12px;
        cursor: pointer;
        font-weight: 800;
    }

.social-icons-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.s-link {
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: bold;
    transition: 0.3s;
    color: #475569;
    cursor: pointer;
}

    .s-link:hover {
        background: var(--mhd-bs-red);
        color: #fff;
        transform: translateY(-3px);
    }

/* اپلیکیشن */
.footer-app-banner {
    margin-top: 50px;
    background: #1e293b;
    border-radius: 25px;
    padding: 20px 35px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #fff;
}

.app-text-side strong {
    font-size: 16px;
    display: block;
    margin-bottom: 4px;
}

.app-text-side span {
    font-size: 12px;
    opacity: 0.7;
}

.app-store-btn {
    background: rgba(255,255,255,0.1);
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 800;
    border: 1px solid rgba(255,255,255,0.15);
    transition: 0.3s;
    margin-right: 8px;
}

    .app-store-btn:hover {
        background: #fff;
        color: #1e293b;
    }

/* کپی‌رایت و نمادها */
.footer-bottom-legal {
    margin-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    color: #fff;
    font-size: 13px;
}

.trust-logos {
    display: flex;
    gap: 15px;
    align-items: center;
}

    .trust-logos img {
        height: 45px;
        background: #fff;
        border-radius: 10px;
        padding: 5px;
    }

.trust-placeholder {
    font-size: 11px;
    background: #fff;
    color: #333;
    padding: 5px 10px;
    border-radius: 8px;
    font-weight: bold;
}

/* ============================= */
/* ====== TABLET VERSION ======= */
/* ============================= */

@media (max-width: 992px) {

    .footer-main-card-radial {
        padding: 35px;
        border-radius: 35px;
    }

    .footer-content-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .footer-lower-row {
        grid-template-columns: 1fr;
        gap: 35px;
    }

    .footer-app-banner {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-bottom-legal {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ============================= */
/* ======= MOBILE VERSION ====== */
/* ============================= */

@media (max-width: 576px) {

    .mahd-boxed-footer {
        padding: 50px 0 30px;
    }

    .footer-wrapper-container {
        padding: 0 15px;
    }

    .footer-main-card-radial {
        padding: 25px 20px;
        border-radius: 25px;
    }

    /* ویژگی‌ها */
    .footer-features-row {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        margin-bottom: 30px;
    }

    .f-icon-circle {
        width: 55px;
        height: 55px;
        border-radius: 18px;
    }

    .f-item img {
        width: 28px;
    }

    .f-item span {
        font-size: 12px;
    }

    /* گرید لینک‌ها */
    .footer-content-grid {
        text-align: center;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

        .footer-col ul {
            display: inline-block;
            text-align: center;
        }

        .footer-col h4 {
            font-size: 14px;
            margin-bottom: 12px;
        }

        .footer-col ul li a {
            font-size: 13px;
        }

            .footer-col ul li a:hover {
                padding-right: 0; /* حذف حرکت به راست هنگام هاور */
            }

    .support-info p {
        font-size: 12px;
    }

    /* درباره و خبرنامه */
    .footer-lower-row {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-text-footer h4 {
        font-size: 14px;
    }

    .about-text-footer p {
        font-size: 12px;
        line-height: 1.9;
    }

    /* فرم ایمیل */
    .mhd-input-group {
        flex-direction: column;
        padding: 8px;
        border-radius: 15px;
        gap: 8px;
    }

        .mhd-input-group input {
            width: 100%;
            font-size: 13px;
            padding: 10px;
        }

        .mhd-input-group button {
            width: 100%;
            padding: 10px;
            border-radius: 12px;
        }

    /* شبکه اجتماعی */
    .social-icons-row {
        justify-content: center;
    }

    .s-link {
        width: 30px;
        height: 30px;
        font-size: 8px;
    }

    /* اپلیکیشن */
    .footer-app-banner {
        padding: 18px;
        border-radius: 18px;
    }

    .app-text-side strong {
        font-size: 14px;
    }

    .app-text-side span {
        font-size: 11px;
    }

    .app-downloads {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }

    .app-store-btn {
        width: 100%;
        text-align: center;
        margin-right: 0;
        padding: 10px;
        font-size: 12px;
    }

    .footer-bottom-legal {
        margin-top: 25px;
        font-size: 12px;
    }

    .trust-logos {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

        .trust-logos img {
            height: 40px;
        }

    .trust-placeholder {
        font-size: 10px;
    }
}

.whatsapp-float {
    position: fixed;
    bottom: 40px;
    left: 40px;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 70px;
    height: 70px;
    background-color: #25d366;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    visibility: hidden;
    opacity: 0;
}

@media (min-width: 769px) {
    .whatsapp-float {
        visibility: visible;
        opacity: 1;
    }
}

.whatsapp-float img {
    width: 45px;
    height: 45px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform 0.3s ease;
}

.whatsapp-float:hover {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    background-color: #20b857;
}

    .whatsapp-float:hover img {
        transform: scale(1.1);
    }

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-float {
    animation: pulse-green 2s infinite;
}

/* مخفی کردن در دسکتاپ */
@media (min-width: 769px) {
    .mobile-bottom-nav, .mobile-panel {
        display: none !important;
    }
}

/* استایل کلی نوار پایین */
.mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: #fff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.05);
    z-index: 1000;
    border-top: 1px solid #eee;
    padding-bottom: env(safe-area-inset-bottom); /* برای آیفون */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #888;
    position: relative;
    transition: 0.3s;
    width: 20%;
}

    .nav-item.active {
        color: var(--mahd-red, #ef394e);
    }

.icon-box {
    margin-bottom: 4px;
    transition: 0.3s;
}

.label {
    font-size: 11px;
    font-weight: 600;
}

/* دکمه وسط (تماس) */
.nav-center {
    position: relative;
    top: -25px;
}

    .nav-center .icon-box.main-action {
        width: 60px;
        height: 60px;
        background: var(--mahd-red, #ef394e);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #fff;
        box-shadow: 0 5px 15px rgba(239, 57, 78, 0.4);
        border: 4px solid #fff;
    }

/* منوی دایره‌ای */
.circle-menu {
    position: absolute;
    bottom: 70px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 140px;
    height: 140px;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-center.active .circle-menu {
    transform: translateX(-50%) scale(1);
    pointer-events: auto;
}

.circle-item {
    position: absolute;
    width: 45px;
    height: 45px;
    background: #333;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
    text-decoration: none;
}

    /* موقعیت دایره‌ها */
    .circle-item:nth-child(1) {
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        background: #25d366;
    }
    /* تماس */
    .circle-item:nth-child(2) {
        bottom: 10px;
        right: 0;
        background: #25d366;
    }
    /* واتساپ */
    .circle-item:nth-child(3) {
        bottom: 10px;
        left: 0;
        background: #0088cc;
    }
    /* تلگرام */

    .circle-item:active {
        transform: scale(0.9);
    }

/* پنل‌های کشویی */
.mobile-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    width: 100%;
    height: 60vh;
    background: #fff;
    z-index: 999;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.1);
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

    .mobile-panel.open {
        bottom: 0;
    }

.panel-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .panel-header h3 {
        margin: 0;
        font-size: 18px;
        color: var(--mahd-dark, #1a202c);
    }

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
}

.panel-content {
    padding: 20px;
    overflow-y: auto;
}

    .panel-content ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .panel-content li {
        padding: 15px 0;
        border-bottom: 1px solid #f5f5f5;
    }

    .panel-content a {
        text-decoration: none;
        color: var(--mahd-dark, #1a202c);
        font-weight: 600;
        display: block;
    }