.norterra-product-collection,
.norterra-product-collection * {
  box-sizing: border-box;
}

.norterra-product-collection {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: clamp(24px, 4vw, 52px) 0;
  background: var(--npc-bg, #fff);
  color: #111;
  font-family: inherit;
}

.norterra-product-collection__shell {
  width: min(100% - 40px, 1440px);
  margin: 0 auto;
}

.norterra-product-collection__header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.norterra-product-collection__header h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.norterra-product-collection__view-all {
  flex: 0 0 auto;
  color: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.norterra-product-collection__grid {
  display: grid;
  grid-template-columns: repeat(var(--npc-cols, 4), minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 28px);
}

.norterra-product-collection__notice {
  width: min(100% - 32px, 1180px);
  margin: 20px auto;
  padding: 18px;
  border: 1px solid #dedede;
  border-radius: 10px;
  background: #fff;
  color: #4b4b4b;
  text-align: center;
}

.norterra-product-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #dedede;
  border-radius: 11px;
  background: var(--npc-card-bg, #fff);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.015);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.norterra-product-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
}

.norterra-product-card__image {
  position: relative;
  display: flex;
  aspect-ratio: 1.13 / 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-bottom: 1px solid #e6e6e6;
  background: #fff;
  text-decoration: none;
}

.norterra-product-card__image img {
  display: block;
  width: 82%;
  height: 82%;
  margin: 0;
  object-fit: contain;
  transition: transform 250ms ease;
}

.norterra-product-card:hover .norterra-product-card__image img {
  transform: scale(1.025);
}

.norterra-product-card__sale {
  position: absolute;
  top: 11px;
  left: 11px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #d92727;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.norterra-product-card__content {
  display: flex;
  min-height: 108px;
  flex-direction: column;
  padding: 14px 12px 10px;
}

.norterra-product-card__brand {
  margin-bottom: 4px;
  color: #282828;
  font-size: 12px;
  line-height: 1.2;
  text-transform: uppercase;
}

.norterra-product-card h3 {
  min-height: 42px;
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.norterra-product-card h3 a {
  color: #050505;
  text-decoration: none;
}

.norterra-product-card__flavor {
  margin: 0;
  color: #252525;
  font-size: 14px;
  line-height: 1.3;
}

.norterra-pack-picker {
  position: static;
  margin-top: auto;
  border-top: 1px solid #e6e6e6;
  background: #fff;
}

.norterra-pack-picker > summary {
  display: grid;
  min-height: 56px;
  grid-template-columns: minmax(70px, 1fr) 26px minmax(78px, auto);
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.norterra-pack-picker > summary::-webkit-details-marker {
  display: none;
}

.norterra-pack-picker__quantity {
  font-size: 14px;
  white-space: nowrap;
}

.norterra-pack-picker__chevron {
  color: #111;
  font-size: 27px;
  font-weight: 300;
  line-height: 1;
  transition: transform 180ms ease;
}

.norterra-pack-picker[open] .norterra-pack-picker__chevron {
  transform: rotate(90deg);
}

.norterra-pack-picker__price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.1;
}

.norterra-pack-picker__price strong {
  font-size: 18px;
  font-weight: 900;
}

.norterra-pack-picker__price small {
  margin-top: 3px;
  color: #535353;
  font-size: 11px;
}

.norterra-pack-picker__backdrop {
  display: none;
}

.norterra-pack-picker[open] .norterra-pack-picker__backdrop {
  position: absolute;
  z-index: 20;
  inset: 0 0 48px;
  display: block;
  background: rgba(30, 30, 30, 0.25);
  pointer-events: none;
}

.norterra-pack-picker__panel {
  position: absolute;
  z-index: 21;
  right: 0;
  bottom: 48px;
  left: 0;
  display: none;
  max-height: calc(100% - 92px);
  overflow: auto;
  border-top: 1px solid #dedede;
  background: #fff;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.08);
}

.norterra-pack-picker[open] .norterra-pack-picker__panel {
  display: block;
}

.norterra-pack-picker__close {
  display: flex;
  width: 100%;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 12px;
  border: 0;
  border-bottom: 1px solid #ececec;
  background: #fff;
  color: #171717;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.norterra-pack-picker__title {
  display: block;
  padding: 10px 12px 8px;
  font-size: 16px;
}

.norterra-pack-picker__tiers {
  padding: 0 12px 12px;
}

.norterra-pack-tier {
  position: relative;
  display: grid;
  min-height: 43px;
  grid-template-columns: minmax(63px, 0.8fr) minmax(66px, auto) minmax(58px, auto) 22px;
  align-items: center;
  gap: 6px;
  margin-top: -1px;
  padding: 7px 9px;
  border: 1px solid #e3e3e3;
  background: #fff;
  cursor: pointer;
}

.norterra-pack-tier:first-child {
  margin-top: 0;
  border-radius: 7px 7px 0 0;
}

.norterra-pack-tier:last-child {
  border-radius: 0 0 7px 7px;
}

.norterra-pack-tier.is-selected {
  z-index: 1;
  background: #f0f0f0;
}

.norterra-pack-tier input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.norterra-pack-tier__quantity {
  font-size: 13px;
}

.norterra-pack-tier__total {
  justify-self: end;
  font-size: 14px;
  white-space: nowrap;
}

.norterra-pack-tier__unit {
  justify-self: end;
  color: #4d4d4d;
  font-size: 11px;
  white-space: nowrap;
}

.norterra-pack-tier__radio {
  display: block;
  width: 20px;
  height: 20px;
  border: 1px solid #bcbcbc;
  border-radius: 50%;
}

.norterra-pack-tier.is-selected .norterra-pack-tier__radio {
  border: 5px solid #1986b7;
  background: #fff;
}

.norterra-product-card__cart,
.norterra-product-card__choose {
  display: block;
  width: 100%;
  margin: 0;
}

.norterra-product-card__cart button,
.norterra-product-card__choose {
  display: flex;
  width: 100%;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border: 0;
  border-radius: 0;
  background: var(--npc-button-bg, #202020);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}

.norterra-product-card__cart button:hover,
.norterra-product-card__choose:hover {
  filter: brightness(1.15);
  color: #fff;
}

.norterra-product-card__cart button.is-loading {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 1024px) {
  .norterra-product-collection__grid {
    grid-template-columns: repeat(var(--npc-tablet-cols, 3), minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .norterra-product-collection {
    padding: 24px 0 30px;
  }

  .norterra-product-collection__shell {
    width: min(100% - 20px, 1440px);
  }

  .norterra-product-collection__header {
    align-items: center;
    margin-bottom: 14px;
  }

  .norterra-product-collection__header h2 {
    font-size: 24px;
  }

  .norterra-product-collection__grid {
    grid-template-columns: repeat(var(--npc-mobile-cols, 2), minmax(0, 1fr));
    gap: 10px;
  }

  .norterra-product-collection.is-mobile-swipe .norterra-product-collection__shell {
    width: 100%;
  }

  .norterra-product-collection.is-mobile-swipe .norterra-product-collection__header {
    padding: 0 12px;
  }

  .norterra-product-collection.is-mobile-swipe .norterra-product-collection__grid {
    display: grid;
    grid-auto-columns: min(78vw, 300px);
    grid-auto-flow: column;
    grid-template-columns: none;
    gap: 10px;
    overflow-x: auto;
    padding: 0 12px 10px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .norterra-product-collection.is-mobile-swipe .norterra-product-collection__grid::-webkit-scrollbar {
    display: none;
  }

  .norterra-product-collection.is-mobile-swipe .norterra-product-card {
    scroll-snap-align: start;
  }

  .norterra-product-card {
    border-radius: 9px;
  }

  .norterra-product-card__image {
    aspect-ratio: 1 / 1;
  }

  .norterra-product-card__image img {
    width: 88%;
    height: 88%;
  }

  .norterra-product-card__content {
    min-height: 98px;
    padding: 10px 9px 8px;
  }

  .norterra-product-card__brand {
    margin-bottom: 3px;
    font-size: 10px;
  }

  .norterra-product-card h3 {
    min-height: 36px;
    margin-bottom: 3px;
    font-size: 13px;
    line-height: 1.28;
  }

  .norterra-product-card__flavor {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .norterra-pack-picker > summary {
    min-height: 50px;
    grid-template-columns: minmax(52px, 1fr) 18px minmax(64px, auto);
    padding: 6px 8px;
  }

  .norterra-pack-picker__quantity {
    font-size: 11px;
  }

  .norterra-pack-picker__chevron {
    font-size: 21px;
  }

  .norterra-pack-picker__price strong {
    font-size: 15px;
  }

  .norterra-pack-picker__price small {
    font-size: 9px;
  }

  .norterra-pack-picker__panel {
    bottom: 43px;
    max-height: calc(100% - 70px);
  }

  .norterra-pack-picker[open] .norterra-pack-picker__backdrop {
    inset: 0 0 43px;
  }

  .norterra-pack-picker__close {
    min-height: 34px;
    font-size: 11px;
  }

  .norterra-pack-picker__title {
    padding: 8px 8px 6px;
    font-size: 13px;
  }

  .norterra-pack-picker__tiers {
    padding: 0 7px 8px;
  }

  .norterra-pack-tier {
    min-height: 40px;
    grid-template-columns: minmax(46px, 0.8fr) minmax(54px, auto) minmax(45px, auto) 18px;
    gap: 3px;
    padding: 5px 6px;
  }

  .norterra-pack-tier__quantity,
  .norterra-pack-tier__total {
    font-size: 11px;
  }

  .norterra-pack-tier__unit {
    font-size: 8px;
  }

  .norterra-pack-tier__radio {
    width: 17px;
    height: 17px;
  }

  .norterra-pack-tier.is-selected .norterra-pack-tier__radio {
    border-width: 4px;
  }

  .norterra-product-card__cart button,
  .norterra-product-card__choose {
    min-height: 43px;
    padding: 8px 6px;
    font-size: 13px;
  }
}

@media (max-width: 390px) {
  .norterra-product-collection__shell {
    width: min(100% - 14px, 1440px);
  }

  .norterra-product-collection__grid {
    gap: 7px;
  }

  .norterra-product-card h3 {
    font-size: 12px;
  }

  .norterra-pack-tier__unit {
    display: none;
  }

  .norterra-pack-tier {
    grid-template-columns: minmax(43px, 1fr) minmax(51px, auto) 17px;
  }

  .norterra-pack-tier__radio {
    grid-column: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .norterra-product-card,
  .norterra-product-card__image img,
  .norterra-pack-picker__chevron {
    transition: none;
  }
}

/* v1.4: compact two-column mobile cards and reliable pack-picker layout. */
.norterra-product-card.is-pack-open {
  z-index: 30;
}

.norterra-pack-tier,
.norterra-pack-tier > * {
  min-width: 0;
}

.norterra-pack-tier__quantity,
.norterra-pack-tier__total,
.norterra-pack-tier__unit {
  white-space: nowrap;
}

@media (max-width: 700px) {
  .norterra-product-collection {
    padding-top: 20px;
    padding-bottom: 28px;
  }

  .norterra-product-collection__shell {
    width: calc(100% - 16px);
  }

  .norterra-product-collection__header {
    gap: 10px;
    margin-bottom: 12px;
  }

  .norterra-product-collection__header h2 {
    font-size: clamp(21px, 6vw, 26px);
    line-height: 1.08;
  }

  .norterra-product-collection__view-all {
    font-size: 12px;
  }

  .norterra-product-collection__grid {
    gap: 8px;
  }

  .norterra-product-card {
    min-width: 0;
    border-radius: 9px;
  }

  .norterra-product-card:hover {
    transform: none;
    box-shadow: 0 2px 3px rgba(0, 0, 0, 0.015);
  }

  .norterra-product-card__image img {
    width: 91%;
    height: 91%;
  }

  .norterra-product-card__content {
    min-height: 106px;
    padding: 9px 9px 8px;
  }

  .norterra-product-card h3 {
    min-height: 34px;
    font-size: 12.5px;
    line-height: 1.24;
  }

  .norterra-product-card__flavor {
    font-size: 10.5px;
  }

  .norterra-pack-picker > summary {
    min-height: 50px;
    grid-template-columns: minmax(0, 1fr) 14px minmax(62px, auto);
    gap: 3px;
    padding: 6px 8px;
  }

  .norterra-pack-picker__panel {
    right: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .norterra-pack-picker__tiers {
    width: 100%;
    padding: 0 6px 7px;
    overflow-x: hidden;
  }

  .norterra-pack-tier {
    width: 100%;
    min-height: 44px;
    grid-template-columns: minmax(48px, 1fr) minmax(56px, auto) 17px;
    grid-template-rows: auto auto;
    column-gap: 4px;
    row-gap: 0;
    padding: 5px 5px;
  }

  .norterra-pack-tier__quantity {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    font-size: 10.5px;
  }

  .norterra-pack-tier__total {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    font-size: 10.5px;
    line-height: 1.1;
  }

  .norterra-pack-tier__unit {
    display: block;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    justify-self: end;
    font-size: 7.5px;
    line-height: 1.1;
  }

  .norterra-pack-tier__radio {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
    width: 16px;
    height: 16px;
  }

  .norterra-pack-tier.is-selected .norterra-pack-tier__radio {
    border-width: 4px;
  }
}

@media (max-width: 390px) {
  .norterra-product-collection__shell {
    width: calc(100% - 12px);
  }

  .norterra-product-collection__grid {
    gap: 6px;
  }

  .norterra-product-card__content {
    padding-right: 7px;
    padding-left: 7px;
  }

  .norterra-pack-picker > summary {
    grid-template-columns: minmax(0, 1fr) 12px minmax(57px, auto);
    padding-right: 6px;
    padding-left: 6px;
  }

  .norterra-pack-picker__quantity {
    font-size: 10px;
  }

  .norterra-pack-picker__price strong {
    font-size: 14px;
  }

  .norterra-pack-picker__price small {
    font-size: 8px;
  }

  .norterra-pack-tier {
    grid-template-columns: minmax(43px, 1fr) minmax(52px, auto) 16px;
    padding-right: 4px;
    padding-left: 4px;
  }

  .norterra-pack-tier__quantity,
  .norterra-pack-tier__total {
    font-size: 9.5px;
  }

  .norterra-pack-tier__unit {
    display: block;
    font-size: 7px;
  }
}


/* v1.5: cleaner AJAX cart behavior and a readable mobile pack-size bottom sheet. */
.norterra-product-collection a.added_to_cart,
.norterra-product-collection a.wc-forward.added_to_cart {
  display: none !important;
}

.norterra-product-card__cart button.is-added {
  background: #176b3a;
}

@media (max-width: 700px) {
  html.norterra-pack-modal-open,
  html.norterra-pack-modal-open body {
    overflow: hidden;
  }

  .norterra-product-card__content {
    min-height: 112px;
    padding: 11px 10px 10px;
  }

  .norterra-product-card__brand {
    font-size: 11px;
  }

  .norterra-product-card h3 {
    min-height: 38px;
    font-size: 14px;
    line-height: 1.24;
  }

  .norterra-product-card__flavor {
    font-size: 12px;
    line-height: 1.25;
  }

  .norterra-pack-picker > summary {
    min-height: 58px;
    grid-template-columns: minmax(0, 1fr) 17px minmax(70px, auto);
    gap: 4px;
    padding: 8px 9px;
  }

  .norterra-pack-picker__quantity {
    font-size: 13px;
    font-weight: 500;
  }

  .norterra-pack-picker__chevron {
    font-size: 24px;
  }

  .norterra-pack-picker__price strong {
    font-size: 17px;
    line-height: 1.05;
  }

  .norterra-pack-picker__price small {
    margin-top: 4px;
    font-size: 10.5px;
    line-height: 1.05;
  }

  .norterra-pack-picker[open] .norterra-pack-picker__backdrop {
    position: fixed;
    z-index: 99998;
    inset: 0;
    display: block;
    background: rgba(12, 12, 12, 0.52);
    pointer-events: auto;
  }

  .norterra-pack-picker__panel {
    position: fixed;
    z-index: 99999;
    right: 12px;
    bottom: max(12px, env(safe-area-inset-bottom));
    left: 12px;
    display: none;
    width: auto;
    max-height: min(82vh, 650px);
    overflow: auto;
    border: 1px solid #d8d8d8;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 22px 70px rgba(0, 0, 0, 0.28);
    -webkit-overflow-scrolling: touch;
  }

  .norterra-pack-picker[open] .norterra-pack-picker__panel {
    display: block;
  }

  .norterra-pack-picker__close {
    position: sticky;
    z-index: 2;
    top: 0;
    min-height: 50px;
    border-radius: 16px 16px 0 0;
    background: #fff;
    font-size: 15px;
    font-weight: 600;
  }

  .norterra-pack-picker__title {
    padding: 16px 18px 11px;
    font-size: 21px;
    line-height: 1.15;
  }

  .norterra-pack-picker__tiers {
    padding: 0 14px 16px;
  }

  .norterra-pack-tier {
    min-height: 62px;
    grid-template-columns: minmax(72px, 1fr) minmax(84px, auto) 26px;
    grid-template-rows: auto auto;
    column-gap: 9px;
    padding: 9px 12px;
  }

  .norterra-pack-tier__quantity {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: center;
    font-size: 15px;
    font-weight: 500;
  }

  .norterra-pack-tier__total {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
    justify-self: end;
    font-size: 17px;
    font-weight: 900;
    line-height: 1.08;
  }

  .norterra-pack-tier__unit {
    display: block;
    grid-column: 2;
    grid-row: 2;
    align-self: start;
    justify-self: end;
    font-size: 12px;
    line-height: 1.1;
  }

  .norterra-pack-tier__radio {
    grid-column: 3;
    grid-row: 1 / 3;
    align-self: center;
    justify-self: end;
    width: 23px;
    height: 23px;
  }

  .norterra-pack-tier.is-selected .norterra-pack-tier__radio {
    border-width: 6px;
  }

  .norterra-product-card__cart button,
  .norterra-product-card__choose {
    min-height: 50px;
    font-size: 15px;
  }
}

@media (max-width: 390px) {
  .norterra-product-card h3 {
    font-size: 13.5px;
  }

  .norterra-product-card__flavor {
    font-size: 11.5px;
  }

  .norterra-pack-picker__panel {
    right: 8px;
    bottom: max(8px, env(safe-area-inset-bottom));
    left: 8px;
  }

  .norterra-pack-picker__tiers {
    padding-right: 10px;
    padding-left: 10px;
  }

  .norterra-pack-tier {
    min-height: 60px;
    grid-template-columns: minmax(66px, 1fr) minmax(79px, auto) 24px;
    column-gap: 7px;
    padding-right: 10px;
    padding-left: 10px;
  }

  .norterra-pack-tier__quantity {
    font-size: 14px;
  }

  .norterra-pack-tier__total {
    font-size: 16px;
  }

  .norterra-pack-tier__unit {
    font-size: 11px;
  }
}

/* v1.6: Nicokick-style pack chooser and custom WooCommerce mini-cart drawer. */
html.norterra-pack-modal-open,
html.norterra-pack-modal-open body,
html.norterra-cart-open,
html.norterra-cart-open body {
  overflow: hidden !important;
}

.norterra-pack-picker[open] .norterra-pack-picker__backdrop {
  position: fixed;
  z-index: 999980;
  inset: 0;
  display: block;
  background: rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  backdrop-filter: blur(1px);
}

.norterra-pack-picker__panel {
  position: fixed;
  z-index: 999990;
  right: auto;
  bottom: 0;
  left: 50%;
  display: none;
  width: min(520px, 100%);
  max-height: min(88vh, 760px);
  overflow: auto;
  transform: translateX(-50%);
  border: 0;
  border-radius: 18px 18px 0 0;
  background: #fff;
  box-shadow: 0 -18px 60px rgba(0, 0, 0, 0.25);
  -webkit-overflow-scrolling: touch;
}

.norterra-pack-picker[open] .norterra-pack-picker__panel {
  display: block;
  animation: norterra-sheet-in 220ms ease-out both;
}

@keyframes norterra-sheet-in {
  from { opacity: 0; transform: translate(-50%, 24px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.norterra-pack-picker__product {
  position: sticky;
  z-index: 4;
  top: 0;
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  min-height: 92px;
  padding: 12px 14px;
  border-bottom: 1px solid #e7e7e7;
  background: #fff;
}

.norterra-pack-picker__thumb {
  display: flex;
  width: 68px;
  height: 68px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e7e7e7;
  border-radius: 8px;
  background: #fff;
}

.norterra-pack-picker__thumb img {
  display: block;
  width: 92%;
  height: 92%;
  margin: 0;
  object-fit: contain;
}

.norterra-pack-picker__product-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.norterra-pack-picker__product-copy small {
  color: #4d4d4d;
  font-size: 12px;
  line-height: 1.2;
}

.norterra-pack-picker__product-copy strong {
  overflow: hidden;
  font-size: 15px;
  line-height: 1.28;
  text-overflow: ellipsis;
}

.norterra-pack-picker__close {
  position: static;
  display: flex;
  width: 38px;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #333;
  font-size: 30px;
  font-weight: 300;
  line-height: 1;
}

.norterra-pack-picker__title {
  display: block;
  padding: 18px 18px 12px;
  font-size: 18px;
  line-height: 1.2;
}

.norterra-pack-picker__tiers {
  padding: 0 16px 16px;
}

.norterra-pack-tier {
  min-height: 58px;
  grid-template-columns: minmax(88px, 1fr) minmax(88px, auto) minmax(72px, auto) 24px;
  gap: 10px;
  padding: 10px 12px;
  border-color: #e3e3e3;
}

.norterra-pack-tier.is-selected {
  background: #ff9d91;
}

.norterra-pack-tier__quantity {
  font-size: 15px;
}

.norterra-pack-tier__total {
  font-size: 16px;
}

.norterra-pack-tier__unit {
  font-size: 12px;
}

.norterra-pack-picker__add {
  position: sticky;
  z-index: 4;
  bottom: 0;
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px calc(12px + env(safe-area-inset-bottom));
  border: 0;
  border-radius: 0;
  background: var(--npc-button-bg, #202020);
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.norterra-pack-picker__add.is-added,
.norterra-product-card__cart button.is-added {
  background: #666;
}

.norterra-pack-picker__add.is-loading,
.norterra-product-card__cart button.is-loading {
  opacity: 0.7;
  cursor: wait;
}

.norterra-cart-layer {
  position: fixed;
  z-index: 1000000;
  inset: 0;
  visibility: hidden;
  pointer-events: none;
}

.norterra-cart-layer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.norterra-cart-layer__overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0, 0, 0, 0.48);
  opacity: 0;
  transition: opacity 220ms ease;
}

.norterra-cart-layer.is-open .norterra-cart-layer__overlay {
  opacity: 1;
}

.norterra-cart-drawer {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: min(460px, 100%);
  height: 100%;
  max-width: 100%;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(102%);
  border: 0;
  background: #fff;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.2);
  outline: none;
  transition: transform 250ms ease;
}

.norterra-cart-layer.is-open .norterra-cart-drawer {
  transform: translateX(0);
}

.norterra-cart-drawer__content {
  display: flex;
  min-height: 0;
  height: 100%;
  flex-direction: column;
}

.norterra-cart-layer.is-updating .norterra-cart-drawer__body {
  opacity: 0.48;
  pointer-events: none;
}

.norterra-cart-drawer__header {
  position: relative;
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  padding: 12px 52px;
  background: #176f7b;
  color: #fff;
}

.norterra-cart-drawer__header strong {
  font-size: 15px;
}

.norterra-cart-drawer__close {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 34px;
  height: 34px;
  padding: 0;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
}

.norterra-cart-drawer__message {
  padding: 16px 22px;
  background: #f5f5f5;
  color: #3d3d3d;
  font-size: 13px;
  line-height: 1.45;
  text-align: center;
}

.norterra-cart-drawer__body {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 20px 18px;
  transition: opacity 150ms ease;
  -webkit-overflow-scrolling: touch;
}

.norterra-cart-drawer__body h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

.norterra-cart-drawer__items {
  display: grid;
  gap: 16px;
}

.norterra-cart-item {
  position: relative;
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 8px 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e8e8e8;
}

.norterra-cart-item:last-child {
  border-bottom: 0;
}

.norterra-cart-item__image {
  grid-row: 1 / 3;
  display: flex;
  width: 78px;
  height: 78px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  background: #fff;
}

.norterra-cart-item__image img {
  display: block;
  width: 92%;
  height: 92%;
  margin: 0;
  object-fit: contain;
}

.norterra-cart-item__details {
  min-width: 0;
}

.norterra-cart-item__details small {
  display: block;
  margin-bottom: 2px;
  color: #666;
  font-size: 11px;
}

.norterra-cart-item__name {
  display: block;
  color: #111;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.28;
  text-decoration: none;
}

.norterra-cart-item__prices {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 7px;
}

.norterra-cart-item__prices del {
  color: #777;
  font-size: 12px;
}

.norterra-cart-item__prices strong {
  color: #bd3e32;
  font-size: 17px;
}

.norterra-cart-item__unit {
  align-self: start;
  color: #333;
  font-size: 12px;
  white-space: nowrap;
}

.norterra-cart-item__unit small {
  margin-left: 2px;
  color: #777;
  font-size: 10px;
}

.norterra-cart-item__controls {
  display: inline-grid;
  width: max-content;
  grid-template-columns: 30px 34px 30px;
  align-items: center;
  border: 1px solid #e1e1e1;
  background: #f8f8f8;
}

.norterra-cart-item__controls button {
  display: flex;
  width: 30px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: #333;
  font-size: 18px;
  cursor: pointer;
}

.norterra-cart-item__controls span {
  font-size: 12px;
  text-align: center;
}

.norterra-cart-item__remove {
  align-self: center;
  justify-self: end;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #d46666;
  font-size: 22px;
  cursor: pointer;
}

.norterra-cart-drawer__footer {
  flex: 0 0 auto;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom));
  border-top: 1px solid #dedede;
  background: #fff;
}

.norterra-cart-drawer__total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  font-size: 18px;
}

.norterra-cart-drawer__total strong {
  font-size: 20px;
}

.norterra-cart-drawer__checkout,
.norterra-cart-drawer__empty button {
  display: flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid #202020;
  border-radius: 3px;
  background: #fff;
  color: #111;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.norterra-cart-drawer__empty {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 30px;
  text-align: center;
}

.norterra-cart-drawer__loading {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
}

.norterra-cart-drawer__loading span {
  width: 34px;
  height: 34px;
  border: 3px solid #ddd;
  border-top-color: #176f7b;
  border-radius: 50%;
  animation: norterra-spin 700ms linear infinite;
}

@keyframes norterra-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
  .norterra-pack-picker__panel {
    width: 100%;
    max-height: 90vh;
    border-radius: 16px 16px 0 0;
  }

  .norterra-pack-picker__product {
    grid-template-columns: 64px minmax(0, 1fr) 38px;
    min-height: 86px;
    padding: 10px 12px;
  }

  .norterra-pack-picker__thumb {
    width: 64px;
    height: 64px;
  }

  .norterra-pack-picker__title {
    padding: 16px 14px 10px;
    font-size: 17px;
  }

  .norterra-pack-picker__tiers {
    padding: 0 10px 12px;
  }

  .norterra-pack-tier {
    min-height: 56px;
    grid-template-columns: minmax(72px, 1fr) minmax(75px, auto) minmax(64px, auto) 23px;
    gap: 7px;
    padding: 9px 10px;
  }

  .norterra-pack-tier__quantity {
    font-size: 14px;
  }

  .norterra-pack-tier__total {
    font-size: 15px;
  }

  .norterra-pack-tier__unit {
    display: block;
    font-size: 11px;
  }

  .norterra-pack-picker__add {
    min-height: 56px;
    font-size: 16px;
  }

  .norterra-cart-drawer {
    width: 100%;
  }

  .norterra-cart-drawer__body {
    padding: 18px 14px;
  }

  .norterra-cart-item {
    grid-template-columns: 72px minmax(0, 1fr) auto;
    gap: 7px 9px;
  }

  .norterra-cart-item__image {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 390px) {
  .norterra-pack-tier {
    grid-template-columns: minmax(64px, 1fr) minmax(70px, auto) minmax(60px, auto) 22px;
    gap: 5px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .norterra-pack-tier__quantity {
    font-size: 13px;
  }

  .norterra-pack-tier__total {
    font-size: 14px;
  }

  .norterra-pack-tier__unit {
    font-size: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .norterra-pack-picker[open] .norterra-pack-picker__panel,
  .norterra-cart-layer__overlay,
  .norterra-cart-drawer {
    animation: none;
    transition: none;
  }
}

/* v1.7: clear add confirmation, smooth preloaded cart drawer, and stable desktop modal. */
.norterra-product-card:hover,
.norterra-product-card.is-pack-open,
.norterra-product-card.is-pack-open:hover {
  transform: none !important;
}

.norterra-product-card.is-pack-open {
  z-index: 40;
}

.norterra-product-card__cart button,
.norterra-pack-picker__add {
  transition: background-color 160ms ease, opacity 160ms ease, color 160ms ease;
}

.norterra-product-card__cart button.is-loading,
.norterra-pack-picker__add.is-loading {
  background: #4a4a4a !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  opacity: 1 !important;
}

.norterra-product-card__cart button.is-added,
.norterra-pack-picker__add.is-added {
  background: #606060 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  opacity: 1 !important;
  font-size: 27px;
  font-weight: 500;
  cursor: default;
}

.norterra-product-card__cart button.is-error,
.norterra-pack-picker__add.is-error {
  background: #a73232 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

@media (min-width: 701px) {
  .norterra-pack-picker__panel {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: min(560px, calc(100vw - 48px));
    max-height: min(84vh, 760px);
    transform: translate(-50%, -50%);
    border: 1px solid #dedede;
    border-radius: 18px;
  }

  .norterra-pack-picker[open] .norterra-pack-picker__panel {
    animation: norterra-dialog-in 200ms ease-out both;
  }

  .norterra-pack-picker__product {
    border-radius: 18px 18px 0 0;
  }

  @keyframes norterra-dialog-in {
    from {
      opacity: 0;
      transform: translate(-50%, calc(-50% + 18px));
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%);
    }
  }
}

@media (max-width: 700px) {
  .norterra-pack-picker__panel {
    top: auto;
    right: auto;
    bottom: 0;
    left: 50%;
    width: 100%;
    max-height: 90vh;
    transform: translateX(-50%);
    border: 0;
    border-radius: 16px 16px 0 0;
  }

  .norterra-pack-picker[open] .norterra-pack-picker__panel {
    animation: norterra-sheet-in 220ms ease-out both;
  }

  .norterra-pack-picker__add.is-added,
  .norterra-product-card__cart button.is-added {
    min-height: 56px;
    font-size: 28px;
  }
}

/* v1.8: clean Nicokick-style pack selector with safe mobile spacing. */
.norterra-pack-picker[open] .norterra-pack-picker__backdrop {
  background: rgba(10, 10, 10, 0.58) !important;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.norterra-pack-picker__panel {
  display: none !important;
  width: min(620px, calc(100vw - 40px)) !important;
  max-height: min(88dvh, 760px) !important;
  flex-direction: column;
  overflow: hidden !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 20px !important;
  background: #fff !important;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32) !important;
}

.norterra-pack-picker[open] .norterra-pack-picker__panel {
  display: flex !important;
}

.norterra-pack-picker__product {
  position: relative !important;
  top: auto !important;
  flex: 0 0 auto;
  grid-template-columns: 86px minmax(0, 1fr) 48px !important;
  min-height: 112px !important;
  gap: 18px !important;
  padding: 16px 20px !important;
  border-bottom: 1px solid #e6e6e6 !important;
  border-radius: 20px 20px 0 0 !important;
}

.norterra-pack-picker__thumb {
  width: 86px !important;
  height: 86px !important;
  border-radius: 10px !important;
}

.norterra-pack-picker__product-copy {
  gap: 8px !important;
}

.norterra-pack-picker__product-copy small {
  color: #333 !important;
  font-size: 16px !important;
  line-height: 1.15 !important;
}

.norterra-pack-picker__product-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-size: 23px !important;
  font-weight: 800 !important;
  line-height: 1.18 !important;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.norterra-pack-picker__close {
  width: 44px !important;
  min-height: 44px !important;
  height: 44px !important;
  color: #222 !important;
  font-size: 40px !important;
  line-height: 1 !important;
}

.norterra-pack-picker__title {
  flex: 0 0 auto;
  padding: 26px 24px 16px !important;
  font-size: 27px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
}

.norterra-pack-picker__tiers {
  min-height: 0;
  flex: 1 1 auto;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 22px 20px !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.norterra-pack-tier {
  min-height: 76px !important;
  grid-template-columns: minmax(115px, 1fr) minmax(92px, auto) minmax(105px, auto) 42px !important;
  grid-template-rows: 1fr !important;
  gap: 14px !important;
  margin-top: 0 !important;
  padding: 13px 18px !important;
  border-color: #e7e7e7 !important;
  background: #fff !important;
}

.norterra-pack-tier + .norterra-pack-tier {
  border-top: 0 !important;
}

.norterra-pack-tier:first-child {
  border-radius: 13px 13px 0 0 !important;
}

.norterra-pack-tier:last-child {
  border-radius: 0 0 13px 13px !important;
}

.norterra-pack-tier.is-selected {
  background: #ffa197 !important;
}

.norterra-pack-tier__quantity,
.norterra-pack-tier__total,
.norterra-pack-tier__unit,
.norterra-pack-tier__radio {
  grid-row: 1 !important;
  align-self: center !important;
}

.norterra-pack-tier__quantity {
  grid-column: 1 !important;
  font-size: 20px !important;
  font-weight: 500 !important;
}

.norterra-pack-tier.is-selected .norterra-pack-tier__quantity {
  font-weight: 800 !important;
}

.norterra-pack-tier__total {
  grid-column: 2 !important;
  justify-self: end !important;
  font-size: 22px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

.norterra-pack-tier__unit {
  display: block !important;
  grid-column: 3 !important;
  justify-self: end !important;
  color: #4a4a4a !important;
  font-size: 17px !important;
  line-height: 1 !important;
}

.norterra-pack-tier__radio {
  position: relative;
  grid-column: 4 !important;
  justify-self: end !important;
  width: 35px !important;
  height: 35px !important;
  border: 2px solid #d6d6d6 !important;
  background: #fff !important;
}

.norterra-pack-tier.is-selected .norterra-pack-tier__radio {
  border: 2px solid #d6d6d6 !important;
  background: #fff !important;
}

.norterra-pack-tier.is-selected .norterra-pack-tier__radio::after {
  position: absolute;
  top: 48%;
  left: 50%;
  color: #36a765;
  content: '✓';
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  transform: translate(-50%, -50%);
}

.norterra-pack-picker__add {
  position: static !important;
  flex: 0 0 auto;
  min-height: 74px !important;
  padding: 18px 24px calc(18px + env(safe-area-inset-bottom)) !important;
  border-radius: 0 0 19px 19px !important;
  background: #fed813 !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
  font-size: 25px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.norterra-pack-picker__add:hover,
.norterra-pack-picker__add:focus-visible {
  background: #f1cb00 !important;
  color: #111 !important;
}

.norterra-pack-picker__add.is-loading {
  background: #f2ce12 !important;
  color: #111 !important;
  -webkit-text-fill-color: #111 !important;
}

.norterra-pack-picker__add.is-added {
  background: #238636 !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  font-size: 21px !important;
}

@media (min-width: 701px) {
  .norterra-pack-picker__panel {
    top: 50% !important;
    right: auto !important;
    bottom: auto !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
  }

  .norterra-pack-picker[open] .norterra-pack-picker__panel {
    animation: norterra-dialog-clean-in 190ms ease-out both !important;
  }

  @keyframes norterra-dialog-clean-in {
    from { opacity: 0; transform: translate(-50%, calc(-50% + 18px)) scale(.985); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  }
}

@media (max-width: 700px) {
  .norterra-pack-picker__panel {
    top: auto !important;
    right: 12px !important;
    bottom: max(12px, env(safe-area-inset-bottom)) !important;
    left: 12px !important;
    width: auto !important;
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)) !important;
    transform: none !important;
    border-radius: 18px !important;
  }

  .norterra-pack-picker[open] .norterra-pack-picker__panel {
    animation: norterra-sheet-clean-in 210ms ease-out both !important;
  }

  @keyframes norterra-sheet-clean-in {
    from { opacity: 0; transform: translateY(22px); }
    to { opacity: 1; transform: translateY(0); }
  }

  .norterra-pack-picker__product {
    grid-template-columns: 76px minmax(0, 1fr) 42px !important;
    min-height: 102px !important;
    gap: 14px !important;
    padding: 14px 16px !important;
    border-radius: 18px 18px 0 0 !important;
  }

  .norterra-pack-picker__thumb {
    width: 76px !important;
    height: 76px !important;
  }

  .norterra-pack-picker__product-copy {
    gap: 6px !important;
  }

  .norterra-pack-picker__product-copy small {
    font-size: 15px !important;
  }

  .norterra-pack-picker__product-copy strong {
    font-size: clamp(19px, 5.4vw, 23px) !important;
  }

  .norterra-pack-picker__close {
    width: 40px !important;
    min-height: 40px !important;
    height: 40px !important;
    font-size: 37px !important;
  }

  .norterra-pack-picker__title {
    padding: 22px 18px 14px !important;
    font-size: 25px !important;
  }

  .norterra-pack-picker__tiers {
    padding: 0 16px 16px !important;
  }

  .norterra-pack-tier {
    min-height: 70px !important;
    grid-template-columns: minmax(82px, 1fr) minmax(76px, auto) minmax(90px, auto) 36px !important;
    gap: 8px !important;
    padding: 11px 13px !important;
  }

  .norterra-pack-tier__quantity {
    font-size: 18px !important;
  }

  .norterra-pack-tier__total {
    font-size: 20px !important;
  }

  .norterra-pack-tier__unit {
    font-size: 15px !important;
  }

  .norterra-pack-tier__radio {
    width: 32px !important;
    height: 32px !important;
  }

  .norterra-pack-picker__add {
    min-height: 70px !important;
    padding: 16px 18px calc(16px + env(safe-area-inset-bottom)) !important;
    border-radius: 0 0 17px 17px !important;
    font-size: 23px !important;
  }
}

@media (max-width: 430px) {
  .norterra-pack-picker__panel {
    right: 8px !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    left: 8px !important;
    max-height: calc(100dvh - 16px - env(safe-area-inset-bottom)) !important;
  }

  .norterra-pack-picker__product {
    grid-template-columns: 68px minmax(0, 1fr) 38px !important;
    min-height: 92px !important;
    gap: 11px !important;
    padding: 11px 13px !important;
  }

  .norterra-pack-picker__thumb {
    width: 68px !important;
    height: 68px !important;
  }

  .norterra-pack-picker__product-copy small {
    font-size: 14px !important;
  }

  .norterra-pack-picker__product-copy strong {
    font-size: 18px !important;
  }

  .norterra-pack-picker__title {
    padding: 18px 14px 11px !important;
    font-size: 23px !important;
  }

  .norterra-pack-picker__tiers {
    padding: 0 12px 12px !important;
  }

  .norterra-pack-tier {
    min-height: 64px !important;
    grid-template-columns: minmax(70px, 1fr) minmax(66px, auto) minmax(74px, auto) 31px !important;
    gap: 6px !important;
    padding: 9px 10px !important;
  }

  .norterra-pack-tier__quantity {
    font-size: 16px !important;
  }

  .norterra-pack-tier__total {
    font-size: 18px !important;
  }

  .norterra-pack-tier__unit {
    font-size: 13px !important;
  }

  .norterra-pack-tier__radio {
    width: 29px !important;
    height: 29px !important;
  }

  .norterra-pack-tier.is-selected .norterra-pack-tier__radio::after {
    font-size: 19px;
  }

  .norterra-pack-picker__add {
    min-height: 64px !important;
    padding: 14px 16px calc(14px + env(safe-area-inset-bottom)) !important;
    font-size: 21px !important;
  }
}
