.gift-builder {
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #dfe6f0;
    border-radius: 8px;
    background: #fbfcfe;
}
.gift-builder-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.gift-builder-label {
    color: #334155;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}
.gift-builder-label .required { color: #ef4444; }
.gift-builder-optional {
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    margin-left: 5px;
    padding: 1px 7px;
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    font-size: 11px;
    font-weight: 500;
    vertical-align: 1px;
}
.gift-builder-help {
    margin-top: 3px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}
.gift-builder-count {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 12px;
    line-height: 20px;
    white-space: nowrap;
}
.gift-builder-list {
    display: grid;
    gap: 8px;
}
.gift-item-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 122px 36px;
    align-items: center;
    gap: 8px;
}
.gift-name-control input,
.gift-quantity-control input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #d8e0eb;
    border-radius: 7px;
    background: #fff;
    color: #1e293b;
    font: inherit;
    font-size: 14px;
    outline: none;
    box-shadow: none;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}
.gift-name-control input:focus,
.gift-quantity-control input:focus {
    border-color: var(--fa-blue);
    box-shadow: 0 0 0 3px rgba(0, 47, 167, 0.1);
}
.gift-quantity-control {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 30px;
    align-items: center;
    min-height: 42px;
    overflow: hidden;
    border: 1px solid #d8e0eb;
    border-radius: 7px;
    background: #fff;
}
.gift-quantity-control input {
    min-height: 40px;
    padding: 8px 2px;
    border: 0;
    border-radius: 0;
    text-align: center;
    box-shadow: none;
    -moz-appearance: textfield;
}
.gift-quantity-control input::-webkit-outer-spin-button,
.gift-quantity-control input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}
.gift-qty-button {
    width: 30px;
    height: 40px;
    padding: 0;
    border: 0;
    background: #f8fafc;
    color: #475569;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 140ms ease, color 140ms ease;
}
.gift-qty-button:hover { background: #eef3fb; color: var(--fa-blue); }
.gift-qty-button:active { background: #e2e8f0; }
.gift-qty-button:focus-visible,
.gift-remove-button:focus-visible,
.gift-add-button:focus-visible {
    outline: 3px solid rgba(0, 47, 167, 0.16);
    outline-offset: 1px;
}
.gift-remove-button {
    width: 36px;
    height: 42px;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
    color: #94a3b8;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: border-color 140ms ease, background-color 140ms ease, color 140ms ease;
}
.gift-remove-button:hover { border-color: #fecaca; background: #fff7f7; color: #dc2626; }
.gift-builder[data-required="true"] .gift-item-row:only-child .gift-remove-button {
    visibility: hidden;
    pointer-events: none;
}
.gift-builder-empty {
    padding: 9px 11px;
    border: 1px dashed #cbd5e1;
    border-radius: 7px;
    color: #94a3b8;
    font-size: 12px;
    line-height: 1.5;
}
.gift-add-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    margin-top: 10px;
    padding: 6px 10px;
    border: 1px solid #cbd8ec;
    border-radius: 7px;
    background: #f7faff;
    color: var(--fa-blue);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 140ms ease, background-color 140ms ease;
}
.gift-add-button:hover { border-color: #8fa9d4; background: #eef4ff; }
.gift-add-button > span { font-size: 18px; font-weight: 400; line-height: 0.8; }
.gift-builder [hidden] { display: none !important; }
@media (max-width: 640px) {
    .gift-builder { padding: 12px; }
    .gift-item-row { grid-template-columns: minmax(0, 1fr) 116px 36px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
    .gift-builder * { transition: none !important; }
}
