/* NSTECH Promotion Manager: scoped presentation, no scripts or external assets. */
.nst-promo-card {
  --nst-accent:var(--wd-primary-color,#087ce8); --nst-border:var(--nst-accent);
  --nst-card-bg:#fff; --nst-price:var(--nst-accent);
  --nst-badge-bg:#111318; --nst-badge-text:#fff;
  --nst-button-bg:var(--nst-accent); --nst-button-text:#fff; --nst-button-hover:#055db4;
  --nst-border-width:1px; --nst-radius:12px; --nst-badge-radius:6px;
  --wd-prod-bg:var(--nst-card-bg); --wd-brd-radius:var(--nst-radius);
}
/* The WoodMart card is INSIDE its grid column. Do not frame/resize the column. */
.nst-promo-card:not(:is(.product-grid-item,.wd-product)),
.nst-promo-card:is(.product-grid-item,.wd-product) > :is(.product-wrapper,.wd-product-wrapper) {
  box-sizing:border-box; background-color:var(--nst-card-bg)!important; border-radius:var(--nst-radius);
}
.nst-promo-card.nst-has-border:not(:is(.product-grid-item,.wd-product)),
.nst-promo-card.nst-has-border:is(.product-grid-item,.wd-product) > :is(.product-wrapper,.wd-product-wrapper) {
  border:var(--nst-border-width) solid var(--nst-border);
}
.nst-promo-card:not(.nst-has-shadow):not(:is(.product-grid-item,.wd-product)),
.nst-promo-card:not(.nst-has-shadow):is(.product-grid-item,.wd-product) > :is(.product-wrapper,.wd-product-wrapper) { box-shadow:none; }
.nst-promo-card.nst-has-shadow:not(:is(.product-grid-item,.wd-product)),
.nst-promo-card.nst-has-shadow:is(.product-grid-item,.wd-product) > :is(.product-wrapper,.wd-product-wrapper) {
  box-shadow:0 2px 10px rgba(20,43,66,.07); transition:box-shadow .2s ease;
}
.nst-promo-card.nst-has-shadow:hover:not(:is(.product-grid-item,.wd-product)),
.nst-promo-card.nst-has-shadow:hover:is(.product-grid-item,.wd-product) > :is(.product-wrapper,.wd-product-wrapper) { box-shadow:0 5px 16px rgba(20,43,66,.11); }

/* Match NSTECH's 260px image region in both tiled grids and carousels. */
.nst-promo-card.wd-hover-tiled:not(.nstech-text-first) > .product-wrapper > .product-element-top {
  border-radius:var(--nst-radius) var(--nst-radius) 0 0;
}
.nst-promo-card.wd-hover-tiled:not(.nstech-text-first) > .product-wrapper > .product-element-top > .product-image-link {
  box-sizing:border-box; display:flex; align-items:center; justify-content:center;
  height:var(--nst-tile-image-height,260px); padding:52px 16px 14px;
}
.nst-promo-card.wd-hover-tiled:not(.nstech-text-first) > .product-wrapper > .product-element-top > :is(.product-image-link,.hover-img) :is(img,picture) {
  display:block; width:auto; height:auto; max-width:100%; max-height:100%;
  object-fit:contain; margin-inline:auto;
}
.nst-promo-card.wd-hover-tiled:not(.nstech-text-first) > .product-wrapper > .product-element-top > .hover-img {
  box-sizing:border-box; padding:52px 16px 14px;
}
/* Target each card/summary component, so parent offers cannot recolour related cards. */
.nst-promo-card.nst-has-price > .price ins,
.nst-promo-card.nst-has-price > .price ins .amount,
.nst-promo-card.nst-has-price > .woocommerce-LoopProduct-link > .price ins,
.nst-promo-card.nst-has-price > .woocommerce-LoopProduct-link > .price ins .amount,
.nst-promo-card.nst-has-price > .product-wrapper > .product-element-bottom > .price ins,
.nst-promo-card.nst-has-price > .product-wrapper > .product-element-bottom > .price ins .amount,
.nst-promo-card.nst-has-price > .product-wrapper > .price ins,
.nst-promo-card.nst-has-price > .product-wrapper > .price ins .amount,
.nst-promo-single.nst-has-price .summary > .price ins,
.nst-promo-single.nst-has-price .summary > .price ins .amount,
.nst-promo-single.nst-has-price .summary > .summary-inner > .price ins,
.nst-promo-single.nst-has-price .summary > .summary-inner > .price ins .amount,
.nst-promo-single.nst-has-price .summary > .cart .woocommerce-variation-price > .price ins,
.nst-promo-single.nst-has-price .summary > .cart .woocommerce-variation-price > .price ins .amount,
.nst-promo-single.nst-has-price .summary > .summary-inner > .cart .woocommerce-variation-price > .price ins,
.nst-promo-single.nst-has-price .summary > .summary-inner > .cart .woocommerce-variation-price > .price ins .amount {
  color:var(--nst-price)!important; font-weight:700; text-decoration:none;
}

/* Colour text purchase buttons; native icon-only toolbars retain their own appearance. */
.nst-promo-card.nst-has-button > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *),
.nst-promo-card.nst-has-button > .product-wrapper > :is(.product-element-bottom,.wd-bottom-actions) :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *),
.nst-promo-card.nst-has-button > .product-wrapper > .product-element-top > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *),
.nst-promo-single.nst-has-button .summary > .cart .single_add_to_cart_button,
.nst-promo-single.nst-has-button .summary > .summary-inner > .cart .single_add_to_cart_button {
  background:var(--nst-button-bg)!important; border-color:var(--nst-button-bg)!important;
  color:var(--nst-button-text)!important; border-radius:min(var(--nst-radius),8px);
  transition:background-color .15s ease,border-color .15s ease; color-scheme:light;
}
.nst-promo-card.nst-has-button > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *):hover,
.nst-promo-card.nst-has-button > .product-wrapper > :is(.product-element-bottom,.wd-bottom-actions) :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *):hover,
.nst-promo-card.nst-has-button > .product-wrapper > .product-element-top > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *):hover,
.nst-promo-single.nst-has-button .summary > .cart .single_add_to_cart_button:hover,
.nst-promo-single.nst-has-button .summary > .summary-inner > .cart .single_add_to_cart_button:hover {
  background:var(--nst-button-hover)!important; border-color:var(--nst-button-hover)!important; color:var(--nst-button-text)!important;
}
.nst-promo-card.nst-has-button.nst-button-outline > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *),
.nst-promo-card.nst-has-button.nst-button-outline > .product-wrapper > :is(.product-element-bottom,.wd-bottom-actions) :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *),
.nst-promo-card.nst-has-button.nst-button-outline > .product-wrapper > .product-element-top > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *),
.nst-promo-single.nst-has-button.nst-button-outline .summary > .cart .single_add_to_cart_button,
.nst-promo-single.nst-has-button.nst-button-outline .summary > .summary-inner > .cart .single_add_to_cart_button {
  background:transparent!important; border:1px solid var(--nst-button-bg)!important; color:var(--nst-button-bg)!important;
}
.nst-promo-card.nst-has-button.nst-button-outline > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *):hover,
.nst-promo-card.nst-has-button.nst-button-outline > .product-wrapper > :is(.product-element-bottom,.wd-bottom-actions) :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *):hover,
.nst-promo-card.nst-has-button.nst-button-outline > .product-wrapper > .product-element-top > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *):hover,
.nst-promo-single.nst-has-button.nst-button-outline .summary > .cart .single_add_to_cart_button:hover,
.nst-promo-single.nst-has-button.nst-button-outline .summary > .summary-inner > .cart .single_add_to_cart_button:hover {
  background:var(--nst-button-bg)!important; color:var(--nst-button-text)!important;
}
.nst-promo-card.nst-has-button > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *):focus-visible,
.nst-promo-card.nst-has-button > .product-wrapper > :is(.product-element-bottom,.wd-bottom-actions) :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *):focus-visible,
.nst-promo-card.nst-has-button > .product-wrapper > .product-element-top > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):not(:is(.wd-style-icon,.wd-action-btn,.wd-buttons,.woodmart-buttons,.wd-add-small-btn) *):focus-visible,
.nst-promo-single.nst-has-button .summary > .cart .single_add_to_cart_button:focus-visible,
.nst-promo-single.nst-has-button .summary > .summary-inner > .cart .single_add_to_cart_button:focus-visible { outline:2px solid var(--nst-button-bg); outline-offset:3px; }

/* Override WoodMart's word-break:break-all without forcing long labels off-screen. */
.onsale.nst-promo-badge,.product-label.nst-promo-badge {
  box-sizing:border-box; display:inline-flex!important; align-items:center; justify-content:center;
  flex-direction:column; gap:3px; width:max-content!important; min-width:0!important;
  height:auto!important; min-height:0!important; max-width:100%!important;
  background:var(--nst-badge-bg,#111318)!important; color:var(--nst-badge-text,#fff)!important;
  border:0!important; border-radius:var(--nst-badge-radius,6px)!important;
  font-family:inherit; font-size:11px!important; font-weight:700!important; line-height:1.35!important;
  letter-spacing:.25px; text-transform:none!important; padding:8px 11px!important; margin:0!important;
  text-align:center; text-decoration:none; box-shadow:none; white-space:normal!important;
  word-break:normal!important; overflow-wrap:normal!important; hyphens:none; z-index:3;
}
.nst-promo-badge .nst-promo-label {
  display:block; max-width:100%; white-space:normal; word-break:normal; overflow-wrap:break-word;
}
.nst-promo-badge.nst-badge-pill { border-radius:999px!important; }
.nst-promo-badge.nst-badge-square { border-radius:0!important; }
.nst-promo-badge.nst-badge-rounded { border-radius:6px!important; }
.nst-promo-badge .nst-promo-saving {
  display:block; font-size:10px; line-height:1.25; font-weight:500; letter-spacing:0; text-transform:none;
}
/* Classic WooCommerce positions the badge itself. */
.nst-promo-card > .onsale.nst-promo-badge,
.nst-promo-card > a > .onsale.nst-promo-badge { top:12px; max-width:calc(100% - 24px)!important; }
.nst-promo-card > .onsale.nst-badge-left,
.nst-promo-card > a > .onsale.nst-badge-left,
.nst-promo-single > .onsale.nst-badge-left { left:12px; right:auto; }
.nst-promo-card > .onsale.nst-badge-right,
.nst-promo-card > a > .onsale.nst-badge-right,
.nst-promo-single > .onsale.nst-badge-right { right:12px; left:auto; }
/* WoodMart positions the GROUP. Only adjust groups that contain our campaign badge. */
:is(.product-labels,.wd-product-labels):has(> .nst-promo-badge) {
  width:max-content; max-width:calc(100% - 24px); gap:6px; top:12px; z-index:3;
}
:is(.product-labels,.wd-product-labels):has(> .nst-promo-badge.nst-badge-left) {
  left:12px; right:auto; inset-inline-start:12px; inset-inline-end:auto; align-items:flex-start;
}
:is(.product-labels,.wd-product-labels):has(> .nst-promo-badge.nst-badge-right) {
  left:auto; right:12px; inset-inline-start:auto; inset-inline-end:12px; align-items:flex-end;
}
:is(.product-labels,.wd-product-labels) > .nst-promo-badge { position:relative!important; inset:auto!important; }
/* Leave the other top corner available to the icon toolbar. */
.nst-promo-card.wd-hover-tiled:not(.nstech-text-first) > .product-wrapper > .product-element-top > :is(.product-labels,.wd-product-labels):has(> .nst-promo-badge) {
  max-width:calc(100% - 72px);
}
.nst-promo-card.wd-hover-tiled:not(.nstech-text-first) > .product-wrapper > .product-element-top:has(> .product-labels > .nst-badge-right) > .wd-buttons.wd-pos-r-t {
  left:10px; right:auto; inset-inline-start:10px; inset-inline-end:auto;
}
/* Placeholder-free, text-first products need a normal-flow badge row above the icons. */
.nst-promo-card.nstech-text-first > .product-wrapper > .product-element-top {
  display:flex; flex-direction:column; gap:12px; padding:14px 14px 0; overflow:visible;
}
.nst-promo-card.nstech-text-first > .product-wrapper > .product-element-top > :is(.product-labels,.wd-product-labels):has(> .nst-promo-badge) {
  position:static; transform:none; max-width:100%; align-self:flex-start;
}
.nst-promo-card.nstech-text-first > .product-wrapper > .product-element-top > :is(.product-labels,.wd-product-labels):has(> .nst-promo-badge.nst-badge-right) { align-self:flex-end; }
.nst-promo-card.nstech-text-first > .product-wrapper > .product-element-top > .wd-buttons {
  position:static; flex-direction:row; justify-content:flex-end; align-self:flex-end; max-width:100%; box-shadow:none;
}
@media(max-width:767px) {
  .nst-promo-card.wd-hover-tiled { --nst-tile-image-height:clamp(150px,42vw,260px); }
  .onsale.nst-promo-badge,.product-label.nst-promo-badge { font-size:10px!important; padding:7px 9px!important; letter-spacing:.1px; }
  .nst-promo-badge .nst-promo-saving { font-size:9px; }
  .nst-promo-card.wd-hover-tiled:not(.nstech-text-first) > .product-wrapper > .product-element-top > :is(.product-labels,.wd-product-labels):has(> .nst-promo-badge) { max-width:calc(100% - 60px); }
}
@media(prefers-reduced-motion:reduce) {
  .nst-promo-card,.nst-promo-card > .product-wrapper,.nst-promo-single .single_add_to_cart_button { transition:none!important; }
}

/* NSTECH homepage: preserve its flattened layout, decorate the visible card. */
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card { background-color:var(--nst-card-bg)!important; border-radius:var(--nst-radius); }
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-border { border:var(--nst-border-width) solid var(--nst-border); }
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card:not(.nst-has-shadow) { box-shadow:none; }
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-shadow { box-shadow:0 2px 10px rgba(20,43,66,.07); }
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-shadow:is(:hover,:focus-within) { box-shadow:0 5px 16px rgba(20,43,66,.11); }
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card > .product-wrapper > .product-element-top > :is(.product-labels,.wd-product-labels):has(> .nst-promo-badge) {
  position:static; transform:none; order:-1; align-self:flex-start; justify-content:center;
  width:max-content; max-width:calc(100% - 52px); min-height:44px;
  margin:0 0 12px; margin-inline-end:52px;
}
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-badge-right > .product-wrapper > .product-element-top > :is(.product-labels,.wd-product-labels):has(> .nst-promo-badge) {
  align-self:flex-end; margin-inline-start:52px; margin-inline-end:0;
}
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card > .product-wrapper > .product-element-top > .product-image-link { padding:8px 10px; }
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-badge-right .wd-wishlist-btn { left:22px!important; right:auto!important; }
@media(max-width:767px) {
  .ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-badge-right .wd-wishlist-btn { left:14px!important; right:auto!important; }
}
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button > .product-wrapper > .product-element-top > .wd-buttons > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button),
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button) {
  background:var(--nst-button-bg)!important; color:var(--nst-button-text)!important;
  border-color:var(--nst-button-bg)!important; border-radius:min(var(--nst-radius),8px);
}
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button > .product-wrapper > .product-element-top > .wd-buttons > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):hover,
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):hover {
  background:var(--nst-button-hover)!important; color:var(--nst-button-text)!important;
  border-color:var(--nst-button-hover)!important;
}
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button.nst-button-outline > .product-wrapper > .product-element-top > .wd-buttons > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button),
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button.nst-button-outline > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button) {
  background:transparent!important; color:var(--nst-button-bg)!important;
  border-color:var(--nst-button-bg)!important;
}
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button.nst-button-outline > .product-wrapper > .product-element-top > .wd-buttons > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):hover,
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button.nst-button-outline > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):hover {
  background:var(--nst-button-bg)!important; color:var(--nst-button-text)!important;
  border-color:var(--nst-button-bg)!important;
}
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button > .product-wrapper > .product-element-top > .wd-buttons > .wd-add-btn > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):focus-visible,
.ns-promo-v6 .ns-live-products .products > .product.nst-promo-card.nst-has-button > :is(a.add_to_cart_button,a.product_type_variable,a.product_type_simple,a.product_type_grouped,button.add_to_cart_button):focus-visible { outline:2px solid var(--nst-button-bg); outline-offset:3px; }
