.kratos-order { padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); }
.kratos-order .cart-header, .order-drawer-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.kratos-order h2 { margin: 0; font-size: 18px; }
.order-total { margin: 5px 0 0; color: var(--text-2); font-size: 13px; font-weight: 600; }
.product-order-add { margin: 20px 0; padding: 16px; border-radius: var(--radius); background: var(--bg); }
.product-order-add h3 { margin: 0 0 6px; font-size: 14px; }
.product-order-add p { margin: 0 0 14px; font-size: 13px; font-weight: 600; line-height: 1.45; }
.product-order-add .kratos-add label { flex: 0 0 auto; }
.product-order-add .kratos-add button { flex: 1; }
.order-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.order-item > a { grid-column: 1 / -1; font-size: 14px; font-weight: 600; line-height: 1.35; }
.order-item label { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.order-item input, .kratos-add input { width: 72px; min-height: 44px; padding: 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); }
.remove-btn { min-height: 44px; color: var(--color-action-text); font-size: 12px; font-weight: 650; }
.order-customer-fields { display: grid; gap: 12px; margin-top: 20px; }
.order-customer-fields label { display: grid; gap: 7px; color: var(--text); font-size: 13px; font-weight: 700; }
.order-customer-fields input { width: 100%; min-height: 46px; padding: 11px 13px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--white); color: var(--text); }
.order-customer-fields input:focus { border-color: var(--color-action-text); outline: 3px solid var(--color-action-text); outline-offset: 2px; }
.kratos-order [data-whatsapp] { width: 100%; justify-content: center; margin-top: 20px; white-space: normal; }
.cart-note { color: var(--text-2); font-size: 12px; line-height: 1.65; }
.cart-note summary { cursor: pointer; }
.cart-empty { padding: 22px 0; color: var(--text-2); line-height: 1.6; }
.is-error { color: var(--color-action-text); }
.kratos-add { display: flex; align-items: center; gap: 8px; }
.kratos-add label { min-width: 0; }
.kratos-add button { min-height: 44px; }
.page-content > .kratos-order.kratos-order-page { max-width: none; }
.order-page-items, .order-page-actions { min-width: 0; }
.order-page-actions .order-customer-fields { margin-top: 0; }
.order-page-actions .btn { width: 100%; justify-content: center; margin-top: 12px; }
.order-page-actions .cart-note { margin: 14px 0 0; }
[data-global-status]:not(:empty) { position: fixed; right: 20px; bottom: 20px; left: 20px; z-index: 100; max-width: 560px; margin: auto; padding: 14px 20px; border-radius: var(--radius-sm); background: var(--text); color: var(--white); box-shadow: 0 2px 6px color-mix(in srgb, var(--color-institutional-dark) 15%, transparent); }

body.kratos-order-drawer-open { overflow: hidden; }
.kratos-order-drawer { position: fixed; inset: 0; z-index: 1000; display: flex; justify-content: flex-end; visibility: hidden; pointer-events: none; }
.kratos-order-drawer.is-open { visibility: visible; pointer-events: auto; }
.order-drawer-backdrop { position: absolute; inset: 0; padding: 0; background: var(--color-institutional-dark); opacity: 0; transition: opacity .2s ease; }
.kratos-order-drawer.is-open .order-drawer-backdrop { opacity: .58; }
.order-drawer-panel.kratos-order { position: relative; display: flex; width: min(100%, 384px); height: 100%; flex-direction: column; padding: 0; border: 0; border-radius: 0; background: var(--white); box-shadow: -12px 0 30px color-mix(in srgb, var(--color-institutional-dark) 20%, transparent); transform: translateX(100%); transition: transform .24s ease; }
.kratos-order-drawer.is-open .order-drawer-panel { transform: translateX(0); }
.order-drawer-header { padding: 26px 26px 18px; border-bottom: 1px solid var(--border); }
.order-drawer-close { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 50%; color: var(--text); }
.order-drawer-items { display: flex; min-height: 0; flex: 1; flex-direction: column; overflow-y: auto; padding: 0 26px; }
.order-drawer-empty { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.order-drawer-empty[hidden] { display: none; }
.order-drawer-empty p { max-width: 240px; margin: 0 0 4px; color: var(--text-2); font-size: 14px; line-height: 1.55; }
.order-drawer-empty .btn { width: min(100%, 250px); justify-content: center; }
.order-drawer-panel [data-order-notice] { margin: 0; padding: 0 26px; color: var(--text-2); font-size: 13px; line-height: 1.5; }
.order-drawer-footer { padding: 18px 26px 24px; border-top: 1px solid var(--border); background: var(--white); }
.order-drawer-footer .order-customer-fields { margin-top: 0; }
.order-drawer-footer .btn { width: 100%; margin-top: 12px; }
.order-drawer-footer .cart-note { margin: 12px 0 0; }

@media (max-width: 420px) {
  .product-order-add .kratos-add { align-items: stretch; flex-direction: column; }
  .product-order-add .kratos-add label, .product-order-add .kratos-add input { width: 100%; }
  .order-drawer-header { padding: 20px 20px 16px; }
  .order-drawer-items { padding: 0 20px; }
  .order-drawer-panel [data-order-notice] { padding: 0 20px; }
  .order-drawer-footer { padding: 16px 20px 20px; }
}

@media (min-width: 768px) {
  .kratos-order-page { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); column-gap: 36px; align-items: start; }
  .kratos-order-page .cart-header { grid-column: 1 / -1; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
  .order-page-actions { position: sticky; top: 110px; padding-left: 28px; border-left: 1px solid var(--border); }
}

@media (prefers-reduced-motion: reduce) {
  .order-drawer-backdrop, .order-drawer-panel.kratos-order { transition: none; }
}
.order-drawer-empty .order-drawer-contact { background: var(--color-institutional-dark); border-color: var(--white); color: var(--white); }

@media (hover:hover) and (pointer:fine) {

.order-drawer-close:hover { color: var(--color-action-text); }
.order-drawer-empty .order-drawer-contact:hover { background: color-mix(in srgb, var(--color-institutional-dark) 88%, var(--white)); border-color: var(--white); color: var(--white); }
}
/* Quantity controls share the same dimensions in cards, product and order. */
.quantity-stepper { display: grid; grid-template-columns: 44px minmax(44px, 1fr) 44px; width: 100%; max-width: 196px; flex: 0 0 auto; align-items: center; }
.quantity-stepper button { display: grid; place-items: center; width: 44px; min-height: 44px; border: 1px solid var(--border); background: var(--bg); font-size: 22px; border-radius: 6px; }
.quantity-stepper input, .kratos-add .quantity-stepper input, .order-item .quantity-stepper input { width: 100%; min-width: 0; padding: 8px 0; min-height: 44px; text-align: center; font-size: 16px; appearance: textfield; border-radius: 0; }
.quantity-stepper input::-webkit-inner-spin-button, .quantity-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.quantity-stepper button:disabled { background: var(--bg); color: var(--text-2); opacity: .65; }
.card-footer .quantity-stepper { max-width: none; }
.order-customer-fields input { font-size: 16px; }
.order-customer-fields label, .order-total, .cart-note, .product-order-add p, .order-drawer-panel [data-order-notice] { font-size: 14px; }
.cart-note summary { display: list-item; min-height: 44px; padding-block: 10px; font-size: 14px; }
.order-item { grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; }
.order-item > img { width: 48px; height: 48px; object-fit: contain; background: #fff; }
.order-item > a { grid-column: 2 / -1; display: flex; align-items: center; min-height: 44px; font-size: 15px; overflow-wrap: anywhere; }
.order-item-controls { grid-column: 1 / 3; display: grid; gap: 6px; font-size: 14px; }
.order-item .remove-btn { align-self: end; min-width: 44px; font-size: 14px; }
body.kratos-modal-open { overflow: hidden; }
.order-drawer-panel.kratos-order { height: 100vh; height: 100dvh; width: min(100%, 420px); overflow-y: auto; overscroll-behavior: contain; }
.order-drawer-header { flex-shrink: 0; padding: 20px; }
.order-drawer-close { width: 44px; height: 44px; flex-shrink: 0; }
.order-drawer-items { flex: 1 0 96px; min-height: 96px; padding-inline: 20px; }
.order-drawer-panel:has(.order-drawer-footer:not([hidden])) .order-drawer-items { flex: 1 1 auto; }
.order-drawer-footer { flex-shrink: 0; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); }
.order-drawer-footer .order-customer-fields { gap: 4px; }
.order-drawer-footer .cart-note { margin-block: 4px 0; }
.order-drawer-footer .cart-note p { margin-block: 4px 8px; }
.order-toast { position: fixed; right: 20px; left: 20px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 1100; display: flex; align-items: center; justify-content: space-between; gap: 12px; max-width: 560px; margin-inline: auto; padding: 8px 16px; border-radius: 10px; background: var(--text); color: #fff; box-shadow: 0 4px 20px rgb(0 0 0 / .2); }
.order-toast [data-global-status]:not(:empty) { position: static; margin: 0; padding: 0; background: transparent; box-shadow: none; font-size: 14px; line-height: 1.45; }
.order-toast button { min-height: 44px; min-width: 80px; color: #fff; font-size: 14px; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.order-toast.is-error { border: 2px solid var(--color-action); color: #fff; }
@media (max-height: 560px) { .order-drawer-panel:has(.order-drawer-footer:not([hidden])) .order-drawer-items { flex: 1 0 120px; } }
/* Dialogs also cover WordPress' administrator toolbar. */
.kratos-order-drawer { z-index: 100001; }
.order-toast { z-index: 100002; }
