/* HAG 30.9.318 — bundle explanation and QA-only price comparison */
.market-card .hag318-bundle-card-saving{font-size:10px!important;font-weight:700!important;color:#305e78!important;border-top:1px solid #dae6ed;padding-top:8px;margin-top:9px}
.hag318-bundle-overlay[hidden]{display:none!important}.hag318-bundle-overlay{position:fixed;z-index:16000;inset:0;display:flex;align-items:center;justify-content:center;padding:20px}.hag318-bundle-backdrop{position:absolute;inset:0;background:#091d34b8;backdrop-filter:blur(3px)}
.hag318-bundle-panel{position:relative;width:min(760px,95vw);max-height:88vh;overflow:auto;background:#fffdf9;border:1px solid #dce6ec;border-radius:20px;padding:28px;color:#183a5b;box-shadow:0 30px 70px #071d3455}
.hag318-bundle-close{position:absolute;right:15px;top:12px;background:#edf4f8;border:0;color:#214a6c;width:36px;height:36px;border-radius:50%;font-size:22px;cursor:pointer}
.hag318-bundle-panel h2{font-size:26px;line-height:1.13;margin:8px 36px 10px 0;color:#173a5b}.hag318-bundle-panel h3{font-size:16px;margin:20px 0 10px}.hag318-bundle-panel p{color:#577086;font-size:13px;line-height:1.55}
.hag318-bundle-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:16px 0}.hag318-bundle-summary>div{border:1px solid #dce6ed;border-radius:10px;padding:12px;background:#f7fafc}.hag318-bundle-summary small{display:block;font-size:10px;color:#647a8b}.hag318-bundle-summary strong{display:block;font-size:22px;margin-top:5px;color:#163c62}
.hag318-bundle-items article{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid #dce6ee;padding:12px 2px}.hag318-bundle-items article strong{font-size:13px;color:#173e60}.hag318-bundle-items p{margin:4px 0 0;font-size:11px}.hag318-bundle-items small{display:block;font-size:10px;color:#775f31;margin-top:5px}
.hag318-bundle-review,.hag318-bundle-existing{background:#eef5f9;border:1px solid #d7e6ef;border-radius:11px;padding:12px;margin:14px 0}.hag318-bundle-review strong,.hag318-bundle-existing strong{font-size:12px}.hag318-bundle-review p,.hag318-bundle-existing p{margin:6px 0 0;font-size:12px}.hag318-caveat{font-size:10px!important}
.hag318-cart-item-head{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:7px;align-items:start;padding:9px 0;border-bottom:1px solid #e8edf1;font-size:11px}.hag318-cart-item-head button{border:0;background:none;font-size:17px;cursor:pointer;color:#805232}.hag318-cart-bundle{background:#f6f9fc;border:1px solid #dae6ef;padding:10px;border-radius:10px;margin:8px 0}.hag318-cart-bundle .hag318-cart-item-head{padding:0 0 8px}.hag318-cart-bundle small{font-size:10px;color:#667a8a;line-height:1.4}.hag318-cart-bundle ul{list-style:none;padding:0;margin:7px 0}.hag318-cart-bundle li{display:flex;justify-content:space-between;gap:6px;margin:5px 0;font-size:10px}.hag318-cart-line{display:flex;justify-content:space-between;gap:7px;align-items:start;margin:6px 0;font-size:10px}.hag318-cart-line span{max-width:80%}.hag318-cart-line strong{font-size:11px}.hag318-savings strong,.hag318-cart-savings{color:#247051}.hag318-cart-disclosure{padding:9px 0}.hag318-cart-disclosure small{font-size:10px;line-height:1.42;color:#6a7a88}.hag318-cart-savings{display:flex;justify-content:space-between;gap:9px;font-size:12px;margin:0 0 8px}
.hag318-coupon{border-top:1px solid #dce6ed;padding:12px 0;margin-top:9px}.hag318-coupon label{display:block;font-size:11px;font-weight:800;margin-bottom:6px}.hag318-coupon-controls{display:flex;gap:7px}.hag318-coupon input{min-width:0;width:100%;border:1px solid #cedfe9;border-radius:9px;padding:9px;font-size:12px}.hag318-coupon .btn{width:auto!important;white-space:nowrap;padding:8px!important;font-size:10px!important}.hag318-coupon p{font-size:10px;line-height:1.4;color:#647c8e}
@media(max-width:540px){.hag318-bundle-panel{padding:17px;max-height:86vh}.hag318-bundle-summary{grid-template-columns:1fr 1fr}.hag318-bundle-summary>div:last-child{grid-column:1/-1}.hag318-bundle-summary strong{font-size:19px}}

/* v319: surface visible discount explanations and keep cart readable on phones. */
#marketplaceModal .hag318-bundle-card-saving{display:block!important;margin-top:11px!important;line-height:1.5!important;color:#255872!important;}
#marketplaceModal .hag318-coupon{display:block!important;}
#marketplaceModal .hag318-cart-bundle{grid-column:1/-1!important;width:100%;min-width:0;box-sizing:border-box;}
#marketplaceModal .hag318-cart-bundle li{gap:10px;line-height:1.45;}
#marketplaceModal .hag318-cart-bundle li span:first-child{flex:1;min-width:0;overflow-wrap:anywhere;}
#marketplaceModal .hag318-cart-bundle li span:last-child{white-space:nowrap;}
#marketplaceModal .hag318-bundle-panel .hag318-bundle-items{max-width:100%;}
#marketplaceModal .hag318-bundle-panel .hag318-bundle-items article{align-items:start;}
#marketplaceModal .hag318-bundle-panel .hag318-bundle-items article>div{min-width:0;}
#marketplaceModal .hag318-bundle-panel .hag318-bundle-items article>strong{white-space:nowrap;}
@media(max-width:600px){#marketplaceModal .hag318-coupon-controls{flex-direction:column}#marketplaceModal .hag318-coupon-controls button{min-height:36px!important;}}

/* v320: accessible native bundle cards and cart comparisons. */
#marketplaceModal .hag320-bundle-card .market-card-body{min-width:0}
#marketplaceModal .hag320-bundle-card h3 button{background:transparent;border:0;color:inherit;font:inherit;text-align:left;padding:0;cursor:pointer}
#marketplaceModal .hag320-bundle-preview{display:flex;flex-wrap:wrap;gap:5px;margin:10px 0}
#marketplaceModal .hag320-bundle-preview span{border:1px solid #dce6ed;background:#f7fafc;border-radius:6px;color:#355876;font-size:10px;padding:5px 7px;line-height:1.3}
#marketplaceModal .hag320-bundle-pricing{display:flex;gap:7px 14px;align-items:baseline;flex-wrap:wrap;margin:8px 0}
#marketplaceModal .hag320-bundle-pricing span{font-size:11px;color:#627a8d}
#marketplaceModal .hag320-bundle-pricing strong{font-size:17px;color:#173d61}
#marketplaceModal .hag320-bundle-pricing small{font-size:10px;color:#607689;font-weight:500}
#marketplaceModal .hag320-bundle-pricing b{font-size:12px;color:#237453}
#marketplaceModal .hag320-bundle-actions{display:flex;gap:8px;flex-wrap:wrap;margin:10px 0}
#marketplaceModal .hag320-bundle-actions button{min-height:35px;flex:1;white-space:normal;padding:8px!important;font-size:11px!important}
#marketplaceModal .hag320-bundle-note{display:block;font-size:10px;color:#60788a;line-height:1.5}
#marketplaceModal .hag320-see-bundles{margin:8px 0 0;font-size:11px;font-weight:700;color:#174668;background:#eff5f9;border:1px solid #d3e2ec;padding:9px;border-radius:8px;width:100%;text-align:left;cursor:pointer}
@media(max-width:700px){#marketplaceModal .hag320-bundle-actions{flex-direction:column}}

/* v323: same card footprint and no in-card expansion/zoom as other Marketplace items. */
#marketplaceGrid .hag323-bundle-card{min-height:210px!important;max-width:100%!important;transform:none!important;scale:1!important;overflow:hidden!important;cursor:pointer!important;transition:box-shadow .15s ease,border-color .15s ease!important}
#marketplaceGrid .hag323-bundle-card:hover,#marketplaceGrid .hag323-bundle-card:focus-visible{transform:none!important;scale:1!important;box-shadow:0 5px 18px rgba(19,59,97,.10)!important;border-color:#b8cad9!important;outline-offset:2px}
#marketplaceGrid .hag323-bundle-card .market-card-body{display:flex;flex-direction:column;min-width:0!important;padding:16px!important}
#marketplaceGrid .hag323-bundle-card h3{font-size:16px!important;line-height:1.2!important;margin:5px 0 8px!important}
#marketplaceGrid .hag323-bundle-card .hag323-bundle-desc{margin:0 0 6px!important;line-height:1.45!important;font-size:11px!important;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#marketplaceGrid .hag323-bundle-includes{display:flex;gap:4px;flex-wrap:wrap;align-items:center;margin:6px 0 4px}
#marketplaceGrid .hag323-bundle-includes span{font-size:9px!important;line-height:1.2!important;background:#f7fafc;border:1px solid #dce6ed;padding:4px 6px;border-radius:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:45%}
#marketplaceGrid .hag323-bundle-includes .hag323-more{font-weight:750;white-space:nowrap;background:#edf4f8;color:#21486a}
#marketplaceGrid .hag323-bundle-savings{font-size:10px!important;color:#60788a;margin:5px 0 4px;white-space:normal;line-height:1.45}
#marketplaceGrid .hag323-bundle-savings b{color:#237453;margin-left:6px}
#marketplaceGrid .hag323-bundle-foot{margin-top:auto;padding-top:7px;align-items:center!important;gap:8px}
#marketplaceGrid .hag323-bundle-foot strong{font-size:18px!important;white-space:nowrap}
#marketplaceGrid .hag323-bundle-foot strong small{font-size:9px!important;font-weight:500;line-height:1.4;color:#607689;margin:0;white-space:normal}
#marketplaceGrid .hag323-bundle-foot .market-add{white-space:normal;font-size:11px!important;min-width:110px!important;min-height:36px;flex:0 0 auto}
#marketplaceGrid .hag323-view-detail{display:inline-block;text-align:left;border:0;background:none;color:#245e85;font-size:10px!important;line-height:1.3;font-weight:750;padding:7px 0 0;cursor:pointer;align-self:flex-start}
#marketplaceGrid .hag323-view-detail:hover{text-decoration:underline}
#marketplaceGrid .hag323-bundle-card.expanded .market-card-extra,#marketplaceGrid .hag323-bundle-card .market-card-impact{display:none!important}
/* Match the other Marketplace secondary details: centered, contained, scrollable. */
#marketplaceModal .hag318-bundle-overlay{position:absolute!important;inset:0!important;z-index:90!important;display:grid!important;place-items:center!important;padding:24px!important;box-sizing:border-box!important;overflow:hidden!important}
#marketplaceModal .hag318-bundle-overlay[hidden]{display:none!important}
#marketplaceModal .hag318-bundle-backdrop{background:rgba(14,40,67,.48)!important;backdrop-filter:none!important}
#marketplaceModal .hag318-bundle-panel{position:relative!important;display:block!important;width:min(720px,92vw)!important;max-width:min(720px,86vh)!important;max-height:86vh!important;overflow:auto!important;padding:28px 30px 20px!important;border-radius:18px!important;box-shadow:0 24px 70px rgba(8,29,51,.28)!important;background:#fff!important;scrollbar-gutter:stable!important}
#marketplaceModal .hag318-bundle-close{position:sticky!important;top:0!important;float:right!important;margin:-12px -12px 4px 16px!important;z-index:4!important}
#marketplaceModal .hag318-bundle-panel h2{font-size:24px!important}
#marketplaceModal #hag318AddBundle{min-height:40px}
@media(max-width:820px){#marketplaceGrid .hag323-bundle-card .market-card-body{padding:12px!important}#marketplaceGrid .hag323-bundle-includes span{max-width:60%}#marketplaceModal .hag318-bundle-panel{width:min(720px,94vw)!important;padding:18px!important}#marketplaceModal .hag318-bundle-overlay{padding:12px!important}}

/* v324: uniform selected / already-available state. No observer and no animated scale. */
#marketplaceModal button.hag324-cart-inactive[disabled],
#marketplaceModal button[data-cart-status="selected"][disabled],
#marketplaceModal button[data-cart-status="owned"][disabled],
#marketplaceModal button[data-cart-status="restricted"][disabled]{
  color:#6b7d8b!important;background:#e8edf1!important;border-color:#d4dee6!important;
  opacity:1!important;cursor:not-allowed!important;box-shadow:none!important;transform:none!important;
  pointer-events:none!important;
}
#marketplaceModal button[data-cart-status="selected"][disabled]{color:#516775!important;background:#dce5eb!important}
#marketplaceModal .hag318-bundle-existing{background:#f1f6fa;border-color:#dbe6ed}
#marketplaceModal .hag318-bundle-review{background:#f9fbfd;border-color:#e0e8ed}
#marketplaceModal .hag318-bundle-panel .hag318-caveat{font-size:11px!important;line-height:1.5}

/* v325: cart bundle is ONE full-width column, not 3 columns inherited from .marketplace-cart-items > div. */
#marketplaceModal .marketplace-cart-items{min-width:0!important;width:100%!important;display:block!important;}
#marketplaceModal .marketplace-cart-items > .hag318-cart-bundle{display:block!important;grid-template-columns:none!important;min-width:0!important;max-width:100%!important;width:100%!important;padding:13px!important;box-sizing:border-box!important;overflow-wrap:break-word!important;}
#marketplaceModal .marketplace-cart-items > .hag318-cart-bundle .hag318-cart-item-head{display:flex!important;justify-content:space-between!important;gap:12px!important;align-items:flex-start!important;}
#marketplaceModal .hag318-cart-bundle .hag318-cart-item-head strong{flex:1!important;min-width:0!important;font-size:12px!important;line-height:1.4!important;}
#marketplaceModal .hag318-cart-bundle ul{display:block!important;width:100%!important;margin:10px 0 12px!important;padding:0!important;list-style:none!important;}
#marketplaceModal .hag318-cart-bundle li{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:start!important;gap:10px!important;margin:0!important;padding:7px 0!important;border-bottom:1px solid #e2eaf1!important;font-size:11px!important;line-height:1.5!important;}
#marketplaceModal .hag318-cart-bundle li span{width:auto!important;max-width:none!important;min-width:0!important;overflow-wrap:normal!important;word-break:normal!important;white-space:normal!important;}
#marketplaceModal .hag318-cart-bundle li span:last-child{white-space:nowrap!important;font-weight:750!important;}
#marketplaceModal .hag318-cart-bundle .hag318-cart-line{display:flex!important;justify-content:space-between!important;align-items:baseline!important;flex-wrap:wrap!important;gap:8px!important;margin:9px 0!important;font-size:11px!important;line-height:1.45!important;}
#marketplaceModal .hag318-cart-bundle .hag318-cart-line span{flex:1!important;min-width:0!important;max-width:none!important;}
#marketplaceModal .hag318-cart-bundle .hag318-cart-line strong{max-width:100%!important;text-align:right!important;white-space:normal!important;font-size:11px!important;}
#marketplaceModal .hag325-quote-pending strong{color:#143d61!important;}
#marketplaceModal .marketplace-cart-total strong{white-space:normal!important;overflow-wrap:normal!important;text-align:right!important;font-size:16px!important;}
@media(min-width:1461px){
 #marketplaceModal .marketplace-layout{grid-template-columns:155px minmax(0,1fr) 340px!important;}
 #marketplaceModal .marketplace-filters{grid-column:1!important;grid-row:1!important;min-width:0!important;}
 #marketplaceModal .marketplace-layout>main{grid-column:2!important;grid-row:1!important;min-width:0!important;max-width:100%!important;}
 #marketplaceModal .marketplace-cart{grid-column:3!important;grid-row:1!important;position:sticky!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;}
}
/* Small desktops: a full-width cart beneath the product grid rather than a squeezed right rail. */
@media(min-width:1001px) and (max-width:1460px){#marketplaceModal .marketplace-layout{grid-template-columns:155px minmax(0,1fr)!important;}#marketplaceModal .marketplace-cart{display:block!important;grid-column:1/-1!important;grid-row:2!important;width:100%!important;max-width:100%!important;position:static!important;}#marketplaceModal .marketplace-cart > *{grid-column:auto!important;grid-row:auto!important;}#marketplaceModal .marketplace-cart-items{max-width:780px!important;}#marketplaceModal .marketplace-layout>main{grid-column:2!important;grid-row:1!important;min-width:0!important;max-width:100%!important;}}
@media(max-width:1000px){#marketplaceModal .marketplace-cart{width:100%!important;max-width:100%!important;position:static!important;}#marketplaceModal .hag318-cart-bundle{max-width:100%!important;}}
