/* ========== СТИЛИ ДЛЯ ОФЕРТЫ ========== */

/* Страница оферты */
.ofer-page {
    max-width: 1500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    position: relative;
}

/* Кнопка назад */
.ofer-back-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: rgba(0, 255, 178, 0.1);
    border: 1px solid rgba(0, 255, 178, 0.3);
    color: var(--accent);
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 20px rgba(0, 255, 178, 0.2);
}

.ofer-back-btn:hover {
    background: rgba(0, 255, 178, 0.2);
    transform: translateX(-3px);
    box-shadow: 0 12px 25px rgba(0, 255, 178, 0.3);
}

.ofer-back-btn i {
    font-size: 18px;
}

/* Заголовок оферты */
.ofer-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 35px;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, 
                rgba(255, 0, 80, 0.15) 0%, 
                rgba(0, 255, 178, 0.15) 100%),
                var(--bg-panel);
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.ofer-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff3b3b, #00ffb2);
}

.ofer-title {
    color: var(--accent);
    font-size: 32px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
    text-shadow: 0 0 20px rgba(0, 255, 178, 0.3);
}

.ofer-subtitle {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.5;
}

.ofer-date {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background: rgba(0, 255, 178, 0.15);
    border-radius: 12px;
    color: var(--accent);
    font-weight: 600;
    border: 1px solid rgba(0, 255, 178, 0.3);
}

/* Контейнер оферты */
.ofer-container {
    background: var(--bg-panel);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-soft);
    padding: 40px;
    box-shadow: var(--shadow-soft);
    line-height: 1.7;
    position: relative;
}

.ofer-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* Заголовки внутри оферты */
.ofer-container h1 {
    color: var(--accent);
    font-size: 26px;
    margin: 40px 0 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid rgba(0, 255, 178, 0.3);
    position: relative;
}

.ofer-container h1::before {
    content: "§";
    position: absolute;
    left: -35px;
    color: var(--accent);
    opacity: 0.7;
    font-size: 24px;
}

.ofer-container h2 {
    color: #c53131;
    font-size: 22px;
    margin: 30px 0 15px;
    padding-left: 15px;
    border-left: 3px solid #00ffd9;
}

.ofer-container h3 {
    color: #88ffdd;
    font-size: 18px;
    margin: 25px 0 12px;
    opacity: 0.95;
}

/* Параграфы */
.ofer-container p {
    margin: 15px 0;
    color: var(--text-main);
    font-size: 16px;
    text-align: justify;
}

/* Списки */
.ofer-container ul, 
.ofer-container ol {
    margin: 20px 0;
    padding-left: 30px;
}

.ofer-container li {
    margin: 10px 0;
    color: var(--text-main);
    position: relative;
    padding-left: 5px;
}

.ofer-container ul li::before {
    content: "▶";
    color: var(--accent);
    font-size: 12px;
    position: absolute;
    left: -20px;
    top: 2px;
}

.ofer-container ol {
    counter-reset: item;
}

.ofer-container ol li {
    counter-increment: item;
    padding-left: 10px;
}

.ofer-container ol li::before {
    content: counter(item) ".";
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: -25px;
}

/* Акцентированные блоки */
.ofer-notice {
    background: linear-gradient(135deg, 
                rgba(0, 255, 178, 0.1) 0%, 
                rgba(88, 101, 242, 0.1) 100%);
    border: 1px solid rgba(0, 255, 178, 0.4);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 255, 178, 0.1);
}

.ofer-notice::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #00ffb2, #5865f2);
}

.ofer-notice-icon {
    font-size: 24px;
    color: var(--accent);
    margin-right: 15px;
    float: left;
}

.ofer-warning {
    background: linear-gradient(135deg, 
                rgba(255, 59, 59, 0.1) 0%, 
                rgba(255, 179, 71, 0.1) 100%);
    border: 1px solid rgba(255, 59, 59, 0.4);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
}

.ofer-warning::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(to bottom, #ff3b3b, #ffb347);
}

/* Таблицы в оферте */
.ofer-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid var(--border-soft);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.ofer-table th {
    background: linear-gradient(135deg, rgba(0, 255, 178, 0.2), rgba(0, 255, 178, 0.1));
    padding: 18px 20px;
    text-align: left;
    color: var(--accent);
    font-weight: 700;
    font-size: 16px;
    border-bottom: 2px solid var(--accent-soft);
}

.ofer-table td {
    padding: 18px 20px;
    border-top: 1px solid var(--border-soft);
    background: rgba(10, 10, 20, 0.8);
    font-size: 15px;
}

.ofer-table tr:hover td {
    background: rgba(0, 255, 178, 0.08);
    transition: background 0.3s ease;
}

/* Код и термины */
.ofer-term {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 8px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 15px;
    color: #88ff00;
    margin: 0 3px;
}

/* Подпись */
.ofer-signature {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--border-soft);
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
    padding: 30px;
    border-radius: 15px;
    margin-top: 60px;
}

.ofer-signature p {
    color: var(--text-muted);
    font-size: 15px;
    margin: 10px 0;
}

.ofer-contacts {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.ofer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: rgba(0, 255, 178, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(0, 255, 178, 0.2);
}

.ofer-contact-icon {
    color: var(--accent);
    font-size: 20px;
}

/* Навигация по разделам */
.ofer-toc {
    position: fixed;
    top: 150px;
    right: 20px;
    width: 280px;
    background: rgba(10, 10, 20, 0.95);
    border: 1px solid var(--border-soft);
    border-radius: 15px;
    padding: 20px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
    z-index: 90;
    display: none;
}

.ofer-toc-title {
    color: var(--accent);
    font-size: 16px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ofer-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ofer-toc-item {
    margin: 8px 0;
}

.ofer-toc-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.ofer-toc-link:hover {
    color: var(--accent);
    background: rgba(0, 255, 178, 0.1);
    transform: translateX(5px);
}

/* Кнопка "Показать оглавление" */
.ofer-toc-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 255, 178, 0.1);
    border: 1px solid rgba(0, 255, 178, 0.3);
    color: var(--accent);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 90;
    transition: all 0.3s ease;
}

.ofer-toc-toggle:hover {
    background: rgba(0, 255, 178, 0.2);
    transform: scale(1.1);
}

/* Прогресс-бар чтения */
.ofer-progress {
    position: fixed;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 95;
}

.ofer-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #ff3b3b, #00ffb2);
    width: 0%;
    transition: width 0.3s ease;
}

/* Анимации */
.ofer-container {
    animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


@media (max-width: 1024px) {
    .ofer-toc {
        display: none !important;
    }
    
    .ofer-toc-toggle {
        display: none;
    }
    
    .ofer-back-btn {
        top: 80px;
        left: 10px;
    }
}

@media (max-width: 768px) {
    .ofer-page {
        padding: 10px;
    }
    
    .ofer-header {
        padding: 25px 15px;
    }
    
    .ofer-title {
        font-size: 26px;
    }
    
    .ofer-container {
        padding: 25px 15px;
    }
    
    .ofer-container h1 {
        font-size: 22px;
        padding-left: 25px;
    }
    
    .ofer-container h1::before {
        left: 0;
    }
    
    .ofer-container h2 {
        font-size: 20px;
    }
    
    .ofer-back-btn {
        position: absolute;
        top: 20px;
        left: 15px;
        padding: 8px 15px;
        font-size: 13px;
    }
}

/* Эффект выделения при наведении на разделы */
.ofer-section {
    transition: all 0.3s ease;
    padding: 15px;
    border-radius: 12px;
    margin: 10px 0;
}

.ofer-section:hover {
    background: rgba(0, 255, 178, 0.05);
    box-shadow: 0 5px 20px rgba(0, 255, 178, 0.1);
}

/* Цитаты */
.ofer-quote {
    border-left: 4px solid var(--accent);
    padding-left: 20px;
    margin: 25px 0;
    font-style: italic;
    color: var(--text-muted);
    background: rgba(0, 255, 178, 0.05);
    padding: 20px;
    border-radius: 0 12px 12px 0;
}

/* ========== КНОПКА ОФЕРТЫ В МАГАЗИНЕ ========== */
.shop-ofer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(0, 255, 178, 0.1);
    border: 1px solid rgba(0, 255, 178, 0.3);
    border-radius: 12px;
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.shop-ofer-link:hover {
    background: rgba(0, 255, 178, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 255, 178, 0.2);
}

.shop-ofer-link i {
    font-size: 16px;
}

/* Блок с информацией о договоре в магазине */
.shop-ofer-notice {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(0, 255, 178, 0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.shop-ofer-notice-icon {
    color: var(--accent);
    font-size: 24px;
}

.shop-ofer-notice-text {
    flex: 1;
    font-size: 14px;
    color: var(--text-muted);
    
}

.shop-ofer-notice-text a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.shop-ofer-notice-text a:hover {
    text-decoration: underline;
}


/* Кнопка "Вернуться к покупкам" для мобильных */
.mobile-back-to-shop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent);
    color: #000;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 255, 178, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
}

@media (min-width: 769px) {
    .mobile-back-to-shop {
        display: none;
    }
}

/* Баннер для принятия оферты на мобильных */
.mobile-ofer-accept {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px;
    border-top: 2px solid var(--accent);
    z-index: 999;
    text-align: center;
}

.mobile-ofer-accept p {
    margin: 0 0 10px;
    font-size: 13px;
    color: var(--text-muted);
}

.mobile-ofer-accept-buttons {
    display: flex;
    gap: 10px;
}

.mobile-ofer-accept-btn {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.mobile-ofer-accept-btn.accept {
    background: var(--accent);
    color: #000;
}

.mobile-ofer-accept-btn.decline {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
}

@media (min-width: 769px) {
    .mobile-ofer-accept {
        display: none;
    }
}