/* cart.css – стили только для страницы корзины */

.cart-card {
    background: rgba(255,255,255,0.4);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 100%;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.clear-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
}

.clear-btn:hover {
    background: #c0392b;
}

.cart-items {
    flex: 0 0 auto;
    overflow-y: visible;
    margin-bottom: 20px;
}

.cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 10px;
}

.item-info {
    flex: 2;
    min-width: 150px;
}

.item-brand {
    font-weight: bold;
    font-size: 18px;
}

.item-sku {
    font-size: 12px;
    color: #666;
}

.item-price {
    min-width: 80px;
    text-align: center;
}

.item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 100px;
    justify-content: center;
}

.qty-btn {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid #2c3e50;
    background: white;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}

.qty-btn:hover {
    background: #2c3e50;
    color: white;
}

.item-sum {
    min-width: 80px;
    text-align: right;
    font-weight: bold;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    transition: 0.2s;
}

.remove-btn:hover {
    color: #e74c3c;
}

/* Блок доставки и примечаний */
.delivery-options {
    margin-top: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
}

.delivery-options .radio-group {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.delivery-options .radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 500;
}

.delivery-options input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.delivery-block {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}

.delivery-block input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    margin-top: 8px;
}

.delivery-notice {
    font-size: 14px;
    color: #e67e22;
    margin-top: 8px;
    font-style: italic;
}

.notes-checkbox {
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.notes-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.notes-textarea {
    margin-top: 10px;
}

.notes-textarea textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    resize: vertical;
    font-family: inherit;
}

/* Строка: доставка (слева) + итог (справа) */
.delivery-summary-row {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 20px;
    margin: 20px 0;
    align-items: flex-start;
}

.delivery-options {
    flex: 2;
}

.summary-block {
    flex: 1;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px;
    border-radius: 12px;
    text-align: right;
    box-sizing: border-box;
}

/* Поля контактов (на всю ширину) */
.contact-fields {
    margin-top: 20px;
}

.contact-fields input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    margin-bottom: 10px;
}

/* Итоговая цена */
.total-price {
    font-size: 24px;
    font-weight: bold;
    color: #c0392b;
    margin-top: 10px;
}

.order-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 12px;
    font-size: 18px;
    cursor: pointer;
    width: 100%;
    transition: 0.2s;
}

.order-btn:hover {
    background: #2ecc71;
}

/* ========== МОБИЛЬНАЯ АДАПТАЦИЯ (max-width: 478px) ========== */
@media (max-width: 478px) {
    .delivery-summary-row {
        flex-wrap: nowrap;
    }
    .delivery-options,
    .summary-block {
        flex: 0 0 50%;
        max-width: 50%;
        box-sizing: border-box;
        min-width: 0;
    }

    /* Раскрытие доставки */
    .delivery-options.delivery-open {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .delivery-options.delivery-open ~ .summary-block {
        display: none;
    }

    /* Раскрытие примечаний */
    .delivery-options.notes-open {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .delivery-options.notes-open ~ .summary-block {
        display: none;
    }

    /* Показываем блок примечаний при открытии */
    .delivery-options.notes-open .notes-textarea {
        display: block !important;
    }
}