/* ============================================ */
/* ========== RESPONSIVE.CSS — SKYBUY ========== */
/* ======= Адаптивность для всех экранов ======= */
/* ============================================ */

/* ================================================
   БУРГЕР-МЕНЮ
   ================================================ */

.burger-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(125, 78, 255, 0.15);
    border: 2px solid rgba(125, 78, 255, 0.4);
    cursor: pointer;
    gap: 5px;
    transition: all 0.3s ease;
    z-index: 1100;
    padding: 0;
}

.burger-btn:hover {
    background: rgba(125, 78, 255, 0.3);
    border-color: var(--accent-primary);
    box-shadow: 0 0 15px rgba(125, 78, 255, 0.4);
}

.burger-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--accent-secondary);
    border-radius: 2px;
    transition: all 0.35s ease;
    transform-origin: center;
}

/* Анимация бургера при открытии */
.burger-btn.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.burger-btn.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.burger-btn.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Мобильное меню */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-nav-overlay.open {
    opacity: 1;
}

.mobile-nav-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    background: rgba(14, 14, 22, 0.98);
    backdrop-filter: blur(20px);
    border-left: 2px solid rgba(125, 78, 255, 0.4);
    z-index: 1060;
    display: flex;
    flex-direction: column;
    padding: 80px 30px 30px;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}

.mobile-nav-drawer.open {
    right: 0;
}

.mobile-nav-drawer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient, linear-gradient(135deg, #5f3bff, #9d7aff));
}

.mobile-nav-logo {
    font-size: 24px;
    font-weight: 800;
    background: linear-gradient(135deg, #fff, #b294ff);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(125, 78, 255, 0.2);
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.mobile-nav-links a {
    color: var(--text-secondary, #9b9b9b);
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    padding: 14px 16px;
    border-radius: 12px;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid transparent;
}

.mobile-nav-links a i {
    width: 20px;
    text-align: center;
    color: var(--accent-primary, #7d4eff);
    font-size: 16px;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
    color: #fff;
    background: rgba(125, 78, 255, 0.15);
    border-color: rgba(125, 78, 255, 0.3);
    transform: translateX(4px);
}

.mobile-nav-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(125, 78, 255, 0.2);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-nav-footer a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary, #9b9b9b);
    text-decoration: none;
    font-size: 14px;
    padding: 10px 16px;
    border-radius: 10px;
    transition: all 0.25s ease;
}

.mobile-nav-footer a:hover {
    color: #fff;
    background: rgba(125, 78, 255, 0.1);
}

/* ================================================
   1200px — ШИРОКИЕ НОУТБУКИ / НЕБОЛЬШИЕ ДЕСКТОПЫ
   ================================================ */
@media (max-width: 1200px) {
    .container {
        padding: 0 24px;
    }

    .nav {
        gap: 20px;
    }

    .hero h1 {
        font-size: 56px;
    }

    .games-showcase {
        grid-template-columns: repeat(3, 1fr);
    }

    .rotating-box-container {
        width: 95%;
        height: 450px;
    }
}

/* ================================================
   1024px — ПЛАНШЕТЫ LANDSCAPE
   ================================================ */
@media (max-width: 1024px) {
    .nav {
        gap: 16px;
    }

    .nav a {
        font-size: 14px;
    }

    .hero h1 {
        font-size: 50px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .stat-item h3 {
        font-size: 36px;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .games-showcase {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .catalog-layout {
        grid-template-columns: 230px 1fr;
        gap: 20px;
    }

    .profile-grid {
        grid-template-columns: 240px 1fr;
    }

    .rotating-box-container {
        height: 400px;
    }
}

/* ================================================
   992px — ПЛАНШЕТЫ PORTRAIT
   ================================================ */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 44px;
    }

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

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

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

    .rotating-box-container {
        height: 340px;
        width: 95%;
    }

    .product-header {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .section-title h2 {
        font-size: 32px;
    }
}

/* ================================================
   768px — МОБИЛЬНЫЕ УСТРОЙСТВА (BREAKPOINT)
   ================================================ */
@media (max-width: 768px) {

    /* --- Шапка --- */
    .header .nav {
        display: none !important;
    }

    .burger-btn {
        display: flex;
    }

    .mobile-nav-overlay {
        display: block;
        pointer-events: none;
    }

    .mobile-nav-overlay.open {
        pointer-events: all;
    }

    .header-content {
        padding: 12px 16px;
    }

    /* --- Hero --- */
    .hero {
        padding: 80px 0 60px;
        min-height: auto;
    }

    .hero-content {
        padding: 0 16px;
    }

    .hero h1 {
        font-size: 38px;
        line-height: 1.25;
    }

    .hero-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .hero-badge {
        font-size: 12px;
        padding: 8px 16px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 14px;
    }

    .btn-primary-large,
    .btn-secondary-large {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }

    /* Скрываем вращающийся прямоугольник на мобилках */
    .rotating-box-container {
        display: none;
    }

    /* --- Статистика --- */
    .stats {
        padding: 50px 0;
    }

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

    .stat-item {
        padding: 28px 16px;
    }

    .stat-item h3 {
        font-size: 32px;
    }

    /* --- Особенности --- */
    .features {
        padding: 50px 0;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    /* --- Игры --- */
    .games-showcase {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .section-title h2 {
        font-size: 28px;
    }

    .section-title p {
        font-size: 14px;
    }

    /* --- Каталог --- */
    .catalog-layout {
        grid-template-columns: 1fr;
    }

    .filters {
        position: static !important;
        max-height: none !important;
        margin-bottom: 20px;
    }

    .games-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* --- Страница товара --- */
    .product-header {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .product-image-block {
        position: static !important;
        top: auto !important;
    }

    .product-title {
        font-size: 28px;
    }

    .product-price {
        font-size: 36px;
    }

    /* --- Чекаут --- */
    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static !important;
    }

    /* --- Профиль --- */
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-sidebar {
        position: static !important;
    }

    .profile-header h1 {
        font-size: 26px;
    }

    /* --- О нас --- */
    .about-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

    /* --- Поддержка --- */
    .support-grid {
        grid-template-columns: 1fr;
    }

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

    /* --- Корзина --- */
    .summary-actions {
        flex-direction: column;
    }

    /* --- Продать --- */
    .sell-form {
        padding: 24px 16px;
    }

    /* --- Маркетплейс --- */
    .marketplace-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* --- Подвал --- */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 24px;
        text-align: center;
    }

    .footer-col a {
        display: inline-block;
        margin: 0 8px;
    }
}

/* ================================================
   480px — МАЛЕНЬКИЕ СМАРТФОНЫ
   ================================================ */
@media (max-width: 480px) {

    /* --- Hero --- */
    .hero h1 {
        font-size: 30px;
    }

    .hero-badge {
        font-size: 11px;
        letter-spacing: 0.5px;
    }

    /* --- Статистика --- */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-item {
        padding: 20px 12px;
    }

    .stat-item h3 {
        font-size: 26px;
    }

    .stat-item p {
        font-size: 13px;
    }

    /* --- Игры --- */
    .games-showcase {
        grid-template-columns: 1fr;
    }

    /* --- Каталог --- */
    .games-grid {
        grid-template-columns: 1fr;
    }

    .game-card-image {
        height: 180px;
    }

    /* --- Форма --- */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* --- Товар --- */
    .product-price-block {
        flex-direction: column;
        align-items: stretch;
    }

    .product-title {
        font-size: 24px;
    }

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

    .req-list {
        grid-template-columns: 1fr;
    }

    /* --- Корзина --- */
    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .item-quantity {
        width: 100%;
        justify-content: center;
        margin: 0;
    }

    .item-total {
        width: 100%;
        text-align: left;
        margin-right: 0;
    }

    /* --- Маркетплейс --- */
    .marketplace-grid {
        grid-template-columns: 1fr;
    }

    /* --- Кнопки --- */
    .btn-primary-large,
    .btn-secondary-large {
        font-size: 15px;
        padding: 14px 24px;
    }

    /* --- Секции --- */
    .section-title h2 {
        font-size: 24px;
    }

    .features {
        padding: 40px 0;
    }

    .stats {
        padding: 40px 0;
    }
}

/* ================================================
   360px — ОЧЕНЬ МАЛЕНЬКИЕ ЭКРАНЫ
   ================================================ */
@media (max-width: 360px) {

    .container {
        padding: 0 12px;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero-badge {
        font-size: 10px;
        padding: 6px 12px;
    }

    .logo {
        font-size: 22px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-item h3 {
        font-size: 22px;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .btn-primary-large,
    .btn-secondary-large {
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* ================================================
   МОБИЛЬНАЯ КНОПКА ПЕРЕКЛЮЧЕНИЯ — УБИРАЕМ НА БОЛЬШИХ
   ================================================ */
@media (min-width: 769px) {
    #mobileToggle {
        display: none !important;
    }
}

/* ================================================
   УТИЛИТЫ ДЛЯ АДАПТИВНОСТИ
   ================================================ */

/* Скрыть на мобильных */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Показать только на мобильных */
@media (min-width: 769px) {
    .show-mobile-only {
        display: none !important;
    }
}

/* Плавный скролл для тач-устройств */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }

    .games-showcase,
    .games-grid,
    .features-grid {
        scroll-snap-type: none;
    }
}
