/* NeXt Chapter Recovery v2.0.0 — consolidated production layer */

:root {
  --ncr-focus: #1b6ca8;
  --ncr-danger: #8b1e16;
  --ncr-border: rgba(91, 48, 30, .18);
  --ncr-shadow-soft: 0 18px 48px rgba(35, 17, 10, .09);
}

html { scroll-padding-top: 7rem; }

body.ncr-production-v200 {
  overflow-wrap: anywhere;
  text-rendering: optimizeLegibility;
}

.ncr-skip-link {
  position: fixed;
  z-index: 1000000;
  inset: .75rem auto auto .75rem;
  transform: translateY(-180%);
  padding: .8rem 1rem;
  border-radius: .6rem;
  background: #fff;
  color: #17110e;
  font-weight: 800;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}

.ncr-skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--ncr-focus) !important;
  outline-offset: 3px !important;
}

.ncr-v187-menu .ncr-nav-list,
.ncr-v187-mobile-nav .ncr-mobile-nav-list {
  display: flex;
  align-items: center;
  gap: .15rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ncr-v187-menu li,
.ncr-v187-mobile-nav li { margin: 0; padding: 0; }

.ncr-v187-menu .sub-menu {
  position: absolute;
  z-index: 30;
  min-width: 14rem;
  margin: 0;
  padding: .55rem;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 1rem;
  background: #27120d;
  box-shadow: var(--ncr-shadow-soft);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(.5rem);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.ncr-v187-menu li { position: relative; }
.ncr-v187-menu li:hover > .sub-menu,
.ncr-v187-menu li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.ncr-v187-menu .current-menu-item > a,
.ncr-v187-menu .current-menu-ancestor > a,
.ncr-v187-mobile-nav .current-menu-item > a,
.ncr-v187-mobile-nav a[aria-current="page"] {
  background: rgba(232, 111, 29, .2);
  color: #fff7ec;
}

.ncr-v187-mobile-nav .ncr-mobile-nav-list {
  display: grid;
  width: 100%;
  gap: .35rem;
}

.ncr-v187-mobile-nav .sub-menu {
  display: grid;
  gap: .25rem;
  margin: .25rem 0 0 .75rem;
  padding: .25rem 0 .25rem .65rem;
  border-left: 2px solid rgba(232, 111, 29, .35);
  list-style: none;
}

.ncr-cart-link { position: relative; }
.ncr-cart-count {
  position: absolute;
  inset: -.35rem -.35rem auto auto;
  display: grid;
  min-width: 1.25rem;
  min-height: 1.25rem;
  place-items: center;
  padding: .08rem .25rem;
  border: 2px solid #35150d;
  border-radius: 999px;
  background: #fff4e5;
  color: #5b1c0f;
  font: 800 .68rem/1 sans-serif;
}

.ncr-mobile-shop-link,
.ncr-mobile-account-link {
  display: block;
  min-height: 44px;
}

.ncr-search-panel { max-height: min(88vh, 48rem); overflow-y: auto; }
body.ncr-search-open { overflow: hidden; }

/* Community */
.ncr-community-app-page {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 4rem;
  background: linear-gradient(180deg, #f9eee2, #fffaf4 32rem);
}

.ncr-community-app-wrap {
  width: min(1180px, calc(100% - 2rem));
  margin-inline: auto;
}

.ncr-community-intro {
  display: grid;
  gap: 1rem;
  margin-bottom: 1.25rem;
  padding: clamp(1.25rem, 3vw, 2.4rem);
  border: 1px solid var(--ncr-border);
  border-radius: 1.5rem;
  background: #fffaf4;
  box-shadow: var(--ncr-shadow-soft);
}

.ncr-community-intro h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.6rem) !important; }
.ncr-community-intro p { max-width: 68ch; margin: 0; color: #5d493e; }

.ncr-community-tabs ul {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: .25rem 0 0;
  padding: 0;
  list-style: none;
}

.ncr-community-tabs a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  padding: .65rem 1rem;
  border: 1px solid var(--ncr-border);
  border-radius: 999px;
  background: #fff;
  color: #522012;
  font-weight: 800;
  text-decoration: none;
}

.ncr-community-tabs a[aria-current="page"] {
  border-color: #8b2e18;
  background: #8b2e18;
  color: #fff;
}

.ncr-community-safety {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.15rem;
  border-left: .3rem solid #b54a1c;
  border-radius: .8rem;
  background: #fff7e8;
  color: #4e372c;
}

.ncr-community-module,
.ncr-community-signin,
.ncr-community-unavailable,
.ncr-tool-unavailable {
  padding: clamp(1rem, 2.4vw, 2rem);
  border: 1px solid var(--ncr-border);
  border-radius: 1.4rem;
  background: #fff;
  box-shadow: var(--ncr-shadow-soft);
}

.ncr-community-signin { text-align: center; }
.ncr-community-signin h2,
.ncr-community-unavailable h2,
.ncr-tool-unavailable h2 { margin-top: 0; }

/* WooCommerce classic templates and blocks */
.ncr-commerce-area .ncr-woo-wrap,
.ncr-commerce-area main.site-main {
  width: min(1220px, calc(100% - 2rem));
  margin-inline: auto;
}

.ncr-commerce-area .ncr-woo-card,
.ncr-commerce-area .woocommerce,
.ncr-commerce-area .wc-block-cart,
.ncr-commerce-area .wc-block-checkout {
  min-width: 0;
}

.woocommerce ul.products,
.wc-block-grid__products,
.wc-block-product-template {
  gap: clamp(.85rem, 2vw, 1.35rem) !important;
}

.woocommerce ul.products li.product,
.wc-block-grid__product,
.wc-block-product {
  overflow: hidden;
  border: 1px solid var(--ncr-border) !important;
  border-radius: 1.25rem;
  background: #fffaf4;
  box-shadow: 0 12px 32px rgba(35, 17, 10, .07);
}

.woocommerce ul.products li.product img,
.wc-block-grid__product-image img,
.wc-block-components-product-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.woocommerce table.shop_table,
.wc-block-cart-items { width: 100%; }

.woocommerce-cart-form,
.woocommerce-account .woocommerce-MyAccount-content,
.wc-block-cart__main,
.wc-block-checkout__main { min-width: 0; }

.woocommerce-MyAccount-navigation ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce-MyAccount-navigation a {
  display: block;
  min-height: 44px;
  padding: .7rem .9rem;
  border-radius: .65rem;
  text-decoration: none;
}

.woocommerce-MyAccount-navigation .is-active a {
  background: #8b2e18;
  color: #fff;
}

.woocommerce form .form-row label,
.wc-block-components-text-input label,
.wc-block-components-combobox .wc-block-components-combobox-control label {
  font-weight: 750;
}

.woocommerce form .form-row .required { color: var(--ncr-danger); }

.woocommerce-error,
.woocommerce-info,
.woocommerce-message,
.wc-block-components-notice-banner {
  border-radius: .9rem !important;
}

@media (max-width: 1060px) {
  .ncr-v187-menu .ncr-nav-list { display: none; }
}

@media (max-width: 782px) {
  .woocommerce table.shop_table_responsive,
  .woocommerce-cart-form { overflow-x: auto; }

  .ncr-community-tabs ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ncr-community-tabs a { justify-content: center; text-align: center; }
}

@media (max-width: 480px) {
  .ncr-community-tabs ul { grid-template-columns: 1fr; }
  .ncr-community-app-wrap,
  .ncr-commerce-area .ncr-woo-wrap,
  .ncr-commerce-area main.site-main { width: min(100% - 1rem, 1180px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

html[data-theme="dark"] .ncr-community-app-page {
  background: linear-gradient(180deg, #150c08, #21110c 32rem);
}

html[data-theme="dark"] .ncr-community-intro,
html[data-theme="dark"] .ncr-community-module,
html[data-theme="dark"] .ncr-community-signin,
html[data-theme="dark"] .ncr-community-unavailable,
html[data-theme="dark"] .ncr-community-tabs a,
html[data-theme="dark"] .woocommerce ul.products li.product,
html[data-theme="dark"] .wc-block-grid__product,
html[data-theme="dark"] .wc-block-product {
  border-color: rgba(255, 190, 132, .2) !important;
  background: #21140f;
  color: #fff5ea;
}

html[data-theme="dark"] .ncr-community-intro p,
html[data-theme="dark"] .ncr-community-safety { color: #f2d9c6; }
html[data-theme="dark"] .ncr-community-safety { background: #382116; }
