/* MH Add to Cart Upsell – theme-first styling. WoodMart variables win where present. */
#gwco-modal{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:16px;box-sizing:border-box;font-family:inherit;color:inherit}
#gwco-modal.gwco-hidden{display:none}
#gwco-modal .gwco-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.62)}
#gwco-modal .gwco-dialog{position:relative;width:min(100%,950px);max-height:92vh;overflow-y:auto;box-sizing:border-box;text-align:center;background:var(--wd-main-bgcolor,var(--wp--preset--color--base,#fff));color:var(--wd-text-color,inherit);border-radius:var(--wd-brd-radius,8px);padding:34px 28px 24px;box-shadow:0 16px 60px #0003;font:inherit}
#gwco-modal .gwco-x{position:absolute;right:14px;top:12px;cursor:pointer;border:0;background:transparent;color:inherit;font:inherit;font-size:27px;line-height:1;padding:5px}
#gwco-modal h2{font-family:var(--wd-title-font,inherit);font-size:clamp(21px,3vw,29px);line-height:1.25;margin:0 35px 9px;color:var(--wd-title-color,inherit);font-weight:700}
#gwco-modal .gwco-subtitle{font-size:15px;color:inherit;margin:0 0 25px}
#gwco-modal .gwco-carousel{overflow:hidden;width:100%}
#gwco-modal .gwco-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
#gwco-modal .gwco-product{box-sizing:border-box;min-width:0;border:1px solid var(--wd-bordered-brd-color,var(--wd-brd-color,#e5e5e5));border-radius:var(--wd-brd-radius,7px);padding:16px 13px;display:flex;flex-direction:column;align-items:center;gap:8px;transition:border-color .2s}
#gwco-modal .gwco-product img{display:block;width:100%;max-width:170px;height:150px;object-fit:contain;margin:0 auto}
#gwco-modal .gwco-product h3{font-size:15px;line-height:1.35;font-weight:600;margin:0;color:var(--wd-title-color,inherit);flex:1}
#gwco-modal .gwco-price{font-size:15px;font-weight:600;color:var(--wd-primary-color,var(--wp--preset--color--primary,inherit));margin:0 0 4px}
#gwco-modal .gwco-price del{font-size:12px;opacity:.65;margin-left:5px;color:inherit}
#gwco-modal .gwco-free{color:var(--wd-primary-color,var(--wp--preset--color--primary,inherit));font-weight:700}
/* WoodMart's accent button tokens; standard themes via WP presets, then native button. */
#gwco-modal .gwco-add{box-sizing:border-box;width:100%;margin-top:auto;cursor:pointer;min-height:42px;padding:11px 13px;border:0;border-radius:var(--btn-accented-brd-radius,var(--wd-brd-radius,4px));background-color:var(--btn-accented-bgcolor,var(--wd-primary-color,var(--wp--preset--color--primary,#333)));color:var(--btn-accented-color,#fff);font-family:inherit;font-size:13px;font-weight:700;line-height:1.3;text-transform:var(--btn-accented-transform,uppercase);box-shadow:var(--btn-accented-box-shadow,none);transition:background-color .2s,color .2s,box-shadow .2s}
#gwco-modal .gwco-add:hover,#gwco-modal .gwco-add:focus-visible{background-color:var(--btn-accented-bgcolor-hover,var(--wd-primary-color,#252525));color:var(--btn-accented-color-hover,var(--btn-accented-color,#fff));box-shadow:var(--btn-accented-box-shadow-hover,none)}
#gwco-modal .gwco-add:disabled{cursor:default;opacity:.6}
#gwco-modal .gwco-one .gwco-grid{grid-template-columns:1fr}
#gwco-modal .gwco-one .gwco-product{display:grid;grid-template-columns:minmax(110px,180px) minmax(0,1fr) minmax(130px,190px);grid-template-rows:auto auto;column-gap:20px;text-align:left;align-items:center}
#gwco-modal .gwco-one .gwco-product img{grid-column:1;grid-row:1/3}
#gwco-modal .gwco-one .gwco-product h3{grid-column:2;grid-row:1;align-self:end}
#gwco-modal .gwco-one .gwco-price{grid-column:2;grid-row:2;align-self:start}
#gwco-modal .gwco-one .gwco-add{grid-column:3;grid-row:1/3}
#gwco-modal .gwco-two .gwco-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#gwco-modal .gwco-many .gwco-grid{display:flex;gap:16px;transition:transform .27s ease;will-change:transform}
#gwco-modal .gwco-many .gwco-product{flex:0 0 calc((100% - 32px)/3)}
#gwco-modal .gwco-nav{display:flex;gap:12px;align-items:center;justify-content:center;margin:17px 0 0}
#gwco-modal .gwco-nav button{background:transparent;border:1px solid var(--wd-brd-color,#ddd);border-radius:var(--wd-brd-radius,4px);min-width:38px;height:36px;color:inherit;font:inherit;cursor:pointer}
#gwco-modal .gwco-nav button:disabled{opacity:.35;cursor:default}
#gwco-modal .gwco-position{font-size:12px;opacity:.75;min-width:48px}
#gwco-modal .gwco-feedback{min-height:18px;font-size:13px;margin-top:9px}
#gwco-modal .gwco-continue{background:transparent;border:0;color:inherit;font:inherit;font-size:13px;text-decoration:underline;cursor:pointer;margin-top:12px}
body.gwco-lock{overflow:hidden}
@media(max-width:700px){#gwco-modal .gwco-dialog{padding:32px 16px 20px}#gwco-modal .gwco-subtitle{margin-bottom:15px}#gwco-modal .gwco-one .gwco-product{grid-template-columns:100px 1fr;grid-template-rows:auto auto auto;gap:6px 12px}#gwco-modal .gwco-one .gwco-product img{grid-column:1;grid-row:1/4;height:100px}#gwco-modal .gwco-one .gwco-product h3{grid-column:2;grid-row:1}#gwco-modal .gwco-one .gwco-price{grid-column:2;grid-row:2}#gwco-modal .gwco-one .gwco-add{grid-column:2;grid-row:3}#gwco-modal .gwco-two .gwco-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}#gwco-modal .gwco-many .gwco-product{flex-basis:calc((100% - 12px)/2)}#gwco-modal .gwco-many .gwco-grid{gap:12px}#gwco-modal .gwco-product{padding:10px 8px}#gwco-modal .gwco-product img{height:100px}#gwco-modal .gwco-add{font-size:11px;padding:9px 5px}}
@media(max-width:440px){#gwco-modal .gwco-many .gwco-product{flex-basis:100%}#gwco-modal .gwco-two .gwco-grid{grid-template-columns:1fr}#gwco-modal .gwco-two .gwco-product{display:grid;grid-template-columns:80px 1fr;text-align:left;gap:5px 12px}#gwco-modal .gwco-two .gwco-product img{grid-row:1/4;grid-column:1;height:85px}#gwco-modal .gwco-two .gwco-add{grid-column:2}#gwco-modal .gwco-one .gwco-product{grid-template-columns:80px 1fr}#gwco-modal .gwco-one .gwco-product img{height:85px}}

/* v1.5.2: mobile-safe viewport and per-campaign styling */
#gwco-modal{padding:max(8px,env(safe-area-inset-top)) 10px max(8px,env(safe-area-inset-bottom));height:100dvh}
#gwco-modal .gwco-dialog{width:min(100%,950px);max-height:calc(100dvh - 20px);overscroll-behavior:contain;overflow-x:hidden;overflow-y:auto;background-color:var(--mh-bg,var(--wd-main-bgcolor,var(--wp--preset--color--base,#fff)));background-image:var(--mh-image,none);background-size:cover;background-position:center;color:var(--mh-text,var(--wd-text-color,inherit));border-radius:var(--mh-radius,var(--wd-brd-radius,8px));scrollbar-width:thin}
#gwco-modal h2{color:var(--mh-heading,var(--wd-title-color,inherit))}
#gwco-modal .gwco-add{background-color:var(--mh-button,var(--btn-accented-bgcolor,var(--wd-primary-color,var(--wp--preset--color--primary,#333))))}
#gwco-modal .gwco-add:hover{background-color:var(--btn-accented-bgcolor-hover,var(--wd-primary-color,#252525))}
#gwco-modal .gwco-continue{display:inline-flex;justify-content:center;align-items:center;padding:12px 25px;min-height:42px;margin:16px auto 4px;background:var(--mh-secondary,var(--btn-default-bgcolor-hover,var(--btn-accented-bgcolor-hover,var(--wd-alternative-color,#555))));color:var(--btn-default-color-hover,#fff);border:0;border-radius:var(--btn-default-brd-radius,var(--wd-brd-radius,4px));font-size:13px;font-weight:700;text-transform:uppercase;line-height:1.35;text-decoration:none;cursor:pointer;transition:background-color .2s,opacity .2s}
#gwco-modal .gwco-continue:hover,#gwco-modal .gwco-continue:focus-visible{background:var(--btn-accented-bgcolor,var(--wd-primary-color,#333));color:var(--btn-accented-color,#fff)}
#gwco-modal .gwco-nav{display:flex;position:relative;z-index:2;margin:12px 0 3px;gap:12px;justify-content:center;align-items:center}
#gwco-modal .gwco-nav button{display:inline-flex;align-items:center;justify-content:center;border:1px solid var(--wd-brd-color,#bbb);background:var(--wd-main-bgcolor,#fff);color:var(--wd-title-color,#333);width:46px;height:40px;font-size:21px;flex-shrink:0}
#gwco-modal .gwco-nav button:not(:disabled):hover{background:var(--mh-button,var(--btn-accented-bgcolor,var(--wd-primary-color,#333)));color:#fff}
@media(max-width:900px){#gwco-modal .gwco-many .gwco-product{flex-basis:calc((100% - 12px)/2)}#gwco-modal .gwco-many .gwco-grid{gap:12px}}
@media(max-width:600px){#gwco-modal{align-items:center}#gwco-modal .gwco-dialog{width:100%;max-height:calc(100dvh - 20px);padding:28px 15px 15px}#gwco-modal h2{font-size:clamp(20px,6vw,27px);margin:0 25px 8px;line-height:1.15}#gwco-modal .gwco-subtitle{font-size:13px;margin-bottom:14px}#gwco-modal .gwco-many .gwco-product{flex-basis:100%;padding:12px}#gwco-modal .gwco-product img{height:112px}#gwco-modal .gwco-continue{width:100%;font-size:12px}#gwco-modal .gwco-nav{margin-top:10px}#gwco-modal .gwco-feedback{margin-top:5px}}

/* v1.6.0: split hero styling, separate card controls, side arrows, carousel clipping */
#gwco-modal .gwco-dialog{background-image:none;background-color:var(--mh-bg,var(--wd-main-bgcolor,#fff));padding:0 0 22px;overflow-y:auto}
#gwco-modal .gwco-hero{background-image:var(--mh-image,none);background-size:cover;background-position:center;padding:29px 26px 18px;margin:0 0 12px}
#gwco-modal .gwco-subtitle{margin-bottom:0}
#gwco-modal .gwco-slider-frame{position:relative;margin:0 46px}
#gwco-modal .gwco-carousel{overflow:hidden}
#gwco-modal .gwco-product{background:var(--mh-card-bg,var(--wd-main-bgcolor,#fff));color:var(--mh-card-text,var(--wd-text-color,#333));border:1px solid var(--wd-brd-color,#dedede)!important;min-height:0}
#gwco-modal .gwco-product h3{color:var(--mh-card-text,var(--wd-title-color,#333))}
#gwco-modal .gwco-price{color:var(--mh-card-text,var(--wd-text-color,#333))}
#gwco-modal .gwco-price ins{color:var(--wd-primary-color,#d24b00);text-decoration:none}
#gwco-modal .gwco-savings{font-size:12px;display:block;font-weight:500}
#gwco-modal .gwco-nav{position:absolute;inset:0 -43px;display:flex!important;justify-content:space-between;align-items:center;pointer-events:none;margin:0}
#gwco-modal .gwco-nav button{pointer-events:auto;border-radius:50%;width:38px;height:38px;min-width:38px;box-shadow:0 2px 8px #0002}
#gwco-modal .gwco-nav .gwco-position{position:absolute;left:50%;bottom:-23px;transform:translateX(-50%);pointer-events:none}
#gwco-modal .gwco-feedback,#gwco-modal .gwco-continue{position:relative}
#gwco-modal .gwco-x{z-index:5;right:10px;top:8px}
#gwco-modal .gwco-grid{align-items:stretch}
#gwco-modal .gwco-product{height:auto}
#gwco-modal .gwco-nav:has(.gwco-next:disabled):has(.gwco-prev:disabled){display:none!important}
@media(max-width:600px){#gwco-modal .gwco-dialog{padding:0 0 12px;max-height:calc(100dvh - 20px)}#gwco-modal .gwco-hero{padding:28px 20px 14px;margin-bottom:12px}#gwco-modal .gwco-slider-frame{margin:0 40px}#gwco-modal .gwco-nav{inset:0 -39px}#gwco-modal .gwco-nav button{width:34px;height:34px;min-width:34px;font-size:18px}#gwco-modal .gwco-product{padding:12px 10px;min-height:260px}#gwco-modal .gwco-product img{height:110px}#gwco-modal .gwco-feedback{margin-top:25px}#gwco-modal .gwco-continue{width:calc(100% - 32px)}}

/* v1.6.1: responsive carousel and mobile overflow repair */
#gwco-modal{width:100%;max-width:100vw;min-width:0;overflow:hidden;box-sizing:border-box;}
#gwco-modal .gwco-dialog{min-width:0;width:min(100%,950px);max-width:100%;max-height:calc(100dvh - 20px);overflow-x:clip;overflow-y:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;}
#gwco-modal .gwco-slider-frame{min-width:0;}
#gwco-modal .gwco-carousel{min-width:0;max-width:100%;overflow:hidden;}
#gwco-modal .gwco-many .gwco-grid{display:flex!important;flex-wrap:nowrap!important;gap:12px!important;grid-template-columns:none!important;width:100%;min-width:0;transition:transform .25s ease;}
#gwco-modal .gwco-many .gwco-product{box-sizing:border-box;min-width:0;flex-shrink:0;overflow:hidden;padding:12px 9px;}
#gwco-modal .gwco-product h3{overflow-wrap:anywhere;word-break:normal;font-size:clamp(11px,1.7vw,15px);}
#gwco-modal .gwco-nav.gwco-nav-hidden{display:none!important;}
#gwco-modal .gwco-nav{display:flex!important;}
#gwco-modal .gwco-product img{max-width:100%;}
@media(max-width:650px){
 #gwco-modal{padding:8px;}
 #gwco-modal .gwco-dialog{max-height:calc(100dvh - 16px);border-radius:var(--mh-radius,var(--wd-brd-radius,8px));padding-bottom:10px;}
 #gwco-modal .gwco-hero{padding:34px 22px 14px;}
 #gwco-modal h2{font-size:clamp(18px,5vw,25px);}
 #gwco-modal .gwco-slider-frame{margin:0 30px;}
 #gwco-modal .gwco-nav{inset:0 -30px;}
 #gwco-modal .gwco-nav button{width:28px;min-width:28px;height:32px;font-size:17px;padding:0;}
 #gwco-modal .gwco-many .gwco-product{min-height:0;padding:8px 5px;gap:6px;}
 #gwco-modal .gwco-many .gwco-product img{height:86px;max-width:100%;}
 #gwco-modal .gwco-many .gwco-product h3{font-size:11px;line-height:1.3;}
 #gwco-modal .gwco-many .gwco-price{font-size:12px;}
 #gwco-modal .gwco-many .gwco-add{font-size:10px;padding:7px 3px;min-height:36px;white-space:normal;}
 #gwco-modal .gwco-feedback{margin-top:26px;}
 #gwco-modal .gwco-continue{max-width:calc(100% - 24px);width:calc(100% - 24px);font-size:11px;}
 #gwco-modal .gwco-two .gwco-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
 #gwco-modal .gwco-two .gwco-product{display:flex;text-align:center;flex-direction:column;gap:6px;}
 #gwco-modal .gwco-two .gwco-product img,#gwco-modal .gwco-two .gwco-product h3,#gwco-modal .gwco-two .gwco-add{grid-column:auto;grid-row:auto;}
}
@media(max-width:360px){
 #gwco-modal .gwco-slider-frame{margin:0 24px;}
 #gwco-modal .gwco-nav{inset:0 -25px;}
 #gwco-modal .gwco-many .gwco-product{padding:7px 4px;}
}

/* v1.6.2: theme-colour chevrons and balanced footer rhythm */
#gwco-modal .gwco-nav button,
#gwco-modal .gwco-nav button:not(:disabled):hover,
#gwco-modal .gwco-nav button:focus-visible{
  border:0!important;border-radius:0!important;box-shadow:none!important;
  background:transparent!important;background-color:transparent!important;
  color:var(--wd-primary-color,var(--wp--preset--color--primary,#333))!important;
  width:30px;min-width:30px;height:44px;padding:0!important;
  font-size:27px;font-weight:600;line-height:1;transition:opacity .2s ease,transform .2s ease;
}
#gwco-modal .gwco-nav button:not(:disabled):hover{transform:scale(1.14)}
#gwco-modal .gwco-nav button:disabled{opacity:.25!important}
#gwco-modal .gwco-dialog{padding-bottom:12px!important}
#gwco-modal .gwco-slider-frame{margin-bottom:0}
#gwco-modal .gwco-feedback:empty{display:none!important}
#gwco-modal .gwco-feedback:not(:empty){margin:12px 20px 0;min-height:0}
#gwco-modal .gwco-continue{margin:12px auto 0!important}
#gwco-modal .gwco-nav .gwco-position{bottom:-18px}
#gwco-modal .gwco-slider-frame:has(.gwco-nav:not(.gwco-nav-hidden)){padding-bottom:20px}
@media(max-width:650px){
 #gwco-modal .gwco-nav button{width:24px;min-width:24px;height:40px;font-size:23px}
 #gwco-modal .gwco-continue{margin-top:12px!important}
}

/* v1.6.3: preserve the full product-card perimeter inside the sliding viewport.
   Vertical padding gives the 1px bottom stroke breathing room when WooCommerce /
   theme pixel rounding clips the carousel, and the inset stroke cannot be cut off. */
#gwco-modal .gwco-carousel{
  box-sizing:border-box!important;
  padding-top:2px!important;
  padding-bottom:3px!important;
}
#gwco-modal .gwco-many .gwco-grid{
  align-items:stretch!important;
  padding-bottom:1px!important;
}
#gwco-modal .gwco-product{
  position:relative!important;
  border:1px solid var(--wd-brd-color,#dedede)!important;
  box-shadow:inset 0 0 0 1px var(--wd-brd-color,#dedede)!important;
  background-clip:padding-box!important;
}
