* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f8f9fa;
    color: #333;
    padding: 20px;
    line-height: 1.6;
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 24px;
    box-shadow: none;
}

h1 {
    text-align: center;
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 12px;
    font-weight: 600;
}

a,
a:link,
a:visited,
a:hover,
a:active,
a:focus {
    text-decoration: none;
    color: #3496B2;
    cursor: pointer;
}

/* Опционально: изменение цвета при наведении (без подчеркивания) */
a:hover {
    color: red;
}

p { text-indent: 8px;}

.subtitle {
    text-align: center;
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0;
    font-size: 0.95rem;
    white-space: nowrap;
}

.category-select {
    width: 400px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    background: white;
}

.quantity-input {
    width: 80px;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.95rem;
    text-align: right;
    background: white;
}

/* Изображение слева */
.image-col {
    float: left;
    width: 100px;
    height: 100px;
    background-color: #e0e0e0;
    margin-right: 20px;
    margin-top: 20px;
    margin-bottom: 25px; /* Добавлен отступ снизу */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 4px;
box-shadow: 0px 0px 9px 0px #a8a8a8;
 -webkit-box-shadow: 0px 0px 9px 0px #a8a8a8;
 -moz-box-shadow: 0px 0px 9px 0px #a8a8a8;
}

.image-col img {
    max-width: 96px;
    max-height: 96px;
    opacity: 0.9;
}

/* Картинка категории справа от основной картинки */
.category-image-col {
    float: left;
    width: 100px;
    height: 100px;
    background-color: #f5f5f5;
    margin-right: 20px;
    margin-top: 20px;
    margin-bottom: 25px; /* Добавлен отступ снизу */
    display: none; /* По умолчанию скрыта */
    justify-content: center;
    align-items: center;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.category-image-col img {
    max-width: 100px;
    max-height: 100x;
    opacity: 0.9;
}

/* Блок аннотации на всю ширину */
.annotation-block {
    width: 100%;
    margin-top: 25px; /* Увеличено с 20px до 25px для отступа от картинок */
    margin-bottom: 3px; /* Добавлен отступ снизу */
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.70rem;
    line-height: 1.5;
    color: #555;
    clear: both; /* Очищает float элементы сверху */
}

.annotation-block p {
    margin: 0;
}

/* Итоговый блок справа */
.total-col {
    float: right;
    width: 220px; /* Увеличено с 200 → 220 для надёжного размещения € */
    margin-top: 20px;
    margin-bottom: 25px; /* Добавлен отступ снизу */
    font-size: 0.85rem;
    color: #333;
    padding-right: 8px; /* Добавлено для воздушности */
    word-wrap: break-word; /* Защита от непредвиденных переносов */
    white-space: nowrap; /* Запрещаем перенос внутри строк */
}

.total-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.total-label {
    color: #333;
    font-weight: bold;
}

.total-value {
    color: #333;
    font-weight: bold;
}

.total-value--active {
    color: #d32f2f !important; /* ← ЭТО ОБЯЗАТЕЛЬНО */
}

/* Скидка */
.discount-input {
    width: 60px;
    padding: 4px 6px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
    text-align: center;
    background: white;
}

/* Очистка флоатов */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

footer {
    text-align: center;
    color: #777;
    margin-top: 20px; /* Уменьшено с 40px до 20px */
    padding-top: 15px; /* Уменьшено с 20px до 15px */
    border-top: 1px solid #eee;
    font-size: 0.9rem;
}

/* === АДАПТИВНОСТЬ ДЛЯ МОБИЛЬНЫХ УСТРОЙСТВ === */
@media (max-width: 600px) {
    .image-col {
        width: 80px;
        height: 80px;
        margin-right: 10px;
    }
    
    .category-image-col {
        width: 80px;
        height: 80px;
        margin-right: 10px;
    }
    
    .annotation-block {
        margin-top: 15px;
        padding: 12px;
        font-size: 0.8rem;
    }
    
    .total-col {
        width: 180px;
    }
    
    .quantity-input {
        width: 80px;
    }

    .form-group {
        flex-direction: column;
        gap: 8px;
    }

    .form-label {
        min-width: auto;
    }

    .category-select,
    .quantity-input {
        width: 100%;
    }

.total-value--active {
    color: #d32f2f !important; /* Ярко-красный, контрастный, но не агрессивный */
    font-weight: bold;
}

}