/* ===========================================================================
   No1 Princess — Cart icon + slide-out cart drawer
   Matches the brand: dark panel, cream type, TAY Birdie headings, gold/red.
   Tokens (--c-*) come from home.css :root.
   =========================================================================== */

/* ---- Header cart icon -------------------------------------------------- */
.np-nav__actions { display: flex; align-items: center; gap: 12px; }

.np-cart-toggle {
  position: relative;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border: 1.5px solid rgba(246, 244, 241, 0.7);
  background: transparent;
  color: var(--c-cream);
  transition: background-color .25s ease, color .25s ease;
}
.np-cart-toggle:hover { background: var(--c-cream); color: var(--c-dark); }
.np-cart-toggle svg { width: 22px; height: 22px; }

.np-cart-count {
  position: absolute; top: -7px; right: -7px;
  min-width: 21px; height: 21px; padding: 0 6px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: var(--c-red); color: var(--c-cream);
  font-family: var(--font-body); font-weight: 800; font-size: 11px; line-height: 1;
}
.np-cart-count.is-empty { display: none; }

/* ---- Overlay + drawer shell ------------------------------------------- */
.np-cart-overlay {
  position: fixed; inset: 0; z-index: 110;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0; transition: opacity .35s ease;
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.np-cart-overlay.is-open { opacity: 1; }

.np-cart {
  position: fixed; top: 0; right: 0; z-index: 120;
  width: min(440px, 92vw); height: 100svh;
  background: var(--c-dark); color: var(--c-cream);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
  box-shadow: -30px 0 70px rgba(0, 0, 0, 0.45);
}
.np-cart.is-open { transform: translateX(0); }

.np-cart__head {
  flex: none;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px clamp(20px, 4vw, 26px);
  border-bottom: 1px solid rgba(246, 244, 241, 0.12);
}
.np-cart__title { font-family: var(--font-display); font-weight: 400; font-size: 23px; letter-spacing: -0.04em; margin: 0; }
.np-cart__close {
  width: 42px; height: 42px; display: grid; place-items: center;
  background: transparent; border: none; color: var(--c-cream); opacity: .85; cursor: pointer;
  transition: opacity .2s ease, transform .2s ease;
}
.np-cart__close:hover { opacity: 1; transform: rotate(90deg); }
.np-cart__close svg { width: 24px; height: 24px; }

.np-cart__body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.np-cart__body .widget_shopping_cart_content { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

/* Items + upsell scroll together (items stay at the top, always visible);
   subtotal + offers + buttons are pinned in the footer. */
.np-cart__scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.np-cart__foot { flex: none; }

body.np-cart-open { overflow: hidden; }

/* ---- WooCommerce mini-cart, restyled ----------------------------------- */
.np-cart .woocommerce-mini-cart {
  list-style: none; margin: 0;
  padding: 0 clamp(20px, 4vw, 26px);
}
.np-cart .woocommerce-mini-cart-item {
  position: relative; list-style: none; margin: 0;
  padding: 14px 24px 14px 64px; min-height: 52px;
  border-bottom: 1px solid rgba(246, 244, 241, 0.1);
}
.np-cart .woocommerce-mini-cart-item img {
  position: absolute; left: 0; top: 14px;
  width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: #fff;
}
.np-cart .woocommerce-mini-cart-item > a:not(.remove) {
  display: block;
  font-family: var(--font-display); font-weight: 400;
  font-size: 16px; letter-spacing: -0.02em; line-height: 1.2;
  color: var(--c-cream); text-decoration: none; padding-right: 22px;
}
.np-cart .woocommerce-mini-cart-item > a:not(.remove):hover { color: var(--c-gold); }
.np-cart .woocommerce-mini-cart-item .quantity {
  display: block; margin-top: 4px;
  font-family: var(--font-body); font-size: 13px; color: var(--c-beige);
}
.np-cart .woocommerce-mini-cart-item .quantity .amount { color: var(--c-cream); }
.np-cart .woocommerce-mini-cart-item a.remove {
  position: absolute; top: 13px; right: 0;
  width: 22px; height: 22px; border-radius: 50%;
  display: grid; place-items: center;
  color: var(--c-beige) !important; background: transparent;
  font-size: 16px; line-height: 1; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
.np-cart .woocommerce-mini-cart-item a.remove:hover { background: var(--c-red); color: #fff !important; }

/* ---- Compact totals breakdown (Subtotal / Delivery / VAT / Total) ------- */
.np-cart__totals {
  flex: none; padding: 12px clamp(20px, 4vw, 26px) 6px;
  border-top: 1px solid rgba(246, 244, 241, 0.16);
}
.np-cart__row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 2.5px 0;
  font-family: var(--font-body); font-size: 13px; color: var(--c-beige);
}
.np-cart__row > span:last-child { color: var(--c-cream); font-weight: 600; }
.np-cart__row .amount { color: var(--c-cream); }
.np-cart__row--discount > span:last-child,
.np-cart__row--discount .amount { color: var(--c-gold); }
.np-cart__row--grand {
  margin-top: 7px; padding-top: 9px; border-top: 1px solid rgba(246, 244, 241, 0.14);
}
.np-cart__row--grand > span:first-child {
  color: var(--c-cream); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; font-size: 13px;
}
.np-cart__row--grand .amount {
  font-family: var(--font-display); font-weight: 400; font-size: 21px; letter-spacing: -0.03em;
}
.np-cart__vatnote { margin: 6px 0 0; font-family: var(--font-body); font-size: 11px; line-height: 1.35; color: rgba(246, 244, 241, 0.5); }

/* ---- Action buttons: compact, side-by-side --------------------------- */
.np-cart .woocommerce-mini-cart__buttons {
  flex: none; margin: 0; display: flex; flex-direction: row; gap: 8px;
  padding: 12px clamp(20px, 4vw, 26px) clamp(16px, 3vw, 22px);
}
.np-cart .woocommerce-mini-cart__buttons .button {
  flex: 1 1 0; min-width: 0; text-align: center; padding: 12px 8px; border-radius: 6px;
  font-family: var(--font-body); font-weight: 800; font-size: 12px; letter-spacing: .04em; text-transform: uppercase;
  text-decoration: none; border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}
.np-cart .woocommerce-mini-cart__buttons .button:not(.checkout) {
  background: transparent; color: var(--c-cream); border-color: rgba(246, 244, 241, 0.55);
}
.np-cart .woocommerce-mini-cart__buttons .button:not(.checkout):hover { background: var(--c-cream); color: var(--c-dark); border-color: var(--c-cream); }
.np-cart .woocommerce-mini-cart__buttons .button.checkout {
  order: 2; flex: 1.5 1 0; background: var(--c-red); color: var(--c-cream); border-color: var(--c-red);
}
.np-cart .woocommerce-mini-cart__buttons .button.checkout:hover { background: var(--c-cream); color: var(--c-dark); border-color: var(--c-cream); }

/* empty state */
.np-cart .woocommerce-mini-cart__empty-message {
  margin: 0; padding: clamp(28px, 5vw, 40px) clamp(22px, 4vw, 32px);
  color: var(--c-beige); font-size: 16px; line-height: 1.5;
}

/* Keep cart headings on-brand even if Kadence tints headings navy. */
.np-cart :is(h1, h2, h3, h4) { color: inherit !important; }

/* ===========================================================================
   Quantity stepper (replaces the "2 × £8.50" text on each line)
   =========================================================================== */
.np-qty {
  display: inline-flex; align-items: center; margin-top: 8px;
  border: 1.5px solid rgba(246, 244, 241, 0.28); border-radius: 999px; overflow: hidden;
}
.np-qty.is-loading { opacity: .5; pointer-events: none; }
.np-qty__btn {
  width: 26px; height: 26px; display: grid; place-items: center;
  background: transparent; border: none; color: var(--c-cream);
  font-size: 15px; line-height: 1; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.np-qty__btn:hover { background: var(--c-cream); color: var(--c-dark); }
.np-qty__num {
  min-width: 24px; text-align: center;
  font-family: var(--font-body); font-weight: 700; font-size: 13px; color: var(--c-cream);
}
.np-qty__price {
  position: absolute; right: 0; bottom: 15px; margin: 0;
  font-family: var(--font-display); font-size: 16px; letter-spacing: -0.02em; color: var(--c-cream);
}
.np-qty__price .amount { color: var(--c-cream); }

/* ===========================================================================
   Cross-sell upsell slider (pinned just above the subtotal)
   =========================================================================== */
.np-upsell {
  padding: 14px clamp(22px, 4vw, 32px) 8px;
  border-top: 1px solid rgba(246, 244, 241, 0.12);
}
.np-upsell__title {
  margin: 0 0 10px; font-family: var(--font-body); font-weight: 700; font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--c-beige);
}
.np-upsell__track {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(246,244,241,0.35) transparent;
}
.np-upsell__track::-webkit-scrollbar { height: 5px; }
.np-upsell__track::-webkit-scrollbar-thumb { background: rgba(246,244,241,0.3); border-radius: 999px; }
.np-upsell__card {
  flex: 0 0 94px; scroll-snap-align: start;
  background: rgba(246, 244, 241, 0.05); border-radius: 10px; padding: 6px;
  display: flex; flex-direction: column;
}
/* Fixed thumbnail height (a plain aspect-ratio let placeholder images balloon). */
.np-upsell__img img {
  width: 100%; height: 64px; object-fit: cover; border-radius: 6px; background: #fff; display: block;
}
.np-upsell__name {
  margin: 7px 0 1px; font-family: var(--font-body); font-weight: 600; font-size: 12px;
  line-height: 1.2; color: var(--c-cream);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.np-upsell__price { font-family: var(--font-body); font-size: 11.5px; color: var(--c-beige); margin-bottom: 7px; }
.np-upsell__price .amount { color: var(--c-cream); }
.np-upsell__add {
  margin-top: auto; text-align: center; padding: 6px 8px; border-radius: 999px;
  border: 1.5px solid rgba(246, 244, 241, 0.5); background: transparent; color: var(--c-cream);
  font-family: var(--font-body); font-weight: 800; font-size: 10.5px; letter-spacing: .04em;
  text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.np-upsell__add:hover, .np-upsell__add.added { background: var(--c-gold); color: var(--c-dark); border-color: var(--c-gold); }
.np-upsell__add.loading { opacity: .6; pointer-events: none; }
/* WooCommerce injects a "View cart" link after an ajax add — not needed here. */
.np-upsell__card .added_to_cart { display: none !important; }

/* ===========================================================================
   Offers & rewards panel (coupon box + auto-apply offer list)
   =========================================================================== */
.np-offers { flex: none; padding: 0 clamp(20px, 4vw, 26px); }
.np-offers__toggle {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; background: transparent; border: none; cursor: pointer; color: var(--c-cream);
  font-family: var(--font-body); font-weight: 700; font-size: 13px; letter-spacing: .04em;
  text-transform: uppercase; border-top: 1px solid rgba(246, 244, 241, 0.16);
}
.np-offers__chev { transition: transform .25s ease; }
.np-offers__toggle[aria-expanded="true"] .np-offers__chev { transform: rotate(180deg); }
.np-offers__panel { padding-bottom: 14px; }
.np-offers__list { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.np-offers__item { display: flex; align-items: flex-start; gap: 10px; font-family: var(--font-body); font-size: 13px; color: var(--c-beige); }
.np-offers__check {
  flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid rgba(246, 244, 241, 0.3); color: transparent; margin-top: 1px;
}
.np-offers__item.is-applied .np-offers__check { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-dark); }
.np-offers__text strong { display: block; color: var(--c-cream); font-weight: 700; }
.np-offers__text em { font-style: normal; font-size: 12px; }

.np-coupon { display: flex; gap: 8px; }
.np-coupon__input {
  flex: 1 1 auto; min-width: 0; padding: 12px 14px; border-radius: 6px;
  background: rgba(246, 244, 241, 0.06); border: 1.5px solid rgba(246, 244, 241, 0.25);
  color: var(--c-cream); font-family: var(--font-body); font-size: 14px;
}
.np-coupon__input::placeholder { color: rgba(246, 244, 241, 0.5); }
.np-coupon__input:focus { outline: none; border-color: var(--c-cream); }
.np-coupon__apply {
  flex: none; padding: 12px 18px; border-radius: 6px; border: 1.5px solid var(--c-cream);
  background: var(--c-cream); color: var(--c-dark); font-family: var(--font-body); font-weight: 800;
  font-size: 12px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: opacity .2s ease;
}
.np-coupon__apply:disabled { opacity: .5; cursor: default; }
.np-coupon__msg { margin: 8px 0 0; font-size: 12.5px; color: var(--c-beige); }
.np-coupon__msg.is-error { color: #e8836f; }
.np-coupon__applied { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.np-coupon__applied li {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-family: var(--font-body); font-size: 13px; color: var(--c-cream);
  padding: 8px 12px; background: rgba(198, 146, 59, 0.14); border-radius: 6px;
}
.np-coupon__remove { color: var(--c-beige) !important; font-size: 18px; line-height: 1; text-decoration: none; }
.np-coupon__remove:hover { color: var(--c-red) !important; }
