/* Presentation only. The plugin adds nsc-enabled together with its shared markup. */
body.nsc-enabled {
  --nsc-ivory: #faf8f3;
  --nsc-white: #fff;
  --nsc-bordeaux: #7f2d40;
  --nsc-ink: #26251f;
  --nsc-muted: #605950;
  --nsc-line: #e4dccf;
  --nsc-surface: var(--nsc-ivory);
  --nsc-text: var(--nsc-ink);
  --nsc-accent: var(--nsc-bordeaux);
  --nsc-card-background: var(--nsc-white);
  --nsc-card-radius: 14px;
  --nsc-ui-font: Arial, Helvetica, sans-serif;
  --nsc-title-font: Georgia, "Times New Roman", serif;
}

/* Keep the original site intact whenever the replacement is not active. */
body.nsc-enabled .nph-mobile-nav,
body.nsc-enabled .ct-shortcuts-bar,
body.nsc-enabled .ct-drawer-canvas[data-shortcuts-bar],
body.nsc-enabled .nph-foot,
body.nsc-enabled #footer.ct-footer {
  display: none !important;
}

/* Woo archive/search cards; product pages and both weight dialogs stay untouched. */
body.nsc-enabled :is(.products, .entries) > .product {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  min-width: 0;
  height: 100%;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid var(--nsc-line);
  border-radius: var(--nsc-card-radius);
  background: var(--nsc-card-background);
  box-shadow: none !important;
  color: var(--nsc-text);
  font-family: var(--nsc-ui-font);
  text-align: left;
}

body.nsc-enabled :is(.products, .entries) > .product > figure {
  flex: 0 0 auto;
  align-self: stretch;
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  margin: 0 !important;
  position: relative;
  overflow: hidden;
}

body.nsc-enabled :is(.products, .entries) > .product .ct-media-container {
  display: block;
  width: 100%;
  height: auto !important;
  aspect-ratio: 1 / 1;
  background: var(--nsc-card-background);
}

body.nsc-enabled :is(.products, .entries) > .product .ct-media-container img {
  width: 100% !important;
  height: 100% !important;
  max-height: none;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center;
  transform: none !important;
}

body.nsc-enabled :is(.products, .entries) > .product :is(.woocommerce-loop-product__title, .entry-title) {
  min-height: 2.7em;
  margin: 14px 12px 10px !important;
  padding: 0;
  color: var(--nsc-text);
  font: 600 17px/1.35 var(--nsc-title-font) !important;
  text-transform: none !important;
  letter-spacing: normal;
  overflow-wrap: anywhere;
}

body.nsc-enabled :is(.products, .entries) > .product :is(.woocommerce-loop-product__title, .entry-title) a {
  color: inherit;
  font: inherit !important;
  text-decoration: none;
}

body.nsc-enabled :is(.products, .entries) > .product :is(.entry-meta, .product-category) {
  display: none !important;
}

body.nsc-enabled :is(.products, .entries) > .product .ct-woo-card-rating {
  margin: 0 12px 8px;
}

body.nsc-enabled :is(.products, .entries) > .product .ct-woo-card-actions {
  box-sizing: border-box;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  justify-content: flex-end;
  gap: 12px;
  width: 100%;
  margin: auto 0 0 !important;
  padding: 12px;
  border: 0 !important;
  background: var(--nsc-surface);
}

body.nsc-enabled :is(.products, .entries) > .product .ct-woo-card-actions::before {
  display: none !important;
}

body.nsc-enabled :is(.products, .entries) > .product .ct-woo-card-actions > .price {
  display: block;
  flex: none !important;
  width: 100%;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--nsc-text);
  font: 600 16px/1.45 var(--nsc-ui-font);
  text-align: left;
  white-space: normal;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

body.nsc-enabled :is(.products, .entries) > .product .price small {
  color: var(--nsc-muted);
  font: 400 12px/1.45 var(--nsc-ui-font);
}

body.nsc-enabled :is(.products, .entries) > .product .ct-woo-card-actions > .button {
  display: flex !important;
  flex: none !important;
  align-items: center;
  justify-content: center;
  width: 100% !important;
  min-width: 0;
  min-height: 44px;
  height: auto;
  margin: 0 !important;
  padding: 10px 8px !important;
  border: 1px solid var(--nsc-accent) !important;
  border-radius: 8px;
  background: var(--nsc-accent) !important;
  color: var(--nsc-white) !important;
  font: 600 13px/1.3 var(--nsc-ui-font) !important;
  letter-spacing: normal;
  text-transform: none;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}

body.nsc-enabled :is(.products, .entries) > .product .ct-woo-card-actions > .button:hover {
  filter: brightness(.92);
}

body.nsc-enabled .nsc-footer {
  box-sizing: border-box;
  width: 100%;
  margin: 32px 0 0;
  padding: 28px max(18px, env(safe-area-inset-right)) 28px max(18px, env(safe-area-inset-left));
  border-top: 1px solid var(--nsc-line);
  background: var(--nsc-surface);
  color: var(--nsc-text);
  font: 400 14px/1.6 var(--nsc-ui-font);
}

body.nsc-enabled .nsc-footer__inner {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1240px;
  margin-inline: auto;
}

body.nsc-enabled .nsc-footer__brand {
  color: var(--nsc-accent);
  font: 600 20px/1.4 var(--nsc-title-font);
}

body.nsc-enabled .nsc-footer :is(p, address) {
  margin: 6px 0;
  color: var(--nsc-text);
  font: 400 14px/1.6 var(--nsc-ui-font);
  font-style: normal;
}

body.nsc-enabled .nsc-footer__links {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px 18px;
}

body.nsc-enabled .nsc-footer a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  color: var(--nsc-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

body.nsc-enabled .nsc-nav {
  display: none;
}

body.nsc-enabled :is(.nsc-nav, .nsc-footer) a:focus-visible,
body.nsc-enabled :is(.products, .entries) > .product a:focus-visible,
body.nsc-enabled :is(.products, .entries) > .product button:focus-visible {
  outline: 2px solid var(--nsc-accent);
  outline-offset: 2px;
}

body.nsc-enabled :is(.products, .entries) > .product .ct-media-container:focus-visible {
  outline-offset: -3px;
}

@media (max-width: 1024px) {
  body.nsc-enabled {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }

  body.nsc-enabled .nsc-nav {
    box-sizing: border-box;
    position: fixed;
    inset: auto 0 0;
    z-index: 90;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2px;
    min-height: 64px;
    padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom, 0px)) max(6px, env(safe-area-inset-left));
    border-top: 1px solid var(--nsc-line);
    background: var(--nsc-surface);
    color: var(--nsc-accent);
    font: 500 12px/1.3 var(--nsc-ui-font);
  }

  body.nsc-enabled .nsc-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 0;
    min-height: 50px;
    padding: 4px 2px;
    border-radius: 6px;
    color: inherit;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
  }

  body.nsc-enabled .nsc-nav :is(svg, .nsc-nav__icon) {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  body.nsc-enabled .nsc-nav a:is(:hover, [aria-current="page"]) {
    background: var(--nsc-white);
  }

  body.nsc-enabled .nsc-footer {
    margin-top: 24px;
    padding-top: 22px;
    padding-bottom: 22px;
  }
}

@media (max-width: 480px) {
  body.nsc-enabled :is(.products, .entries) > .product :is(.woocommerce-loop-product__title, .entry-title) {
    font-size: 15px !important;
  }

  body.nsc-enabled .nsc-footer__inner {
    flex-direction: column;
    gap: 14px;
  }
}
