:root {
    --primary: #2c5f2d;
    --secondary: #97bc62;
    --dark: #1a3a1a;
    --light: #f5f5f0;
}

body {
    background-color: var(--light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Отступ для мобильного бара */
@media (max-width: 767px) {
    body {
        padding-bottom: 70px;
    }
}

/* Навигация */
.navbar-custom {
    background: linear-gradient(135deg, var(--primary), var(--dark));
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar-custom .nav-link, 
.navbar-custom .navbar-brand {
    color: white !important;
}

/* Хлебные крошки */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 20px;
}

.breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    text-decoration: underline;
}

/* Hero секция */
.hero-vinyl {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('https://images.unsplash.com/photo-1581858726788-75bc0f6a952d?w=1200');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    border-radius: 0 0 20px 20px;
}

/* Карточки товаров */
.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s;
    margin-bottom: 5px;
    height: 100%;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.product-card .product-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.product-card .product-info {
    padding: 12px;
    line-height: 1.2;
}

.product-card .product-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    line-height: 1.3;
    min-height: 36px;
}

.product-card .product-collection {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 6px;
    line-height: 1.2;
}

.product-card .product-price {
    margin-bottom: 8px;
    line-height: 1.2;
}

.product-card .btn-buy {
    padding: 6px;
    font-size: 12px;
    line-height: 1.2;
}

.product-card .product-price .current-price {
    font-size: 18px;
}

/* Бейджи акций */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff4757;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.product-badge.sale {
    background: #ff6b35;
}

.product-badge.discount-percent {
    top: 50px;
    background: #ff4757;
    font-size: 14px;
    padding: 4px 10px;
}

@media (max-width: 768px) {
    .product-card .product-image {
        height: 180px;
    }
    .product-badge.discount-percent {
        top: 45px;
        font-size: 11px;
        padding: 3px 8px;
    }
}

/* Цены */
.product-price {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.product-price .current-price {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary);
}

.product-price .old-price {
    font-size: 14px;
    font-weight: normal;
    color: #999;
    text-decoration: line-through;
}

.product-price .discount-badge {
    font-size: 11px;
    font-weight: bold;
    background: #ff4757;
    color: white;
    padding: 2px 8px;
    border-radius: 20px;
}

@media (max-width: 768px) {
    .product-price .current-price {
        font-size: 18px;
    }
}

/* Кнопки */
.btn-buy {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-buy:hover {
    background: var(--dark);
    transform: scale(1.02);
}

/* Кнопка избранного */
.favorite-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 20;
    transition: all 0.3s;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn i {
    font-size: 18px;
    color: #ff4757;
}

/* Стили для активной кнопки избранного */
.add-to-favorites i.bi-heart-fill,
.favorite-btn i.bi-heart-fill,
.add-to-favorites i[style*="color"],
.favorite-btn i[style*="color"] {
    color: #dc3545 !important;
}

/* Фильтр-сайдбар */
.filter-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    position: sticky;
    top: 80px;
}

.filter-section {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.filter-section h6 {
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--dark);
    cursor: pointer;
}

.filter-options {
    max-height: 200px;
    overflow-y: auto;
}

/* Чекбоксы */
.form-check {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    border: 2px solid #2c5f2d !important;
    border-radius: 4px !important;
}

.form-check-input:checked {
    background-color: #2c5f2d !important;
}

.form-check-label {
    font-size: 14px;
    cursor: pointer;
}

/* Ползунок цен */
.price-slider {
    margin: 20px 0;
}

.price-inputs {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.price-inputs input {
    flex: 1;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
}

/* noUiSlider */
.noUi-target {
    background: #e8e8e8;
    border-radius: 10px;
    border: none;
    height: 4px;
}

.noUi-connect {
    background: var(--primary);
}

.noUi-handle {
    width: 14px !important;
    height: 14px !important;
    border-radius: 50% !important;
    background: white;
    border: 2px solid var(--primary) !important;
    right: -7px !important;
    top: -5px !important;
}

.noUi-handle:before,
.noUi-handle:after {
    display: none;
}

/* Страница товара */
.product-detail {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.product-detail-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
}

/* Галерея */
#thumbnails {
    overflow-x: auto;
    display: flex;
    gap: 8px;
    scrollbar-width: none;
}

#thumbnails::-webkit-scrollbar {
    display: none;
}

.thumb-item {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
}

.thumb-item.active {
    border-color: var(--primary);
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Десктоп */
.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: white;
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 15px;
}

/* Блок картинка + текст — фиксированная ширина, не растягивается */
.cart-item-info {
    display: flex;
    gap: 15px;
    align-items: center;
    width: 40%;
}

.cart-item-image {
    width: 100px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.cart-item-details {
    flex: 1;
}

.cart-item-details h6 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.cart-item-price,
.cart-item-pack {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

/* Блок количества */
.cart-item-quantity {
    width: 180px;
    text-align: center;
    white-space: nowrap;
}

/* Блок суммы */
.cart-item-total {
    text-align: right;
    min-width: 150px;
}

.cart-item-sum {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary);
    margin-bottom: 5px;
}

.btn-qty {
    background: #e9ecef;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.btn-remove {
    background: none;
    border: none;
    color: #dc3545;
    text-decoration: underline;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Мобильная версия */
@media (max-width: 768px) {
    .cart-item {
        flex-wrap: wrap;
        gap: 12px;
    }

    .cart-item-info {
        width: 100%;
    }

    .cart-item-quantity {
        width: auto;
        text-align: left;
    }

    .cart-item-total {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
        text-align: left;
    }

    .cart-item-sum {
        margin-bottom: 0;
    }
}
/* Подвал */
footer {
    background: var(--dark);
    color: white;
    margin-top: 50px;
    padding: 40px 0 20px;
}

footer a {
    transition: all 0.3s ease;
}

footer a:hover {
    color: white !important;
    text-decoration: underline !important;
}

footer h5 {
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 10px;
    position: relative;
}

footer h5::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary);
}

/* Мобильный бар */
.fixed-bottom {
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    z-index: 1000;
}

.fixed-bottom .col-3 a {
    font-size: 12px;
}

.fixed-bottom .col-3 i {
    font-size: 20px;
}

/* Ссылка на товар */
.product-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Отступы между секциями на главной */
.home-section {
    margin-bottom: 2rem;
}

.home-section:last-child {
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .home-section {
        margin-bottom: 1.5rem;
    }
}

/* Карточки в каталоге — 2 в ряд на планшетах */
@media (max-width: 991px) {
    .catalog-products .col-md-6 {
        width: 50%;
    }
}

/* Мобильная адаптация */
@media (max-width: 767px) {
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
    
    .navbar-brand {
        font-size: 18px;
    }
    
    .hero-vinyl {
        padding: 40px 0;
        margin-bottom: 20px;
    }
    
    .hero-vinyl h1 {
        font-size: 24px;
    }
    
    .breadcrumb {
        font-size: 11px;
        flex-wrap: wrap;
    }
    
    .filter-sidebar {
        position: static;
        margin-bottom: 20px;
        display: none;
    }
    
    .filter-sidebar.show {
        display: block;
    }
    
    .product-detail {
        padding: 15px;
    }
    
    .catalog-products .col-md-6 {
        width: 100%;
    }
    
    .cart-item {
        flex-direction: column;
        text-align: center;
    }
    
    .thumb-item {
        width: 55px;
        height: 55px;
    }
}

@media (max-width: 480px) { 
    .product-title {
        font-size: 14px;
    }
    
    .breadcrumb {
        font-size: 10px;
    }
}
input[type="checkbox"] {
    appearance: auto !important;
    -webkit-appearance: checkbox !important;
}
/* Принудительное отображение иконки VK в футере */
footer .bi-vk {
    display: inline-block !important;
    font-size: 1.25rem !important;
    width: auto !important;
    height: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Убедимся, что родительская ссылка не скрывает */
footer .text-white-50 {
    display: inline-block !important;
}
.calculator-card .btn-outline-success {
    background-color: transparent;
    border-color: #198754;
    color: #198754;
}

.calculator-card .btn-outline-success:hover {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

@media (max-width: 768px) {
    .calculator-card .row.g-2 {
        flex-direction: column;
        gap: 10px !important;
    }
    .calculator-card .row.g-2 .col-6 {
        width: 100%;
    }
    .calculator-card .btn-outline-success {
        padding: 10px 20px;
        font-size: 1.3rem;
    }
    .calculator-card .form-control {
        font-size: 1.1rem;
        padding: 10px;
        height: auto;
    }
    .calculator-card .input-group-sm > .form-control {
        font-size: 1.1rem;
        padding: 10px;
    }
    /* Поле ввода площади */
    .calculator-card #roomArea {
        font-size: 1.1rem;
        padding: 10px;
        height: auto;
    }
    /* Метки и текст */
    .calculator-card .form-label,
    .calculator-card .small,
    .calculator-card .alert {
        font-size: 0.9rem;
    }
}