.add-button.needs-preparation { width: auto; min-width: 92px; padding: 0 11px; font-size: 10px; font-weight: 800; }
.preparation-modal { position: fixed; inset: 0; z-index: 80; background: rgba(25,15,12,.65); display: grid; place-items: center; padding: 22px; backdrop-filter: blur(5px); }
.preparation-modal[hidden] { display: none; }
.preparation-card { width: min(600px,100%); max-height: calc(100dvh - 35px); overflow: auto; background: var(--paper); border-radius: 24px; padding: 28px; box-shadow: var(--shadow); position: relative; }
.preparation-card > .close { position: absolute; right: 18px; top: 18px; z-index: 2; }
.preparation-card > img { width: 100%; height: 180px; object-fit: cover; border-radius: 16px; margin-bottom: 22px; background: #eee; }
.preparation-card h2 { font: 700 30px Lora,serif; margin: 7px 0; }
.preparation-card > p { color: var(--muted); margin: 0 0 20px; }
.preparation-options { display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }
.preparation-options button { border: 1px solid var(--line); background: #fff; border-radius: 13px; padding: 14px; text-align: left; display: grid; grid-template-columns: 30px 1fr; align-items: center; }
.preparation-options button span { grid-row: 1/3; font-size: 20px; }
.preparation-options button small { color: var(--muted); font-size: 10px; }
.preparation-options button.selected { border: 2px solid var(--red); padding: 13px; background: #fff7f2; color: var(--red); }
.confirm-preparation { margin-top: 18px; }
.package-selector { margin-top: 16px; padding: 15px; border: 1px solid var(--line); border-radius: 13px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.package-selector > div:first-child { display: grid; gap: 3px; }
.package-selector small { color: var(--muted); font-size: 10px; }
.package-control { display: flex; align-items: center; gap: 14px; }
.package-control button { width: 34px; height: 34px; border: 1px solid var(--line); background: var(--cream); color: var(--red); border-radius: 9px; font-size: 20px; font-weight: 800; }
.package-control strong { min-width: 48px; text-align: center; color: var(--red); }
@media (max-width:600px) { .preparation-modal { padding: 0; align-items: end; } .preparation-card { width: 100%; max-height: 92dvh; border-radius: 24px 24px 0 0; padding: 20px; } .preparation-card > img { height: 145px; } .preparation-options { grid-template-columns: 1fr; } }
.form-grid select { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 13px 14px; background: #fff; color: var(--ink); outline: none; margin-top: 7px; }
.form-grid select:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(128,10,3,.07); }
.form-grid select.invalid { border-color: #c9342b; }
.primary-action.confirm-order { justify-content: center; background: #23864f; }
.primary-action.confirm-order:hover { background: #176d3d; }
.delivery-fee-notice { margin-top: 18px; padding: 11px 13px; border-radius: 10px; background: #fff7df; border: 1px solid #ead9a8; color: #6b571e; font-size: 11px; }
.account-note { margin-top: 10px; display: flex; align-items: flex-start; gap: 9px; padding: 9px 11px; border-radius: 10px; background: #f3eee8; color: var(--ink); }
.account-note > span { color: var(--red); }
.account-note div { display: grid; gap: 2px; }
.account-note b { font-size: 11px; }
.account-note small { color: var(--muted); font-size: 9px; line-height: 1.4; }
.payment-options { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.payment-options label { position: relative; min-height: 52px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 11px; background: #fff; display: grid; grid-template-columns: 25px 1fr; align-items: center; cursor: pointer; }
.payment-options label:has(input:checked) { border: 2px solid var(--red); padding: 8px 9px; background: #fff7f2; color: var(--red); }
.payment-options input { position: absolute; opacity: 0; pointer-events: none; }
.payment-options span { grid-row: 1/3; color: var(--red); font-weight: 800; }
.payment-options small { color: var(--muted); font-size: 8px; }
.payment-note { margin: 6px 0 0; color: var(--muted); font-size: 9px; }
.change-field { display: block; margin-top: 8px; font-size: 10px; font-weight: 700; }
.change-field[hidden] { display: none; }
.change-field input { max-width: 190px; margin-left: 8px; }
@media (max-width:600px) { .payment-options { grid-template-columns: 1fr; } }
.cart-preparation { display: block; color: var(--muted); line-height: 1.35; margin-bottom: 4px; }
.cart-preparation b { color: var(--ink); }
.cart-price { display: block; margin-top: 3px; }
.cart-item .quantity > b { min-width: 44px; text-align: center; color: var(--ink); font-size: 12px; }

/* Catálogo mais compacto no desktop: quatro produtos por linha. */
@media (min-width: 901px) {
  .product-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .product-image { height: 172px; }
  .product-body { padding: 15px; }
  .product-body h3 { font-size: 18px; }
  .product-body p { font-size: 12px; }
}

/* Checkout dimensionado para manter o botão de confirmação dentro da tela. */
@media (min-width: 701px) {
  .checkout { padding: 10px; display: grid; place-items: center; overflow: hidden; }
  .checkout[hidden] { display: none; }
  .checkout-panel { width: min(960px, calc(100vw - 20px)); max-width: none; max-height: calc(100dvh - 20px); overflow: auto; }
  .checkout .drawer-head { padding: 17px 24px 7px; }
  .checkout .drawer-head h2 { font-size: 25px; margin: 3px 0; }
  .checkout .steps { padding-top: 2px; padding-bottom: 15px; }
  .checkout form { padding: 8px 24px 22px; }
  .checkout fieldset { margin: 14px 0; }
  .checkout legend { margin-bottom: 8px; font-size: 16px; }
  .checkout .fulfillment label { padding: 12px 15px; grid-template-columns: 28px 1fr; column-gap: 8px; }
  .checkout .fulfillment label:has(input:checked) { padding: 11px 14px; }
  .checkout .fulfillment label span { grid-row: 1/3; }
  .checkout .form-grid { gap: 9px 12px; }
  .checkout input, .checkout select { padding: 10px 12px; margin-top: 4px; }
  .checkout .delivery-fee-notice { margin-top: 10px; padding: 8px 11px; }
  .checkout-summary { margin-top: 12px; padding-top: 13px; padding-bottom: 13px; }
}
