/* Public styles stay scoped to the quick-buy button and dialog. */
.quick-buy-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; margin: 0; border: 1px solid hsl(var(--qb-primary, 358 70% 47%)); border-radius: 4px; background: hsl(var(--qb-primary, 358 70% 47%)); color: #fff; font-weight: 700; line-height: 1.4; text-transform: none; }
.quick-buy-button:hover, .quick-buy-button:focus { background: #ae2026; color: #fff; }
body.quick-buy-no-scroll { overflow: hidden; }
#quick-buy-popup { width: min(var(--qb-popup-max-width, 1000px), calc(100vw - 32px)); max-width: calc(100vw - 32px); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 0; border-radius: 6px; background: #fff; color: #231f20; box-shadow: 0 12px 48px #0004; font-family: Roboto, sans-serif; font-size: 14px; line-height: 1.5; overflow: auto; }
#quick-buy-popup:not([open]) { display: none; }
#quick-buy-popup::backdrop { background: #0009; }
#quick-buy-popup *, #quick-buy-popup *::before, #quick-buy-popup *::after { box-sizing: border-box; }
#quick-buy-popup .qb-close { position: absolute; top: 8px; right: 8px; z-index: 2; display: flex; align-items: center; justify-content: center; width: 36px; min-width: 0; height: 36px; min-height: 0; margin: 0; padding: 0; border: 0; background: #fff; color: #111; border-radius: 4px; font-size: 28px; line-height: 1; }
#quick-buy-popup .qb-header { padding: 18px 56px 18px 24px; border-bottom: 1px solid #e6e6e6; }
#quick-buy-popup .qb-header p { margin: 0; font-size: 20px; font-weight: 700; line-height: 1.4; }
#quick-buy-popup .qb-checkout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 24px; margin: 0; }
#quick-buy-popup :is(.qb-product-column, .qb-buyer-column) { min-width: 0; }
#quick-buy-popup .qb-product-column { padding-right: 24px; border-right: 1px solid #e6e6e6; }
#quick-buy-popup .qb-product-summary { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
#quick-buy-popup .qb-product-details { flex: 1; min-width: 0; }
#quick-buy-popup .qb-product-photo { flex: 0 0 100px; width: 100px; height: 100px; border: 1px solid #e6e6e6; border-radius: 4px; overflow: hidden; }
#quick-buy-popup .qb-product-photo img { display: block; width: 100%; height: 100%; object-fit: contain; }
#quick-buy-popup .qb-product-name { margin: 0 0 8px; font-size: 16px; font-weight: 700; }
#quick-buy-popup .qb-product-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 16px; font-size: 16px; font-weight: 700; color: hsl(var(--qb-primary, 358 70% 47%)); }
#quick-buy-popup .qb-product-price ins { order: -1; text-decoration: none; background: none; }
#quick-buy-popup .qb-product-price del { color: #888; font-size: 16px; font-weight: 400; }
#quick-buy-popup .qb-product-price .amount { color: inherit; }
#quick-buy-popup .qb-field { display: flex; flex-direction: column; gap: 4px; margin: 0 0 12px; font-size: 14px; color: #231f20; font-weight: 500; }
#quick-buy-popup .qb-compact .qb-field-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#quick-buy-popup :is(input:not([type=radio]), select, textarea) { width: 100%; min-width: 0; margin: 0; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; background-color: #fff; color: #111; font: inherit; font-weight: 400; box-shadow: none; }
#quick-buy-popup :is(input:not([type=radio]), select) { height: 36px; min-height: 0; }
#quick-buy-popup .qb-quantity-field > label { margin: 0; font-weight: 700; }
#quick-buy-popup .qb-quantity-control { display: flex; align-items: center; gap: 6px; width: fit-content; }
#quick-buy-popup .qb-quantity-control button { display: flex; align-items: center; justify-content: center; width: 30px; min-width: 0; height: 30px; min-height: 0; margin: 0; padding: 0; border: 1px solid #ddd; border-radius: 4px; background: #f7f7f7; color: #231f20; font-size: 18px; line-height: 1; letter-spacing: 0; }
#quick-buy-popup .qb-quantity-control button:disabled { opacity: .4; cursor: default; }
#quick-buy-popup input[name=quantity] { width: 40px; height: 30px; padding: 2px 4px; border: 1px solid #ddd; border-radius: 4px; text-align: center; appearance: textfield; -moz-appearance: textfield; }
#quick-buy-popup input[name=quantity]::-webkit-inner-spin-button, #quick-buy-popup input[name=quantity]::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }
#quick-buy-popup .qb-fields-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
#quick-buy-popup .qb-section-title { margin: 0 0 14px; font-size: 18px; font-weight: 700; }
#quick-buy-popup .qb-note { margin: 16px 0 0; color: #666; font-size: 13px; }
#quick-buy-popup .qb-coupon-row { display: flex; gap: 8px; }
#quick-buy-popup .qb-apply-coupon { flex: 0 0 auto; width: auto; min-width: 0; height: 36px; min-height: 0; margin: 0; padding: 0 10px; border: 1px solid hsl(var(--qb-primary, 358 70% 47%)); border-radius: 4px; background: #fff; color: hsl(var(--qb-primary, 358 70% 47%)); font-size: 13px; line-height: 1.2; letter-spacing: 0; text-transform: none; }
#quick-buy-popup fieldset { min-width: 0; margin: 0 0 12px; padding: 0; border: 0; }
#quick-buy-popup legend { margin: 0 0 6px; font-size: 14px; font-weight: 700; text-transform: none; }
#quick-buy-popup .qb-choice { display: flex; align-items: center; gap: 6px; margin: 6px 0; font-size: 14px; font-weight: 400; }
#quick-buy-popup input[type=radio] { flex: 0 0 auto; margin: 0; accent-color: hsl(var(--qb-primary, 358 70% 47%)); }
#quick-buy-popup .qb-rate-price { margin-left: auto; white-space: nowrap; }
#quick-buy-popup .qb-totals { margin-top: 16px; padding-top: 12px; border-top: 1px solid #ddd; }
#quick-buy-popup .qb-totals p { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 6px; font-size: 14px; }
#quick-buy-popup .qb-totals p > span:last-child { text-align: right; }
#quick-buy-popup .qb-total { font-weight: 700; }
#quick-buy-popup .qb-total > span:last-child { color: hsl(var(--qb-primary, 358 70% 47%)); font-size: 16px; white-space: nowrap; }
#quick-buy-popup .qb-status { min-height: 22px; margin: 10px 0; font-size: 13px; color: #555; }
#quick-buy-popup .qb-status.is-error { color: hsl(var(--qb-primary, 358 70% 47%)); }
#quick-buy-popup .qb-submit { width: 100%; height: 36px; min-height: 0; margin: 0; padding: 6px 12px; border: 0; border-radius: 4px; background: hsl(var(--qb-primary, 358 70% 47%)); color: #fff; font-size: 14px; font-weight: 700; line-height: 1.4; letter-spacing: 0; }
#quick-buy-popup .qb-submit:disabled { opacity: .5; cursor: default; }
#quick-buy-popup .qb-loading { padding: 40px 24px; margin: 0; }
#quick-buy-popup .qb-hidden { display: none !important; }
#quick-buy-popup .qb-payment-static .qb-choice input { display: none; }
#quick-buy-popup .qb-payment-static .qb-choice:not(:has(input:checked)) { display: none; }
#quick-buy-popup textarea { min-height: 56px; }
#quick-buy-popup :is(button, input, select, textarea):focus { outline: none; box-shadow: none; }
#quick-buy-popup :is(input:not([type=radio]), select, textarea):focus { border-color: hsl(var(--qb-primary, 358 70% 47%)); }
@media (max-width: 849px) {
    #quick-buy-popup { width: calc(100vw - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); }
    #quick-buy-popup .qb-header { padding: 16px 48px 16px 16px; }
    #quick-buy-popup .qb-header p { font-size: 18px; }
    #quick-buy-popup .qb-checkout { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 16px; }
    #quick-buy-popup .qb-product-column { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 8px 16px; align-items: start; padding: 0 0 16px; border: 0; border-bottom: 1px solid #ddd; }
    #quick-buy-popup .qb-product-column:not(:has(.qb-product-photo)) { grid-template-columns: minmax(0, 1fr); }
    #quick-buy-popup :is(.qb-product-summary, .qb-product-details) { display: contents; }
    #quick-buy-popup .qb-product-photo { grid-column: 1; grid-row: 1 / span 3; }
    #quick-buy-popup .qb-product-name { grid-column: -2 / -1; grid-row: 1; margin: 0; font-size: 16px; }
    #quick-buy-popup .qb-product-price { grid-column: -2 / -1; grid-row: 2; margin: 0; }
    #quick-buy-popup .qb-quantity-field { grid-column: -2 / -1; grid-row: 3; margin: 0; }
    #quick-buy-popup .qb-quantity-field > label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
    #quick-buy-popup :is(.qb-variations, .qb-note) { grid-column: 1 / -1; }
    #quick-buy-popup .qb-variations:not(:has(select)) { display: none; }
    #quick-buy-popup :is(input:not([type=radio]), select, textarea) { font-size: 16px; }
}
@media (max-width: 400px) { #quick-buy-popup .qb-fields-row { grid-template-columns: minmax(0, 1fr); gap: 0; } }

#quick-buy-popup :is(.qb-address-retry, .qb-retry-bootstrap), form.checkout .qb-address-retry { display: inline-flex; align-items: center; justify-content: center; width: auto; min-height: 0; height: 30px; margin: 4px 0 0; padding: 0 10px; border: 1px solid #ddd; border-radius: 4px; background: #fff; color: #231f20; font-size: 13px; line-height: 1.2; letter-spacing: 0; text-transform: none; }
.qb-address-retry[hidden] { display: none !important; }
