/* ============================================
   军之甲 JUNZHIJIA - Responsive Styles
   Breakpoints: 640 / 768 / 1024 / 1280 / 1536
   ============================================ */

/* ---------- Desktop Large (1536+) ---------- */
@media (min-width: 1536px) {
    :root {
        --container-max: 1320px;
    }

    .container--wide {
        max-width: 1480px;
    }

    .hero__title {
        font-size: 4rem;
    }
}

/* ---------- Laptop (1024-1280) ---------- */
@media (max-width: 1280px) {
    .container {
        max-width: 100%;
    }

    .hero__title {
        font-size: 3rem;
    }
}

/* ---------- Tablet (768-1024) ---------- */
@media (max-width: 1024px) {
    /* Nav */
    .nav__list {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: #FFFFFF;
        flex-direction: column;
        padding: 100px var(--space-xl) var(--space-xl);
        gap: var(--space-md);
        transition: right var(--transition-base);
        z-index: 1000;
        box-shadow: var(--shadow-xl);
        overflow-y: auto;
    }

    .nav__list.active {
        right: 0;
    }

    .nav__link {
        color: var(--color-text-primary) !important;
        font-size: 1rem;
        display: block;
        padding: var(--space-sm) 0;
    }

    .nav__link::after {
        display: none;
    }

    .mega-menu {
        position: static;
        transform: none;
        min-width: auto;
        box-shadow: none;
        padding: 0 0 0 var(--space-lg);
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--transition-base);
    }

    .mega-menu::before {
        display: none;
    }

    .nav__item--dropdown:hover .mega-menu {
        max-height: 600px;
    }

    .mega-menu__grid {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .mobile-toggle {
        display: flex;
    }

    .lang-switch {
        margin-left: auto;
        margin-right: var(--space-md);
    }

    /* Mobile nav overlay */
    .nav-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Hero */
    .hero {
        height: 80vh;
        min-height: 500px;
    }

    .hero__title {
        font-size: 2.25rem;
    }

    .hero__subtitle {
        font-size: 1.063rem;
    }

    /* Stats */
    .stats-bar__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2xl);
    }

    .stats-bar__item:nth-child(2)::after {
        display: none;
    }

    /* Footer */
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Product gallery */
    .prod-gallery {
        flex-direction: column-reverse;
    }

    .prod-gallery__thumbs {
        flex-direction: row;
        width: 100%;
        overflow-x: auto;
    }

    .prod-gallery__thumb {
        width: 60px;
        height: 60px;
        flex-shrink: 0;
    }

    /* Feature list */
    .feature-list {
        grid-template-columns: 1fr;
    }

    /* Timeline */
    .timeline::before {
        left: 20px;
    }

    .timeline__item,
    .timeline__item:nth-child(even) {
        flex-direction: row;
        padding-left: 50px;
    }

    .timeline__dot {
        left: 20px;
    }

    .timeline__content {
        width: 100%;
    }

    /* Gallery */
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-banner__title {
        font-size: 2rem;
    }
}

/* ---------- Mobile (640-768) ---------- */
@media (max-width: 768px) {
    :root {
        --space-4xl: 64px;
        --space-5xl: 80px;
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    .hero__title {
        font-size: 1.75rem;
    }

    .hero__subtitle {
        font-size: 0.938rem;
    }

    .hero__actions {
        flex-direction: column;
        align-items: center;
    }

    .hero__actions .btn {
        width: 100%;
        max-width: 280px;
    }

    .hero .swiper-button-next,
    .hero .swiper-button-prev {
        display: none;
    }

    .stats-bar__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar__number {
        font-size: 2rem;
    }

    .footer__grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .footer__bottom {
        flex-direction: column;
        text-align: center;
    }

    .cta-banner__title {
        font-size: 1.75rem;
    }

    .cta-banner__actions {
        flex-direction: column;
        align-items: center;
    }

    .cta-banner__actions .btn {
        width: 100%;
        max-width: 280px;
    }

    .tabs {
        gap: var(--space-xs);
    }

    .tab-btn {
        padding: 8px 16px;
        font-size: 0.813rem;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .spec-table {
        display: block;
        overflow-x: auto;
    }

    .download-card {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .page-banner {
        padding: var(--space-3xl) 0;
    }

    .page-banner__title {
        font-size: 1.625rem;
    }
}

/* ---------- Small Mobile (<640px) ---------- */
@media (max-width: 640px) {
    .hero__title {
        font-size: 1.5rem;
    }

    .stats-bar__grid {
        grid-template-columns: 1fr 1fr;
    }

    .product-card__content {
        padding: var(--space-md);
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}
