/* ===========================
   meidea.ru — v2 Premium
   =========================== */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, sans-serif;
    background: #fafafa;
    color: #111;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { padding-left: 1.4em; }
.container { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* --- Header --- */
.header {
    border-bottom: 1px solid #eaeaea;
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 64px;
}
.logo {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    flex-shrink: 0;
}
.logo-accent { color: #2563eb; }
.nav {
    display: flex;
    gap: 20px;
    flex: 1;
}
.nav-link {
    font-size: 0.875rem;
    color: #555;
    transition: color 0.2s;
    white-space: nowrap;
}
.nav-link:hover { color: #111; }
.search-toggle {
    background: none;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #555;
    transition: border-color 0.2s, color 0.2s;
    flex-shrink: 0;
}
.search-toggle:hover { border-color: #2563eb; color: #2563eb; }

/* --- Hero --- */
.hero {
    text-align: center;
    padding: 64px 0 48px;
}
.hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 14px;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: #666;
    max-width: 540px;
    margin: 0 auto;
}

/* --- Articles --- */
.articles {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding-bottom: 64px;
}
.article-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.25s, border-color 0.25s;
}
.article-card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.06);
    border-color: #ddd;
}
.article-link {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 200px;
}
.article-card-image {
    overflow: hidden;
    background: #f0f0f0;
}
.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.article-card:hover .article-card-image img { transform: scale(1.03); }
.article-card-body {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.article-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}
.article-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #2563eb;
}
.article-date {
    font-size: 0.82rem;
    color: #999;
}
.article-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
    transition: color 0.2s;
}
.article-card:hover .article-title { color: #2563eb; }
.article-excerpt {
    font-size: 0.92rem;
    color: #666;
    line-height: 1.5;
}

/* --- Article Page --- */
.article-page {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    margin: 32px 0 64px;
    padding: 40px 48px;
}
.article-page-header { margin-bottom: 32px; }
.article-page .article-category { margin-bottom: 8px; display: inline-block; }
.article-page-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.article-page .article-date { display: block; }

.article-content {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #222;
}
.article-content h2 {
    font-size: 1.45rem;
    font-weight: 700;
    margin: 40px 0 16px;
    letter-spacing: -0.02em;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}
.article-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin: 28px 0 10px;
}
.article-content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 24px 0;
}

.article-hero-image {
    margin: 0 0 32px 0;
    border-radius: 12px;
    overflow: hidden;
    max-height: 400px;
}
.article-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0;
    border-radius: 12px;
}
.article-content p { margin-bottom: 18px; }
.article-content ul, .article-content ol { margin-bottom: 18px; }
.article-content li { margin-bottom: 6px; }
.article-content blockquote {
    border-left: 3px solid #2563eb;
    padding: 14px 22px;
    margin: 28px 0;
    background: #f8f9ff;
    border-radius: 0 8px 8px 0;
    color: #444;
    font-style: italic;
}

/* --- Product Box --- */
.product-box {
    background: #f8f9ff;
    border: 1px solid #e0e7ff;
    border-radius: 12px;
    padding: 24px;
    margin: 28px 0;
    display: flex;
    align-items: center;
    gap: 24px;
}

.product-box-img {
    width: 100px;
    height: 100px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    flex-shrink: 0;
}
.product-box-body { flex: 1; }
.product-box-title {
    font-weight: 700;
    font-size: 1.05rem;
    margin-bottom: 4px;
}
.product-box-price {
    color: #2563eb;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.btn {
    display: inline-block;
    padding: 10px 24px;
    background: #2563eb;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.2s;
}
.btn:hover { background: #1d4ed8; }

/* --- Footer --- */
.footer {
    margin-top: auto;
    border-top: 1px solid #eaeaea;
    background: #fff;
    padding: 20px 0;
}
.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.footer-copy { font-size: 0.85rem; color: #999; }
.footer-nav { display: flex; gap: 20px; }
.footer-nav a {
    font-size: 0.85rem;
    color: #888;
    transition: color 0.2s;
}
.footer-nav a:hover { color: #111; }

/* --- Search Overlay --- */
.search-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 200;
    align-items: flex-start;
    justify-content: center;
    padding-top: 120px;
}
.search-overlay.active { display: flex; }
.search-overlay .search-input {
    width: 480px;
    max-width: 90vw;
    padding: 16px 20px;
    font-size: 1.1rem;
    border: 2px solid #2563eb;
    border-radius: 12px;
    outline: none;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

/* --- Responsive --- */
@media (max-width: 700px) {
    .article-link { grid-template-columns: 1fr; }
    .article-card-image { height: 200px; }
    .article-card-body { padding: 20px; }
    .article-page { padding: 24px; }
    .hero-title { font-size: 1.6rem; }
    .nav { gap: 12px; overflow-x: auto; }
    .header-inner { gap: 16px; }
    .nav-link { font-size: 0.8rem; }
    .product-box { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
    .nav { display: none; }
    .hero { padding: 40px 0; }
}
