/**
 * Main Page Styles
 * Единые стили для главной страницы
 */

/* ==========================================================================
   Основные переменные и сбросы
   ========================================================================== */

:root {
    --primary-color: #2469BE;
    --secondary-color: #1a4f8a;
    --accent-color: #4A90E2;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f1f3f4;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 16px rgba(0,0,0,0.15);
    --shadow-xl: 0 16px 32px rgba(0,0,0,0.2);
    --transition: all 0.3s ease;
    --border-radius: 8px;
    --border-radius-lg: 12px;
    --container-max-width: 1200px;
    --container-padding: 20px;
}

/* ==========================================================================
   Общие стили для всего сайта
   ========================================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}

/* Контейнеры */
.container, .modern-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

@media (max-width: 768px) {
    .container, .modern-container {
        padding: 0 15px;
    }
}

/* Секции */
.section {
    padding: 80px 0;
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }
}

/* Заголовки секций */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 15px;
    line-height: 1.2;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.5;
}

@media (max-width: 768px) {
    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }
}

/* Кнопки */
.btn, .submit-btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary, .submit-btn {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover, .submit-btn:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   Главная страница - Hero секция
   ========================================================================== */

.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

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

/* ==========================================================================
   Популярные товары
   ========================================================================== */

.featured-products-section {
    background: var(--bg-secondary);
    padding: 80px 0;
}

.products-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 20px;
    flex-wrap: wrap;
}

.search-input {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input input {
    width: 100%;
    padding: 14px 45px 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 50px;
    font-size: 16px;
    transition: var(--transition);
    background: white;
}

.search-input input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(36, 105, 190, 0.1);
}

.search-input .search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 18px;
}

.sort-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sort-controls select {
    padding: 10px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: white;
    font-size: 14px;
    cursor: pointer;
}

.featured-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.product-card {
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 20px;
}

.product-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
    display: block;
}

.product-title:hover {
    color: var(--primary-color);
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.product-sales {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.product-sales i {
    color: #ffc107;
}

.product-buttons {
    display: flex;
    gap: 10px;
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--text-primary);
    color: white;
}

/* ==========================================================================
   Преимущества
   ========================================================================== */

.advantages-section {
    background: white;
    padding: 80px 0;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.advantage-card {
    text-align: center;
    padding: 30px 20px;
}

.advantage-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 2rem;
    box-shadow: var(--shadow-md);
}

.advantage-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.advantage-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   Отзывы
   ========================================================================== */

.reviews-section {
    background: var(--bg-secondary);
    padding: 80px 0;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.review-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.review-content {
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 20px;
    line-height: 1.6;
}

.review-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.review-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
}

.review-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.review-info span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ==========================================================================
   Партнеры
   ========================================================================== */

.partners-section {
    background: white;
    padding: 80px 0;
}

.partners-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.partners-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.partners-description {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 30px;
}

.partners-benefits {
    list-style: none;
    padding: 0;
    margin: 0;
}

.partners-benefits li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: var(--text-secondary);
}

.partners-benefits li::before {
    content: '✓';
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
}

.partners-image {
    text-align: center;
}

.partners-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ==========================================================================
   Контакты
   ========================================================================== */

.contact-section {
    background: var(--bg-secondary);
    padding: 80px 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
}

.contact-info {
    padding-right: 20px;
}

.contact-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 0px;
    margin: 10px;
    height: 16px;
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-details h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.contact-details p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.contact-form {
    background: white;
    padding: 40px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 18px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    background: white;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(36, 105, 190, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ==========================================================================
   FAQ секция
   ========================================================================== */

.faq-section {
    background: white;
    padding: 80px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    overflow: hidden;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-question {
    width: 100%;
    padding: 20px 25px;
    background: white;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-item.active .faq-question::after {
    content: '−';
}

.faq-answer {
    display: none;
    padding: 0 25px 25px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .advantages-grid,
    .reviews-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

    .hero-section {
        padding: 80px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .products-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input {
        max-width: none;
    }

    .featured-products-grid,
    .advantages-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .partners-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-form {
        padding: 30px 20px;
    }

    .faq-question {
        padding: 15px 20px;
        font-size: 1rem;
    }

    .faq-answer {
        padding: 0 20px 20px;
    }
}

@media (max-width: 480px) {
    .section {
        padding: 40px 0;
    }

    .hero-section {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .product-card {
        margin: 0 -10px;
    }

    .advantage-card {
        padding: 20px 15px;
    }

    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .contact-icon {
        width: 0px;
        margin: 10px;
        height: 16px;
        color: var(--primary-color);
        flex-shrink: 0;
        align-self: center;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }
.mb-5 { margin-bottom: 50px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }
.mt-5 { margin-top: 50px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

.justify-center { justify-content: center; }
.align-center { align-items: center; }
.align-start { align-items: flex-start; }
.align-end { align-items: flex-end; }
