/* Основные стили */
.hero-section {
    margin-top: 8rem;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-title {
    color: #602c07;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 1.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #602c07;
    border-radius: 3px;
}

.section-title i {
    margin-right: 0.5rem;
}

/* Карусель */
.carousel-caption {
    bottom: 3rem;
    left: 5%;
    right: 5%;
}

.carousel-item img {
    height: 500px;
    object-fit: cover;
    filter: brightness(0.9);
}

.carousel-control-prev, .carousel-control-next {
    width: 5%;
}

/* Кнопка "Все товары" (обновленный стиль как у кнопки "В корзину") */
.btn-all-products {
    border-color: #dee2e6;
    color: #495057;
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    border-radius: 6px;
    background-color: #f8f9fa;
}

.btn-all-products:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    color: #495057;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-all-products i {
    transition: transform 0.3s ease;
    margin-left: 0.5rem;
}

.btn-all-products:hover i {
    transform: translateX(3px);
}

/* Карточки товаров */
.product-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    background: white;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(96, 44, 7, 0.2);
}

.product-card .card-img-top {
    height: 250px;
    object-fit: contain;
    background: #f9f9f9;
    transition: transform 0.3s ease;
    padding: 15px;
}

.product-card:hover .card-img-top {
    transform: scale(1.05);
}

.product-card .card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
    min-height: 50px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-card .card-text {
    color: #602c07;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Бейджи статусов */
.product-card .badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.3rem;
}

.badge-new {
    background-color: #28a745;
    color: white;
}

.badge-sale {
    background-color: #dc3545;
    color: white;
}

.badge-hit {
    background-color: #fd7e14;
    color: white;
}

/* Кнопки карточки товара */
.product-card .btn {
    transition: all 0.2s ease;
    font-weight: 500;
    margin-bottom: 0.5rem;
    width: 100%;
    border-radius: 6px;
}

.product-card .btn-primary {
    background-color: #602c07;
    border-color: #602c07;
}

.product-card .btn-primary:hover {
    background-color: #4a2305;
    border-color: #4a2305;
    transform: translateY(-2px);
}

.product-card .btn-outline-secondary {
    border-color: #dee2e6;
    color: #495057;
    background-color: #f8f9fa;
}

.product-card .btn-outline-secondary:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
}

/* Кнопка состава */
.btn-composition {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: white;
}

.btn-composition:hover {
    background-color: #e67312;
    border-color: #e67312;
    color: white;
    transform: translateY(-2px);
}

/* Счетчик количества */
.quantity-control {
    display: flex;
    margin: 0 auto 15px;
    width: 100%;
    max-width: 180px;
    height: 42px;
}

.quantity-btn {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    padding: 0;
    border: 1px solid #dee2e6;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s;
    color: #495057;
    flex-shrink: 0;
    user-select: none;
}

.quantity-btn:first-child {
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.quantity-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

.quantity-input {
    flex-grow: 1;
    min-width: 50px;
    height: 42px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #dee2e6;
    border-left: none;
    border-right: none;
    padding: 0;
    -moz-appearance: textfield;
    outline: none;
    font-size: 1rem;
}

.quantity-input:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

.quantity-input::-webkit-outer-spin-button,
.quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Карточки категорий */
.category-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
    background: white;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: rgba(96, 44, 7, 0.2);
}

.category-card .card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex-grow: 1;
}

.category-icon {
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(96, 44, 7, 0.1);
    border-radius: 50%;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    aspect-ratio: 1/1;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
    background-color: rgba(96, 44, 7, 0.2);
}

.category-icon i {
    font-size: 1.75rem;
    color: #602c07;
}

.category-card .card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.category-card .card-text {
    color: #6c757d;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/* Стили для кнопок в категориях */
.category-card .btn {
    background-color: #602c07;
    border-color: #602c07;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
    border-radius: 6px;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-card .btn:hover {
    background-color: #4a2305;
    border-color: #4a2305;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(96, 44, 7, 0.2);
}

.category-card .btn i {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.category-card .btn:hover i {
    transform: translateX(3px);
}

/* Блок преимуществ */
.advantages {
    position: relative;
    overflow: hidden;
    background: url('../images/fon/pattern.png') repeat;
}


.max-w-800 {
    max-width: 800px;
}

.advantage-card {
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid rgba(96, 44, 7, 0.1);
    background: white;
    z-index: 1;
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(96, 44, 7, 0.1) !important;
    border-color: rgba(96, 44, 7, 0.2);
}

.advantage-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background-color: rgba(96, 44, 7, 0.1);
    color: #602c07;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.advantage-card:hover .advantage-icon {
    background-color: rgba(96, 44, 7, 0.2) !important;
    transform: scale(1.1);
}

.advantage-card h4 {
    color: #602c07;
    font-weight: 600;
    margin-bottom: 1rem;
}

.advantage-card p {
    color: #495057;
}

/* Стили для заголовка преимуществ */
.advantages .section-title {
    color: #602c07;
    font-weight: 700;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 0;
}

.advantages .section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #602c07;
    border-radius: 3px;
}

.advantages .section-title i {
    margin-right: 0.5rem;
    color: #602c07;
}

/* Модальные окна */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #602c07;
    color: white;
    border-radius: 10px 10px 0 0;
    padding: 1rem 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

/* Список состава */
.composition-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.composition-list li {
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
}

.composition-list li:before {
    content: "•";
    color: #fd7e14;
    font-weight: bold;
    font-size: 1.2rem;
    margin-right: 1rem;
}

.composition-list li:hover {
    background-color: #e9ecef;
    transform: translateX(5px);
}

/* Адаптивность */
@media (max-width: 1199.98px) {
    .product-card .card-img-top {
        height: 180px;
    }
    
    .category-icon {
        width: 60px;
        height: 60px;
    }
    
    .category-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 991.98px) {
    .product-card .card-img-top {
        height: 160px;
    }
    
    .col-md-6.col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        margin-top: 7rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .carousel-item img {
        height: 300px;
    }
    
    .product-card .card-img-top {
        height: 140px;
    }
    
    .product-card .card-title,
    .category-card .card-title {
        font-size: 1rem;
    }
    
    .quantity-control {
        max-width: 150px;
        height: 38px;
    }
    
    .quantity-btn {
        width: 38px;
        height: 38px;
    }
    
    .quantity-input {
        height: 38px;
    }
    
    .category-icon {
        width: 70px;
        height: 70px;
    }
    
    /* Адаптивность блока преимуществ */
    .advantages {
        padding: 2rem 0;
    }
    
    .advantage-card {
        padding: 1.5rem;
    }
    
    .advantage-icon {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 575.98px) {
    .col-md-6.col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .product-card .card-img-top {
        height: 180px;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
    
    .category-icon {
        width: 80px;
        height: 80px;
    }
    
    .category-icon i {
        font-size: 1.75rem;
    }
}

@media (max-width: 400px) {
    .quantity-control {
        max-width: 130px;
        height: 34px;
    }
    
    .quantity-btn {
        width: 34px;
        height: 34px;
    }
    
    .quantity-input {
        height: 34px;
        font-size: 0.85rem;
    }
}