.mdco-add-to-order,.mdco-primary,.mdco-submit{background:#1760ae!important;color:#fff!important;border:0!important;border-radius:6px!important;padding:12px 17px!important;font-weight:750!important;font-size:14px!important;line-height:1.2!important;text-align:center!important;cursor:pointer!important;text-decoration:none!important;display:inline-flex!important;align-items:center;justify-content:center;gap:7px;max-width:100%;transition:background .15s ease,transform .15s ease}
.mdco-add-to-order:hover,.mdco-primary:hover,.mdco-submit:hover{background:#0c396e!important;color:#fff!important}.mdco-add-to-order:focus-visible,.mdco-submit:focus-visible,.mdco-floating-order:focus-visible{outline:3px solid #e9a32c!important;outline-offset:3px!important}.mdco-add-to-order.mdco-just-added{background:#198054!important}
.mdco-loop-button{margin:12px 0 5px!important;position:relative;z-index:4}.mdco-loop-button .mdco-add-to-order{min-height:40px;width:100%!important}
.mdco-single-add{margin:20px 0 14px}.mdco-single-add .mdco-add-to-order{min-height:48px}.mdco-single-add small{display:block;margin-top:9px;color:#62758a}
/* Replace only the legacy purchase UI — preserve product links and catalog browsing. */
.woocommerce .products .ajax_add_to_cart:not(.mdco-add-to-order),.woocommerce .products .add_to_cart_button:not(.mdco-add-to-order),.woocommerce .products a.added_to_cart,.woocommerce .single-product form.cart,.single-product .single_add_to_cart_button,.kapee-products .ajax_add_to_cart{display:none!important}
.mdco-floating-order{position:fixed!important;z-index:9998!important;right:24px;bottom:25px;display:flex!important;gap:9px;align-items:center;justify-content:center;padding:13px 18px;color:#fff!important;background:#113e75!important;border-radius:999px!important;box-shadow:0 6px 25px #132d4f3d!important;font-weight:700!important;text-decoration:none!important;font-size:14px!important}
.mdco-floating-order strong,.mdco-count{min-width:25px;height:25px;padding:2px 6px;border-radius:20px;background:#ffd15b;color:#113456;text-align:center;display:inline-flex;justify-content:center;align-items:center;font-weight:800}
.mdco-page{max-width:1160px;margin:35px auto 65px;padding:0 20px;color:#162e4c}.mdco-heading{margin-bottom:25px}.mdco-heading h1{font-size:clamp(30px,3vw,42px);font-weight:850;line-height:1.12;color:#123858;margin:8px 0 11px}.mdco-heading p{max-width:720px;color:#556b80;font-size:15px;line-height:1.6}.mdco-kicker{font-size:11px;letter-spacing:.21em;font-weight:800;color:#168bd4}
.mdco-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,1fr);gap:24px;align-items:start}
.mdco-items-panel,.mdco-form-panel{background:#fff;padding:24px;border:1px solid #e0e6ed;border-radius:12px;box-shadow:0 5px 18px #123c5910}.mdco-page h2{font-size:21px;line-height:1.25;font-weight:800;color:#113456;margin:0 0 16px}.mdco-muted{font-size:14px;color:#718397;padding:20px 0}.mdco-help,.mdco-small{color:#687989;font-size:12px;line-height:1.55;margin-top:12px}.mdco-back{display:inline-block;margin-top:13px;color:#155dac!important;font-weight:700}
.mdco-item{display:flex;gap:12px;align-items:center;border-bottom:1px solid #ebf0f4;padding:12px 0}.mdco-item:last-child{border-bottom:0}.mdco-image{width:64px;min-width:64px;height:64px;display:flex;align-items:center;justify-content:center;background:#f1f6f9;border-radius:6px;overflow:hidden}.mdco-image img{width:100%;height:100%;object-fit:contain}.mdco-item-text{flex:1;min-width:0}.mdco-item-text a{font-size:13px;font-weight:700;text-decoration:none!important;color:#193d63!important}.mdco-item-text small{display:block;color:#bd7e16;font-size:11px;margin-top:3px}.mdco-qty-label{font-size:11px;color:#6a7886;font-weight:700;text-align:center;white-space:nowrap}.mdco-qty-label input{display:block!important;margin:3px auto 0!important;width:72px!important;height:38px!important;background:#fff!important;border:1px solid #cad5de!important;border-radius:5px!important;text-align:center!important;padding:4px!important;min-width:0!important}.mdco-remove{color:#af3151;border:0;background:transparent;font-size:27px;line-height:1;padding:2px 8px;cursor:pointer}
.mdco-form-panel label:not(.mdco-consent){display:block;margin:0 0 14px;color:#304a62;font-weight:700;font-size:13px}.mdco-form-panel label>span{color:#c82e50}.mdco-form-panel input:not([type=checkbox]),.mdco-form-panel textarea{display:block;box-sizing:border-box;margin-top:6px!important;width:100%!important;background:#fff!important;border:1px solid #cdd7e3!important;border-radius:5px!important;padding:11px 12px!important;font-size:14px!important;color:#17344c!important;min-height:44px!important}.mdco-form-panel textarea{min-height:90px!important}.mdco-consent{display:flex;gap:9px;align-items:flex-start;margin:14px 0;color:#42596e;font-size:12px;line-height:1.45}.mdco-consent input{flex:0 0 auto;margin-top:1px}.mdco-submit{width:100%;min-height:48px;margin-top:5px}.mdco-submit:disabled{opacity:.5;cursor:not-allowed}.mdco-trap{position:absolute!important;left:-9999px!important;height:1px!important;width:1px!important;overflow:hidden!important}.mdco-success{max-width:680px;margin:60px auto;padding:35px;background:#f3f9ff;border:1px solid #c9e1f8;border-radius:9px}.mdco-success h1{font-size:29px;color:#154a80}.mdco-success p{line-height:1.6;color:#38556d}.mdco-success .mdco-primary{margin-top:12px}
@media(max-width:760px){.mdco-layout{grid-template-columns:minmax(0,1fr)}.mdco-page{padding:0 15px}.mdco-items-panel,.mdco-form-panel{padding:19px}.mdco-floating-order{right:12px;bottom:14px;padding:11px 15px;font-size:13px}.mdco-item{gap:7px}.mdco-image{width:48px;min-width:48px;height:48px}.mdco-qty-label input{width:57px!important}}
@media(prefers-reduced-motion:reduce){.mdco-add-to-order,.mdco-primary,.mdco-submit{transition:none!important}}

/* v1.1: Optional notes for each ordered item. */
.mdco-note-label{display:block;margin-top:8px;font-size:11px;color:#64798a;font-weight:600}.mdco-note-label input{display:block;box-sizing:border-box;width:100%;max-width:360px;margin-top:4px;padding:7px 9px;background:#fff;border:1px solid #d3dce5;border-radius:5px;font-size:12px;color:#183850}.mdco-note-label input:focus{border-color:#2471b6;outline:2px solid #2471b629}

/* v1.1.2 — Product card alignment with Kapee and Homepage Product Grid v1.5.
   WHY: the previous fix changed the card height to auto, but the homepage grid
   uses fixed grid tracks. The visual card escaped its track; controls were cut
   and rows overlapped. Keep both card AND row the same height and position the
   real, JS-bound selection control inside a reserved footer region. */

/* Normal shop/product listings: one real button in ordinary document flow. */
.woocommerce .products .product.mdco-product-card,
.woocommerce .products div.product.mdco-product-card {
  min-width:0!important;
  box-sizing:border-box!important;
}
.woocommerce .products .product.mdco-product-card > .product-wrapper {
  position:relative!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.woocommerce .products .mdco-product-card > .product-wrapper > .mdco-loop-button {
  position:relative!important;
  clear:both!important;
  display:block!important;
  flex:0 0 auto!important;
  width:100%!important;
  max-width:100%!important;
  margin:10px 0 4px!important;
  padding:0!important;
  z-index:15!important;
  opacity:1!important;
  visibility:visible!important;
  transform:none!important;
  pointer-events:auto!important;
}
.woocommerce .products .mdco-product-card > .product-wrapper > .mdco-loop-button > .mdco-add-to-order {
  display:flex!important;
  position:relative!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:44px!important;
  box-sizing:border-box!important;
  max-width:100%!important;
  padding:9px 12px!important;
  font-size:14px!important;
  margin:0!important;
  z-index:16!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
  transform:none!important;
}
/* Remove the empty Kapee action rail from catalog-only listings.
   Do not hide the product image/link, order action, or single-product controls. */
.woocommerce .products .mdco-product-card .product-price-buttons {
  display:none!important;
}
/* On WPBakery home widgets the .woocommerce wrapper is often absent. */
html body .products-and-categories-box .products .product.mdco-product-card .product-price-buttons {
  display:none!important;
}

/* Homepage Products & Categories widget has an independent fixed-row grid.
   Consistent tracks with enough reserved space for photo, name AND CTA. */
html body .products-and-categories-box {
  --md-card-height: 304px!important;
  --md-image-stage: 174px!important;
  --md-image-width: 178px!important;
  --md-image-height: 165px!important;
}
html body .products-and-categories-box .products.zm-md-static-grid,
html body .products-and-categories-box .products.zm-md-grid,
html body .products-and-categories-box .products.products-wrap:not(.owl-carousel),
html body .products-and-categories-box .products.row:not(.owl-carousel) {
  grid-auto-rows:var(--md-card-height)!important;
  align-items:stretch!important;
}
html body .products-and-categories-box .products .product.mdco-product-card,
html body .products-and-categories-box .products div.product.mdco-product-card {
  position:relative!important;
  display:block!important;
  height:var(--md-card-height)!important;
  min-height:var(--md-card-height)!important;
  max-height:var(--md-card-height)!important;
  overflow:hidden!important;
  margin:0!important;
  box-sizing:border-box!important;
}
html body .products-and-categories-box .products .product.mdco-product-card > .product-wrapper,
html body .products-and-categories-box .products div.product.mdco-product-card > .product-wrapper {
  display:flex!important;
  flex-direction:column!important;
  justify-content:flex-start!important;
  position:relative!important;
  height:100%!important;
  min-height:100%!important;
  max-height:100%!important;
  width:100%!important;
  min-width:0!important;
  padding:8px 8px 60px!important;
  margin:0!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  transform:none!important;
}
html body .products-and-categories-box .products .product.mdco-product-card > .product-wrapper > .product-image {
  flex:0 0 var(--md-image-stage)!important;
  height:var(--md-image-stage)!important;
  max-height:var(--md-image-stage)!important;
  min-height:var(--md-image-stage)!important;
  overflow:hidden!important;
}
html body .products-and-categories-box .products .product.mdco-product-card > .product-wrapper > .product-info {
  flex:0 0 40px!important;
  height:40px!important;
  max-height:40px!important;
  min-height:40px!important;
  overflow:hidden!important;
}
html body .products-and-categories-box .products .product.mdco-product-card > .product-wrapper > .mdco-loop-button {
  position:absolute!important;
  left:8px!important;
  right:8px!important;
  bottom:8px!important;
  width:auto!important;
  max-width:none!important;
  height:44px!important;
  min-height:44px!important;
  margin:0!important;
  padding:0!important;
  display:block!important;
  z-index:30!important;
  isolation:isolate;
  opacity:1!important;
  visibility:visible!important;
  pointer-events:auto!important;
}
html body .products-and-categories-box .products .product.mdco-product-card > .product-wrapper > .mdco-loop-button > button.mdco-add-to-order {
  width:100%!important;
  height:44px!important;
  min-height:44px!important;
  max-height:44px!important;
  margin:0!important;
  padding:7px 7px!important;
  white-space:normal!important;
  line-height:1.25!important;
  font-size:13px!important;
  box-sizing:border-box!important;
  cursor:pointer!important;
  pointer-events:auto!important;
}
@media(max-width:767px) {
  html body .products-and-categories-box {
    --md-card-height:248px!important;
    --md-image-stage:132px!important;
    --md-image-width:124px!important;
    --md-image-height:125px!important;
  }
  html body .products-and-categories-box .products .product.mdco-product-card > .product-wrapper { padding:6px 6px 51px!important; }
  html body .products-and-categories-box .products .product.mdco-product-card > .product-wrapper > .product-info {
    height:36px!important;min-height:36px!important;max-height:36px!important;flex:0 0 36px!important;
  }
  html body .products-and-categories-box .products .product.mdco-product-card > .product-wrapper > .mdco-loop-button {
    left:6px!important;right:6px!important;bottom:6px!important;height:40px!important;min-height:40px!important;
  }
  html body .products-and-categories-box .products .product.mdco-product-card > .product-wrapper > .mdco-loop-button > button.mdco-add-to-order {
    height:40px!important;min-height:40px!important;max-height:40px!important;font-size:11px!important;padding:6px 4px!important;
  }
}
