/* MarketKit 1.4.10 — header cart counter + practical, spacious cart drawer.
   Loaded after repair, mobile, journey and identity. Does not affect auth drawer. */

/* The header icon must retain its own visible count on desktop/tablet/mobile. */
body.mk-shell .mk-header-actions > .mk-header-cart-action {
  position:relative!important; isolation:isolate; overflow:visible!important;
  min-width:42px!important; min-height:40px!important;
}
body.mk-shell .mk-header-actions > .mk-header-cart-action > .mk-cart-count,
body.mk-identity.mk-shell .mk-header .mk-header-actions > .mk-header-cart-action > .mk-cart-count {
  position:absolute!important; display:flex!important; align-items:center!important; justify-content:center!important;
  z-index:5!important; inset-block-start:-8px!important; inset-block-end:auto!important;
  inset-inline-end:-7px!important; inset-inline-start:auto!important;
  min-width:21px!important; width:auto!important; height:21px!important;
  padding:0 4px!important; margin:0!important; border:2px solid var(--mk-header-bg,#feee00)!important;
  border-radius:999px!important; background:#162a4a!important; color:#fff!important;
  font:700 11px/1 Arial,sans-serif!important; box-sizing:border-box!important;
  opacity:1!important; visibility:visible!important; transform:none!important;
  pointer-events:none!important;
}
body.mk-shell .mk-mobile-cart .mk-cart-count{
  display:flex!important;align-items:center!important;justify-content:center!important;
  min-width:20px!important;height:20px!important;background:#172d52!important;color:#fff!important;
  border:2px solid #fff!important;z-index:3!important;font:700 10px/1 Arial,sans-serif!important;
}

/* Keep the panel below the WordPress admin bar and never scroll the whole drawer. */
body.mk-shell #mk-cart {
  position:fixed!important; top:var(--mk-admin-offset,0px)!important; bottom:0!important;
  inset-inline-start:auto; left:0!important; right:auto!important;
  width:min(408px,100vw)!important; max-width:100vw!important;
  height:calc(100dvh - var(--mk-admin-offset,0px))!important;
  max-height:calc(100dvh - var(--mk-admin-offset,0px))!important;
  padding:0!important; margin:0!important;
  display:flex!important; flex-direction:column!important; overflow:hidden!important;
  border-radius:0!important; background:#fff!important;
  box-shadow:12px 0 45px #1125432e!important;
}
body.mk-shell #mk-cart[hidden]{display:none!important}

/* Compact title and line-item count, without taking away shopping space. */
body.mk-shell #mk-cart > .mk-cart-heading {
  flex:0 0 auto!important; padding:14px 19px 12px!important;
  min-height:72px!important; gap:8px!important; background:#fff!important;
}
body.mk-shell #mk-cart .mk-cart-heading > div > span{font-size:10px!important;line-height:1.25!important}
body.mk-shell #mk-cart .mk-cart-heading h2{
  margin:2px 0 0!important; font-size:19px!important; font-weight:800!important;
  line-height:1.35!important; gap:8px!important;
}
body.mk-shell #mk-cart .mk-cart-heading .mk-cart-count{
  position:static!important; display:inline-flex!important; height:23px!important;min-width:23px!important;
  color:#244d9b!important;background:#edf3ff!important;border:0!important;padding:2px 5px!important;
}
body.mk-shell #mk-cart .mk-cart-heading > .mk-icon-button{width:36px!important;height:36px!important;min-height:36px!important}
body.mk-shell #mk-cart > .mk-mini-cart-content,
body.mk-shell #mk-cart .mk-mini-cart-content {
  flex:1 1 auto!important; display:flex!important; flex-direction:column!important;
  min-height:0!important; height:auto!important; max-height:none!important;
  overflow:hidden!important; padding:0!important;
}
body.mk-shell #mk-cart .mk-cart-summary-note{
  flex:0 0 auto!important; padding:8px 19px!important; min-height:34px!important;
  line-height:1.3!important; font-size:11px!important; border-radius:0!important;
}

/* Only the items area scrolls; hide the ugly native scrollbar, not scrolling. */
body.mk-shell #mk-cart .mk-mini-cart-items{
  flex:1 1 0%!important; min-height:0!important; max-height:none!important;
  overflow-y:auto!important; overflow-x:hidden!important;
  padding:0 19px!important; margin:0!important;
  overscroll-behavior:contain; scrollbar-width:none!important;
  -webkit-overflow-scrolling:touch;
}
body.mk-shell #mk-cart .mk-mini-cart-items::-webkit-scrollbar {display:none!important;width:0!important;height:0!important}
body.mk-shell #mk-cart ul.mk-cart-items{display:block!important;margin:0!important;padding:0!important;max-height:none!important;overflow:visible!important}
body.mk-shell #mk-cart li.mk-cart-item{
  display:grid!important; grid-template-columns:68px minmax(0,1fr) 24px!important;
  gap:11px!important; padding:12px 0!important; margin:0!important;
  min-height:101px!important; border-bottom:1px solid #e9eef5!important;align-items:start!important;
}
body.mk-shell #mk-cart .mk-cart-item-photo{
  width:68px!important; height:80px!important; min-height:80px!important;
  padding:7px!important; background:#f7f9fb!important; border-radius:11px!important;
}
body.mk-shell #mk-cart .mk-cart-item-photo img{width:100%!important;height:100%!important;object-fit:contain!important;margin:0!important;float:none!important}
body.mk-shell #mk-cart .mk-cart-item-copy{min-width:0!important;overflow:hidden}
body.mk-shell #mk-cart .mk-cart-item-name{
  display:-webkit-box!important; -webkit-box-orient:vertical!important; -webkit-line-clamp:2!important;
  overflow:hidden!important; font-size:12px!important;font-weight:750!important;
  line-height:1.5!important;min-height:0!important;margin:0!important;
}
body.mk-shell #mk-cart .mk-cart-item-price{
  display:flex!important; gap:6px!important; margin:4px 0!important;
  font-size:13px!important; line-height:1.3!important;
}
body.mk-shell #mk-cart .mk-cart-item-quantity{font-size:11px!important}
body.mk-shell #mk-cart .mk-cart-quantity-control{display:inline-flex!important;width:112px!important;max-width:100%!important;justify-content:space-between!important;margin:1px 0!important;height:29px!important;border-radius:8px!important}
body.mk-shell #mk-cart .mk-cart-quantity-control button{min-width:29px!important;height:27px!important;padding:2px!important}
body.mk-shell #mk-cart .mk-cart-quantity-control span{min-width:27px!important}
body.mk-shell #mk-cart .mk-cart-remove{width:24px!important;height:24px!important;padding:4px!important}

/* A short checkout bar: two direct actions, no large empty bottom region. */
body.mk-shell #mk-cart .mk-mini-cart-footer{
  flex:0 0 auto!important; display:grid!important;grid-template-columns:minmax(0,1fr)!important;
  gap:10px!important; margin:0!important; padding:12px 19px max(12px,env(safe-area-inset-bottom))!important;
  border-top:1px solid #e5eaf2!important; box-shadow:0 -4px 16px #11243e0d!important;
  background:#fff!important;
}
body.mk-shell #mk-cart .mk-mini-cart-subtotal{grid-column:1/-1!important;margin:0!important;min-width:0!important;gap:8px!important}
body.mk-shell #mk-cart .mk-mini-cart-subtotal > strong{font-size:12px!important}
body.mk-shell #mk-cart .mk-mini-cart-subtotal .mk-price{font-size:20px!important;line-height:1.3!important;overflow-wrap:anywhere!important}
body.mk-shell #mk-cart .mk-mini-cart-footer > p{
  grid-column:1/-1!important;margin:0!important;padding:0!important;
  font-size:10px!important;line-height:1.4!important;
}
body.mk-shell #mk-cart .mk-mini-cart-footer > .mk-checkout-button,
body.mk-shell #mk-cart .mk-mini-cart-footer > .mk-outline-button{
  grid-column:1/-1!important; display:flex!important; align-items:center!important; justify-content:center!important;
  width:100%!important; padding:8px!important; margin:0!important; min-width:0!important;
  min-height:48px!important; height:auto!important; border-radius:10px!important;
  font-size:12px!important; font-weight:800!important; text-align:center!important;
  line-height:1.4!important; white-space:normal!important;
}
body.mk-shell #mk-cart .mk-mini-cart-footer > .mk-text-link{display:none!important}
/* Mini-cart actions are full-width and stacked; colors stay under MarketKit theme variables. */
body.mk-shell #mk-cart .mk-mini-cart-footer > .mk-outline-button,
body.mk-shell #mk-cart .mk-mini-cart-footer > .mk-checkout-button{
  background:var(--mk-blue,#3866df)!important;
  border:1px solid var(--mk-blue,#3866df)!important;
  color:#fff!important;
}
body.mk-shell #mk-cart .mk-mini-cart-footer > :is(.mk-outline-button,.mk-checkout-button):focus-visible{
  outline:3px solid var(--mk-blue,#3866df);outline-offset:2px;
}

@media(max-width:520px){
 body.mk-shell #mk-cart{width:100vw!important;max-width:100vw!important}
 body.mk-shell #mk-cart > .mk-cart-heading{padding:12px 14px 10px!important;min-height:64px!important}
 body.mk-shell #mk-cart .mk-cart-summary-note{padding-inline:14px!important}
 body.mk-shell #mk-cart .mk-mini-cart-items{padding:0 14px!important}
 body.mk-shell #mk-cart li.mk-cart-item{grid-template-columns:62px minmax(0,1fr) 22px!important;gap:9px!important;min-height:96px!important}
 body.mk-shell #mk-cart .mk-cart-item-photo{width:62px!important;height:73px!important;min-height:73px!important}
 body.mk-shell #mk-cart .mk-mini-cart-footer{padding:10px 14px max(12px,env(safe-area-inset-bottom))!important}
 body.mk-shell #mk-cart .mk-mini-cart-footer>.mk-checkout-button,
 body.mk-shell #mk-cart .mk-mini-cart-footer>.mk-outline-button{min-height:42px!important;font-size:11px!important}
}
@media(max-height:620px){
 body.mk-shell #mk-cart .mk-cart-heading{min-height:56px!important;padding-block:9px!important}
 body.mk-shell #mk-cart .mk-cart-summary-note{padding-block:5px!important;min-height:28px!important}
 body.mk-shell #mk-cart .mk-mini-cart-footer>p{display:none!important}
 body.mk-shell #mk-cart .mk-mini-cart-footer{padding-block:8px!important}
}
