/* V2 overlay on unchanged V1. No product/theme columns or price logic changes. */
html.mp-visual-v2 {--mp-v2-panel:#f3f4f3;--mp-v2-accent:#a51f22;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) {
 --mp-v2-ink:#292929;--mp-v2-border:#d1d4d2;background:var(--mp-v2-panel) !important;color:var(--mp-v2-ink);border-radius:5px !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(input,select,textarea,button,.btn,.mega-attrlabel,.mp-standard-plus-summary,.mp-purchase-price,.mp-purchase-qty,.mp-purchase-row,.mp-megaformula-notice,#megalabel_0,#step-quantity,#mp-step-quantity,#show-result-container,#megaproductdays,.mpimage) {
 border-radius:5px !important;box-shadow:none !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(.mega-attrlabel,.mp-standard-plus-summary,.mp-purchase-price,.mp-purchase-qty,#megalabel_0,#step-quantity,#mp-step-quantity) {background:#fff !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(label,.mega_title,.mp-standard-plus-title,.mp-purchase-label,h3,h4) {font-weight:700 !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(.mp-v1-measure-info,.megadescriptionshort,.megadescriptionshort p) {font-weight:400 !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(input[type=text],input[type=number],select,textarea) {border:1px solid var(--mp-v2-border) !important;background:#fff !important;color:var(--mp-v2-ink);}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(.mpattr,.mpattrselected,.mp-attr-item,.mp-attr-selected) {border-radius:5px !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(#btnAddProduct,#btnCalculePrice,#btnAddCalculePrice),
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) #mp-step-buttons :is(button,a,input):is(#btnAddProduct,#btnCalculePrice,#btnAddCalculePrice) {
 display:flex !important;align-items:center !important;justify-content:center !important;gap:12px !important;width:100% !important;max-width:none !important;flex:1 1 100% !important;min-height:54px !important;
 padding:14px 20px !important;border:1px solid #292929 !important;border-radius:5px !important;background:#292929 !important;background-image:none !important;color:#fff !important;box-shadow:none !important;
 font-size:14px !important;font-weight:700 !important;letter-spacing:.06em;text-transform:uppercase;text-decoration:none !important;line-height:1.4 !important;white-space:normal;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) #mp-step-buttons {width:100% !important;max-width:none !important;flex-wrap:wrap !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(#btnAddProduct,#btnCalculePrice,#btnAddCalculePrice):hover {filter:brightness(.85);}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(#btnAddProduct,#btnCalculePrice,#btnAddCalculePrice) :is(span,i) {color:inherit !important;}
html.mp-visual-v2 .mp-v2-quantity {
 display:inline-grid !important;grid-template-columns:90px 38px !important;grid-template-rows:56px !important;column-gap:10px !important;align-items:stretch !important;
 width:138px !important;min-width:138px !important;max-width:138px !important;height:56px !important;flex:0 0 auto !important;padding:0 !important;margin:0 !important;vertical-align:middle;overflow:visible;border:0 !important;border-radius:5px !important;background:transparent !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) .mp-v2-quantity :is(#id_step_quantity,#quantity_wanted) {
 width:100% !important;min-width:0 !important;max-width:none !important;height:56px !important;min-height:0 !important;margin:0 !important;padding:8px !important;border:1px solid #b8bdb9 !important;border-radius:5px !important;box-shadow:none !important;text-align:center !important;font-size:18px !important;font-weight:600 !important;appearance:textfield;
}
html.mp-visual-v2 .mp-v2-quantity input::-webkit-inner-spin-button,html.mp-visual-v2 .mp-v2-quantity input::-webkit-outer-spin-button {appearance:none;margin:0;}
html.mp-visual-v2 .mp-v2-quantity-actions {display:grid !important;grid-template-rows:1fr 1fr !important;gap:6px !important;height:56px !important;border:0;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) .mp-v2-quantity-actions button {
 display:grid !important;place-items:center !important;width:38px !important;height:25px !important;min-height:0 !important;min-width:0 !important;padding:0 !important;margin:0 !important;border:1px solid #b8bdb9 !important;border-radius:5px !important;background:#fff !important;color:#292929 !important;box-shadow:none !important;font-size:20px !important;font-weight:500 !important;line-height:1 !important;cursor:pointer;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) .mp-v2-quantity-actions button+button {border-top:1px solid #b8bdb9 !important;}
html.mp-visual-v2 .mp-v2-old-stepper {display:none !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(button,input,select,a):focus-visible {outline:2px solid #292929;outline-offset:3px;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) :is(.megabuttons_list a,.mp_color_pick) {border:1px solid #d1d4d2 !important;border-radius:5px !important;box-shadow:none !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .megabuttons_list a {background:#fff !important;color:#292929 !important;padding:12px 16px !important;min-height:44px;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) :is(.megabuttons_list a.selectAttr,.mp_color_pick.selectAttr) {border:3px solid var(--mp-v2-accent) !important;box-shadow:none !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .megabuttons_list a.selectAttr {padding:10px 14px !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(.mp-step-measures,#mp-step-buttons,#mp-product-notes) {border-radius:5px !important;background:#fff !important;box-shadow:none !important;}
html.mp-visual-v2 :is(#mp-orientation-dialog,#mp-floating-summary),html.mp-visual-v2 :is(#mp-orientation-dialog,#mp-floating-summary) :is(button,.mp-orientation-price,.mp-orientation-warning,.mp-orientation-ack) {border-radius:5px !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) #mp-step-buttons {padding:0 !important;border:0 !important;}
html.mp-visual-v2 .mp-v2-quantity,html.mp-visual-v2 .mp-v2-quantity * {box-sizing:border-box !important;}
html.mp-visual-v2 #mpproduct-step {--mp-border:#d1d4d2;--mp-paper:#fff;--mp-sand:#fff;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) .mp-v1-measure-copy {background:transparent !important;border:0 !important;box-shadow:none !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) .mp-purchase-info-top {grid-template-columns:minmax(0,1fr) minmax(230px,1fr);}
@media(max-width:600px){
 html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) .mp-purchase-info-top {grid-template-columns:minmax(0,1fr) !important;}
 html.mp-visual-v2 #mpproduct-step :is(#step-quantity,#mp-step-quantity).mp-purchase-qty > div {flex-wrap:wrap !important;}
}
html.mp-visual-v2 #mpimages {border-radius:5px !important;background:var(--mp-v2-panel) !important;box-shadow:none !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .mp_color_pick img {border-radius:5px !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step),html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) * {box-sizing:border-box;}
html.mp-visual-v2 #mpproduct-step :is(#step-quantity,#mp-step-quantity).mp-purchase-qty {min-width:0 !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) :is(#mp-width,#mp-height,#mp-long,#mp-step-width,#mp-step-height,#mp-step-long) {
 display:flex !important;flex-direction:row !important;align-items:center !important;justify-content:flex-start !important;flex-wrap:wrap !important;gap:10px !important;width:100% !important;max-width:none !important;margin:0 !important;padding:0 !important;border:0 !important;border-radius:5px !important;background:transparent !important;box-shadow:none !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .mp-v1-measure-copy > label {text-transform:none !important;letter-spacing:0 !important;text-align:left !important;color:#292929 !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .mp-v1-measure-copy {flex:0 1 100px !important;width:100px !important;min-width:80px !important;max-width:100px !important;overflow-wrap:anywhere;}
html.mp-visual-v2 #mpproduct-step :is(#step-quantity,#mp-step-quantity) .mp-v2-quantity #id_step_quantity {height:56px !important;width:100% !important;min-width:0 !important;border:1px solid #b8bdb9 !important;border-radius:5px !important;margin:0 !important;padding:8px !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) :is(#mp-width,#mp-height,#mp-long,#mp-step-width,#mp-step-height,#mp-step-long) > :is(input.mp-measure,select[id$="_select"]) {width:135px !important;min-width:0 !important;flex:0 0 135px !important;}
@media(max-width:420px){
 html.mp-visual-v2 :is(#megaproduct,#megagroups) :is(#mp-width,#mp-height,#mp-long,#mp-step-width,#mp-step-height,#mp-step-long) > input.mp-measure {width:110px !important;min-width:0 !important;flex:0 0 110px !important;}
}
/* V2 refinement: one filled measure area, clear headings, matching option borders. */
html.mp-visual-v2 :is(#megaproduct,#megagroups) #mpproduct-step .mp-step-measures,
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) .mp-step-measures {
 display:flex !important;flex-direction:column !important;gap:18px !important;padding:16px !important;background:var(--mp-v2-panel) !important;border:1px solid #d1d4d2 !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) .mega-attrlabel {border:1px solid #b8bdb9 !important;border-radius:5px !important;}
html.mp-visual-v2 #mpproduct-step :is(#step-quantity,#mp-step-quantity).mp-purchase-qty {justify-content:center !important;text-align:center !important;}
html.mp-visual-v2 #mpproduct-step :is(#step-quantity,#mp-step-quantity).mp-purchase-qty > div {
 display:flex !important;flex-direction:row !important;flex-wrap:wrap !important;align-items:center !important;justify-content:center !important;gap:10px !important;width:100% !important;
}
html.mp-visual-v2 #mpproduct-step :is(#step-quantity,#mp-step-quantity).mp-purchase-qty label {width:auto !important;margin:0 !important;text-align:left !important;text-transform:none !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) :is(.megaattr_name,.mp-product-price,#megaproduct_price) {color:var(--mp-v2-accent) !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) #megalabel_0.mp-purchase-price .mp_total_price,
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) .mp_total_price {color:var(--mp-v2-accent) !important;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .mega_title {margin-right:6px;}
html.mp-visual-v2 #mpproduct-step #megalabel_0.mp-purchase-price {flex-wrap:wrap !important;white-space:normal !important;}
/* Match the quantity card to the price card, including title hierarchy. */
html.mp-visual-v2 :is(#megaproduct,#megagroups) :is(#step-quantity,#mp-step-quantity),
html.mp-visual-v2 #mpproduct-step :is(#step-quantity,#mp-step-quantity).mp-purchase-qty {
 border:1px solid #b8bdb9 !important;border-radius:5px !important;background:#fff !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) :is(#step-quantity,#mp-step-quantity) label,
html.mp-visual-v2 #mpproduct-step :is(#step-quantity,#mp-step-quantity).mp-purchase-qty label {
 font-size:24px !important;font-weight:700 !important;line-height:1.3 !important;letter-spacing:0 !important;text-transform:none !important;color:#292929 !important;
}
html.mp-visual-v2 .mp-v2-measures-value {color:var(--mp-v2-accent) !important;font-weight:700 !important;}
html.mp-visual-v2 .mp-v2-measures-separator {color:inherit;}
/* Keep the shopping icon and caption on one centered flex axis. */
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) #mp-step-buttons :is(#btnAddProduct,#btnCalculePrice,#btnAddCalculePrice) > :is(i,span),
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(#btnAddProduct,#btnCalculePrice,#btnAddCalculePrice) > :is(i,span) {
 position:static !important;float:none !important;transform:none !important;margin:0 !important;padding:0 !important;align-self:center !important;vertical-align:middle;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(#btnAddProduct,#btnCalculePrice,#btnAddCalculePrice) > i {
 display:inline-flex !important;align-items:center !important;justify-content:center !important;flex:0 0 auto !important;width:1.25em !important;height:1.25em !important;line-height:1 !important;letter-spacing:0 !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(#btnAddProduct,#btnCalculePrice,#btnAddCalculePrice) > i::before {display:block;line-height:1;}
html.mp-visual-v2 :is(#megaproduct,#megagroups,#mpproduct-step) :is(#btnAddProduct,#btnCalculePrice,#btnAddCalculePrice) > span {flex:0 1 auto !important;width:auto !important;min-width:0;line-height:1.4 !important;text-align:center !important;}

/* Image options fill equal columns; configured dimensions define preferred size and ratio. */
html.mp-visual-v2 :is(#megaproduct,#megagroups) .megacolor_list.mp-v2-image-grid {
 display:grid !important;grid-template-columns:repeat(auto-fit,minmax(min(100%,var(--mp-v2-image-min,120px)),1fr)) !important;gap:12px !important;align-items:start !important;width:100% !important;max-width:100% !important;margin-left:0 !important;margin-right:0 !important;padding:0 !important;list-style:none !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .megacolor_list.mp-v2-image-grid > li {
 float:none !important;width:auto !important;min-width:0 !important;max-width:none !important;margin:0 !important;padding:0 !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .megacolor_list.mp-v2-image-grid > li > a.mp_color_pick {
 display:flex !important;align-items:center !important;justify-content:center !important;width:100% !important;max-width:100% !important;height:auto !important;min-width:0 !important;aspect-ratio:var(--mp-v2-image-ratio,1);margin:0 !important;padding:0 !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .megacolor_list.mp-v2-image-grid > li > a.mp_color_pick > img {
 display:block !important;width:100% !important;max-width:100% !important;height:100% !important;min-width:0 !important;object-fit:contain !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .megacolor_list.mp-v2-image-grid > li .mplabeldiv {
 width:100% !important;max-width:100% !important;height:auto !important;max-height:none !important;white-space:normal !important;overflow-wrap:anywhere;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .megacolor_list.mp-v2-image-grid > li > .megazoomsingle {z-index:3;}
html.mp-visual-v2 :is(#megaproduct,#megagroups) .megacolor_list.mp-v2-image-grid > li:is([hidden],.hideMegaField) {display:none !important;}

/* Button rows must reserve the full padded link height instead of an inline line box. */
html.mp-visual-v2 :is(#megaproduct,#megagroups) ul.megabuttons_list {
 display:flex !important;flex-wrap:wrap !important;align-items:stretch !important;justify-content:flex-start !important;gap:10px !important;width:100% !important;min-width:0 !important;max-width:100% !important;height:auto !important;margin:0 !important;padding:0 !important;list-style:none !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) ul.megabuttons_list > li {
 display:flex;flex:0 1 auto !important;float:none !important;min-width:0 !important;max-width:100% !important;height:auto !important;margin:0 !important;padding:0 !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) ul.megabuttons_list > li > a {
 display:flex !important;align-items:center !important;justify-content:center !important;flex:1 1 auto !important;min-width:0 !important;max-width:100% !important;margin:0 !important;box-sizing:border-box !important;line-height:1.4 !important;white-space:normal !important;overflow-wrap:anywhere;text-align:center !important;
}
html.mp-visual-v2 :is(#megaproduct,#megagroups) ul.megabuttons_list > li:is([hidden],.hideMegaField) {display:none !important;}
