/* ============================================
   Mushroomawzsupply - Тема для сайта
   Цветовая палитра и стили
   ============================================ */

/* Сброс и базовые стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--mushroom-white);
    color: var(--graphite);
    line-height: 1.6;
}

/* Цветовые переменные */
:root {
    --mushroom-white: #F6F2EA;
    --warm-sand: #E7DDCF;
    --graphite: #1F2326;
    --ash-gray: #6B6F73;
    --forest-green: #1E5B3A;
    --olive: #6D7A3A;
    --chestnut-brown: #6B3F2A;
    --amber: #D08A2D;
    --fresh-teal: #1E7A78;
    --success: #2E7D32;
    --warning: #B86A00;
    --error: #B3261E;
    --border-color: #D6C9B8;
    --shadow: 0 4px 12px rgba(31, 35, 38, 0.08);
    --shadow-hover: 0 8px 24px rgba(31, 35, 38, 0.12);
    --transition: all 0.3s ease;
}

/* Контейнер */
.mushroom-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.mushroom-container-narrow {
    max-width: 800px;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    color: var(--chestnut-brown);
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.mushroom-section-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.mushroom-section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--olive);
    margin: 0.5rem auto;
}

.mushroom-page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.mushroom-page-subtitle {
    color: var(--ash-gray);
    font-size: 1.125rem;
    margin-bottom: 3rem;
    text-align: center;
}

/* Кнопки */
.mushroom-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.mushroom-button-primary {
    background-color: var(--forest-green);
    color: white;
}

.mushroom-button-primary:hover {
    background-color: #184B30;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.mushroom-button-secondary {
    background-color: transparent;
    color: var(--forest-green);
    border: 2px solid var(--forest-green);
}

.mushroom-button-secondary:hover {
    background-color: var(--warm-sand);
}

.mushroom-button-cta {
    background-color: var(--amber);
    color: white;
    font-weight: 600;
}

.mushroom-button-cta:hover {
    background-color: #B8761F;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.mushroom-button-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

.mushroom-button-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Шапка */
.mushroom-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(31, 35, 38, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mushroom-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

/* Логотип */
.mushroom-logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.mushroom-logo-icon {
    width: 40px;
    height: 40px;
    fill: var(--forest-green);
}

.mushroom-logo-text {
    display: flex;
    flex-direction: column;
}

.mushroom-logo-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--forest-green);
}

.mushroom-logo-subtitle {
    font-size: 0.75rem;
    color: var(--ash-gray);
}

/* Навигация */
.mushroom-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mushroom-nav-toggle-icon {
    width: 24px;
    height: 24px;
    fill: var(--graphite);
}

.mushroom-nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.mushroom-nav-link {
    color: var(--graphite);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.mushroom-nav-link:hover {
    color: var(--forest-green);
}

.mushroom-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--forest-green);
    transition: width 0.3s ease;
}

.mushroom-nav-link:hover::after {
    width: 100%;
}

/* Герой-секция */
.mushroom-hero {
    background: linear-gradient(rgba(31, 35, 38, 0.8), rgba(31, 35, 38, 0.8)), url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.mushroom-hero-title {
    font-size: 3rem;
    color: white;
    margin-bottom: 1.5rem;
}

.mushroom-hero-subtitle {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.mushroom-hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Почему выбирают нас */
.mushroom-why {
    padding: 5rem 0;
    background-color: white;
}

.mushroom-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.mushroom-why-card {
    background-color: var(--mushroom-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.mushroom-why-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.mushroom-why-icon {
    width: 60px;
    height: 60px;
    background-color: var(--olive);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.mushroom-why-icon svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.mushroom-why-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--chestnut-brown);
}

.mushroom-why-text {
    color: var(--ash-gray);
}

/* Категории продуктов */
.mushroom-categories {
    padding: 5rem 0;
    background-color: var(--warm-sand);
}

.mushroom-categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.mushroom-category-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 200px;
    display: flex;
    align-items: flex-end;
    position: relative;
}

.mushroom-category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.mushroom-category-card:nth-child(1) {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent), url('/img/agricultire-farm-mushroom-7g-shutterstock-com.avif') center/cover;
}

.mushroom-category-card:nth-child(2) {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent), url('/img/ripe-fresh-mushrooms-box-warehouse-after-assembling-close-up_180601-10942.jpg') center/cover;
}

.mushroom-category-card:nth-child(3) {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent), url('/img/reino-fungi.jpg') center/cover;
}

.mushroom-category-card:nth-child(4) {
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent), url('/img/sohranyaem-polzu-2.jpg') center/cover;
}

.mushroom-category-content {
    padding: 1.5rem;
    color: white;
    width: 100%;
}

.mushroom-category-title {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.mushroom-category-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* Рекомендуемые продукты */
.mushroom-featured {
    padding: 5rem 0;
    background-color: white;
}

.mushroom-featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.mushroom-product-card {
    background-color: var(--mushroom-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.mushroom-product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.mushroom-product-image {
    height: 180px;
    background-color: var(--warm-sand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mushroom-product-content {
    padding: 1.5rem;
}

.mushroom-product-title {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    color: var(--chestnut-brown);
}

.mushroom-product-category {
    color: var(--olive);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.mushroom-product-link {
    color: var(--forest-green);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.mushroom-product-link:hover {
    text-decoration: underline;
}

/* Призыв к действию */
.mushroom-cta {
    padding: 5rem 0;
    background-color: var(--forest-green);
    color: white;
    text-align: center;
}

.mushroom-cta-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.mushroom-cta-text {
    font-size: 1.125rem;
    max-width: 700px;
    margin: 0 auto 3rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Сетка списка */
.mushroom-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.mushroom-list-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.mushroom-list-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.mushroom-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.mushroom-card-image-placeholder {
    width: 100%;
    height: 200px;
    background-color: var(--warm-sand);
}

.mushroom-card-body {
    padding: 1.5rem;
}

.mushroom-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.mushroom-card-link {
    color: var(--chestnut-brown);
    text-decoration: none;
}

.mushroom-card-link:hover {
    color: var(--forest-green);
}

.mushroom-card-text {
    color: var(--ash-gray);
    margin-bottom: 1rem;
}

.mushroom-card-readmore {
    color: var(--forest-green);
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.mushroom-card-readmore:hover {
    text-decoration: underline;
}

/* Блог */
.mushroom-blog {
    padding: 4rem 0;
}

.mushroom-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.mushroom-blog-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.mushroom-blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.mushroom-blog-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.mushroom-blog-content {
    padding: 1.5rem;
}

.mushroom-blog-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.mushroom-blog-link {
    color: var(--chestnut-brown);
    text-decoration: none;
}

.mushroom-blog-link:hover {
    color: var(--forest-green);
}

.mushroom-blog-excerpt {
    color: var(--ash-gray);
    margin-bottom: 1rem;
}

.mushroom-blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
}

.mushroom-blog-date {
    color: var(--ash-gray);
}

.mushroom-blog-readmore {
    color: var(--forest-green);
    font-weight: 500;
    text-decoration: none;
}

.mushroom-blog-readmore:hover {
    text-decoration: underline;
}

/* Статья */
.mushroom-article {
    padding: 4rem 0;
}

.mushroom-article-hero {
    margin-bottom: 3rem;
}

.mushroom-article-image {
    width: 100%;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.mushroom-article-caption {
    text-align: center;
    color: var(--ash-gray);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

.mushroom-article-content {
    line-height: 1.8;
}

.mushroom-article-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--chestnut-brown);
}

/* Связанные статьи */
.mushroom-related {
    padding: 3rem 0;
}

.mushroom-related-title {
    font-size: 1.75rem;
    margin-bottom: 2rem;
    text-align: center;
}

.mushroom-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.mushroom-related-card {
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
}

.mushroom-related-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.mushroom-related-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.mushroom-related-content {
    padding: 1rem;
}

.mushroom-related-card-title {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.mushroom-related-link {
    color: var(--chestnut-brown);
    text-decoration: none;
}

.mushroom-related-link:hover {
    color: var(--forest-green);
}

.mushroom-related-text {
    color: var(--ash-gray);
    font-size: 0.875rem;
}

/* Разделитель */
.mushroom-divider {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 4rem 0;
}

/* Пагинация */
.mushroom-pagination {
    margin-top: 4rem;
    display: flex;
    justify-content: center;
}

.mushroom-pagination ul {
    display: flex;
    list-style: none;
    gap: 0.5rem;
}

.mushroom-pagination li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    text-decoration: none;
    color: var(--graphite);
    font-weight: 500;
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.mushroom-pagination li a:hover {
    background-color: var(--warm-sand);
}

.mushroom-pagination li.active a {
    background-color: var(--forest-green);
    color: white;
    border-color: var(--forest-green);
}

/* Подвал */
.mushroom-footer {
    background-color: var(--chestnut-brown);
    color: white;
    padding: 4rem 0 2rem;
}

.mushroom-footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.mushroom-footer-col {
    display: flex;
    flex-direction: column;
}

.mushroom-footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.mushroom-footer-logo .mushroom-logo-icon {
    fill: white;
}

.mushroom-footer-logo .mushroom-logo-title {
    color: white;
    font-size: 1.25rem;
}

.mushroom-footer-title {
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

.mushroom-footer-text {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.mushroom-footer-certifications {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.mushroom-badge {
    background-color: var(--olive);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
}

.mushroom-footer-address,
.mushroom-footer-contact {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.mushroom-footer-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    fill: white;
    margin-top: 0.25rem;
}

.mushroom-footer-note {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 1rem;
}

.mushroom-footer-links {
    list-style: none;
}

.mushroom-footer-links li {
    margin-bottom: 0.75rem;
}

.mushroom-footer-links a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: var(--transition);
}

.mushroom-footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
}

.mushroom-partner-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mushroom-partner {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition);
}

.mushroom-partner:hover {
    color: white;
    text-decoration: underline;
}

.mushroom-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.mushroom-footer-copyright,
.mushroom-footer-designed {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

/* Markdown стили */
.mushroom-markdown-body {
    font-size: 1.125rem;
    line-height: 1.8;
}

.mushroom-markdown-body h1,
.mushroom-markdown-body h2,
.mushroom-markdown-body h3,
.mushroom-markdown-body h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.mushroom-markdown-body p {
    margin-bottom: 1.5rem;
}

.mushroom-markdown-body ul,
.mushroom-markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.mushroom-markdown-body a {
    color: var(--forest-green);
    text-decoration: none;
}

.mushroom-markdown-body a:hover {
    text-decoration: underline;
}

.mushroom-markdown-body blockquote {
    border-left: 4px solid var(--olive);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--ash-gray);
}

.mushroom-markdown-body code {
    background-color: var(--warm-sand);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
}

/* Адаптивность */
@media (max-width: 992px) {
    .mushroom-hero-title {
        font-size: 2.5rem;
    }

    .mushroom-section-title {
        font-size: 1.75rem;
    }

    .mushroom-page-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .mushroom-nav-toggle {
        display: block;
    }

    .mushroom-nav-list {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: white;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 10px 20px rgba(31, 35, 38, 0.1);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 999;
    }

    .mushroom-nav-list.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .mushroom-hero-title {
        font-size: 2rem;
    }

    .mushroom-hero-subtitle {
        font-size: 1rem;
    }

    .mushroom-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .mushroom-button {
        width: 100%;
        max-width: 300px;
    }

    .mushroom-footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .mushroom-container {
        padding: 0 1rem;
    }

    .mushroom-hero {
        padding: 4rem 0;
    }

    .mushroom-why,
    .mushroom-categories,
    .mushroom-featured,
    .mushroom-cta {
        padding: 3rem 0;
    }

    .mushroom-list-grid,
    .mushroom-blog-grid,
    .mushroom-related-grid {
        grid-template-columns: 1fr;
    }

    .mushroom-footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
/* ============================================
   TABLES — clean + no layout break + X-scroll
   ============================================ */

/* 1) Правильный скролл: на обёртке (если можешь — используй её) */
.mushroom-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;

    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow);
}

/* 2) Если таблица без обёртки и приходит из контента/markdown —
      скроллим КОНТЕЙНЕР, а не table (table не трогаем display!) */
.mushroom-content-inner,
.mushroom-markdown-body {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 3) Базовая таблица (и для .mushroom-table и для markdown-таблиц) */
.mushroom-table,
.mushroom-markdown-body table {
    width: 100%;
    max-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
}

/* 4) Ячейки: разрешаем переносы, чтобы таблица не раздувала страницу */
.mushroom-table th,
.mushroom-table td,
.mushroom-markdown-body table th,
.mushroom-markdown-body table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
    text-align: left;
    color: var(--graphite);
    font-size: 0.95rem;
    line-height: 1.5;

    white-space: normal;        /* важно: НЕ nowrap глобально */
    overflow-wrap: anywhere;    /* ломает длинные куски текста */
    word-break: break-word;     /* запасной вариант */
}

/* 5) Шапка */
.mushroom-table thead th,
.mushroom-markdown-body table thead th {
    background: var(--warm-sand);
    color: var(--chestnut-brown);
    font-weight: 700;
}

/* 6) Зебра (опционально, выглядит аккуратно) */
.mushroom-table tbody tr:nth-child(even) td,
.mushroom-markdown-body table tbody tr:nth-child(even) td {
    background: var(--mushroom-white);
}

/* 7) Точечный режим для “широких” таблиц (много колонок):
      добавляешь класс .mushroom-table-nowrap ТОЛЬКО таким таблицам */
.mushroom-table-nowrap th,
.mushroom-table-nowrap td {
    white-space: nowrap;
}
