/* ElectroJC cart/checkout lane additions (theme.css stays as in static) */
/* static: only index.html has body.mk-dark; cart/checkout/success are light (header.twig sets mk-dark everywhere) */
body.mk-dark:has([data-oc-route-theme^="checkout/"]) { background: #fff; color: #333; }
body.mk-dark:has([data-oc-route-theme^="checkout/"]) .mk-crumbs.breadcrumbs { color: inherit; }
[data-mk-cart].mk-busy { opacity: .7; pointer-events: none; transition: opacity .15s; }
.mk-cart-item > div:nth-child(2) { min-width: 0; }
.mk-cart-item .mk-ci-sub { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mk-cart-item .mk-qty input { outline: none; }
.mk-summary .card-body > div > :last-child { white-space: nowrap; }
.mk-form .mk-ferr { color: #c62828; font-size: 12px; margin: 2px 0 0; min-height: 0; }
.mk-form .mk-ferr:empty { display: none; }
.mk-form .mk-invalid { border-color: #c62828; }
.mk-consent-line { display: block; color: #555; font-size: 12px; margin-top: 10px; }
.mk-co-item span.flex-1 { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.mk-ok-sum { max-width: 460px; margin: 18px auto 6px; text-align: left; border: 1px solid #e3e3e3; border-radius: 12px; background: #fff; padding: 14px 16px; }
.mk-ok-num { font-size: 15px; margin-bottom: 4px; }
.mk-ok-sum img { font-size: 0; }
.mk-ok-row { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding-top: 6px; }
/* routine 6 */
.mk-cart-item .mk-ci-info > a { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mk-cart-item .mk-ci-sub { -webkit-line-clamp: 2; }
@media (max-width: 767px) { .mk-cart-item .mk-ci-sub { -webkit-line-clamp: 1; } .mk-cart-item .mk-ci-info > a { line-height: 1.3; } }
.mk-acc-mode { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 12px 14px; margin-bottom: 14px; border: 1px solid #e3e3e3; border-radius: 10px; background: #fafafa; font-size: 14px; }
.mk-acc-mode label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.mk-acc-login { margin-left: auto; font-size: 13px; text-decoration: underline; color: #333; }
[data-oc-route-theme^="checkout/"] input[type=radio], [data-oc-route-theme^="checkout/"] input[type=checkbox] { accent-color: #111; background-color: #fff; border-color: #bbb; color-scheme: light; }
[data-oc-route-theme^="checkout/"] .radio:checked { background-color: #fff; color: #111; border-color: #111; box-shadow: 0 0 0 3px #fff inset, 0 0 0 12px #111 inset; }
.mk-ok-total { font-size: 18px; font-weight: 800; border-top: 1px solid #eee; margin-top: 6px; padding-top: 8px; }
/* routine 9 (mobile): light cart/checkout without :has (old Safari/Edge), full-width main buttons on phones */
body.mk-dark.mk-page-cart, body.mk-dark.mk-page-checkout, body.mk-dark.mk-page-success { background: #fff; color: #333; }
body.mk-dark.mk-page-cart .mk-crumbs.breadcrumbs, body.mk-dark.mk-page-checkout .mk-crumbs.breadcrumbs, body.mk-dark.mk-page-success .mk-crumbs.breadcrumbs { color: inherit; }
@media (max-width: 767px) {
  .mk-summary > .card-body, [data-oc-route-theme="checkout/checkout"] .card > .card-body { padding: 18px 16px; }
  [data-mk-checkout] button[type=submit], .mk-summary .btn, [data-oc-route-theme="checkout/success"] .btn { width: 100%; }
}
/* routine 22: DaisyUI 4 .loading turns the whole .btn into a spinner mask (ragged yellow/black blob) -> keep the button, draw a clean spinner inside */
[data-oc-route-theme="checkout/checkout"] .btn.loading { -webkit-mask-image: none !important; mask-image: none !important; aspect-ratio: auto !important; width: auto; display: inline-flex; position: relative; pointer-events: none; background: var(--mk-yellow) !important; color: transparent !important; border: 0 !important; opacity: 1; }
[data-oc-route-theme="checkout/checkout"] .btn.loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border: 2.5px solid #000; border-right-color: transparent; border-radius: 50%; animation: mk-co-spin .7s linear infinite; }
@keyframes mk-co-spin { to { transform: rotate(360deg); } }
@media (max-width: 767px) { [data-mk-checkout] button[type=submit].loading { width: 100%; } }
/* routine 65: on phones "Peso: 22,00kg × 2 = 44,00kg" wraps to 2 lines when qty > 1 and the whole cart row jumps -> always reserve 2 lines for the weight */
@media (max-width: 767px) { .mk-cart-item .mk-ci-weight { line-height: 16px; min-height: 32px; } }
