/* checkout-cart lane (astron): cart / checkout / success additions on top of theme.css (static) */
/* busy: no whole-cart wash-out (panels/summary stay crisp), only the row being removed fades smoothly */
#mk-cart-body.is-busy { pointer-events: none; cursor: progress; }
.mk-cart-item, .mk-mini-item { transition: opacity .2s ease; }
.mk-cart-item.is-removing, .mk-mini-item.is-removing { opacity: .45; }
.mk-cart-item .mk-ci-info { min-width: 0; }
.mk-cart-item .nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.35; }
.mk-cart-item .mk-qty { flex-wrap: nowrap; white-space: nowrap; }
.mk-cart-item .mk-qty input { min-width: 0; }
.mk-cart-item .mk-del { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; transition: color .15s; }
.mk-cart-item .mk-del:hover, .mk-cart-item .mk-del:focus-visible { color: var(--mk-red); }
.mk-sum-row span:last-child { white-space: nowrap; padding-left: 12px; }
/* routine 6: fixed columns (qty / price / bin line up in every row), bin right of the line total, no separators */
.mk-cart-item { grid-template-columns: 96px minmax(0, 1fr) max-content 120px 32px; grid-template-areas: "img info qty pr del"; border: 0; }
.mk-cart-item + .mk-cart-item { border-top: 0; }
.mk-cart-item .mk-ci-img { grid-area: img; }
.mk-cart-item .mk-ci-info { grid-area: info; }
.mk-cart-item .mk-qty { grid-area: qty; height: 40px; border-radius: 8px; overflow: hidden; }
.mk-cart-item .mk-qty button { width: 36px; }
.mk-cart-item .mk-qty input { width: 44px; }
.mk-cart-item .pr { grid-area: pr; text-align: right; }
.mk-cart-item .mk-del { grid-area: del; color: #777; }
.mk-sum-total span:first-child { white-space: nowrap; }
/* total separator: crisp 1px hairline only (red accent removed on tester request) */
.mk-sum-total { position: relative; border-top: 0; margin-top: 14px; padding-top: 14px; align-items: baseline; }
.mk-sum-total::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--mk-border); }
.mk-sum-total::after { content: none; }
@media (max-width: 1023px) {
  .mk-cart-item { grid-template-columns: 70px max-content minmax(0, 1fr) 32px; grid-template-areas: "img info info info" "img qty pr del"; row-gap: 8px; column-gap: 10px; align-items: center; }
  .mk-cart-item .mk-ci-img { align-self: start; }
  .mk-cart-item .mk-qty, .mk-cart-item .pr, .mk-cart-item .mk-del { grid-column: auto; grid-row: auto; }
  .mk-cart-item .mk-qty { height: 36px; width: auto; }
  .mk-cart-item .mk-qty button { width: 32px; }
  .mk-cart-item .mk-qty input { width: 38px; }
  .mk-cart-item .pr { justify-self: end; font-size: 16px; }
}
@media (max-width: 420px) {
  .mk-sum-total { font-size: 16px; }
  .mk-sum-row { font-size: 14px; }
}

/* checkout: guest / account choice */
.mk-co-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-co-mode .mk-radio-card { margin-bottom: 0; font-size: 14px; }
.mk-co-mode + .mk-co-pass { margin-top: 10px; }
@media (max-width: 640px) { .mk-co-mode { grid-template-columns: 1fr; } }

/* header mini cart */
.mk-mini { position: fixed; z-index: 60; background: #fff; border: 1px solid var(--mk-border, #ddd); box-shadow: 0 10px 30px rgba(0, 0, 0, .18); padding: 14px; color: #232222; text-align: left; }
.mk-mini[hidden] { display: none; }
.mk-mini::before { content: ""; position: absolute; top: -7px; left: var(--mk-mini-arrow, 90%); width: 12px; height: 12px; margin-left: -6px; background: #fff; border-left: 1px solid var(--mk-border, #ddd); border-top: 1px solid var(--mk-border, #ddd); transform: rotate(45deg); }
.mk-mini.is-busy .mk-mini-list { pointer-events: none; cursor: progress; }
.mk-mini-head { font-weight: 800; font-style: italic; text-transform: uppercase; color: var(--mk-navy); font-size: 15px; margin-bottom: 8px; }
.mk-mini-head span { font-weight: 600; font-style: normal; text-transform: none; color: #555; font-size: 13px; }
/* dropdown grows with the cart down to the bottom of the viewport (--mk-mini-top set by checkout.js place()), only the item list scrolls */
.mk-mini:not([hidden]) { display: flex; flex-direction: column; max-height: calc(100vh - var(--mk-mini-top, 120px) - 8px); }
@supports (height: 100dvh) { .mk-mini:not([hidden]) { max-height: calc(100dvh - var(--mk-mini-top, 120px) - 8px); } }
.mk-mini > * { flex: 0 0 auto; }
.mk-mini > .mk-mini-list { flex: 0 1 auto; min-height: 64px; max-height: none; overflow-y: auto; overscroll-behavior: contain; }
.mk-mini-item { display: grid; grid-template-columns: 56px minmax(0, 1fr) 28px; gap: 10px; align-items: start; padding: 8px 0; }
.mk-mini-img img { width: 56px; height: 56px; object-fit: contain; }
.mk-mini-nm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.3; color: var(--mk-navy); }
.mk-mini-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; min-width: 0; }
/* mini qty = same skewed red stepper as product page / cart (catalog.css), one even box */
.mk-mini-qty { display: inline-flex; align-items: stretch; height: 30px; flex: 0 0 auto; border: 2px solid var(--mk-red); background: #fff; border-radius: 8px; transform: skewX(-14deg); margin: 0 6px 0 4px; overflow: hidden; }
.mk-mini-qty > * { transform: skewX(14deg); }
.mk-mini-qty button { width: 28px; padding: 0; border: 0; background: #fff; color: var(--mk-red); font-size: 16px; font-weight: 800; line-height: 1; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: color .15s; }
.mk-mini-qty button:hover, .mk-mini-qty button:focus-visible { color: var(--mk-navy); outline: none; }
.mk-mini-qty span { min-width: 30px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: var(--mk-navy); background: #fff; }
.mk-mini-unit { font-size: 12px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1 1 auto; }
.mk-mini-tot { color: var(--mk-red); white-space: nowrap; font-size: 14px; flex: 0 0 auto; margin-left: auto; }
.mk-mini-del { width: 28px; height: 28px; border: 0; background: none; color: #777; cursor: pointer; font-size: 15px; transition: color .15s; }
.mk-mini-del:hover, .mk-mini-del:focus-visible { color: var(--mk-red); }
.mk-mini-sum { border-top: 1px solid var(--mk-border, #ddd); margin-top: 6px; padding-top: 8px; font-size: 13px; }
.mk-mini-sum > div { display: flex; justify-content: space-between; gap: 12px; padding: 2px 0; }
.mk-mini-sum > div span:last-child { white-space: nowrap; }
.mk-mini-total { font-weight: 800; font-size: 15px !important; }
.mk-mini-total span:last-child { color: var(--mk-red); }
.mk-mini-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mk-mini-empty { text-align: center; padding: 10px 0 4px; }
.mk-mini-empty i { font-size: 34px; color: var(--mk-border-strong, #bbb); }
.mk-mini-empty p { margin: 8px 0 12px; font-weight: 600; }
.mk-co-nostock { color: var(--mk-red); font-weight: 600; }
/* catalog.css caps .mk-empty p at 560px; static has no cap on cart / success */
[data-oc-route-theme="checkout/cart"] .mk-empty p, [data-oc-route-theme="checkout/success"] .mk-empty p { max-width: none; }

/* checkout */
.mk-co-err { display: block; min-height: 0; font-size: 12px; color: #9f050d; margin-top: 3px; }
.mk-co-err:empty { display: none; }
#mk-co-form .is-invalid { border-color: #9f050d; }
.mk-co-alert { border: 1px solid #9f050d; color: #9f050d; background: #fff5f5; padding: 10px 12px; margin-bottom: 12px; font-size: 14px; }
.mk-co-alert[hidden], .mk-co-pass[hidden], .form-control.mk-co-pass[hidden] { display: none; }
.mk-co-account { margin-bottom: 4px; }
#mk-co-form .checkbox { background-color: #fff; border-color: var(--mk-border-strong, #bbb); border-radius: 2px; }
#mk-co-form .checkbox:checked { background-color: var(--mk-navy, #1e2a5a); border-color: var(--mk-navy, #1e2a5a); }
/* account.css ".mk-form .select{background:#fff}" removes the DaisyUI chevron: restore it (static look) */
#mk-co-form .select { -webkit-appearance: none; appearance: none; background-color: #fff; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23444' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right 16px center; background-size: 12px 8px; background-repeat: no-repeat; padding-right: 2.75rem; }
.mk-co-legal { font-size: 12px; line-height: 1.4; color: #555; margin-top: 8px; text-align: center; }
.mk-check-mini .text-sm { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* success summary */
.mk-co-summary { display: inline-grid; grid-template-columns: auto; gap: 4px; margin: 18px auto 0; text-align: left; border: 1px solid var(--mk-border); padding: 12px 16px; min-width: 300px; }
.mk-co-summary div { display: flex; justify-content: space-between; gap: 24px; font-size: 14px; }
.mk-co-summary dt { color: #555; white-space: nowrap; }
.mk-co-summary dd { text-align: right; overflow-wrap: anywhere; }
.mk-co-summary dd { font-weight: 700; color: var(--mk-navy); }

@media (max-width: 640px) {
  .mk-co-summary { min-width: 0; width: 100%; max-width: 100%; box-sizing: border-box; padding: 10px 12px; }
  /* iOS: values (email, shipping, price) must stay inside the box: wrap row, value goes to next line if needed */
  .mk-co-summary div { flex-wrap: wrap; gap: 0 12px; min-width: 0; }
  .mk-co-summary dt { flex: 0 0 auto; }
  .mk-co-summary dd { flex: 1 1 auto; min-width: 0; max-width: 100%; margin-left: auto; }
  .mk-co-summary dd .dh-nw, .mk-co-summary dd a { white-space: normal; overflow-wrap: anywhere; }
}
/* checkout submit: own inline spinner instead of DaisyUI .loading (that one rotated the whole button) */
#mk-co-form button[type="submit"].is-sending, form button[type="submit"].is-sending { pointer-events: none; cursor: progress; opacity: 1; color: #fff; background: var(--mk-red, #9f050d); border-color: var(--mk-red, #9f050d); gap: 10px; transform: none; animation: none; }
button[type="submit"] .mk-btn-spin { display: none; }
button[type="submit"].is-sending .mk-btn-spin { display: inline-block; flex: none; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: mk-btn-spin .7s linear infinite; }
@keyframes mk-btn-spin { to { transform: rotate(360deg); } }
/* dh-co-spin: spinner + label always in one row (DaisyUI .btn has flex-wrap:wrap -> spinner jumped above the text on mobile) */
#mk-co-form button[type="submit"] { flex-wrap: nowrap; white-space: nowrap; }
#mk-co-form button[type="submit"].is-sending { gap: 8px; }
#mk-co-form button[type="submit"].is-sending .mk-btn-spin { box-sizing: border-box; align-self: center; margin: 0; }
@media (max-width: 479px) {
  #mk-co-form button[type="submit"] { font-size: min(14px, calc((100vw - 134px) / 16.6)); padding-left: 16px; padding-right: 16px; }
}
