/* Customer cart and order lists. Keep form contracts independent of presentation. */
.customer-purchases { color: var(--customer-ink, #142c20); max-width: 1120px; margin-inline: auto; }
.customer-purchases *, .customer-purchases *::before, .customer-purchases *::after { box-sizing: border-box; }
.customer-purchases__header { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.customer-purchases__eyebrow { display: block; color: #53725d; font-size: 12px; font-weight: 700; }
.customer-purchases__header h1 { margin: 7px 0; color: #173d29; font-size: clamp(23px, 3vw, 30px); line-height: 1.5; }
.customer-purchases__header p { margin: 0; color: #637168; font-size: 13px; line-height: 1.9; }
.customer-purchases__back { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 15px; border: 1px solid #d9e6db; border-radius: 13px; background: #fff; color: #265739; font-size: 12px; font-weight: 800; white-space: nowrap; }
.customer-purchases .customer-purchases__cart-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 310px); gap: 20px; align-items: start; }
.customer-purchases__items { min-width: 0; display: grid; gap: 12px; }
.customer-purchases__item { display: grid; grid-template-columns: 82px minmax(0, 1fr) 84px; gap: 14px 18px; align-items: center; padding: 20px; border: 1px solid #e0e9df; border-radius: 20px; background: #fff; }
.customer-purchases__media { grid-row: span 2; display: grid; place-items: center; width: 82px; height: 94px; border-radius: 15px; background: #f1f6ed; color: #75926a; overflow: hidden; }
.customer-purchases__media img { display: block; max-width: 100%; width: 100%; height: 100%; object-fit: contain; }
.customer-purchases__media .ui-icon { --ui-icon-size: 34px; }
.customer-purchases__product { min-width: 0; }
.customer-purchases__product h2 { margin: 0 0 8px; color: #223e2b; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.customer-purchases__product p { margin: 0; font-size: 12px; line-height: 1.8; color: #65736a; }
.customer-purchases__quantity { display: grid; gap: 5px; align-self: start; }
.customer-purchases__quantity label { margin: 0; color: #59685e; font-size: 11px; text-align: center; }
.customer-purchases .customer-purchases__quantity input { width: 84px; min-width: 0; min-height: 44px; height: 44px; padding: 5px 6px; border: 1px solid #c6d7c7; border-radius: 11px; background: #fff; color: #173d29; font-size: 16px; text-align: center; direction: ltr; }
.customer-purchases__quantity input[aria-invalid="true"] { border-color: #bb4535; }
.customer-purchases__item-total { min-width: 0; }
.customer-purchases__item-total small { display: block; color: #6d786f; font-size: 10px; margin-bottom: 4px; }
.customer-purchases__item-total strong { color: #24482e; font-size: 16px; white-space: nowrap; }
.customer-purchases__item-total strong span { font-size: 11px; font-weight: 500; }
.customer-purchases .customer-purchases__remove { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 8px; border: 0; background: transparent; box-shadow: none; color: #a54736; font-size: 12px; font-weight: 700; }
.customer-purchases .customer-purchases__remove:hover { background: #fff1ed; color: #8d3527; transform: none; }
.customer-purchases__quantity-error { grid-column: 1 / -1; margin: 0; color: #a33b2c; font-size: 12px; line-height: 1.9; }
.customer-purchases__summary { position: sticky; top: 100px; min-width: 0; padding: 24px; border: 1px solid #dce8d9; border-radius: 20px; background: #fff; box-shadow: 0 8px 28px rgb(36 64 42 / 4%); }
.customer-purchases__summary h2 { margin: 0 0 22px; font-size: 17px; color: #234a30; }
.customer-purchases__summary-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; color: #667269; }
.customer-purchases__summary-row strong { color: #234a30; }
.customer-purchases__summary-total { display: grid; gap: 9px; margin: 18px 0 14px; padding-top: 18px; border-top: 1px dashed #d8e3d6; }
.customer-purchases__summary-total > span { font-size: 13px; color: #596b5e; }
.customer-purchases__summary-total strong { color: #183f25; font-size: 27px; white-space: nowrap; }
.customer-purchases__summary-total small { font-size: 12px; font-weight: 500; }
.customer-purchases__hint { margin: 0 0 18px; color: #65736a; font-size: 12px; line-height: 1.95; }
.customer-purchases__hint--quiet { margin: 12px 0 0; font-size: 11px; }
.customer-purchases .customer-purchases__primary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; width: 100%; padding: 12px 16px; border: 1px solid #17693d; border-radius: 13px; background: #17693d; color: #fff; font-size: 13px; font-weight: 800; line-height: 1.6; box-shadow: none; text-decoration: none; }
.customer-purchases .customer-purchases__primary:hover { border-color: #0b4c2a; background: #0b4c2a; color: #fff; transform: none; }
.customer-purchases .customer-purchases__update { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 44px; width: 100%; margin-top: 8px; padding: 10px; border: 0; background: transparent; color: #45624b; font-size: 12px; font-weight: 700; box-shadow: none; }
.customer-purchases .customer-purchases__update:hover { background: #f1f6ef; transform: none; }
.customer-purchases__empty { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 52px 24px; border: 1px solid #dfe8dc; border-radius: 22px; background: #fff; text-align: center; }
.customer-purchases__empty-icon { display: grid; place-items: center; width: 70px; height: 70px; border-radius: 22px; background: #edf5e9; color: #517b4d; }
.customer-purchases__empty-icon .ui-icon { --ui-icon-size: 32px; }
.customer-purchases__empty h2 { margin: 5px 0 0; font-size: 20px; color: #20472c; }
.customer-purchases__empty p { margin: 0 0 12px; max-width: 380px; color: #65736a; font-size: 13px; line-height: 1.9; }
.customer-purchases__empty .customer-purchases__primary { width: auto; min-width: 170px; }
.customer-purchases__orders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.customer-purchases__order { display: flex; flex-direction: column; min-width: 0; padding: 24px; border: 1px solid #dfe8dc; border-radius: 20px; background: #fff; }
.customer-purchases__order-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.customer-purchases__order-head > div { min-width: 0; }
.customer-purchases__order-label { font-size: 11px; color: #718074; }
.customer-purchases__order-head h2 { margin: 5px 0; font-size: 14px; line-height: 1.7; overflow-wrap: anywhere; }
.customer-purchases__order-head time { color: #768077; font-size: 11px; }
.customer-purchases__status { display: inline-flex; align-items: center; flex-shrink: 0; max-width: 48%; padding: 7px 10px; border-radius: 9px; background: #f2f4ee; color: #62704e; font-size: 11px; font-weight: 800; line-height: 1.7; text-align: center; }
.customer-purchases__status--preparing, .customer-purchases__status--shipping_registered, .customer-purchases__status--ready_shipping, .customer-purchases__status--handed_carrier, .customer-purchases__status--delivered { background: #eaf5e9; color: #2b683c; }
.customer-purchases__status--verifying_payment, .customer-purchases__status--payment_review, .customer-purchases__status--awaiting_receipt_review { background: #fff4dc; color: #94621c; }
.customer-purchases__status--cancelled, .customer-purchases__status--refunded { background: #f8eeeb; color: #9a5140; }
.customer-purchases__order-message { margin: 19px 0 12px; color: #5d6c60; font-size: 12px; line-height: 1.95; }
.customer-purchases__order-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 20px; color: #6d7b70; font-size: 11px; line-height: 1.8; }
.customer-purchases__order-meta bdi { overflow-wrap: anywhere; }
.customer-purchases__order-foot { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-top: auto; padding-top: 18px; border-top: 1px solid #edf1e9; }
.customer-purchases__order-amount { min-width: 0; display: grid; gap: 5px; }
.customer-purchases__order-amount > span { color: #7b857b; font-size: 10px; }
.customer-purchases__order-amount strong { color: #234a30; font-size: 19px; white-space: nowrap; }
.customer-purchases__order-amount small { font-size: 10px; font-weight: 500; }
.customer-purchases__details { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 9px 13px; border-radius: 11px; background: #edf5e9; color: #2e633e; font-size: 12px; font-weight: 800; white-space: nowrap; }
.customer-purchases a:focus-visible, .customer-purchases button:focus-visible, .customer-purchases input:focus-visible { outline: 3px solid #b0c68e; outline-offset: 3px; }
@media (max-width: 840px) {
    .customer-purchases .customer-purchases__cart-form { grid-template-columns: minmax(0, 1fr); gap: 16px; }
    .customer-purchases__summary { position: static; }
    .customer-purchases__orders { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 540px) {
    .customer-purchases__header { gap: 10px; align-items: flex-start; margin-bottom: 20px; }
    .customer-purchases__header p { font-size: 12px; }
    .customer-purchases__back { padding: 9px 11px; font-size: 11px; }
    .customer-purchases__back .ui-icon { display: none; }
    .customer-purchases__item { grid-template-columns: 64px minmax(0, 1fr) 76px; padding: 15px 13px; gap: 13px 10px; border-radius: 17px; }
    .customer-purchases__media { grid-row: auto; width: 64px; height: 76px; border-radius: 11px; }
    .customer-purchases__product { grid-column: 2 / -1; }
    .customer-purchases__product h2 { font-size: 13px; margin-bottom: 5px; }
    .customer-purchases__product p { font-size: 11px; }
    .customer-purchases__quantity { grid-column: 1; grid-row: 2; justify-items: start; }
    .customer-purchases__quantity label { font-size: 10px; }
    .customer-purchases .customer-purchases__quantity input { width: 64px; }
    .customer-purchases__item-total { grid-column: 2; align-self: end; padding-bottom: 8px; }
    .customer-purchases__item-total strong { font-size: 16px; }
    .customer-purchases__item-total small { font-size: 10px; }
    .customer-purchases__remove { align-self: end; }
    .customer-purchases__summary { padding: 21px; border-radius: 17px; }
    .customer-purchases__summary-total { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
    .customer-purchases__summary-total strong { font-size: 25px; }
    .customer-purchases__summary h2 { font-size: 16px; margin-bottom: 18px; }
    .customer-purchases__order { padding: 20px 17px; border-radius: 17px; }
    .customer-purchases__order-head h2 { font-size: 12px; }
    .customer-purchases__status { font-size: 10px; padding: 6px 8px; }
    .customer-purchases__order-foot { gap: 10px; }
    .customer-purchases__order-amount strong { font-size: 18px; }
    .customer-purchases__details { padding-inline: 11px; font-size: 11px; }
}
@media (max-width: 359px) {
    .customer-purchases__header { flex-wrap: wrap; }
    .customer-purchases__item { grid-template-columns: 60px minmax(0, 1fr) 54px; }
    .customer-purchases__summary-total strong { font-size: 22px; }
    .customer-purchases__order-head { gap: 8px; }
    .customer-purchases__order-foot { flex-wrap: wrap; }
}

.customer-purchases .customer-purchases__primary { background: #084d55; border-color: #084d55; border-radius: 8px; }
.customer-purchases .customer-purchases__primary:hover { background: #063b41; border-color: #063b41; }
.customer-purchases .customer-purchases__primary:active { background: #042f34; border-color: #042f34; }
.customer-purchases .customer-purchases__details, .customer-purchases .customer-purchases__back { background: #fff; color: #334155; border: 1px solid #64748b; border-radius: 8px; }
.customer-purchases .customer-purchases__details:hover, .customer-purchases .customer-purchases__back:hover { background: #f1f5f9; }
.customer-purchases .customer-purchases__details:active, .customer-purchases .customer-purchases__back:active { background: #e2e8f0; }
.customer-purchases :is(a, button):focus-visible { outline: 2px solid #087f8c; outline-offset: 3px; }
:is(.customer-purchases__status, .customer-status-pill).customer-purchases__status--awaiting_payment { background: #fef3c7; color: #92400e; }
:is(.customer-purchases__status, .customer-status-pill):is(.customer-purchases__status--verifying_payment, .customer-purchases__status--payment_review, .customer-purchases__status--awaiting_receipt_review) { background: #fce7f3; color: #9d174d; }
:is(.customer-purchases__status, .customer-status-pill):is(.customer-purchases__status--preparing, .customer-purchases__status--ready_shipping) { background: #cffafe; color: #155e75; }
:is(.customer-purchases__status, .customer-status-pill):is(.customer-purchases__status--shipping_registered, .customer-purchases__status--handed_carrier) { background: #dbeafe; color: #1e40af; }
:is(.customer-purchases__status, .customer-status-pill).customer-purchases__status--delivered { background: #dcfce7; color: #166534; }
:is(.customer-purchases__status, .customer-status-pill):is(.customer-purchases__status--cancelled, .customer-purchases__status--refunded) { background: #fee2e2; color: #991b1b; }
