/* NXSTUDIO cart page — compact style 4a, scoped to .nx-cart-page.
   Loaded inline by page-cart.php. Mirrors mockups/cart-style4a-vercel-addtoast.html
   with real WooCommerce cart data. Overrides the Kadence global
   h1-h6/button/input font and input height noise with !important. */

.nx-cart-page {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 400;
  color: #000000;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.nx-cart-page a {
  color: inherit;
  text-decoration: none;
}

.nx-cart-page .page {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 20px calc(72px + 90px);
}

@media (max-width: 640px) {
  .nx-cart-page .page {
    padding: 32px 16px calc(48px + 86px);
  }
}

/* Breadcrumb */
.nx-cart-page .crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: #a3a3a3;
  margin-bottom: 24px;
}

.nx-cart-page .crumb a {
  color: #737373;
  transition: color .15s cubic-bezier(.4,0,.2,1);
}

.nx-cart-page .crumb a:hover {
  color: #0070f3;
}

.nx-cart-page .crumb .sep {
  color: #e5e5e5;
  font-size: 9px;
}

/* Page head */
.nx-cart-page .page-head {
  text-align: center;
  margin-bottom: 28px;
}

.nx-cart-page .page-head .eyebrow {
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace !important;
  font-size: 12px;
  font-weight: 500;
  color: #0070f3;
  letter-spacing: .05em;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.nx-cart-page .page-head .eyebrow::before,
.nx-cart-page .page-head .eyebrow::after {
  content: "";
  width: 22px;
  height: 1.5px;
  background: #0070f3;
}

.nx-cart-page .page-head h1 {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #171717;
  margin-bottom: 8px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.nx-cart-page .page-head p {
  color: #737373;
  font-size: 14px;
  margin: 0;
}

/* Cart panel + rows */
.nx-cart-page .cart-panel {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  overflow: hidden;
  background: #ffffff;
}

.nx-cart-page .cart-panel form {
  margin: 0;
}

.nx-cart-page .cart-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #f0f0f0;
  transition: background .15s cubic-bezier(.4,0,.2,1);
}

.nx-cart-page .cart-row:last-of-type {
  border-bottom: none;
}

.nx-cart-page .cart-row:hover {
  background: #fafafa;
}

.nx-cart-page .cart-row .thumb {
  width: 64px;
  height: 64px;
  border-radius: 6px;
  overflow: hidden;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  flex-shrink: 0;
  display: block;
}

.nx-cart-page .cart-row .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nx-cart-page .cart-row .thumb .nx-thumb-ph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-size: 14px;
  font-weight: 700;
  color: #a3a3a3;
}

.nx-cart-page .cart-row .info {
  flex: 1;
  min-width: 0;
}

.nx-cart-page .cart-row .name {
  font-size: 14px;
  font-weight: 600;
  color: #171717;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.nx-cart-page .cart-row .name a:hover {
  color: #0070f3;
  text-decoration: none;
}

.nx-cart-page .cart-row .cat {
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace !important;
  font-size: 10px;
  font-weight: 400;
  color: #a3a3a3;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 1px;
  line-height: 16px;
}

.nx-cart-page .cart-row .unit {
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace !important;
  font-size: 11.5px;
  font-weight: 400;
  color: #737373;
  margin-top: 3px;
  line-height: 18.4px;
}

.nx-cart-page .cart-row .unit b {
  color: #333333;
  font-weight: 600;
}

.nx-cart-page .cart-row .qty {
  display: flex;
  align-items: center;
  border: 1.5px solid #e5e5e5;
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}

.nx-cart-page .cart-row .qty button {
  width: 30px;
  height: 34px;
  border: none;
  background: #ffffff;
  font-size: 15px;
  font-weight: 500;
  color: #333333;
  cursor: pointer;
  transition: background .15s cubic-bezier(.4,0,.2,1);
  font-family: Arial, sans-serif !important;
  line-height: normal !important;
  border-radius: 0;
  min-width: 0;
  min-height: 0;
  padding: 0;
}

.nx-cart-page .cart-row .qty button:hover {
  background: #fafafa;
}

.nx-cart-page .cart-row .qty button[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.nx-cart-page .cart-row .qty input {
  width: 38px;
  height: 34px;
  border: none;
  border-left: 1.5px solid #e5e5e5;
  border-right: 1.5px solid #e5e5e5;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  outline: none;
  appearance: textfield;
  color: #171717;
  background: #ffffff;
  font-family: Arial, sans-serif !important;
  line-height: normal !important;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 0;
}

.nx-cart-page .cart-row .qty input::-webkit-outer-spin-button,
.nx-cart-page .cart-row .qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.nx-cart-page .cart-row .line-total {
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace !important;
  font-size: 14px;
  font-weight: 700;
  color: #171717;
  min-width: 78px;
  text-align: right;
  flex-shrink: 0;
}

.nx-cart-page .cart-row .remove-btn {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  color: #a3a3a3;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: all .15s cubic-bezier(.4,0,.2,1);
  text-decoration: none;
  font-weight: 400;
  font-family: Arial, sans-serif !important;
  min-width: 0;
  min-height: 0;
  padding: 0;
  border-radius: 50%;
}

.nx-cart-page .cart-row .remove-btn:hover {
  border-color: #dc2626;
  color: #dc2626;
  background: #fef2f2;
  text-decoration: none;
}

@media (max-width: 640px) {
  .nx-cart-page .cart-row {
    display: grid;
    grid-template-columns: 68px 1fr auto;
    grid-template-rows: auto auto;
    gap: 12px 14px;
    align-items: start;
    padding: 16px 14px;
  }
  .nx-cart-page .cart-row .thumb {
    grid-column: 1;
    grid-row: 1 / 3;
    width: 68px;
    height: 68px;
  }
  .nx-cart-page .cart-row .info {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }
  .nx-cart-page .cart-row .name {
    white-space: normal;
    font-size: 13.5px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .nx-cart-page .cart-row .remove-btn {
    grid-column: 3;
    grid-row: 1;
    width: 24px;
    height: 24px;
    font-size: 16px;
    justify-self: end;
  }
  .nx-cart-page .cart-row .qty {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    justify-self: start;
    width: auto;
    max-width: fit-content;
    display: inline-flex;
    flex-shrink: 0;
  }
  .nx-cart-page .cart-row .qty button {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    flex: 0 0 30px !important;
  }
  .nx-cart-page .cart-row .qty input {
    width: 38px !important;
    min-width: 38px !important;
    max-width: 38px !important;
    flex: 0 0 38px !important;
  }
  .nx-cart-page .cart-row .line-total {
    grid-column: 3;
    grid-row: 2;
    align-self: center;
    justify-self: end;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
    text-align: right;
  }
}

/* Trust strip */
.nx-cart-page .trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 18px;
  margin-top: 16px;
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 6px;
  font-size: 12.5px;
  color: #737373;
  text-align: center;
  flex-wrap: wrap;
}

.nx-cart-page .trust-strip svg {
  color: #16a34a;
  flex-shrink: 0;
}

.nx-cart-page .trust-strip b {
  color: #171717;
  font-weight: 600;
}

/* Recommendations */
.nx-cart-page .recommend {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  padding: 18px;
  margin-top: 24px;
}

.nx-cart-page .recommend h2 {
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace !important;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: #a3a3a3;
  margin-bottom: 14px;
  line-height: 1.6;
}

.nx-cart-page .rec-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

@media (max-width: 560px) {
  .nx-cart-page .rec-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 380px) {
  .nx-cart-page .rec-grid {
    grid-template-columns: 1fr;
  }
}

.nx-cart-page .rec-card {
  border: 1px solid #f0f0f0;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color .15s cubic-bezier(.4,0,.2,1);
  background: #ffffff;
}

.nx-cart-page .rec-card:hover {
  border-color: #a3a3a3;
}

.nx-cart-page .rec-card img {
  aspect-ratio: 1/1;
  object-fit: cover;
  width: 100%;
  display: block;
}

.nx-cart-page .rec-body {
  padding: 8px 10px;
}

.nx-cart-page .rec-body .nm {
  font-size: 11.5px;
  font-weight: 600;
  color: #171717;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.nx-cart-page .rec-body .pr {
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace !important;
  font-size: 11px;
  color: #737373;
  margin-top: 2px;
}

.nx-cart-page .rec-add {
  width: 100%;
  margin-top: 8px;
  min-height: 26px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  color: #171717;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s cubic-bezier(.4,0,.2,1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: Arial, sans-serif !important;
  line-height: normal !important;
  padding: 0;
  min-width: 0;
}

.nx-cart-page .rec-add:hover {
  border-color: #0070f3;
  color: #0070f3;
  background: #eff6ff;
  text-decoration: none;
}

/* Empty cart */
.nx-cart-page .empty-cart {
  display: none;
  text-align: center;
  padding: 48px 20px;
  border: 1px dashed #e5e5e5;
  border-radius: 10px;
}

.nx-cart-page .empty-cart.show {
  display: block;
}

.nx-cart-page .empty-cart h2 {
  font-size: 18px;
  font-weight: 700;
  color: #171717;
  margin-bottom: 4px;
  line-height: 1.6;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.nx-cart-page .empty-cart p {
  font-size: 13px;
  color: #737373;
  margin-bottom: 16px;
}

.nx-cart-page .empty-cart .btn {
  width: auto;
  display: inline-flex;
}

/* Unavailable lines stay visible but are clearly locked. */
.nx-cart-page .cart-row.nx-invalid-cart-item {
  opacity: .85;
}

/* Fixed bottom bar */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: rgba(255, 255, 255, .97);
  -webkit-backdrop-filter: blur(12px) saturate(1.8);
  backdrop-filter: blur(12px) saturate(1.8);
  border-top: 1px solid #e5e5e5;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  font-weight: 400;
  color: #000000;
  line-height: 1.6 !important;
}

@media (max-width: 640px) {
  .bottom-bar {
    padding: 12px 16px;
    gap: 16px;
  }
}

.bottom-bar .bb-total .bb-label {
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace !important;
  font-size: 10.5px;
  font-weight: 400;
  color: #a3a3a3;
  text-transform: uppercase;
  letter-spacing: .06em;
  line-height: 16.8px;
}

.bottom-bar .bb-total .bb-amt {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: #171717;
  line-height: 1.15;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.bottom-bar .bb-total .bb-amt .cents {
  font-size: 15px;
  color: #a3a3a3;
  font-weight: 500;
}

.bottom-bar .bb-total .bb-sub {
  font-size: 11px;
  color: #a3a3a3;
  margin-top: 1px;
  line-height: 17.6px;
  font-weight: 400;
}

/* Bundle line in the bottom bar: the saving is charged as a negative cart fee
 * while the subtotal stays undiscounted (so free shipping is not eaten), so the
 * deal has to be stated here or the customer never sees it. */
.bottom-bar .bb-total .bb-bundle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
  line-height: 16px;
  white-space: nowrap;
}

.bottom-bar .bb-total .bb-bundle-tag {
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace !important;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #067647;
  background: #ecfdf3;
  border: 1px solid #a6f4c5;
  border-radius: 4px;
  padding: 1px 5px;
}

.bottom-bar .bb-total .bb-bundle-save {
  font-size: 11px;
  font-weight: 600;
  color: #067647;
}

.bottom-bar .bb-total .bb-bundle-hint {
  font-size: 11px;
  color: #b45309;
  font-weight: 500;
}

@media (max-width: 440px) {
  .bottom-bar .bb-total .bb-bundle-hint {
    display: none;
  }
}

.bottom-bar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 48px;
  padding: 0 28px;
  font-size: 14.5px;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s cubic-bezier(.4,0,.2,1);
  border: 1.5px solid transparent;
  text-align: center;
  white-space: nowrap;
  text-decoration: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
  background: #0070f3;
  color: #ffffff;
  border-color: #0070f3;
  box-shadow: 0 8px 24px rgba(0, 112, 243, .25), 0 2px 8px rgba(0, 0, 0, .08);
  line-height: 1.6;
}

.bottom-bar .btn:hover {
  background: #0761d1;
  border-color: #0761d1;
  color: #ffffff;
  text-decoration: none;
  transform: none;
}

.bottom-bar .bb-assure {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  color: #a3a3a3;
  white-space: nowrap;
  font-weight: 400;
  line-height: 18.4px;
}

.bottom-bar .bb-assure svg {
  color: #16a34a;
  flex-shrink: 0;
}

.bottom-bar .bb-checkout {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

@media (max-width: 700px) {
  .bottom-bar .bb-assure {
    display: none;
  }
}

@media (max-width: 440px) {
  .bottom-bar .bb-checkout {
    gap: 8px;
  }
  .bottom-bar .btn {
    min-height: 44px;
    padding: 0 18px;
    font-size: 13.5px;
  }
  .bottom-bar .bb-total .bb-amt {
    font-size: 22px;
  }
  .bottom-bar .bb-total .bb-sub {
    font-size: 10px;
  }
}

/* Toast + price drift animations */
.toast-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 220px;
  pointer-events: none;
}

.toast-card {
  pointer-events: auto;
  width: 100%;
  max-width: 400px;
  background: rgba(255, 255, 255, .40);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(229, 229, 229, .6);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .22), 0 6px 20px rgba(0, 0, 0, .12);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-14px) scale(.97);
  transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .3, 1);
}

.toast-card.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-wrap {
  position: relative;
}

.toast-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: #a3a3a3;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
  transition: color .15s cubic-bezier(.4,0,.2,1);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.toast-close:hover {
  color: #000000;
}

.toast-body {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
}

.t-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f0fdf4;
  color: #16a34a;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.t-info {
  flex: 1;
  min-width: 0;
}

.t-msg {
  font-size: 15px;
  font-weight: 700;
  color: #171717;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.t-desc {
  font-size: 12.5px;
  color: #737373;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes char-drift {
  0% { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(.25); opacity: 0; }
}

.d-particle {
  position: fixed;
  z-index: 320;
  pointer-events: none;
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace;
  font-weight: 800;
  line-height: 1;
  animation: char-drift 1s cubic-bezier(.25, .5, .35, 1) forwards;
}

@keyframes char-in {
  0% { transform: translateY(10px) scale(.3); opacity: 0; }
  60% { transform: translateY(-2px) scale(1.08); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.d-char {
  display: inline-block;
  animation: char-in .34s cubic-bezier(.4, 0, .2, 1) backwards;
}
/* Checkout is locked while any unavailable item sits in the cart. */
.bottom-bar .bb-checkout .btn.nx-cart-checkout-disabled {
  background: #d4d4d4;
  color: #737373;
  opacity: .65;
  cursor: not-allowed;
  box-shadow: none;
}

/* Unavailable-items warning — standalone Vercel-style glass card rendered
   above the product panel (separate from the product cards), with red
   attention accents: red left bar, red hairline border, red badge. */
#nxInvalidWarning {
  margin: 0 0 20px;
}

.nx-invalid-cart-warning {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0;
  padding: 20px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-left: 4px solid #dc2626;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.10), 0 2px 8px rgba(0, 0, 0, 0.06);
}

.nx-invalid-cart-warning .nx-warn-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fef2f2;
  color: #dc2626;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nx-invalid-cart-warning .nx-warn-info {
  flex: 1;
  min-width: 0;
}

.nx-invalid-cart-warning .nx-warn-badge {
  display: inline-block;
  font-family: 'SF Mono', 'Fira Code', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid rgba(220, 38, 38, 0.25);
  border-radius: 100px;
  padding: 2px 8px;
}

.nx-invalid-cart-warning .nx-warn-msg {
  font-size: 15px;
  font-weight: 700;
  color: #171717;
  margin: 8px 0 0;
}

.nx-invalid-cart-warning .nx-warn-desc {
  font-size: 12.5px;
  color: #737373;
  margin: 2px 0 0;
}

.nx-invalid-cart-warning ul {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.nx-invalid-cart-warning li {
  padding: 0;
}

/* Per-item remove button: product name left, red "Click to remove" right. */
.nx-invalid-cart-warning .nx-warn-remove {
  display: flex;
  width: 100%;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  background: none;
  border: 0;
  border-top: 1px solid #f0f0f0;
  padding: 8px 0;
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.nx-invalid-cart-warning .nx-warn-remove strong {
  font-size: 12.5px;
  font-weight: 600;
  color: #171717;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-invalid-cart-warning .nx-warn-remove:hover strong {
  color: #dc2626;
}

.nx-invalid-cart-warning .nx-warn-action {
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  white-space: nowrap;
}

.nx-invalid-cart-warning .nx-warn-remove:hover .nx-warn-action {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Stock WC error banners use the WooCommerce icon font for their glyph; the
   theme doesn't load it, so the glyph renders as a stray "P" over the message.
   Kill the glyph on cart page and calm the banner to match the card. */
.nx-cart-page .woocommerce-error::before {
  display: none !important;
}

/* Success + error notices — same Vercel-style glass bar as the product-page
   add-to-cart confirmation: green check icon, dark text, hairline border. */
.nx-cart-page .woocommerce-notices-wrapper .woocommerce-message,
.nx-cart-page .woocommerce-notices-wrapper .woocommerce-info,
.nx-cart-page .woocommerce-notices-wrapper .woocommerce-error {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  margin: 0 0 20px;
  background: rgba(255, 255, 255, 0.55);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  backdrop-filter: blur(20px) saturate(1.8);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.08);
  list-style: none;
  color: #171717;
  font-weight: 600;
  animation: nx-notice-in 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes nx-notice-in {
  0% { transform: translateY(-8px) scale(0.98); opacity: 0; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

.nx-cart-page .woocommerce-notices-wrapper .woocommerce-message::before,
.nx-cart-page .woocommerce-notices-wrapper .woocommerce-info::before,
.nx-cart-page .woocommerce-notices-wrapper .woocommerce-error::before {
  content: "";
  display: block;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  position: static !important;
  font-family: none;
}

.nx-cart-page .woocommerce-notices-wrapper .woocommerce-message::before {
  background: var(--nx-toast-success-bg, #f0fdf4);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 14px no-repeat;
  background-color: #16a34a;
}

.nx-cart-page .woocommerce-notices-wrapper .woocommerce-error {
  border-color: rgba(220, 38, 38, 0.28);
  border-left: 4px solid #dc2626;
  color: #b91c1c;
}

/* Manual dismiss (×) — square 26px button, glyph centered, optically aligned
   with the left icon's inset (16px padding + centered 26px box).
   Two cascade fixes make the symmetry exact:
   1. The theme's global button rule (min-width:100px, min-height:48px, gold
      gradient, padding 0 16px, weight 700) beats these dimensions at equal
      specificity — reset every inherited button property here so the compact
      26px square actually wins.
   2. WC core's ::after (content:" ", display:table, clear:both) becomes a
      flex item too and gets a 14px gap after it, pushing the × 14px off-center.
      Killing it removes the phantom right gap. */
.nx-cart-page .woocommerce-notices-wrapper .woocommerce-message::after,
.nx-cart-page .woocommerce-notices-wrapper .woocommerce-info::after,
.nx-cart-page .woocommerce-notices-wrapper .woocommerce-error::after {
  display: none !important;
  content: none !important;
}

.nx-cart-page .woocommerce-notices-wrapper .nx-notice-close {
  margin-left: auto;
  margin-right: 0;
  flex-shrink: 0;
  width: 26px;
  min-width: 26px;
  height: 26px;
  min-height: 26px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  border-radius: 50%;
  color: #a3a3a3;
  font-family: inherit;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  cursor: pointer;
  padding: 0;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), background 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.nx-cart-page .woocommerce-notices-wrapper .nx-notice-close:hover {
  color: #171717;
  background: #f5f5f5;
}

/* The redirect-guard notice is redundant next to the themed warning card —
   hide the stock banner entirely when the glass card is on the page. */
.nx-cart-page:has(.nx-invalid-cart-warning) .woocommerce-notices-wrapper {
  display: none !important;
}
