.weight-picker { width: 100%; max-width: 300px; text-align: left; font-family: "Montserrat Alternates", sans-serif; }
.weight-picker__label { display: block; margin: 0 0 7px; font-size: 13px; font-weight: 600; color: var(--dark); }
.weight-picker__control { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 13px; border: 1px solid #dedede; border-radius: 12px; background: #fff; transition: border-color 160ms ease, box-shadow 160ms ease; }
.weight-picker__control:focus-within { border-color: var(--red-primary); box-shadow: 0 0 0 3px #a9223112; }
.weight-picker__control svg { width: 22px; height: 22px; flex: 0 0 22px; color: var(--red-primary); }
.weight-picker .weight-picker__input { display: block; width: 100%; min-width: 0; padding: 10px 0; border: 0; outline: 0; border-radius: 0; background: transparent; box-shadow: none; font: inherit; font-size: 16px; font-weight: 500; color: var(--dark); }
.weight-picker__input::placeholder { color: #8a8a8a; font-size: 13px; font-weight: 400; }
.weight-picker .weight-picker__unit { color: #757575; font-size: 14px; font-weight: 500; }
.weight-picker .weight-picker__hint { display: block; margin-top: 6px; color: #6b6b6b; font-size: 11px; line-height: 1.5; }
.weight-picker .weight-picker__error { display: block; margin-top: 6px; color: var(--red-primary); font-size: 12px; line-height: 1.4; }
.weight-picker__error[hidden] { display: none; }
.weight-picker.is-invalid .weight-picker__control { border-color: var(--red-primary); }
.product-card > .weight-picker { margin: 10px 0; max-width: none; }
.product-card .weight-picker__control { gap: 7px; padding: 0 10px; }
.product-card .weight-picker__label { font-size: 12px; }
form.cart:has(> .weight-picker) { flex-wrap: wrap; align-items: flex-start; gap: 14px; }
.weighted-cart-control { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.weighted-cart-control .weight-picker { max-width: 205px; }
.weighted-cart-remove { display: flex; align-items: center; justify-content: center; width: 40px; height: 44px; flex: 0 0 40px; color: #777; border-radius: 10px; }
.weighted-cart-remove svg { width: 21px; height: 21px; }
.weighted-cart-remove:focus-visible { outline: 2px solid var(--red-primary); outline-offset: 2px; }
@media (hover: hover) { .weighted-cart-remove:hover { background: #a922310c; color: var(--red-primary); } }
@media (max-width: 767px) {
  .weighted-cart-control { gap: 2px; }
  .weighted-cart-control .weight-picker { max-width: 190px; }
  .weighted-cart-control .weight-picker__control { min-height: 44px; padding: 0 9px; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) { .weight-picker__control { transition: none; } }

.product-page form.cart > .weight-picker { max-width: 300px; }
@media (max-width: 767px) { .product-page form.cart > .weight-picker { max-width: none; } }

.weighted-purchase-action { display: grid; gap: 7px; width: 100%; }
.weighted-purchase-action .weighted-cart-note { display: flex; align-items: center; gap: 5px; color: var(--success); font-size: 11px; line-height: 18px; font-weight: 500; }
.weighted-cart-note svg { width: 15px; height: 15px; flex: 0 0 15px; }
.weighted-purchase-action .weighted-save-feedback { font-size: 11px; line-height: 1.5; color: var(--success); }
.weighted-purchase-action [hidden],
.product-card .weighted-purchase-action > .added_to_cart,
.product-page .weighted-purchase-action > .added_to_cart { display: none; }
.product-card > .weighted-purchase-action { margin-top: auto; }
.product-page form.cart:has(> .weight-picker) {
    display: grid;
    grid-template-columns: minmax(0, 300px) minmax(0, 320px);
    column-gap: 20px;
    row-gap: 0;
    align-items: start;
}
.product-page form.cart > .weight-picker,
.product-page form.cart > .weighted-purchase-action { display: contents; }
.product-page form.cart > .weight-picker > .weight-picker__label { grid-column: 1; grid-row: 1; line-height: 18px; margin-bottom: 7px; }
.product-page form.cart > .weight-picker > .weight-picker__control { grid-column: 1; grid-row: 2; height: 48px; }
.product-page form.cart > .weight-picker > .weight-picker__hint { grid-column: 1; grid-row: 3; }
.product-page form.cart > .weight-picker > .weight-picker__error { grid-column: 1; grid-row: 4; }
.product-page form.cart > .weighted-purchase-action > .weighted-cart-note { grid-column: 2; grid-row: 1; margin-bottom: 7px; }
.product-page form.cart > .weighted-purchase-action > .btn { grid-column: 2; grid-row: 2; display: flex; align-items: center; justify-content: center; width: 100%; height: 48px; min-height: 48px; margin: 0; padding: 10px 20px; }
.product-page form.cart > .weighted-purchase-action > .weighted-save-feedback { grid-column: 2; grid-row: 3; margin-top: 6px; }
@media (max-width: 767px) {
    .product-page form.cart:has(> .weight-picker) { grid-template-columns: minmax(0, 1fr); }
    .product-page form.cart > .weighted-purchase-action > .weighted-cart-note { grid-column: 1; grid-row: 5; margin-top: 14px; }
    .product-page form.cart > .weighted-purchase-action > .btn { grid-column: 1; grid-row: 6; margin-top: 10px; }
    .product-page form.cart > .weighted-purchase-action > .weighted-save-feedback { grid-column: 1; grid-row: 7; }
}

/* Catalog controls stay one button tall; the editor opens above the grid. */
.weight-picker-slot { width: 100%; margin-top: auto; }
.product-card .weight-picker-trigger { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; }
.weight-picker-trigger > svg { width: 18px; height: 18px; flex: 0 0 18px; }
.product-card .weight-picker-trigger > span { color: inherit; font: inherit; }
.product-card .weight-picker-trigger,
.product-card .add-to-cart-btn {
    font-family: "Montserrat Alternates", sans-serif;
    font-size: 14px;
    font-weight: 700;
    font-style: normal;
    line-height: 1.5;
}
.weight-picker-popover {
    position: fixed;
    inset: auto;
    margin: 0;
    box-sizing: border-box;
    width: 280px;
    padding: 16px;
    border: 1px solid #ece8e8;
    border-radius: 20px;
    background: #fff;
    color: var(--dark);
    box-shadow: 0 12px 40px #24121726, 0 2px 8px #2412170a;
    overflow: auto;
    z-index: 10000;
    font-family: "Montserrat Alternates", sans-serif;
}
.weight-picker-popover[hidden] { display: none; }
.weight-picker-popover::backdrop { background: transparent; }
.weight-picker-popover__header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.weight-picker-popover__header strong { font-size: 16px; font-weight: 600; }
.product-card .weight-picker-close { display: flex; align-items: center; justify-content: center; flex: 0 0 36px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: #f4f4f4; color: #666; }
.weight-picker-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.weight-picker-close:focus-visible, .weight-picker-trigger:focus-visible { outline: 2px solid var(--red-primary); outline-offset: 3px; }
.weight-picker-popover .weight-picker { max-width: none; }
.weight-picker-popover .weighted-purchase-action { margin-top: 14px; }
.product-card .weight-picker-popover .add-to-cart-btn { width: 100%; max-height: none; min-height: 44px; margin: 0; background: var(--red-primary); color: #fff; }
