@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;800&display=swap');

:root {
    --primary: #6f42c1;
    --primary-hover: #59339d;
    --bg-color: #f8f5fc;
    --text-main: #2d2d2d;
    --card-bg: #ffffff;
    --border-radius: 16px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Прижимает футер к низу */
}

/* Шапка */
.navbar {
    /* Делаем цвет слегка прозрачным (0.95 вместо 1) */
    background-color: rgba(111, 66, 193, 0.85); 
    
    /* Добавляем красивое размытие фона под шапкой (эффект матового стекла) */
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); /* Для поддержки браузера Safari (iPhone) */
    
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    
    /* --- МАГИЯ ДЛЯ ПРИЛИПАНИЯ К ВЕРХУ --- */
    position: sticky;
    top: 0;
    z-index: 1000; /* Гарантирует, что шапка будет поверх всех фотографий и текста */
}

.navbar .logo { color: white; text-decoration: none; font-size: 24px; font-weight: 800; letter-spacing: 1px; }
.nav-links { display: flex; gap: 20px; align-items: center; }
.nav-links a { 
    color: rgba(255, 255, 255, 0.7); /* Чуть более прозрачный для неактивных */
    text-decoration: none; 
    font-weight: 600; 
    transition: 0.3s; 
    padding-bottom: 4px; /* Отступ для линии */
    border-bottom: 2px solid transparent; /* Невидимая линия по умолчанию */
}
.nav-links a:hover { 
    color: white; 
}
/* СТИЛЬ ДЛЯ АКТИВНОЙ СТРАНИЦЫ */
.nav-links a.active-nav { 
    color: white; 
    border-bottom: 2px solid white; /* Белая линия под текстом */
}

/* Переключатель языков */
.lang-switcher { display: flex; gap: 10px; background: rgba(0,0,0,0.1); padding: 5px 10px; border-radius: 20px; }
.lang-switcher a { margin-top: 5px; color: white; opacity: 0.5; text-decoration: none; font-weight: 800; font-size: 14px; }
.lang-switcher a.active { opacity: 1; text-decoration: underline; }

/* Основной контент */
.container { max-width: 1200px; margin: 0 auto; padding: 30px 20px; flex: 1; width: 100%; }

/* Главная: Герой-блок */
.hero {
    /* Накладываем градиентный прозрачный переход поверх вашей картинки vazes.jpg */
    background: linear-gradient(135deg, rgba(111, 66, 193, 0.95) 0%, rgba(111, 66, 193, 0.2) 100%), url('vazes.jpg') no-repeat center center;
    background-size: cover;
    padding: 90px 30px; /* Немного увеличили высоту блока, чтобы показать фото */
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(111, 66, 193, 0.2);
    margin-bottom: 40px;
}

/* Делаем текст белым с легкой тенью, чтобы он идеально читался на фоне фото */
.hero h1 { 
    color: white; 
    font-size: 42px; 
    margin-bottom: 15px; 
    text-shadow: 0 2px 15px rgba(0,0,0,0.4); 
}

.hero p { 
    font-size: 19px; 
    color: rgba(255, 255, 255, 0.95); 
    margin-bottom: 30px; 
    text-shadow: 0 2px 15px rgba(0,0,0,0.4); 
}

/* Обновляем кнопку специально для этого блока, чтобы она не сливалась с фоном */
.hero .btn {
    background: white;
    color: var(--primary);
    border: 2px solid white;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.hero .btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: white;
    transform: translateY(-2px);
}

/* Кнопки */
.btn {
    display: inline-block; padding: 12px 25px; background: var(--primary); color: white;
    text-decoration: none; border-radius: 8px; font-weight: 600; transition: 0.3s;
    border: 2px solid var(--primary); cursor: pointer; text-align: center;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); transform: translateY(-2px); }
.btn-outline { background: transparent; color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-danger { background: #dc3545; border-color: #dc3545; }

/* Сетка карточек (О нас / Контакты) */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.card {
    background: var(--card-bg); border-radius: var(--border-radius);
    padding: 30px; box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}
.card h3 { color: var(--primary); margin-bottom: 15px; }
.card p, .card ul { margin-bottom: 15px; line-height: 1.6; color: #444; }
.card ul { list-style: none; }
.card li { padding: 8px 0; border-bottom: 1px solid #eee; }
.alert-box { background: #f0e6ff; padding: 15px; border-left: 5px solid var(--primary); border-radius: 5px; font-weight: 600; }

/* Каталог (Сетка ваз) */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.vase-card { background: white; border-radius: var(--border-radius); overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.08); display: flex; flex-direction: column; transition: 0.3s; }
.vase-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(111, 66, 193, 0.2); }
.vase-card img { 
    width: 100%; 
    height: 350px; 
    object-fit: contain; /* Теперь фото помещается целиком, ничего не обрезается */
    background-color: #f8f5fc; /* Нежно-фиолетовый фон для пустых краев */
    padding: 15px; /* Аккуратные отступы от краев рамки */
}
.vase-card .info { padding: 20px; display: flex; flex-direction: column; flex-grow: 1; }
.vase-card h4 { font-size: 20px; margin-bottom: 10px; }
.vase-card p { color: #777; margin-bottom: 15px; }
.vase-card .price { font-size: 24px; color: var(--primary); font-weight: 800; margin-top: auto; margin-bottom: 15px; }

/* Формы (Админка) */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 14px; }
.form-group input { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; font-family: inherit; }
.admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; background: white; border-radius: 8px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.admin-table th, .admin-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.admin-table th { background: var(--primary); color: white; }

/* Специальная зеленая кнопка для WhatsApp */
.btn-whatsapp { background: #25D366; border-color: #25D366; color: white; }
.btn-whatsapp:hover { background: #20bd5a; border-color: #20bd5a; }

/* Подвал */
footer { background: var(--primary); color: white; text-align: center; padding: 20px; margin-top: auto; }

/* Мобильная адаптация - ИСПРАВЛЕННАЯ ВЕРСИЯ */
@media (max-width: 768px) {
    .desktop-only {
        display: none !important;
    }
    .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 30px; }
    
    /* Делаем так, чтобы шапка аккуратно выстраивалась в столбик, ничего не скрывая */
    .navbar { flex-direction: column; gap: 15px; padding: 20px; }
    
    .nav-links { 
        display: flex; /* Возвращаем видимость */
        flex-direction: column; /* Выстраиваем ссылки и языки друг под другом */
        width: 100%; 
        text-align: center; 
        gap: 15px; 
    }
    
    .lang-switcher { 
        justify-content: center; 
        width: 100%; 
    }
}

/* --- ВСПЛЫВАЮЩЕЕ ОКНО (LIGHTBOX) ДЛЯ КАРТИНОК --- */
.modal-overlay {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Темный полупрозрачный фон */
    backdrop-filter: blur(4px); /* Размытие заднего фона для красоты */
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-image {
    max-width: 90%;
    max-height: 90vh; /* Занимает максимум 90% высоты экрана */
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    object-fit: contain;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.modal-overlay.show .modal-image {
    transform: scale(1); /* Анимация увеличения при открытии */
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: #d1bfee; /* Фиолетовый оттенок при наведении */
    transform: scale(1.1);
}

/* Делаем курсор-лупу при наведении на картинку в каталоге */
.vase-card img {
    cursor: zoom-in;
    transition: opacity 0.2s;
}

.vase-card img:hover {
    opacity: 0.9;
}