:root {
    --gold: #d4af37;
    --dark: #1a1a1a;
    --light: #f9f9f9;
}

body {
    margin: 0; font-family: 'Montserrat', sans-serif;
    background-color: var(--light); color: var(--dark);
    -webkit-tap-highlight-color: transparent;
}

header {
    padding: 30px 20px 10px;
    text-align: center;
    background: linear-gradient(to bottom, #ffffff, #fcfcfc);
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 600;
    letter-spacing: -1px;
    margin-bottom: 5px;
    background: linear-gradient(45deg, #1a1a1a, #4a4a4a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 0.7rem;
    letter-spacing: 2.5px;
    color: #888;
    font-weight: 400;
}

h1 { font-family: 'Playfair Display', serif; font-size: 2.2rem; margin: 0; }

.subtitle { font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; opacity: 0.6; margin-top: 5px; }

/* Поиск */
.search-box {
    padding: 10px 20px;
    background: white;
}

#searchInput {
    width: 100%;
    box-sizing: border-box;
    padding: 14px 20px;
    border-radius: 30px; /* Еще круглее */
    border: 1px solid #eee;
    background: #fdfdfd;
    font-size: 0.95rem;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
    transition: 0.3s;
}

#searchInput:focus {
    border-color: var(--gold);
    background: #fff;
    box-shadow: 0 5px 15px rgba(212,175,55,0.1);
}
/* Категории */
.categories-container { overflow-x: auto; margin-top: 15px; padding-bottom: 5px; }
.categories-container::-webkit-scrollbar { display: none; }
.categories-scroll { display: flex; gap: 8px; padding: 0 5px; }

.filter-btn {
    padding: 6px 14px; /* Чуть меньше падинги */
    border-radius: 12px; /* Более современная форма */
    font-size: 0.8rem;
    background: #f0f0f0;
    border: none;
    transition: 0.2s all ease;
}

.filter-btn.active {
    background: var(--gold); /* Подсветим золотым вместо черного */
    color: white;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

/* Сетка карточек */
.catalog {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; padding: 20px;
}

.card {
    background: white; border-radius: 15px; overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    animation: fadeIn 0.5s ease both;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.card img { width: 100%; height: 150px; object-fit: cover; }
.card-info { padding: 10px; }
.card-info h3 { margin: 0; font-family: 'Playfair Display', serif; font-size: 1.1rem; }
.card-info span { font-size: 0.7rem; color: var(--gold); font-weight: 600; text-transform: uppercase; }

.card-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 5px;
}

.card-tag {
    font-size: 0.65rem;
    background: #f0f0f0;
    color: #888;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: 0.2s;
}

.card-tag:hover {
    background: #e0e0e0;
    color: var(--dark);
}

/* Модалка */
.modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8); z-index: 100; backdrop-filter: blur(5px);
}
.modal-content {
    position: absolute; bottom: 0; background: white; width: 100%;
    border-radius: 30px 30px 0 0; padding: 25px; box-sizing: border-box;
    max-height: 85vh; overflow-y: auto;
}
/* кнопка закрытия */
.modal-close {
    position: absolute;
    top: 15px;
    left: 15px; /* Сдвинули чуть дальше от края */
    width: 36px;
    height: 36px;
    background: white; /* Чистый белый фон */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--dark);
    z-index: 1000; /* Самый высокий слой, чтобы всегда была сверху */
    box-shadow: 0 4px 12px rgba(0,0,0,0.15); /* Более мягкая тень */
}

/* Эффект при нажатии, чтобы чувствовался отклик */
.modal-close:active {
    transform: scale(0.9);
    background: #eee;
}

/* Этот класс будет запускать анимацию */
.animate-zoom {
    animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1); }
}
/* Кнопка сердечка на карточке */
.card-header {
    position: relative;
}

.fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: 0.3s;
    z-index: 2;
}

.fav-btn.active {
    color: #e74c3c;
    background: #fff;
}
/* Эффект для фото в списке */
.card-header {
    overflow: hidden; /* Чтобы картинка не вылезала за границы при увеличении */
}

.card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    transition: transform 0.5s ease; /* Плавность увеличения */
}

.card:active img {
    transform: scale(1.1); /* Увеличение на 10% при нажатии */
}
/* --- БЛОК КАМЕНЬ ДНЯ --- */
/* Контейнер камня дня */
#daily-stone-container {
    padding: 10px 20px;
    width: 100%;
    box-sizing: border-box;
}

.daily-card {
    position: relative;
    overflow: hidden; /* Важно: чтобы блик не вылетал за границы */
    background: white;
    border: 1.5px solid var(--gold);
    border-radius: 20px;
    padding: 10px 15px; /* Компактная высота */
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.1);
    
    /* Оставляем только пружину для самой карточки */
    animation: bounceCard 4s infinite ease-in-out;
}

/* Исправленный БЛИК — теперь он бегает ВНУТРИ карточки */
.daily-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%; /* Растягиваем на всю ширину */
    height: 100%;
    background: linear-gradient(
        to right, 
        rgba(255,255,255,0) 0%, 
        rgba(255,255,255,0.8) 50%, 
        rgba(255,255,255,0) 100%
    );
    transform: skewX(-25deg) translateX(-150%); /* Стартовая позиция за краем */
    animation: shine 4s infinite ease-in-out;
    pointer-events: none; /* Чтобы блик не мешал нажимать на карточку */
}

.daily-img {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    z-index: 1; /* Чтобы быть над бликом */
}

.daily-info {
    z-index: 1; /* Чтобы текст был над бликом */
    text-align: left;
}

.daily-info h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dark);
}

.daily-info p {
    margin: 2px 0 0;
    font-size: 0.7rem;
    color: #888;
}

/* --- ИСПРАВЛЕННЫЕ АНИМАЦИИ --- */

/* Блик теперь двигает только фон ::after, а не всю карточку */
@keyframes shine {
    0%, 20% { 
        transform: skewX(-25deg) translateX(-150%); 
    }
    40%, 100% { 
        transform: skewX(-25deg) translateX(150%); 
    }
}
/* Карточка просто слегка пружинит на месте */
@keyframes bounceCard {
    0%, 25%, 45%, 100% { 
        transform: scale(1); 
    }
    35% { 
        transform: scale(0.97); /* Чуть меньше */
    }
    40% { 
        transform: scale(1.02); /* Пружина */
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px); /* Эффект матового стекла */
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-bottom: env(safe-area-inset-bottom); /* Учет выреза на iPhone */
    z-index: 10;
}

.nav-item {
    text-align: center;
    color: #888;
    transition: 0.3s;
}

.nav-item span { font-size: 20px; }
.nav-item p { margin: 0; font-size: 10px; text-transform: uppercase; font-weight: 600; }

.nav-item.active {
    color: var(--dark);
    transform: translateY(-5px);
}
/* Добавим отступ снизу для каталога, чтобы меню его не закрывало */
body { padding-bottom: 80px; }
