/* Основные стили для списка товаров */
.products-list {
    padding-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;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: #602c07;
    border-radius: 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;
}

.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);
}

.card-body {
    padding: 1.25rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.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;
}

.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%;
}

.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: #ddd;
    color: #495057;
}

.product-card .btn-outline-secondary:hover {
    background-color: #f8f9fa;
    border-color: #ddd;
}

/* Стили для кнопки состава */
.btn-composition {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: white;
}

.btn-composition:hover {
    background-color: #e67312;
    border-color: #e67312;
    color: white;
    transform: translateY(-2px);
}

/* Иконки в кнопках */
.btn i {
    font-size: 0.9em;
    vertical-align: middle;
}

/* Стили для списка состава */
.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);
}

/* Стили для счетчика количества */
.product-card .quantity-control {
    display: flex;
    margin: 0 auto 15px;
    width: 100%;
    max-width: 180px;
    height: 42px;
}

.product-card .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;
}

.product-card .quantity-btn:first-child {
    border-radius: 6px 0 0 6px;
    border-right: none;
}

.product-card .quantity-btn:last-child {
    border-radius: 0 6px 6px 0;
    border-left: none;
}

.product-card .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;
}

.product-card .quantity-input:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

.product-card .quantity-input::-webkit-outer-spin-button,
.product-card .quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Анимации при наведении */
.product-card .add-to-cart:hover {
    background-color: #602c07;
    color: white;
    border-color: #602c07;
}

/* Адаптивные стили */
@media (max-width: 1199.98px) {
    .product-card .card-img-top {
        height: 180px;
    }
}

@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) {
    .section-title {
        font-size: 1.5rem;
    }
    
    .product-card .card-img-top {
        height: 140px;
        padding: 10px;
    }
    
    .product-card .card-title {
        font-size: 1rem;
        min-height: 40px;
    }
    
    .product-card .card-text {
        font-size: 1rem;
    }
    
    .product-card .btn {
        font-size: 0.85rem;
        padding: 0.5rem;
    }
    
    .product-card .quantity-control {
        max-width: 150px;
        height: 38px;
    }
    
    .product-card .quantity-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
    }
    
    .product-card .quantity-input {
        height: 38px;
        font-size: 0.9rem;
    }
}

@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;
    }
    
    .product-card .quantity-control {
        max-width: 140px;
        height: 36px;
    }
    
    .product-card .quantity-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
    
    .product-card .quantity-input {
        height: 36px;
        min-width: 40px;
    }
}

@media (max-width: 400px) {
    .product-card .quantity-control {
        max-width: 130px;
        height: 34px;
    }
    
    .product-card .quantity-btn {
        width: 34px;
        height: 34px;
    }
    
    .product-card .quantity-input {
        height: 34px;
        font-size: 0.85rem;
    }
}

/* Модальное окно состава */
.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;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

/* Стили для модального окна уведомлений */
#notificationModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    background-color: #f8f9fa;
}

#notificationModal .modal-body {
    padding: 2rem;
}

#notificationModal .bi {
    display: block;
    margin: 0 auto 1rem;
}

#notificationModal p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Анимация появления/исчезновения уведомления */
#notificationModal.fade .modal-dialog {
    transition: transform 0.3s ease-out, opacity 0.3s ease;
    transform: translateY(-20px);
    opacity: 0;
}

#notificationModal.show .modal-dialog {
    transform: translateY(0);
    opacity: 1;
}