/* Общие стили для таблицы */
.table td, .table th {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #ddd;
}

.table th {
    text-align: center;
}

.table td {
    text-align: center;
}

/* Стили для формы изменения количества */
.update-quantity-form .input-group {
    width: 120px;
    margin: 0 auto;
}

.update-quantity-form .quantity-input {
    width: 40px;
    text-align: center;
    padding: 0.25rem;
}

.update-quantity-form .btn-decrease,
.update-quantity-form .btn-increase {
    padding: 0.25rem 0.5rem;
    min-width: 30px;
}

/* Стили для кнопок корзины */
.btn_cart {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    padding: 10px 0;
}

.btn_cart .btn {
    min-width: 200px; /* Фиксированная минимальная ширина */
    padding: 10px 20px;
    text-align: center;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    white-space: nowrap; /* Запрет переноса текста */
    flex: 1; /* Равномерное распределение ширины */
    max-width: 250px; /* Максимальная ширина */
}

.btn_cart .btn-secondary {
    background-color: #6c757d;
    border: none;
    color: white;
}

.btn_cart .btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn_cart .btn-primary {
    background-color: #0d6efd;
    border: none;
    color: white;
}

.btn_cart .btn-primary:hover:not(:disabled) {
    background-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn_cart .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .update-quantity-form .input-group {
        width: 100px;
    }

    .update-quantity-form .quantity-input {
        width: 30px;
    }

    .btn_cart {
        flex-direction: column;
        gap: 8px;
    }

    .btn_cart .btn {
        min-width: 100%;
        max-width: 100%;
    }
}

/* Для очень маленьких экранов */
@media (max-width: 400px) {
    .table td, .table th {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .btn_cart .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}