:root {
    --primary-dark: #1a1a2e;
    --primary-light: #16213e;
    --accent-gold: #d4af37;
    --accent-gold-light: #f1e5ac;
    --text-light: #f8f9fa;
    --text-muted: #6c757d;
}

/* Полностью переделанная система фона */

/* Убираем ВСЕ старые background у body */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f8f9fa;
    color: #212529;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: none !important;
}

/* Создаем отдельный фиксированный слой */
.fixed-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -2;
    pointer-events: none; /* Чтобы не мешать кликам по кнопкам */
}

.fixed-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/static/images/backgroundimage.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .fixed-background::before {
        background-image: url('/static/images/imagemobile.jpg');
    }
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-dark);
}

.text-gold {
    color: var(--accent-gold);
}

.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-link {
    position: relative;
    color: var(--text-light) !important;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
    transition: all 0.2s;
    color: var(--text-light) !important;
}

.dropdown-item:hover {
    background-color: rgba(212, 175, 55, 0.1) !important;
    color: var(--accent-gold) !important;
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgb(241, 19, 19);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: rgb(241, 19, 19);
}

.custom-shadow {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.custom-shadow:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.card {
    border: none;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.product_id {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.badge.bg-warning.text-dark {
    /* position: absolute; */
    top: 15px;
    right: 15px;
    z-index: 1;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    background-color: var(--accent-gold) !important;
    color: var(--primary-dark) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.custom-image {
    height: 400px;
    width: 100%;
    object-fit: contain;
    object-position: center;
    background-color: #0c76e0;
    padding: 20px;
}

/* Кнопка корзины */
.cart-fixed-wrapper {
    position: fixed;
    right: 30px;
    top: 100px;
    z-index: 1050;
    opacity: 0;
    transition: all 0.3s ease;
}

.cart-fixed-button {
    padding: 12px 20px;
    border-radius: 50px;
    background-color: var(--primary-dark);
    color: white;
    border: 2px solid var(--accent-gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.cart-fixed-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    background-color: var(--accent-gold);
    color: var(--primary-dark);
}

#goods-in-cart-count {
    background-color: #e63946 !important;
}

/* Формы */
.form-control {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 12px;
    transition: all 0.3s;
}

.form-control:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.btn-dark {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-dark:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
}

/* Адаптация для мобильных */
@media (max-width: 992px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .cart-fixed-wrapper {
        right: 15px;
        bottom: 15px;
        top: auto;
    }
    
    .cart-fixed-button {
        padding: 15px;
        width: 60px;
        height: 60px;
        justify-content: center;
    }
    
    .cart-fixed-button span {
        display: none;
    }
}

@media (max-width: 768px) {
    .dropdown-menu {
        width: 100%;
    }
    
    .custom-image {
        height: 300px;
    }
}

/* Добавьте в ваш CSS файл */
.accordion-collapse {
    transition: height 0.3s ease;
}

.table-responsive {
    overflow: visible; /* или auto, но не hidden */
}


/* Стили для куки-уведомления */
.cookie-consent {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    border: 1px solid #e0e0e0;
    animation: slideInUp 0.5s ease-out;
}

.cookie-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-text h6 {
    color: var(--primary-dark);
    margin-bottom: 8px;
    font-weight: 600;
}

.cookie-text p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0;
    color: #666;
}

.cookie-text a {
    color: var(--accent-gold);
    text-decoration: none;
}

.cookie-text a:hover {
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.cookie-actions .btn {
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 0.85rem;
}

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

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .cookie-consent {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .cookie-content {
        padding: 15px;
    }
    
    .cookie-actions {
        flex-direction: column;
    }
}

/* Стили для обязательного согласия в формах */
.form-check-input:required:invalid {
    border-color: #dc3545;
}

.form-check-input:required:valid {
    border-color: #198754;
}

/* Стили для кнопки VK - общие */
.btn-vk-top, .btn-vk-bottom {
    transition: all 0.3s ease !important;
    font-weight: 500 !important;
}

.btn-vk-top:hover, .btn-vk-bottom:hover {
    transform: translateY(-2px) !important;
    background-color: #3a5a80 !important;
    box-shadow: 0 4px 12px rgba(74, 118, 168, 0.3) !important;
}

/* Для мобильных устройств */
@media (max-width: 768px) {
    .btn-vk-top span, .btn-vk-bottom span {
        font-size: 0.9rem;
    }
    
    .w-md-auto {
        width: auto !important;
    }
}

@media (max-width: 576px) {
    .btn-vk-top, .btn-vk-bottom {
        width: 100% !important;
        justify-content: center !important;
    }
}