.nsc {
  position: fixed;
  top: var(--nsc-viewport-top, 0px);
  right: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  height: var(--nsc-viewport-height, 100dvh);
  min-height: 0;
  max-height: none;
  z-index: 999999;
  visibility: hidden;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: auto;
  -moz-osx-font-smoothing: auto;
  text-rendering: optimizeLegibility;
  font-synthesis: none;
  color: #111;
}

.nsc * { box-sizing: border-box; }
.nsc.is-open { visibility: visible; pointer-events: auto; }

.nsc__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .55);
  opacity: 0;
  transition: opacity .28s ease;
}

.nsc.is-open .nsc__overlay { opacity: 1; }

.nsc__drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(var(--nsc-width, 450px), 100vw);
  height: 100%;
  min-height: 0;
  max-height: none;
  background: #fff;
  transform: translate3d(102%, 0, 0);
  transition: transform .26s cubic-bezier(.22, .85, .32, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  outline: 0;
  box-shadow: -8px 0 30px rgba(0, 0, 0, .12);
  will-change: transform;
}

.nsc.is-open .nsc__drawer { transform: translate3d(0, 0, 0); }
.nsc.is-open.is-settled .nsc__drawer { transform: none; will-change: auto; }
html.nsc-lock,
html.nsc-lock body { overflow: hidden !important; overscroll-behavior: none; }

.nsc__content {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.nsc__header {
  height: 49px;
  min-height: 49px;
  border-bottom: 1px solid #ddd;
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  text-align: center;
  font-size: 16px;
}

.nsc__icon-btn {
  width: 48px;
  height: 48px;
  border: 0;
  background: transparent;
  padding: 15px;
  cursor: pointer;
  color: #111;
}

.nsc svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nsc__shipping {
  padding: 16px 15px;
  border-bottom: 1px solid #ddd;
}

.nsc__shipping-message {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  line-height: 1.25;
  margin-bottom: 8px;
}

.nsc__shipping-message svg { width: 20px; height: 20px; }
.nsc__progress { height: 8px; background: #e9f7f1; border-radius: 999px; overflow: hidden; }

.nsc__progress i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: repeating-linear-gradient(135deg, #2acb94 0, #2acb94 8px, #59dab0 8px, #59dab0 13px);
  transition: width .4s ease;
}

.nsc__items {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 15px;
  overscroll-behavior: contain;
}

.nsc__item {
  position: relative;
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid #ddd;
  transition: opacity .15s;
}

.nsc__item.is-updating { opacity: .45; pointer-events: none; }
.nsc__thumb { width: 70px; height: 70px; border-radius: 3px; overflow: hidden; background: #f3f3f3; }
.nsc__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.nsc__item-main { min-width: 0; }

.nsc__title {
  display: block;
  color: #111;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  margin: 2px 0 10px;
}

.nsc__item .variation { font-size: 11px; margin: 0 0 7px; }

.nsc__qty {
  display: grid;
  grid-template-columns: 32px 31px 32px;
  width: 96px;
  height: 34px;
  border: 1px solid #d5d5d5;
  border-radius: 5px;
  overflow: hidden;
  align-items: center;
  text-align: center;
  font-size: 13px;
}

.nsc__qty button { height: 100%; border: 0; background: #fff; font-size: 16px; cursor: pointer; }
.nsc__item-side { min-width: 112px; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.nsc__prices { text-align: right; white-space: nowrap; font-size: 13px; line-height: 1.45; }
.nsc__price-line { display: flex; justify-content: flex-end; align-items: baseline; gap: 2px; }
.nsc__prices del { color: #aaa; margin-right: 0; }
.nsc__prices em { display: block; color: #009d72; font-style: normal; }
.nsc__remove { border: 0; background: transparent; padding: 6px 0 1px 10px; cursor: pointer; color: #111; }
.nsc__remove svg { width: 18px; height: 18px; }

.nsc__footer {
  border-top: 1px solid #ddd;
  background: #fff;
  padding: 0 15px 20px;
  box-shadow: 0 -4px 12px rgba(0, 0, 0, .03);
}

.nsc__coupon { display: block; }

.nsc .nsc__coupon-toggle {
  width: 100%;
  height: 42px;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: #111;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  text-align: left;
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
  box-shadow: none;
  text-transform: none;
  letter-spacing: normal;
}

.nsc__coupon-toggle svg {
  width: 19px;
  height: 19px;
  flex: 0 0 19px;
  display: block;
  transform: rotate(180deg);
  transform-origin: 50% 50%;
  transition: transform .3s cubic-bezier(.22, .61, .36, 1);
}

.nsc__coupon.is-expanded .nsc__coupon-toggle svg { transform: rotate(0deg); }
.nsc__coupon-panel { overflow: hidden; }

.nsc__coupon-form {
  display: flex;
  gap: 7px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-4px);
  padding: 0;
  transition:
    max-height .4s cubic-bezier(.4, 0, .2, 1),
    opacity .32s cubic-bezier(.4, 0, .2, 1),
    transform .4s cubic-bezier(.4, 0, .2, 1),
    padding-bottom .4s cubic-bezier(.4, 0, .2, 1);
}

.nsc__coupon.is-expanded .nsc__coupon-form {
  max-height: 58px;
  opacity: 1;
  transform: translateY(0);
  padding-bottom: 10px;
}

.nsc .nsc__coupon-form input[type="text"] {
  min-width: 0;
  flex: 1;
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  box-sizing: border-box !important;
  border: 1px solid #ccc !important;
  border-radius: 8px !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 0 16px !important;
  font: inherit;
  line-height: 48px !important;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .18s ease;
}

.nsc .nsc__coupon-form input[type="text"]:focus,
.nsc .nsc__coupon-form input[type="text"]:focus-visible {
  border-width: 1px !important;
  border-color: #111 !important;
  border-radius: 8px !important;
  outline: none !important;
  box-shadow: none !important;
}

.nsc .nsc__coupon-form button[type="submit"] {
  height: 50px !important;
  min-height: 50px !important;
  max-height: 50px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #111;
  color: #fff;
  padding: 0 18px !important;
  font: inherit;
  font-weight: 700;
  line-height: 50px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.nsc__notice { font-size: 12px; color: #b42318; padding-bottom: 7px; }
.nsc__notice:empty { display: none; padding: 0; }
.nsc__coupon:not(.is-expanded) .nsc__notice { display: none; }

.nsc__applied-coupons { border-top: 1px solid #ddd; padding: 10px 0 9px; }
.nsc__applied-coupon { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.nsc__coupon-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 22px;
  padding: 3px 7px;
  background: #b7f3da;
  border-radius: 3px;
  font-size: 12px;
  line-height: 1;
  color: #111;
}

.nsc__coupon-chip > svg { width: 14px; height: 14px; fill: #111; stroke: #111; stroke-width: 1.5; }

.nsc__coupon-chip button {
  border: 0;
  background: transparent;
  color: #589482;
  padding: 0;
  margin: 0 0 0 1px;
  width: 14px;
  height: 14px;
  line-height: 12px;
  font-size: 16px;
  font-weight: 400;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nsc__coupon-discount { color: #00a878; font-size: 14px; white-space: nowrap; }
.nsc__subtotal { border-top: 1px solid #ddd; padding-top: 11px; display: flex; justify-content: space-between; font-size: 18px; }
.nsc__footer.has-coupon .nsc__subtotal { border-top: 0; padding-top: 0; }
.nsc__tax-note { font-size: 14px; color: #777; margin-top: 0; padding-top: 3px; }

.nsc__checkout {
  height: 55px;
  margin-top: 14px;
  border-radius: 6px;
  background: #000;
  color: #fff !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.nsc__checkout svg { width: 19px; height: 19px; fill: currentColor; stroke: none; }
.nsc__empty { margin: auto; text-align: center; padding: 35px; }
.nsc__empty > svg { width: 52px; height: 52px; }
.nsc__empty h2 { font-size: 22px; margin: 16px 0 7px; }
.nsc__empty p { color: #666; font-size: 14px; }
.nsc__empty button { margin-top: 15px; border: 0; background: #000; color: #fff; border-radius: 5px; padding: 13px 22px; font-weight: 700; cursor: pointer; }

.nsc__loading {
  position: absolute;
  z-index: 3;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.nsc.is-loading .nsc__loading { opacity: 1; }
.nsc__loading span { display: block; width: 35%; height: 100%; background: #2acb94; animation: nsc-load 1s infinite ease-in-out; }
.nsc-inline-error { margin-top: 8px; color: #b42318; font-size: 13px; }

@keyframes nsc-load {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(400%); }
}

@media (max-width: 600px) {
  .nsc__drawer { width: 100%; max-width: none; top: 0; right: 0; bottom: 0; height: 100%; min-height: 0; max-height: none; }
  .nsc__overlay { display: none; }
  .nsc__item { grid-template-columns: 70px minmax(0, 1fr) auto; gap: 10px; }
  .nsc__item-side { min-width: 99px; }
  .nsc__title { font-size: 15px !important; }
  .nsc__shipping-message { font-size: 14px; }
  .nsc__footer { padding-bottom: 20px; }
  .nsc__tax-note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .nsc__drawer,
  .nsc__overlay,
  .nsc__progress i,
  .nsc__coupon-toggle svg,
  .nsc__coupon-form { transition: none; }
}
