﻿/* ============================================================
   📄 responsive.css - کدهای ریسپانسیو M4Store
   🎯 وظیفه: واکنش‌گرایی برای تمام دستگاه‌ها
   📱 پشتیبانی: دسکتاپ، تبلت، موبایل
   👨‍💻 توسعه‌دهنده: تیم M4Store
   ============================================================ */

/* ===== تبلت (768px تا 1024px) ===== */
@media screen and (max-width: 1024px) {
    /* ===== هدر ===== */
    .header__nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 360px;
        height: 100vh;
        background: rgba(10, 14, 23, 0.98);
        backdrop-filter: blur(20px);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        overflow-y: auto;
        border-left: 1px solid rgba(0, 191, 255, 0.1);
    }

        .header__nav.open {
            right: 0;
        }

    .header__nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .header__nav-item--dropdown .header__dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        background: transparent;
        border: none;
        padding: 0;
        box-shadow: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .header__nav-item--dropdown.open .header__dropdown {
        max-height: 300px;
    }

    .header__hamburger {
        display: flex;
    }

    .header__auth {
        display: none;
    }

    .header__auth--mobile {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 1px solid rgba(255, 255, 255, 0.05);
    }

    /* ===== هیرو ===== */
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero__title {
        font-size: 2.5rem;
    }

    .hero__description {
        margin: 0 auto 32px;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__stats {
        justify-content: center;
    }

    .hero__image {
        max-width: 500px;
        margin: 0 auto;
    }

    /* ===== بخش خدمات ===== */
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ===== محصولات ===== */
    .products__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ===== نظرات ===== */
    .testimonial-card {
        flex: 0 0 calc(50% - 12px);
    }

    /* ===== آمار ===== */
    .stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ===== تماس ===== */
    .contact-quick__wrapper {
        grid-template-columns: 1fr;
        padding: 30px;
    }

    /* ===== فوتر ===== */
    .footer__container {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer__column--brand {
        grid-column: 1 / -1;
    }
}

/* ===== موبایل (تا 767px) ===== */
@media screen and (max-width: 767px) {
    /* ===== تنظیمات کلی ===== */
    .container {
        padding: 0 16px;
    }

    .section-header__title {
        font-size: 1.8rem;
    }

    /* ===== هدر ===== */
    .header__logo-text {
        font-size: 1.2rem;
    }

    .header__logo-badge {
        display: none;
    }

    .header__search-box {
        width: 280px;
        right: -180px;
    }

    .header__cart-link {
        font-size: 1rem;
    }

    /* ===== هیرو ===== */
    .hero {
        min-height: auto;
        padding: calc(var(--header-height) + 20px) 0 40px;
    }

    .hero__title {
        font-size: 1.8rem;
    }

    .hero__description {
        font-size: 1rem;
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }

        .hero__actions .button {
            width: 100%;
            max-width: 280px;
        }

    .hero__stats {
        flex-direction: column;
        gap: 16px;
    }

    .hero__scroll-indicator {
        display: none;
    }

    /* ===== بخش خدمات ===== */
    .services__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 24px;
    }

    /* ===== محصولات ===== */
    .products__filters {
        gap: 8px;
    }

    .product-filter {
        padding: 6px 16px;
        font-size: 0.8rem;
    }

    .products__grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .product-card__title {
        font-size: 0.95rem;
    }

    .product-card__price-current {
        font-size: 1.1rem;
    }

    .product-card__price-old {
        font-size: 0.75rem;
    }

    /* ===== نظرات ===== */
    .testimonial-card {
        flex: 0 0 100%;
    }

    .testimonials__controls {
        margin-top: 20px;
    }

    /* ===== آمار ===== */
    .stats__grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .stat-item__number {
        font-size: 2rem;
    }

    .stat-item__icon {
        font-size: 2rem;
    }

    /* ===== تماس ===== */
    .contact-quick__wrapper {
        padding: 20px;
        border-radius: 12px;
    }

    .contact-quick__title {
        font-size: 1.5rem;
    }

    .contact-quick__info-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }

    .contact-quick__form {
        padding: 20px;
    }

    /* ===== فوتر ===== */
    .footer__container {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .footer__trust {
        justify-content: center;
    }

    .footer__social {
        justify-content: center;
    }

    .footer__bottom-content {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .footer__bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer__newsletter-form {
        flex-direction: column;
    }

    /* ===== مودال ===== */
   
}

/* ===== موبایل کوچک (تا 480px) ===== */
@media screen and (max-width: 480px) {
    .products__grid {
        grid-template-columns: 1fr;
        max-width: 340px;
        margin: 0 auto;
    }

    .stats__grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }

    .hero__title {
        font-size: 1.5rem;
    }

    .section-header__title {
        font-size: 1.5rem;
    }

    .header__search-box {
        width: 280px;
        right: -200px;
    }

    .header__logo-text {
        font-size: 1rem;
    }

    .header__logo-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .button {
        padding: 10px 20px;
        font-size: 0.9rem;
        min-height: 40px;
    }
}

/* ===== دسکتاپ بزرگ (بیشتر از 1400px) ===== */
@media screen and (min-width: 1400px) {
    .container {
        max-width: 1300px;
    }

    .hero__title {
        font-size: 4.5rem;
    }
}

/* ===== حالت پرینت ===== */
@media print {
    .header,
    .footer,
    .hero__scroll-indicator,
    .testimonials__controls,
    .products__filters {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 40px 0;
    }

    .hero__container {
        grid-template-columns: 1fr;
    }

    .hero__image {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .section-header__title span {
        -webkit-text-fill-color: var(--color-primary);
    }
}

/* ===== رفع مشکلات موبایل ===== */
@media screen and (max-width: 767px) {
    /* جلوگیری از زوم خودکار */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    /* بهبود تاچ */
    .button,
    .header__nav-link,
    .header__auth-btn,
    .product-filter,
    .testimonials__control {
        touch-action: manipulation;
    }
}

/* ===== پشتیبانی از حالت تاریک (سیستم) ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --color-gray-light: #E8EDF2;
    }
}

/* ===== انیمیشن‌های ریسپانسیو ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}
