/* Main */
main {
    flex: 1;
    max-width: 750px;
    margin: 2rem auto;
    padding: 0 1rem;
}
h2 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
}
.card {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}
.search-bar {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
input[type="text"] {
    flex: 1;
    padding: 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}
.add-btn {
    background: var(--brand-color);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 600;
    cursor: pointer;
}

.ingredient-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.ingredient-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.75rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.5rem;

}
.ingredient-item .ingredient {
    flex: 1;
    color: var(--text-main);
}
.drag {
    cursor: move;
    font-size: 1.2rem;
    color: var(--text-secondary);
}
.remove-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.2rem;
    cursor: pointer;
}
input.qty {
    width: 70px;
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}
select {
    padding: 0.4rem;
    border: 1px solid var(--border);
    border-radius: 6px;
}
.equals {
    font-weight: bold;
    margin: 0 0.5rem;
    color: var(--text-secondary);
}

@media(max-width: 600px) {
    .ingredient-item {
    flex-direction: column;
    align-items: stretch;
    }
    .ingredient-item input,
    .ingredient-item select {
    width: 100%; /* full width on mobile */
    }
    .equals {
    width: 100%;
    text-align: center;
    }
}
