/* V4 integration adapters. Every visual change is desktop-only. */
@media (min-width:1025px) {
  /* The transparent header sits outside .main-page-wrapper. Match the canvas
     to the existing page/shop background instead of the global navy body rule.
     Product pages keep their own #0f172a canvas; mobile is untouched. */
  body.mrc-desktop-v4:is(.page,.search-no-results,.error404,.woodmart-archive-shop):not(.single-product) {background-color:var(--mdh-page-canvas,#10141e)!important}
  /* Let the homepage glow reach behind the header without unclipping the posters. */
  body.home.mrc-desktop-v4 .mrc6-home {position:relative;isolation:isolate}
  body.home.mrc-desktop-v4 .mrc6-home::before {content:"";position:absolute;top:-180px;right:0;z-index:-1;width:650px;height:650px;border-radius:50%;background:radial-gradient(circle,rgba(118,242,41,.23),rgba(34,211,238,.045) 45%,transparent 68%);pointer-events:none}
  body.home.mrc-desktop-v4 .mrc6-showcase::after {content:none}
  body.home.mrc-desktop-v4 #mrc-desktop-header .header-links {position:relative;z-index:1}
  /* Keep styling/events scoped here, but let the bar and utility links scroll independently. */
  #mrc-desktop-header {display:contents;font:400 14px/1.5 Cabin,Arial,sans-serif;color:#f1f5fb;background:transparent;--mdh-top:110px;--mdh-edge:40px;--mdh-veil-top:98px;--edge:40px}
  /* The admin toolbar offsets the root scrollport during loading. Pin the
     admin header to the viewport and reserve its normal 98px flow space. */
  body.admin-bar #mrc-desktop-header::before {content:"";display:block;height:98px}
  body.admin-bar #mrc-desktop-header .site-header {position:fixed;top:32px;left:0;right:0}
  #mrc-desktop-header *,#mrc-desktop-header *::before,#mrc-desktop-header *::after {box-sizing:border-box}
  #mrc-desktop-header [hidden] {display:none!important}
  #mrc-desktop-header .site-header {position:sticky;top:0;z-index:392;margin:0;padding-top:18px;background:transparent;filter:drop-shadow(0 6px 10px rgba(0,0,0,.28))}
  #mrc-desktop-header .shell {max-width:1440px;width:calc(100% - 20px);margin-inline:auto}
  /* Rounded menu box with separate, transparent utility links below. */
  #mrc-desktop-header .header-main {height:80px;padding:0 24px;gap:28px;border:0;border-radius:16px;box-shadow:none}
  #mrc-desktop-header .brand {line-height:0;margin:0;flex-shrink:0}
  #mrc-desktop-header .brand img {width:172px;height:auto;max-height:40px;object-fit:contain}
  #mrc-desktop-header .icon-library {display:none}
  #mrc-desktop-header .icon {fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
  #mrc-desktop-header button {min-width:0;min-height:0;text-transform:none;letter-spacing:normal;box-shadow:none;font-family:inherit}
  #mrc-desktop-header button::before,#mrc-desktop-header button::after {content:none}
  #mrc-desktop-header a {text-decoration:none;transition:color .15s,background .15s}
  #mrc-desktop-header .header-action {min-height:44px}
  #mrc-desktop-header .catalog-trigger {min-height:35px}
  #mrc-desktop-header .search-field {margin-bottom:0}
  #mrc-desktop-header input {font-family:inherit;box-shadow:none}
  #mrc-desktop-header .header-links {height:47px;margin-top:0;padding:0;align-items:center;justify-content:flex-end}
  body.mrc-desktop-v4 .mfp {padding-top:4px}
  #mrc-desktop-header .header-links .header-utility-links>a {font-size:14px;gap:7px}
  #mrc-desktop-header .header-links .icon {width:14px;height:14px}
  #mrc-desktop-header .header-links>.header-utility-links {flex:0 0 auto;gap:18px;padding:0 24px;background:transparent;border-radius:0}
  #mrc-desktop-header #mdh-cart-state {display:flex;flex-direction:row;align-items:center;gap:10px;line-height:1.35}
  #mrc-desktop-header .mdh-bag-copy {display:flex;flex-direction:column;white-space:nowrap}
  #mrc-desktop-header .mdh-bag-copy small {font-size:12px;color:#97aec7}
  #mrc-desktop-header .mdh-bag-copy .amount {font:inherit;color:inherit}
  #mrc-desktop-header .bag-icon {flex:none}
  #mrc-desktop-header .bag-icon .header-cart-count {position:absolute;border:2px solid #172538;background:#b6f182;color:#122016;border-radius:50%;font-size:9px;font-weight:700}
  #mrc-desktop-header .popover {position:fixed;top:var(--mdh-top);bottom:auto;right:var(--mdh-edge);left:auto;max-height:calc(100dvh - var(--mdh-top) - 24px);border:0;animation:none;z-index:393}
  /* Cover the full viewport; the header box stays clear on its higher layer. */
  #mrc-desktop-header .page-veil {position:fixed;inset:0;background:#030c19a6;backdrop-filter:blur(4px);z-index:391}
  #mrc-desktop-header .search-panel {left:var(--mdh-search-left);width:var(--mdh-search-width);right:auto}
  #mrc-desktop-header .catalog-panel {left:var(--mdh-edge);width:var(--mdh-header-width);right:auto}
  #mrc-desktop-header .account-panel,#mrc-desktop-header .cart-panel,#mrc-desktop-header .wishlist-panel {width:420px}
  #mrc-desktop-header .search-filters button {min-height:35px}
  #mrc-desktop-header .search-results a {color:inherit}
  #mrc-desktop-header .result-row {min-height:90px;grid-template-columns:75px minmax(0,1fr)}
  #mrc-desktop-header .result-row img {width:75px;height:75px;max-width:75px}
  #mrc-desktop-header .result-meta {font-size:13px}
  #mrc-desktop-header .result-meta>span+span::before {content:'·';margin-inline:7px;color:#647e95}
  #mrc-desktop-header .no-results {grid-column:1/-1;color:#a8bed0}
  #mrc-desktop-header .browse-route {color:inherit}
  #mrc-desktop-header #mdh-cart-content {display:flex;flex-direction:column;min-height:0;overflow:hidden}
  #mrc-desktop-header .cart-items {min-height:90px;overflow:auto}
  #mrc-desktop-header .cart-panel .cart-items {max-height:380px}
  #mrc-desktop-header .cart-item h3 a {color:inherit;font:inherit}
  #mrc-desktop-header .cart-item-meta dl {display:block;margin:3px 0 0;padding:0;font-size:11px;line-height:1.6;color:#94a9be}
  #mrc-desktop-header .cart-item-meta dt {display:inline;font-weight:400;float:none;margin:0 4px 0 0}
  #mrc-desktop-header .cart-item-meta dd {display:inline;margin:0}
  #mrc-desktop-header .cart-item-meta dd p {display:inline;margin:0}
  #mrc-desktop-header .cart-item-meta dd::after {content:'';display:block}
  #mrc-desktop-header .cart-item .quantity {display:flex;flex:none;width:auto;margin:0;gap:0}
  #mrc-desktop-header .cart-item .quantity button {background:none;border:0;padding:0;color:#cfdae8;width:29px;height:27px}
  #mrc-desktop-header .cart-item .quantity output {display:grid;place-items:center;width:26px;color:#dbe6ef}
  #mrc-desktop-header .cart-item .quantity button:disabled {opacity:.35;cursor:not-allowed}
  #mrc-desktop-header .cart-item .quantity .icon {width:12px;height:12px}
  #mrc-desktop-header .cart-item-bottom .amount {font:inherit;color:inherit}
  #mrc-desktop-header .cart-summary .subtotal strong {font-size:28px;line-height:1.2;margin-top:2px}
  #mrc-desktop-header .cart-summary .amount {font:inherit;color:inherit}
  #mrc-desktop-header .primary-button {display:flex;align-items:center;justify-content:space-between;background:#b6f182;color:#152414;border:1px solid #b6f182;border-radius:10px;min-height:43px;padding:10px 20px;font-size:14px;font-weight:600;line-height:20px}
  #mrc-desktop-header .primary-button:hover {background:#c9f79e;color:#10200c}
  #mrc-desktop-header .empty-cart .primary-button {display:inline-flex;font-size:13px;gap:16px}
  #mrc-desktop-header .mdh-cart-error {margin:0;padding:12px 24px;color:#ffbdad;background:#38252b;font-size:12px}
  #mrc-desktop-header .wishlist-panel {overflow:auto}
  #mrc-desktop-header .wishlist-row {display:flex;align-items:center;gap:12px}
  #mrc-desktop-header .mdh-wishlist-product {display:flex;align-items:center;gap:12px;flex:1;min-width:0}
  #mrc-desktop-header .mdh-wishlist-product img {width:56px;height:56px;object-fit:cover;flex:none;border-radius:8px}
  #mrc-desktop-header .mdh-wishlist-product strong {display:block;color:#e1ebf4;font-size:14px;line-height:1.4}
  #mrc-desktop-header .mdh-wishlist-product small {display:block;color:#9bb0c5;font-size:13px;margin-top:5px}
  #mrc-desktop-header .mdh-wishlist-all {display:flex;justify-content:center;gap:12px;padding:16px;border-top:1px solid #31445a;font-size:13px;color:#b6f182}
  #mrc-desktop-header .member-links>a {display:flex;align-items:center;gap:13px;padding:12px 15px;font-size:14px;color:#bdcddd;border-radius:8px}
  #mrc-desktop-header .member-links>a:hover {background:#223747}
  #mrc-desktop-header .member-links .end-arrow {margin-left:auto;width:15px}
  #mrc-desktop-header .member-stats>a {text-decoration:none;color:inherit}
  #mrc-desktop-header .member-stats>.wallet-card {display:block;min-width:0}
  #mrc-desktop-header .wallet-card>span {white-space:nowrap}
  #mrc-desktop-header .wallet-card .amount {font:inherit;color:inherit}
  #mrc-desktop-header .signout {display:flex;align-items:center;gap:12px;font-size:14px}
  #mrc-desktop-header :is(a,button,input):focus-visible {outline:2px solid #b6f182;outline-offset:3px}
  /* The search bar already provides a shared, visible focus border. */
  #mrc-desktop-header #mdh-search-input:focus {outline:none;box-shadow:none}

  /* Restyle the original login sidebar IN PLACE. No cloned forms, nonces or CAPTCHA. */
  body.mrc-desktop-v4 .login-form-side.mdh-native-account {position:fixed;inset:auto;top:var(--mdh-account-top,110px);right:var(--mdh-account-edge,40px);width:420px;height:auto;max-height:calc(100dvh - var(--mdh-account-top,110px) - 24px);overflow:auto;padding:20px 26px 0;border:0;border-radius:15px;background:#162638;color:#f1f5fb;transform:none!important;transition:none;box-shadow:0 25px 70px #020712b0;z-index:395;font:400 14px/1.5 Cabin,Arial,sans-serif;visibility:hidden;opacity:0;pointer-events:none}
  body.mrc-desktop-v4 .login-form-side.mdh-native-account.mdh-open {visibility:visible;opacity:1;pointer-events:auto}
  body.mrc-desktop-v4 .login-form-side.mdh-native-account {background:#162638!important}
  body.mrc-desktop-v4 .mdh-native-account>.wd-heading,body.mrc-desktop-v4 .mdh-native-account>.create-account-question,body.mrc-desktop-v4 .mdh-native-account>.mcp-account-head,body.mrc-desktop-v4 .mdh-native-account>.mcp-account-foot {display:none}
  body.mrc-desktop-v4 .mdh-native-account [hidden] {display:none!important}
  body.mrc-desktop-v4 .mdh-native-account .icon {width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
  body.mrc-desktop-v4 .mdh-native-heading {display:flex;align-items:center;gap:8px;margin-bottom:19px;color:#a9bcce}
  body.mrc-desktop-v4 .mdh-native-heading>span {font-size:9px;letter-spacing:1.2px}
  body.mrc-desktop-v4 .mdh-native-heading>button {display:grid;place-items:center;margin-left:auto;background:none;border:0;padding:4px;min-height:28px;width:28px;color:#a7bccd}
  body.mrc-desktop-v4 .mdh-native-welcome {display:flex;align-items:center;gap:13px;padding-top:18px;border-top:1px solid #364a5e70}
  body.mrc-desktop-v4 .mdh-native-welcome>.icon {width:44px;height:44px;padding:10px;border:1px solid #91b97645;border-radius:11px;background:#b6f1820d;color:#bfdca8}
  body.mrc-desktop-v4 .mdh-native-welcome h2 {font:600 23px/1.3 'Readex Pro',Cabin,sans-serif;letter-spacing:-.6px;color:#f1f5fb;margin:0 0 4px}
  body.mrc-desktop-v4 .mdh-native-welcome p {font-size:13px;color:#9aafc7;margin:0}
  body.mrc-desktop-v4 .mdh-native-account>.mcp-account-tabs {display:flex;gap:5px;padding:4px;margin:22px 0;border:1px solid #354c61;border-radius:8px;background:#101d2e}
  body.mrc-desktop-v4 .mdh-native-account>.mcp-account-tabs :is(button,a) {display:block;width:50%;padding:8px 10px;min-height:36px;border:0;border-radius:5px;background:none;color:#a0b6cc;text-align:center;text-transform:none;font:400 14px/20px Cabin,sans-serif;text-decoration:none}
  body.mrc-desktop-v4 .mdh-native-account>.mcp-account-tabs [aria-pressed=true] {background:#294232;color:#d5efba}
  body.mrc-desktop-v4 .mdh-native-account .mcp-register-pane:not([hidden]) {display:block}
  body.mrc-desktop-v4 .mdh-native-account form {padding:0;margin:0;border:0}
  body.mrc-desktop-v4 .mdh-native-account form.login:not([hidden]) {display:block!important}
  body.mrc-desktop-v4 .mdh-native-account form p {margin:0 0 17px}
  body.mrc-desktop-v4 .mdh-native-account form label {font:400 14px/20px Cabin,sans-serif;color:#cbd8e7;margin-bottom:8px}
  body.mrc-desktop-v4 .mdh-native-account :is(input[type=text],input[type=email],input[type=password]) {height:43px;border:1px solid #3d566e!important;border-radius:7px;background:#122030!important;color:#e8f1f7;font:400 14px Cabin,sans-serif;padding:0 13px;box-shadow:none}
  body.mrc-desktop-v4 .mdh-native-account .show-password-input {color:#93aac2}
  body.mrc-desktop-v4 .mdh-native-account .woocommerce-form-login__rememberme,body.mrc-desktop-v4 .mdh-native-account .lost_password {font-size:13px;color:#b9cbd9}
  body.mrc-desktop-v4 .mdh-native-account button[type=submit] {width:100%;padding:10px 20px;min-height:44px;border:1px solid #b6f182;border-radius:10px;background:#b6f182!important;color:#152414!important;text-transform:none;font:600 14px/20px Cabin,sans-serif;box-shadow:none}
  body.mrc-desktop-v4 .mdh-native-account .woocommerce-privacy-policy-text {font-size:11px;line-height:1.6;color:#9aafc7}
  body.mrc-desktop-v4 .mdh-native-account .woocommerce-privacy-policy-text a {color:#c5e5a9}
  body.mrc-desktop-v4 .mdh-native-benefits {display:flex;gap:12px;align-items:center;margin:18px -26px 0;padding:12px 26px;background:#112031;border-top:1px solid #334a5d;color:#9caec5;font-size:12px;line-height:1.7}
  body.mrc-desktop-v4 .mdh-native-benefits>.icon {width:23px;height:23px;color:#b4d494}
  body.mrc-desktop-v4 .mdh-native-account :is(a,button,input):focus-visible {outline:2px solid #b6f182;outline-offset:2px}
}
@media(min-width:1025px) and (max-width:1240px) {
  #mrc-desktop-header .header-main {padding-inline:20px;gap:19px}
  #mrc-desktop-header .brand img {width:145px}
  #mrc-desktop-header .header-actions {gap:12px}
  #mrc-desktop-header .account-trigger small {display:none}
  #mrc-desktop-header .header-links>.header-utility-links {padding-inline:20px}
}
@media(max-width:1024px) {
  #mrc-desktop-header,.mdh-native-heading,.mdh-native-welcome,.mdh-native-benefits {display:none!important}
}
