/* Основной цвет: #442244 */
:root {
    --main-color: #442244;
    --main-color-light: #663366;
    --main-color-dark: #331133;
    --accent-color: #ff6b9c;
    --text-light: #f8f9fa;
}

/* 1. Новая цветовая схема */
.navbar-dark.bg-dark,
.bg-dark {
    background-color: var(--main-color) !important;
    border: none;
}

.navbar-dark .navbar-nav .nav-link {
    color: var(--text-light) !important;
    transition: all 0.3s ease;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--accent-color) !important;
    transform: translateY(-1px);
}

/* 2. Корзина */
.cart-link {
    position: relative;
    transition: all 0.3s ease;
}

.cart-link:hover {
    color: var(--text-light) !important;
    background-color: var(--main-color-light);
    border-radius: 20px;
    padding: 8px 16px;
    transform: translateY(-2px);
}

/* 3. Хлебные крошки */
.breadcrumb {
    list-style: none;
    padding-left: 0;
    background: transparent;
    margin-bottom: 2rem;
}

.breadcrumb-item::before {
    display: none !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--main-color);
    padding: 0 12px;
    font-weight: 300;
}

.breadcrumb-item a {
    color: var(--main-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: var(--accent-color);
}

.breadcrumb-item.active {
    color: var(--main-color-dark);
    font-weight: 500;
}

/* 4. Изображения в блоге */
.article-content img,
.blog-content img {
    max-width: 40% !important;
    height: auto !important;
    margin: 25px auto;
    display: block;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(68, 34, 68, 0.15);
    transition: all 0.4s ease;
    border: 3px solid transparent;
}

.article-content img:hover,
.blog-content img:hover {
    transform: scale(1.03);
    box-shadow: 0 12px 35px rgba(68, 34, 68, 0.25);
    border-color: var(--main-color-light);
}

/* 5. Мобильное меню */
@media (max-width: 768px) {
    .navbar-collapse {
        background: var(--main-color-dark);
        padding: 20px;
        margin-top: 10px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    
    .navbar-toggler {
        border: 2px solid var(--text-light);
        border-radius: 8px;
    }
    
    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }
}

/* 6. Элегантная типографика */
body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.7;
    color: #2d3748;
    font-weight: 400;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1.2rem;
    color: var(--main-color-dark);
}

h1 {
    font-size: 2.8rem;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    color: #4a5568;
    line-height: 1.6;
}

/* 7. Кнопки в стиле сайта */
.btn-primary {
    background-color: var(--main-color);
    border-color: var(--main-color);
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--main-color-light);
    border-color: var(--main-color-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(68, 34, 68, 0.3);
}

.btn-outline-primary {
    color: var(--main-color);
    border-color: var(--main-color);
    border-radius: 25px;
    padding: 10px 25px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--main-color);
    border-color: var(--main-color);
    transform: translateY(-2px);
}

/* 8. Карточки */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(68, 34, 68, 0.08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(68, 34, 68, 0.15);
}

/* 9. Футер */
footer {
    background-color: var(--main-color) !important;
    color: var(--text-light);
    margin-top: 4rem;
    padding: 3rem 0 !important;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--text-light);
}

/* 10. Анимации */
.fade-in {
    /* animation: fadeIn 0.8s ease-in-out; */
}

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

.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
}

/* Градиент для заголовка Наши продукты */
.section-title {
    font-size: 2.5rem;
    background: linear-gradient(135deg, var(--main-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 2rem;
    text-align: center;
}

/* Стили для кнопок категорий продуктов */
.tab-btn {
    padding: 12px 24px;
    border: 2px solid var(--main-color);
    background: white;
    color: var(--main-color);
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 5px;
}

.tab-btn:hover {
    background: var(--main-color-light);
    color: white;
    border-color: var(--main-color-light);
}

.tab-btn.active {
    background: var(--main-color);
    color: white;
    border-color: var(--main-color);
}

/* Отключаем анимации для навигации и заголовков */
.navbar-brand,
.section-title {
    animation: none !important;
    transition: none !important;
    transform: none !important;
}

/* Стили для чат-бота Ирины */
.irina-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 25px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

#irina-chat-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
}

.irina-chat-header {
    background: var(--main-color);
    color: white;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.irina-avatar {
    font-size: 24px;
    margin-right: 10px;
}

.irina-info h6 {
    margin: 0;
    font-weight: 600;
}

.irina-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.irina-input-container {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 0 0 15px 15px;
}

.irina-input-container input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
}

.irina-input-container input:focus {
    border-color: var(--main-color);
}

.message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background: var(--main-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background: white;
    border: 1px solid #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    padding: 0 10px;
    justify-content: center;
}

/* Улучшенные стили для чат-бота Ирины */
.irina-toggle-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    border-radius: 25px;
    padding: 12px 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    background: linear-gradient(135deg, var(--main-color) 0%, var(--accent-color) 100%);
    border: none;
    font-weight: 600;
}

.irina-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.irina-toggle-btn i {
    color: white !important;
}

#irina-chat-container {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    z-index: 10000; /* Очень высокий z-index */
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
}

.irina-chat-header {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--accent-color) 100%);
    color: white;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.irina-chat-header h6 {
    color: white !important;
    font-weight: 600;
}

.irina-chat-header small {
    color: rgba(255,255,255,0.9) !important;
}

.irina-avatar {
    font-size: 24px;
    margin-right: 10px;
    color: white;
}

#irina-close {
    color: white !important;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#irina-close:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

.irina-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #f8f9fa;
}

.irina-input-container {
    padding: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    background: white;
    border-radius: 0 0 15px 15px;
}

.irina-input-container input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 10px 15px;
    outline: none;
}

.irina-input-container input:focus {
    border-color: var(--main-color);
}

.irina-input-container button {
    border-radius: 20px;
    padding: 10px 15px;
}

.message {
    margin-bottom: 10px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.user-message {
    background: var(--main-color);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 5px;
}

.bot-message {
    background: white;
    border: 1px solid #e0e0e0;
    margin-right: auto;
    border-bottom-left-radius: 5px;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #ccc;
    border-radius: 50%;
    animation: typing-bounce 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) { animation-delay: -0.32s; }
.typing-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes typing-bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

.quick-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
    padding: 0 10px;
    justify-content: center;
}

/* Кнопка "Наверх" */
.scroll-to-top-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(68, 34, 68, 0.8); /* --main-color с прозрачностью */
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.scroll-to-top-btn:hover {
    background: rgba(68, 34, 68, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.scroll-to-top-btn.show {
    display: flex;
}

/* На мобильных устройствах - увеличиваем кнопку */
@media (max-width: 768px) {
    .scroll-to-top-btn {
        width: 60px;
        height: 60px;
        bottom: 90px;
        right: 15px;
        font-size: 20px;
    }
    
    /* Сдвигаем кнопку Ирины выше чтобы не перекрывались */
    .irina-toggle-btn {
        bottom: 160px;
    }
    
    #irina-chat-container {
        bottom: 170px;
    }
}

/* Обновленные стили кнопки "Наверх" - серый полупрозрачный */
.scroll-to-top-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: rgba(128, 128, 128, 0.7); /* Серый полупрозрачный */
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.scroll-to-top-btn:hover {
    background: rgba(128, 128, 128, 0.9);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    border-color: white;
}

.scroll-to-top-btn.show {
    display: flex;
}

/* На мобильных устройствах - увеличиваем кнопку */
@media (max-width: 768px) {
    .scroll-to-top-btn {
        width: 60px;
        height: 60px;
        bottom: 90px;
        right: 15px;
        font-size: 20px;
    }
    
    /* Сдвигаем кнопку Ирины выше чтобы не перекрывались */
    .irina-toggle-btn {
        bottom: 160px;
    }
    
    #irina-chat-container {
        bottom: 170px;
    }
}

/* Стили для кнопок товаров */
.buy-btn {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-outline-primary {
    border-color: var(--main-color);
    color: var(--main-color);
}

.btn-outline-primary:hover {
    background: var(--main-color);
    color: white;
}

/* Стили для кнопок товаров на главной */
.buy-btn {
    background: linear-gradient(135deg, var(--main-color) 0%, var(--accent-color) 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.buy-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Стили для кнопок в разделе продуктов */
.details-btn {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.details-btn:hover {
    background: #0056b3;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.buy-btn {
    background: linear-gradient(135deg, #442244 0%, #ff6b9c 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

/* Красивые кнопки для товаров */
.buy-btn {
    background: linear-gradient(135deg, #442244 0%, #ff6b9c 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.buy-btn.disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.details-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.details-btn:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    color: white;
    text-decoration: none;
}

/* ===== СТИЛЬНЫЕ КАРТОЧКИ ТОВАРОВ ===== */
.products-container {
    padding: 2rem 0;
}

.page-description {
    color: #6c757d;
    font-size: 1.1rem;
    margin-bottom: 3rem;
    text-align: center;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
    border: none;
    border-radius: 20px;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.08),
        0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.product-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.15),
        0 8px 16px rgba(0, 0, 0, 0.1);
}

.product-card:hover::before {
    transform: scaleX(1);
}

.product-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
    border-radius: 16px 16px 0 0;
}

.product-card:hover .product-image {
    transform: scale(1.05);
}

.no-image {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    font-size: 1.5rem;
    border-radius: 16px 16px 0 0;
}

.product-card .card-body {
    padding: 1.5rem;
    background: transparent;
}

.product-card .card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.product-card .card-text {
    color: #718096;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 1rem;
}

.product-price .currency {
    color: #667eea;
    font-weight: 600;
}

.add-to-cart-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
    color: white;
    position: relative;
    overflow: hidden;
}

.add-to-cart-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.add-to-cart-btn:hover::before {
    left: 100%;
}

.add-to-cart-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Адаптивность */
@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .product-card:hover {
        transform: translateY(-5px);
    }
}

/* Анимация появления карточек */
@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.product-card {
    animation: cardAppear 0.6s ease-out;
}

.product-card:nth-child(2) { animation-delay: 0.1s; }
.product-card:nth-child(3) { animation-delay: 0.2s; }
.product-card:nth-child(4) { animation-delay: 0.3s; }
.product-card:nth-child(5) { animation-delay: 0.4s; }
.product-card:nth-child(6) { animation-delay: 0.5s; }

/* Исправления для карточек товаров */
.products-grid {
    display: contents; /* Убираем старую сетку */
}

.product-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.product-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card .card-text {
    flex-grow: 1;
}

/* Улучшаем отображение на мобильных */
@media (max-width: 576px) {
    .col-sm-12 {
        margin-bottom: 1.5rem;
    }
    
    .product-card {
        margin: 0 0.5rem;
    }
}

/* Убираем анимацию появления если мешает */
.product-card {
    animation: none;
}
