:root {
    --bg: #ffffff;
    --bg-dark: #1a5d2e;
    --bg-card: #ffffff;
    --bg-glass: #ffffff;
    --text: #1a5d2e;
    --text-light: rgba(26, 93, 46, 0.7);
    --accent: #4caf50;
    --accent-bright: #66bb6a;
    --accent-dark: #2e7d32;
    --accent-soft: #c8e6c9;
    --accent-yellow: #ffd54f;
    --accent-orange: #ff9800;
    --accent-pink: #f48fb1;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-bright: 0 8px 30px rgba(76, 175, 80, 0.2);
    --radius: 20px;
    font-family: "Manrope", system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #ffffff;
    color: var(--text);
    font-family: "Manrope", sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1200px, 92vw);
    margin: 0 auto;
}

.top-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 3px solid var(--accent-bright);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    flex: 1;
    justify-content: center;
}

.logo-section {
    padding: 20px 0;
    background: #ffffff;
    border-bottom: 2px solid var(--accent-soft);
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-mark {
    width: 120px;
    height: 120px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--accent-bright);
    color: #fff;
    font-size: 48px;
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-mark:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}


.nav-link {
    font-weight: 500;
    position: relative;
    padding-bottom: 6px;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    background: var(--accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user {
    font-weight: 600;
    color: var(--accent-dark);
    min-width: 120px;
}

.btn {
    border: none;
    border-radius: 999px;
    padding: 12px 22px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent-bright);
    color: #fff;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--accent);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--accent-yellow);
    color: #1a5d2e;
    box-shadow: 0 4px 15px rgba(255, 213, 79, 0.3);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--accent-orange);
    color: #fff;
    box-shadow: 0 6px 20px rgba(255, 152, 0, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 1px solid rgba(20, 63, 45, 0.16);
    color: var(--text);
}

.hidden {
    display: none !important;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-direction: column;
    background: rgba(47, 157, 98, 0.12);
    cursor: pointer;
}

.menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--accent-dark);
    display: block;
}

/* Блок с лозунгом */
.slogan-section {
    padding: 40px 0;
    background: #ffffff;
    text-align: center;
}

.slogan-text {
    font-size: clamp(24px, 3.5vw, 32px);
    color: var(--accent);
    font-weight: 700;
    margin: 0;
    line-height: 1.4;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Унифицированные блоки story */
.story-section {
    padding: 80px 0;
    background: #ffffff;
}

.story-container {
    max-width: 1200px;
}

.story-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    min-height: 400px;
}

.story-text {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.story-text h2 {
    font-size: clamp(28px, 4vw, 36px);
    color: var(--accent);
    font-weight: 800;
    margin: 0;
}

.story-text p {
    font-size: 18px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.6;
}

.story-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1; /* Создаем контекст наложения */
}

/* Для второго блока - банка слева, но правее на пару сантиметров (где останавливается орешек) */
.story-two .story-content-wrapper {
    grid-template-columns: 1fr 1fr;
}

.story-two .story-visual {
    justify-content: flex-start;
    align-items: flex-end;
    padding-left: 120px; /* Сдвигаем банку правее еще на 2 см (всего ~12 см) */
    z-index: 2; /* Второй блок выше первого, чтобы банка была поверх орешка */
}

.hero-content h1 {
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--accent);
    font-weight: 800;
}

.hero-content p {
    font-size: 18px;
    color: var(--text-light);
    max-width: 480px;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}


/* Контейнер для шишки - добавьте вашу картинку в /images/pinecone.png */
.pinecone-container {
    position: relative;
    width: 300px;
    height: 330px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    margin-top: -40px; /* Поднимаем шишку на 4 см выше */
}

.pinecone-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.pinecone-img {
    display: none;
}

.pinecone-placeholder {
    width: 100%;
    height: 100%;
    background: #8d6e63;
    border: 4px solid #6d4c41;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(93, 64, 55, 0.3);
}

/* Контейнер для орешка - добавьте вашу картинку в /images/nut.png */
.nut-container {
    position: absolute;
    width: 70px;
    height: 70px;
    left: 50%;
    top: 50%;
    transform: translateX(-50%) translateY(-50%);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
    will-change: transform;
    opacity: 0;
}

.nut-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transform-origin: center;
}

.nut-img {
    display: none;
}

.nut-placeholder {
    width: 100%;
    height: 100%;
    background: #ffd54f;
    border: 4px solid #ffb74d;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #e65100;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 8px 20px rgba(255, 213, 79, 0.3);
}

/* Контейнер для баночки - добавьте вашу картинку в /images/jar.png */
.jar-container {
    position: relative;
    width: 250px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10; /* Банка слоем выше орешка (орешек имеет z-index: 5) */
}

.jar-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.jar-img {
    display: none;
}

.jar-placeholder {
    width: 100%;
    height: 100%;
    background: #ff9800;
    border: 4px solid #f57c00;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.3);
}

.story {
    padding: 60px 0;
    background: #ffffff;
}

.story:nth-child(even) {
    background: #f5f5f5;
}

/* Старые стили story удалены, используются новые .story-section */

.products,
.cooperation,
.partners,
.news,
.contacts {
    padding: 100px 0;
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    gap: 24px;
}

.section-head h2 {
    font-size: clamp(28px, 3.2vw, 40px);
    color: var(--accent);
    font-weight: 800;
}

.link-arrow {
    font-weight: 600;
    color: var(--accent-dark);
}

.categories-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 4px;
}

.category-btn {
    padding: 10px 20px;
    border: 2px solid var(--accent-soft);
    background: #ffffff;
    color: var(--accent);
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.category-btn:hover {
    border-color: var(--accent-bright);
    background: var(--accent-soft);
    transform: translateY(-2px);
}

.category-btn.active {
    background: var(--accent-bright);
    color: #ffffff;
    border-color: var(--accent-bright);
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.products-grid {
    display: grid;
    gap: 28px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.product-card {
    background: var(--bg-card);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: grid;
    gap: 16px;
    transition: all 0.3s ease;
    border: 3px solid var(--accent-soft);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(76, 175, 80, 0.3);
    border-color: var(--accent-bright);
}

.product-card img {
    width: 100%;
    border-radius: 20px;
    object-fit: cover;
    aspect-ratio: 4 / 3;
}

.product-card button {
    justify-self: flex-start;
}

.skeleton-card {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.6) 25%, rgba(255, 255, 255, 0.9) 50%, rgba(255, 255, 255, 0.6) 75%);
    background-size: 200% 100%;
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    animation: shimmer 1.4s infinite;
    color: rgba(20, 63, 45, 0.35);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.cooperation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    padding: 40px;
    border-radius: 24px;
    background: #f5f5f5;
    border: 3px solid var(--accent-bright);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.cooperation-text ul {
    margin-top: 24px;
    display: grid;
    gap: 12px;
    color: var(--text-light);
}

.cooperation-form {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 32px;
    padding: 32px;
    display: grid;
    gap: 18px;
    box-shadow: var(--shadow-soft);
}

.cooperation-form h3 {
    font-size: 22px;
}

.cooperation-form label {
    display: grid;
    gap: 6px;
}

.cooperation-form input,
.cooperation-form textarea {
    border-radius: 18px;
    border: 1px solid rgba(20, 63, 45, 0.12);
    padding: 12px 16px;
    font: inherit;
    background: rgba(247, 252, 248, 0.9);
}

.form-note {
    font-size: 12px;
    color: rgba(20, 63, 45, 0.54);
}

.partners-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 24px;
    align-items: center;
    justify-items: center;
}

.partner-card {
    background: transparent;
    border: none;
    padding: 0;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-card img {
    width: 100%;
    max-width: 180px;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    filter: grayscale(20%);
}

.partner-card:hover img {
    transform: scale(1.1);
    filter: grayscale(0%);
    opacity: 1;
}

.partner-card h4 {
    display: none;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.news-card {
    background: var(--bg-glass);
    border-radius: 28px;
    padding: 24px;
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 12px;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
    padding: 36px;
    border-radius: 36px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.contacts-list {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.contacts-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.contacts-map {
    border-radius: 28px;
    background: rgba(47, 157, 98, 0.12);
    display: grid;
    place-items: center;
    color: rgba(20, 63, 45, 0.6);
    padding: 24px;
}

.site-footer {
    padding: 48px 0;
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.95);
    border-top: 3px solid var(--accent-bright);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links a {
    margin-left: 16px;
    color: rgba(255, 255, 255, 0.75);
}

.cart-panel {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 50;
}

.cart-panel.active {
    display: block;
}

.cart-panel__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.cart-panel__content {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 32px 0 0 32px;
    box-shadow: -16px 0 48px rgba(20, 63, 45, 0.3);
}

.cart-panel__header,
.cart-panel__footer {
    padding: 24px;
    border-bottom: 1px solid rgba(20, 63, 45, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-panel__footer {
    border-bottom: none;
    border-top: 1px solid rgba(20, 63, 45, 0.08);
}

.cart-panel__body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: grid;
    gap: 16px;
}

.cart-item {
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 18px;
    align-items: center;
}

.cart-item img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
}

.cart-item h4 {
    font-size: 16px;
    margin-bottom: 4px;
}

.cart-item__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.cart-empty {
    text-align: center;
    color: rgba(20, 63, 45, 0.45);
}

.cart-close {
    border: none;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 60;
}

.modal.open {
    display: flex;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.modal__dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 28px;
    padding: 32px;
    width: min(420px, 92vw);
    box-shadow: var(--shadow-soft);
    display: grid;
    gap: 18px;
}

.modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    border: none;
    background: rgba(47, 157, 98, 0.12);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
}

.modal-form {
    display: grid;
    gap: 16px;
}

.modal-form label {
    display: grid;
    gap: 6px;
}

.modal-form input {
    border-radius: 16px;
    border: 1px solid rgba(20, 63, 45, 0.16);
    padding: 12px 16px;
    font: inherit;
}

.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: rgba(21, 43, 26, 0.9);
    color: #fff;
    padding: 16px 22px;
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    pointer-events: none;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    max-width: 320px;
    z-index: 70;
}

.toast.visible {
    opacity: 1;
    transform: translateY(0);
}

body.modal-open {
    overflow: hidden;
}

@media (max-width: 980px) {
    .hero-container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        height: 360px;
    }

    .cooperation-grid,
    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .nav-menu {
        position: fixed;
        inset: 72px 0 auto;
        background: rgba(255, 255, 255, 0.96);
        flex-direction: column;
        padding: 24px;
        align-items: flex-start;
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        border-bottom: 1px solid rgba(20, 63, 45, 0.1);
    }

    .nav-menu.open {
        transform: translateY(0);
    }

    .menu-toggle {
        display: flex;
    }

    .nav-actions {
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .hero {
        padding-top: 96px;
    }

    .hero-content h1 {
        font-size: 32px;
    }

    .container {
        width: min(960px, 90vw);
    }

    .products,
    .cooperation,
    .contacts,
    .news,
    .partners {
        padding: 72px 0;
    }
}
