/* Muscle Up Dynamic Cart — drawer + floating button (Muscle Up red theme) */
.mudc-root{--mudc-accent:#e60000;--mudc-ink:#1a1a1a;--mudc-muted:#666666;--mudc-line:#e0e0e0;position:relative;z-index:99998;}
/* scroll lock while the drawer is open — applied to html AND body so it
 * actually holds on iOS, and released by JS on close/restore. */
html.mudc-open,body.mudc-open{overflow:hidden;overscroll-behavior:none;}

/* floating button */
.mudc-fab{position:fixed;bottom:22px;right:22px;width:56px;height:56px;border-radius:50%;border:none;cursor:pointer;background:var(--mudc-accent);color:#fff;display:flex;align-items:center;justify-content:center;box-shadow:0 10px 28px rgba(20,20,20,.3);transition:transform .15s ease, filter .15s ease;z-index:99999;}
.mudc-fab:hover{transform:translateY(-2px);filter:brightness(.93);}
.mudc-fab:active{transform:translateY(0);}
.mudc-fab .mudc-ic{width:24px;height:24px;display:block;}
.mudc-fab-count{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;padding:0 6px;border-radius:10px;background:#fff;color:var(--mudc-accent);font-size:11px;font-weight:700;line-height:20px;text-align:center;border:1px solid var(--mudc-accent);}
/* The floating button shows on every page and every device — including the
 * cart page on desktop, where it opens the side cart over the cart table. */
.mudc-root.mudc-left .mudc-fab{right:auto;left:22px;}

/* overlay + drawer */
.mudc-overlay{position:fixed;inset:0;background:rgba(12,16,22,.55);opacity:0;visibility:hidden;transition:opacity .25s ease, visibility .25s ease;z-index:99998;}
.mudc-drawer{position:fixed;top:0;bottom:0;right:0;width:400px;max-width:92vw;background:#ffffff;display:flex;flex-direction:column;box-shadow:-18px 0 46px rgba(12,16,22,.22);transform:translateX(105%);transition:transform .28s ease;z-index:99999;}
.mudc-root.mudc-left .mudc-drawer{right:auto;left:0;transform:translateX(-105%);box-shadow:18px 0 46px rgba(12,16,22,.22);}
.mudc-root.mudc-on .mudc-overlay{opacity:1;visibility:visible;}
.mudc-root.mudc-on .mudc-drawer{transform:translateX(0);}

/* header — solid accent bar */
.mudc-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;background:var(--mudc-accent);flex:0 0 auto;}
.mudc-head-title{font-size:15px;font-weight:700;color:#fff;letter-spacing:.02em;text-transform:uppercase;}
.mudc-head-count{font-weight:700;color:#fff;}
.mudc-close{width:34px;height:34px;border:none;border-radius:8px;background:rgba(255,255,255,.18);color:#fff;font-size:20px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.mudc-close:hover{background:rgba(255,255,255,.32);}

/* notices */
.mudc-notices{padding:0 20px;}
.mudc-notice{margin-top:12px;padding:10px 12px;border-radius:8px;font-size:13px;line-height:1.45;}
.mudc-notice-success{background:#ecf7ed;color:#116329;border:1px solid #bfe6c7;}
.mudc-notice-error{background:#fbeaec;color:#8a1a1a;border:1px solid #f0c4c7;}
.mudc-notice-notice,.mudc-notice-info{background:#eef4fb;color:#1d4ed8;border:1px solid #c9dbf5;}
.mudc-notice a{text-decoration:underline;}

/* body + items — rows separated by dashed accent lines */
.mudc-body{flex:1;overflow-y:auto;-webkit-overflow-scrolling:touch;overscroll-behavior:contain;padding:4px 20px 8px;}
.mudc-root.mudc-loading .mudc-body{opacity:.55;}
.mudc-loading-wrap{display:flex;flex-direction:column;align-items:center;gap:12px;padding:60px 0;color:var(--mudc-muted);font-size:14px;}
.mudc-spin{display:inline-block;width:26px;height:26px;border:3px solid #e6e9ee;border-top-color:var(--mudc-accent);border-radius:50%;animation:mudc-spin .7s linear infinite;}
@keyframes mudc-spin{to{transform:rotate(360deg);}}

/* spend-more progress bar — distance to the next discount tier */
.mudc-spend{padding:14px 0 2px;}
.mudc-spend-text{font-size:13px;font-weight:600;color:var(--mudc-ink);line-height:1.4;}
.mudc-spend-text .woocommerce-Price-amount{color:var(--mudc-accent);font-weight:700;}
.mudc-spend-bar{margin-top:8px;height:6px;border-radius:999px;background:#f2e6e6;overflow:hidden;}
.mudc-spend-fill{height:100%;border-radius:999px;background:var(--mudc-accent);transition:width .3s ease;}
.mudc-exclude-note{display:flex;gap:8px;align-items:flex-start;margin-top:10px;padding:9px 11px;border-radius:8px;background:#faf3f3;border:1px solid #f0dede;}
.mudc-exclude-ic{flex:0 0 16px;width:16px;height:16px;border-radius:50%;background:var(--mudc-accent);color:#fff;font-size:11px;font-weight:700;line-height:16px;text-align:center;font-style:normal;}
.mudc-exclude-text{font-size:12px;line-height:1.45;color:#6b6b6b;}
.mudc-exclude-text strong{color:var(--mudc-ink);font-weight:700;}
.mudc-exclude-text .woocommerce-Price-amount{color:var(--mudc-ink);font-weight:600;}

.mudc-items{display:flex;flex-direction:column;}
/* items — compact readable row (approved mockup): thumbnail left, name +
 * variation text, a fixed price column, then one compact stepper and a
 * trash icon. The name always wraps at words — never one word per line. */
.mudc-items{display:flex;flex-direction:column;}
.mudc-item{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid #f0f0f0;}
.mudc-item:last-child{border-bottom:none;}
.mudc-item-thumb{width:64px;height:64px;flex:0 0 64px;border-radius:10px;overflow:hidden;background:#f4f4f4;display:flex;align-items:center;justify-content:center;}
.mudc-item-thumb img{width:100%;height:100%;object-fit:cover;display:block;}
.mudc-item-text{flex:1 1 auto;min-width:0;display:block;}
/* Product name — black, wraps at words only. Every property forced so
 * theme styles can never crush it into a one-word-per-line column. */
.mudc-item-name{display:block !important;width:100% !important;max-width:100% !important;font-size:15px;font-weight:800;color:#141414 !important;text-decoration:none;line-height:1.35;white-space:normal !important;word-break:normal !important;overflow-wrap:break-word !important;hyphens:none !important;text-align:left !important;writing-mode:horizontal-tb !important;}
.mudc-item-name:hover{text-decoration:underline;}
/* variation / item data under the name (e.g. "Green - 50 kg. 2.5 kg Increments") */
.mudc-item-variation{display:block;margin-top:2px;font-size:12px;font-weight:400;color:#666666;line-height:1.4;overflow-wrap:break-word;}
/* bundle badge pill under the name, with the dumbbell glyph — wraps to
 * fit the column instead of pushing past the stepper */
.mudc-item-package{display:inline-flex;align-items:center;gap:4px;margin:6px 0 0;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;line-height:1.3;padding:3px 8px;border-radius:8px;background:#fdeaea;color:var(--mudc-accent);border:1px solid var(--mudc-accent);white-space:normal;overflow-wrap:break-word;max-width:100%;text-align:left;}
.mudc-item-package svg{width:10px;height:10px;flex:0 0 10px;display:block;}
/* "Excluded from discount" tag on a line the cart-wide exclusion list keeps
 * out of the tier — the Performance Packages. */
.mudc-item-excluded{display:inline-block;margin:6px 0 0;font-size:9px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;line-height:1.3;padding:3px 8px;border-radius:8px;background:#f2f2f2;color:#6b6b6b;border:1px solid #dedede;white-space:normal;overflow-wrap:break-word;max-width:100%;text-align:left;}

/* bundle card — the "Build Your Own Gym" parent: accent icon tile, title and
 * "Your custom setup (N items)", bundle stepper + trash in the head, each
 * component a clean row beneath with the badge under its thumbnail */
.mudc-bundle{background:#ffffff;border:1px solid var(--mudc-line);border-radius:14px;padding:14px 14px 2px;margin:14px 0;box-shadow:0 2px 10px rgba(12,16,22,.05);}
.mudc-bundle-head{display:flex;align-items:center;gap:12px;margin:0 0 6px;}
.mudc-bundle-ic{width:40px;height:40px;flex:0 0 40px;border-radius:10px;background:var(--mudc-accent);color:#fff;display:flex;align-items:center;justify-content:center;}
.mudc-bundle-ic svg{width:20px;height:20px;display:block;}
.mudc-bundle-titles{flex:1 1 auto;min-width:0;}
.mudc-bundle-title{display:block;font-size:15px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;color:var(--mudc-ink);line-height:1.25;}
.mudc-bundle-sub{display:block;font-size:11px;color:var(--mudc-muted);line-height:1.3;}
.mudc-bundle-side{display:flex;align-items:center;gap:8px;margin-left:auto;flex:0 0 auto;}
.mudc-bundle-remove{color:var(--mudc-accent) !important;}
.mudc-bundle .mudc-item{border-bottom:1px solid #f2f2f2;padding:12px 0;}
.mudc-bundle .mudc-item:last-child{border-bottom:0;}
.mudc-bundle .mudc-item-thumb{width:56px;height:56px;flex:0 0 56px;}
.mudc-btn-dark{background:var(--mudc-ink) !important;border-color:var(--mudc-ink) !important;color:#ffffff !important;}
.mudc-btn-dark:hover{filter:brightness(1.15);color:#ffffff !important;}
/* prices — under the name: per-each price, then the bold line total */
.mudc-item-prices{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 10px;margin-top:4px;white-space:nowrap;}
.mudc-price-ea{display:block;font-size:12px;font-weight:400;color:#666666;}
.mudc-price-ea del{color:#aaaaaa;opacity:.8;}
.mudc-price-ea .mudc-ea{color:#999999;font-weight:400;font-size:10px;margin-left:2px;}
.mudc-price-line{display:block;font-size:15px;font-weight:800;color:#141414;}
.mudc-item-side{display:flex !important;align-items:center !important;gap:8px !important;flex:0 0 auto !important;margin:0 !important;padding:0 !important;float:none !important;}
.mudc-item-remove{position:static !important;flex:0 0 auto !important;width:32px !important;height:32px !important;border:none !important;border-radius:8px !important;background:transparent !important;color:var(--mudc-accent) !important;cursor:pointer;display:flex !important;align-items:center !important;justify-content:center !important;padding:0 !important;margin:0 !important;}
.mudc-item-remove svg{width:17px;height:17px;display:block;}
.mudc-item-remove:hover{background:#fdeaea;}

/* quantity stepper — one compact segmented pill: − | qty | +. Every property
 * is forced with !important so theme/global styles can never stretch the
 * buttons apart, resize the box or restyle the input. */
.mudc-stepper,.mudc-stepper *{box-sizing:border-box;}
.mudc-stepper{display:flex !important;align-items:stretch !important;flex:0 0 auto !important;width:auto !important;max-width:none !important;margin:0 !important;padding:0 !important;background:#ffffff !important;border:1px solid #e3e6ea !important;border-radius:10px !important;overflow:hidden !important;gap:0 !important;float:none !important;transform:none !important;}
.mudc-step{position:static !important;display:flex !important;align-items:center !important;justify-content:center !important;width:30px !important;min-width:30px !important;max-width:30px !important;flex:0 0 30px !important;height:38px !important;margin:0 !important;padding:0 !important;border:0 !important;border-radius:0 !important;background:#ffffff !important;color:#222222 !important;font-size:16px !important;font-weight:400 !important;line-height:1 !important;cursor:pointer !important;transform:none !important;box-shadow:none !important;float:none !important;}
.mudc-step:hover{background:#f5f6f8 !important;color:var(--mudc-accent) !important;}
.mudc-qty{position:static !important;display:block !important;width:36px !important;min-width:36px !important;max-width:36px !important;flex:0 0 36px !important;height:38px !important;margin:0 !important;padding:0 !important;border:0 !important;border-left:1px solid #e3e6ea !important;border-right:1px solid #e3e6ea !important;border-radius:0 !important;background:#ffffff !important;text-align:center !important;font-size:13px !important;font-weight:600 !important;color:#111111 !important;opacity:1 !important;visibility:visible !important;box-shadow:none !important;outline:none !important;transform:none !important;float:none !important;-moz-appearance:textfield !important;appearance:textfield !important;}
.mudc-qty::-webkit-outer-spin-button,.mudc-qty::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}
.mudc-qty:focus{outline:none;border-color:var(--mudc-accent);}

/* clear-cart confirmation — an in-drawer styled dialog, replacing the
 * browser's native confirm popup */
.mudc-confirm{position:absolute;inset:0;z-index:3;display:none;align-items:center;justify-content:center;padding:24px;background:rgba(12,16,22,.45);}
.mudc-confirm.mudc-on{display:flex;}
.mudc-confirm-card{background:#ffffff;border-radius:14px;padding:22px 20px;width:100%;max-width:300px;text-align:center;box-shadow:0 18px 40px rgba(12,16,22,.25);}
.mudc-confirm-text{margin:0 0 16px;font-size:15px;font-weight:700;color:var(--mudc-ink);line-height:1.4;}
.mudc-confirm-actions{display:flex;flex-direction:column;gap:10px;}
.mudc-confirm-actions .mudc-btn{min-height:44px !important;font-size:13px !important;}

/* footer — red subtotal + stacked pill buttons */
.mudc-foot{padding:14px 20px 18px;border-top:1px solid var(--mudc-line);background:#ffffff;flex:0 0 auto;}
.mudc-subtotal{display:flex;justify-content:space-between;font-size:15px;font-weight:700;color:var(--mudc-ink);}
.mudc-totals{font-size:13px;color:#333333;margin-top:6px;}
.mudc-total-row{display:flex;justify-content:space-between;padding:3px 0;}
.mudc-total-row.mudc-discount{color:#116329;}
.mudc-total-row.mudc-grand{font-weight:800;font-size:17px;color:var(--mudc-ink);}
.mudc-foot-note{margin:6px 0 12px;font-size:12px;color:var(--mudc-muted);}
.mudc-actions{display:flex;flex-direction:column;gap:10px;}
.mudc-btn.mudc-clear{min-height:42px;font-size:13px;}
/* Buttons — every property forced so theme/global styles can never squash
 * the pill or clip/overlap its text. */
.mudc-btn{display:flex !important;align-items:center !important;justify-content:center !important;width:auto !important;max-width:100% !important;min-height:48px !important;height:auto !important;padding:10px 26px !important;margin:0 !important;border-radius:999px !important;font-size:14px !important;font-weight:700 !important;line-height:1.3 !important;letter-spacing:.02em !important;text-decoration:none !important;cursor:pointer !important;border:2px solid var(--mudc-accent) !important;box-sizing:border-box !important;text-align:center !important;box-shadow:none !important;transform:none !important;float:none !important;}
.mudc-btn-primary{background:var(--mudc-accent);color:#ffffff;}
.mudc-btn-primary:hover{filter:brightness(.93);color:#ffffff;}
.mudc-btn-ghost{background:#ffffff;color:var(--mudc-accent);}
.mudc-btn-ghost:hover{background:#fff7f7;color:var(--mudc-accent);}

/* empty state */
.mudc-empty{display:flex;flex-direction:column;align-items:center;gap:14px;padding:56px 12px;text-align:center;}
.mudc-ic-big{width:64px;height:64px;color:var(--mudc-accent);opacity:.35;}
.mudc-empty-title{margin:0;font-size:16px;font-weight:700;color:var(--mudc-ink);}
.mudc-empty .mudc-btn{max-width:240px;}

/* responsive — each item is two clean rows: thumb + name on top,
 * stepper + remove aligned in a second row that never wraps or overlaps */
@media (max-width: 640px) {
    .mudc-drawer{width:100vw;max-width:100vw;}
    .mudc-fab{bottom:16px;right:16px;width:52px;height:52px;}
    .mudc-item{gap:10px;padding:12px 0;}
    .mudc-item-thumb{width:54px;height:54px;flex:0 0 54px;}
    .mudc-step{width:26px !important;min-width:26px !important;max-width:26px !important;flex:0 0 26px !important;height:36px !important;}
    .mudc-qty{width:32px !important;min-width:32px !important;max-width:32px !important;flex:0 0 32px !important;height:36px !important;}
    .mudc-item-remove{width:30px;height:30px;}
    /* compact footer — subtotal/total + the three pill buttons share ONE
     * row, so the whole footer takes about half its previous height and
     * the product list keeps the real estate */
    .mudc-foot{padding:7px 14px 9px;}
    .mudc-subtotal{font-size:12px;}
    .mudc-totals{font-size:11px;margin-top:1px;}
    .mudc-total-row{padding:0;}
    .mudc-total-row.mudc-grand{font-size:13px;padding-top:1px;}
    .mudc-foot-note{margin:2px 0 5px;font-size:9px;}
    .mudc-actions{display:flex;flex-direction:row;gap:6px;}
    .mudc-actions .mudc-btn{flex:1 1 0;min-width:0;padding:4px 6px !important;font-size:11px !important;min-height:34px !important;}
    .mudc-btn.mudc-clear{min-height:34px;font-size:11px;}
}
