/* Основные переменные */
:root {
    --primary-color: #494093;
    --secondary-color: #48417d;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --card-bg: #ffffff;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --hover-color: rgba(76, 175, 80, 0.1);
    --footer-bg: #494093;
    --footer-text-color: white;
    --footer-bottom-bg: #48417d;
    --footer-hover-bg: #6960c7;
}

/* Темная тема */
.dark-theme {
    --primary-color: #7b68ee;
    --secondary-color: #6a5acd;
    --text-color: #e0e0e0;
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --shadow-color: rgba(255, 255, 255, 0.1);
    --hover-color: rgba(102, 187, 106, 0.1);
    --footer-bg: #333;
    --footer-text-color: #e0e0e0;
    --footer-bottom-bg: #222;
    --footer-hover-bg: #4b47a3;
}

/* Общие стили */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: 60px;
}

/* Стили шапки */
header {
    background-color: var(--card-bg);
    color: var(--text-color);
    text-align: center;
    box-shadow: 0 2px 5px var(--shadow-color);
    position: relative;
    flex-shrink: 0;
    width: 100%;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.logo {
    height: 200px;
    width: auto;
}

/* Стили навигации */
nav {
    background-color: var(--card-bg);
    padding: 1rem;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 5px var(--shadow-color);
    transition: transform 0.3s ease-in-out;
}

nav.nav-hidden {
    transform: translateY(-100%);
}

nav ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 5px;
}

nav ul li a:hover {
    color: var(--primary-color);
    background-color: var(--hover-color);
    transform: translateY(-3px);
}

/* Стили основного контента */
main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.content-wrapper {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

/* Стили карточек */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 4px 6px var(--shadow-color);
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px var(--shadow-color);
}

/* Стили заголовков */
h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.icon-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}

.icon-title i {
    font-size: 1.5em;
    color: var(--primary-color);
}

/* Стили кнопок */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px var(--shadow-color);
}

/* Стили для подвала */
footer {
    background-color: var(--footer-bg);
    color: var(--footer-text-color);
    padding: 20px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 20px;
}

.footer-section {
    margin: 20px;
    min-width: 200px;
}

.footer-section h3 {
    margin-bottom: 15px;
}

.footer-section p,
.footer-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-section ul {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: var(--footer-text-color);
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    padding: 10px 15px;
    border-radius: 5px;
}

.footer-section ul li a:hover {
    color: var(--footer-text-color);
    background-color: var(--footer-hover-bg);
    transform: translateY(-3px);
}

.footer-bottom {
    background-color: var(--footer-bottom-bg);
    padding: 10px 0;
    margin-top: 20px;
}

/* Стили для мобильного меню */
.burger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
    z-index: 1002;
}

/* Медиа-запросы для адаптивности */
@media (max-width: 768px) {
    .burger-menu {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
    }

    body {
        padding-top: 0;
    }

    nav {
        position: fixed;
        top: 0;
        left: -250px;
        width: 250px;
        height: 100%;
        background-color: var(--bg-color);
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
    }

    nav.show {
        left: 0;
    }

    nav ul {
        flex-direction: column;
        padding-top: 60px;
    }

    nav ul li {
        margin: 10px 0;
    }

    nav ul li a {
        display: block;
        padding: 10px 20px;
    }

    .overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .overlay.show {
        display: block;
    }

    .content-wrapper {
        padding: 10px;
    }

    #hero {
        padding: 30px 10px;
    }

    .card {
        padding: 15px;
    }

    .icon-title {
        font-size: 1.2em;
        flex-direction: column;
        align-items: center;
    }

    .icon-title i {
        font-size: 1.5em;
        margin-bottom: 10px;
    }

    h1, h2 {
        font-size: 1.5em;
    }

    p {
        font-size: 1em;
    }

    .btn {
        padding: 8px 16px;
    }

    .product-grid {
        grid-template-columns: 1fr;
    }

    .gallery {
        width: 100%;
    }

    .gallery-image {
        height: auto;
        width: 100%;
    }

    .gallery-button {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .gallery-button.prev {
        left: 5px;
    }

    .gallery-button.next {
        right: 5px;
    }
}

@media (min-width: 769px) {
    nav {
        display: block !important;
        position: fixed;
        width: 100%;
        height: auto;
        background-color: var(--card-bg);
        box-shadow: 0 2px 5px var(--shadow-color);
    }

    nav ul {
        flex-direction: row;
        padding-top: 0;
    }

    .icon-title {
        flex-direction: row;
        justify-content: start;
        text-align: left;
    }

    .icon-title i {
        font-size: 2em;
        margin-right: 10px;
    }
}

/* Стили для галереи */
.gallery {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 30px auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.gallery-container {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.gallery-image {
    width: 100%;
    flex-shrink: 0;
    object-fit: cover;
}

.gallery-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    color: #333;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-button:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

.gallery-button.prev {
    left: 10px;
}

.gallery-button.next {
    right: 10px;
}

.gallery-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.gallery-dot.active {
    background-color: white;
}

/* Стили для изображений продуктов */
.product-image-container {
    text-align: center;
    margin-bottom: 20px;
}

.product-image {
    max-width: 30%;
    height: auto;
    border-radius: 8px;
}

/* Стили для виджета WhatsApp */
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25d366;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: bounce 2s infinite;
}

.whatsapp-widget img {
    width: 35px;
    height: 35px;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Стили для переключателя темы */
.theme-toggle {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: transparent;
    color: var(--primary-color);
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}

/* Стили для модального окна */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

#contactForm input {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#contactForm button {
    margin-top: 10px;
}

/* Стили для уведомлений */
.notification {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-color);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(10px);
}

.notification.error {
    background-color: var(--secondary-color);
}

.notification .close-btn {
    position: absolute;
    top: 5px;
    right: 10px;
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.notification .close-btn:hover {
    opacity: 1;
}


.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.benefits-list {
    list-style-type: none;
    padding: 0;
}

.benefits-list li {
    margin-bottom: 10px;
}

.benefits-list i {
    color: var(--primary-color);
    margin-right: 10px;
}

#hero {
    text-align: center;
    padding: 50px 20px;
}

#hero h1 {
    font-size: 2.5em;
    margin-bottom: 20px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

/* Дополнительные стили для плавающей навигации */
@media (max-width: 768px) {
    nav.nav-fixed {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        background-color: var(--card-bg);
        box-shadow: 0 2px 5px var(--shadow-color);
    }
}

/* Стили для активного пункта меню */
nav ul li a.active {
    color: var(--primary-color);
    background-color: var(--hover-color);
}

/* Стили для кнопки возврата наверх */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 99;
    font-size: 18px;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 15px;
    border-radius: 4px;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
}

/* Стили для прелоадера */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--primary-color);
    border-top: 3px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}