/* Storefront controls and responsive layouts. Keep overflow local to tables,
   never conceal an oversized account page with body overflow-x:hidden. */
.legacy-store .store-action {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 44px; padding: 10px 18px; border: 1px solid #dbe3ed;
    border-radius: 22px; background: #fff; color: #477dd0;
    font: inherit; font-size: 14px; line-height: 1.4; cursor: pointer;
    text-decoration: none; text-align: center;
}
.legacy-store .store-action:hover { background: #eef3fc; border-color: #598ee3; }
.legacy-store .store-action:focus-visible { outline: 2px solid #598ee3; outline-offset: 3px; }
.legacy-store .store-action--muted { color: #59687b; }
.store-confirm { width: min(420px, calc(100% - 32px)); padding: 24px; border: 0; border-radius: 20px; color: #172438; box-sizing: border-box; }
.store-confirm::backdrop { background: rgb(15 28 47 / .55); }
.store-confirm h2 { margin: 0 0 24px; font-size: 22px; line-height: 1.3; }
.store-confirm > div { display: flex; gap: 12px; }
.store-confirm button { flex: 1; }
.legacy-store .store-confirm__accept { background: #598ee3; border-color: #598ee3; color: white; }
.legacy-store .cart-links { flex-wrap: wrap; align-items: center; }
.legacy-store .cart-links form { margin: 0; }
.legacy-store .cart-line__image { max-width: 100%; }
.legacy-store .cart-line__product { min-width: 0; overflow-wrap: anywhere; }
.legacy-store .account-dashboard__profile,
.legacy-store .profile-section,
.legacy-store .profile-section form,
.legacy-store .profile-company-fields,
.legacy-store .customer-form-grid,
.legacy-store .customer-form-grid > label,
.legacy-store .account-dashboard__side { min-width: 0; max-width: 100%; }
/* Fieldset's UA min-inline-size:min-content otherwise widens the entire grid. */
.legacy-store .profile-company-fields { min-inline-size: 0; }
.legacy-store .account-order-table-wrap { position: relative; min-width: 0; max-width: 100%; }
.legacy-store .profile-section input,
.legacy-store .profile-section textarea { box-sizing: border-box; max-width: 100%; }
.legacy-store .favorite-entry { display: flex; flex-direction: column; min-width: 0; gap: 8px; }
.legacy-store .favorite-entry > .product-card { flex: 1; }
.legacy-store .favorite-entry > form { margin: 0; }
.legacy-store .favorite-entry > form .store-action { width: 100%; font-size: 12px; }
.promotion-bundle__header > a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; text-underline-offset: 4px; }
.promotion-bundle__header > a svg { flex-shrink: 0; }
.legacy-store .catalog-promotions .catalog-promo-list__item { cursor: pointer; }
.legacy-store .catalog-promotions .catalog-promo-list__item:focus-within { outline: 2px solid #598ee3; outline-offset: 2px; }

@media (max-width: 900px) {
    .legacy-store .account-dashboard__profile { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
    .legacy-store .account-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .legacy-store .customer-page { padding-top: 24px; padding-bottom: 40px; }
    .legacy-store .customer-page__header { gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
    .legacy-store .customer-page__header h1 { font-size: 28px; line-height: 1.15; overflow-wrap: anywhere; }
    .legacy-store .customer-page__eyebrow { font-size: 11px; letter-spacing: .04em; }
    .legacy-store .account-customer-kind { align-self: flex-start; }
    .legacy-store .profile-section { padding: 20px 16px; border-radius: 16px; }
    .legacy-store .profile-section h2 { font-size: 20px; line-height: 1.3; }
    .legacy-store .customer-form-grid { grid-template-columns: minmax(0, 1fr); }
    .legacy-store .profile-company-fields { padding: 16px 0 0; margin-inline: 0; border-inline: 0; }
    .legacy-store .profile-company-fields legend { white-space: normal; }
    .legacy-store .price-presentation__markup { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .legacy-store .price-presentation__percent { max-width: 160px; }
    .legacy-store .price-presentation .price-presentation__percent input { font-size: 16px; }
    .legacy-store .account-dashboard__exports .button-secondary { white-space: normal; padding: 12px; }
    .legacy-store .favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 10px; }
    .legacy-store .favorites-grid:has(> :only-child) { grid-template-columns: minmax(0, 1fr); max-width: 360px; }
    .legacy-store .favorites-grid:has(> :only-child) .product-card { grid-template-rows: 200px minmax(0, 1fr); }
    .legacy-store .favorites-grid:has(> :only-child) .product-card__image { height: 200px; }
    .legacy-store .cart-page__header { align-items: stretch; gap: 16px; }
    .legacy-store .cart-links { display: flex; gap: 8px; }
    .legacy-store .cart-links__item { font-size: 12px; }
    .legacy-store .cart-links form { flex-basis: 100%; }
    .legacy-store .cart-lines { display: grid; gap: 12px; }
    .legacy-store .cart-lines__header { display: none; }
    .legacy-store .cart-line {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        grid-template-areas: 'identity identity' 'price price' 'quantity total';
        padding: 16px; gap: 12px 16px; border: 1px solid #e1e6ed; border-radius: 16px;
        align-items: end; background: white;
    }
    .legacy-store .cart-line__identity { grid-area: identity; grid-template-columns: 80px minmax(0, 1fr); gap: 14px; align-items: start; }
    .legacy-store .cart-line__image { width: 80px; height: 96px; }
    .legacy-store .cart-line__product h2 { margin: 4px 0 6px; font-size: 15px; line-height: 1.4; }
    .legacy-store .cart-line__product p { margin: 0; font-size: 11px; letter-spacing: .04em; }
    .legacy-store .cart-line__product small { font-size: 12px; }
    .legacy-store .cart-line__remove { margin-top: 0; }
    .legacy-store .cart-line__remove button { min-height: 44px; font-size: 12px; text-underline-offset: 3px; }
    .legacy-store .cart-line__price { grid-area: price; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 14px; }
    .legacy-store .cart-line__price > span { display: block; font-size: 12px; }
    .legacy-store .cart-line__quantity { grid-area: quantity; margin: 0; align-self: end; }
    .legacy-store .cart-line__quantity label { display: block; position: static; width: auto; height: auto; clip: auto; font-size: 12px; margin-bottom: 6px; }
    .legacy-store .cart-line__quantity input { min-height: 44px; border-radius: 10px; font-size: 16px; }
    .legacy-store .cart-line__total { grid-area: total; text-align: right; gap: 4px; font-size: 18px; }
    .legacy-store .cart-line__total > span { display: block; font-size: 12px; }
    .legacy-store .cart-line__total small, .legacy-store .cart-line__total del { font-size: 11px; }
    .legacy-store .bundle-cart-note { padding: 16px; font-size: 13px; }
    .legacy-store .catalog-promotions { flex-wrap: wrap; overflow: visible; gap: 8px; }
    .legacy-store .catalog-promotions .catalog-promo-list__item { max-width: 100%; min-height: 44px; padding: 9px 12px; border-radius: 14px; font-size: 13px; white-space: normal; line-height: 1.35; }
    .legacy-store .catalog-promotions .catalog-promo-list__item input { flex: 0 0 16px; }
    .promotion-bundle { padding: 16px 12px; border-radius: 16px; }
    .promotion-bundle__header { gap: 8px; }
    .promotion-bundle__header h2 { font-size: 23px; line-height: 1.2; }
    .promotion-bundle__header p { font-size: 14px; line-height: 1.5; }
    .promotion-bundle__tiers { margin-top: 16px; }
    .promotion-bundle__tiers button { min-height: 44px; padding: 10px 8px; font-size: 12px; }
    .promotion-bundle__card { padding: 12px; gap: 8px; }
    .promotion-bundle__name { font-size: 13px; line-height: 1.4; }
    .promotion-bundle__replace { min-height: 44px; font-size: 12px; }
    .promotion-bundle__filters input, .promotion-bundle__filters select { font-size: 16px; }
}
