/* ==========================================================================
   Cart — header bag button + cart drawer (slides in from the right).
   Same look as the menu drawer: black, dot texture, volt accents.
   ========================================================================== */

/* ---------- header button ---------- */

.cart-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  color: inherit;
}

.cart-toggle svg { width: 26px; height: 26px; transition: transform 0.3s var(--ease); }
.cart-toggle:hover svg { transform: translateY(-2px); }

.cart-toggle__count {
  position: absolute;
  top: 5px;
  right: 3px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font: 700 10px/18px var(--font-mono);
  text-align: center;
}

.cart-toggle__count[hidden] { display: none; }

/* ---------- drawer ---------- */

.cart-drawer {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.cart-drawer[hidden] { display: none; }

.cart-drawer__overlay {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 6, 0.55);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}

.cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  width: min(440px, 92vw);
  background-color: var(--c-ink);
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1.6px);
  background-size: 8px 8px;
  color: #fff;
  transform: translateX(100%);
  transition: transform 0.45s var(--ease);
}

.cart-drawer.is-open .cart-drawer__overlay { opacity: 1; }
.cart-drawer.is-open .cart-drawer__panel { transform: none; }

.cart-drawer__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  height: var(--header-h);
  padding: 0 var(--gutter);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cart-drawer__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.cart-drawer__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  color: #fff;
  transition: transform 0.3s var(--ease);
}

.cart-drawer__close:hover { transform: rotate(90deg); }
.cart-drawer__close svg { width: 22px; height: 22px; }

.cart-drawer__body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 var(--gutter);
}

/* ---------- items ---------- */

.cart-items { margin: 0; padding: 0; list-style: none; }

.cart-item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 16px;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.cart-item__img {
  position: relative;
  z-index: 1;                  /* sits over the adapter connector */
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
}

.cart-item__img img { width: 100%; height: 100%; object-fit: cover; }

.cart-item__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.05;
  text-transform: uppercase;
}

.cart-item__meta {
  margin: 6px 0 0;
  font: 700 11px/1 var(--font-mono);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.cart-item__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.cart-item__price { font-size: 15px; font-weight: 600; }

.cart-item__remove {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cart-item__remove:hover { color: #fff; }

/* included adapter: hangs off the display line with a little connector */
.cart-incl {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 0 0 0 60px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
}

/* └ connector from under the product photo */
.cart-incl::before {
  content: "";
  position: absolute;
  left: -16px;
  top: -160px;                 /* runs up behind the product photo, so it always meets it */
  width: 12px;
  height: calc(50% + 160px);
  border-left: 1px dashed rgba(255, 255, 255, 0.25);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.25);
  border-bottom-left-radius: 8px;
}

.cart-incl__img {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--c-accent);
}

.cart-incl__img svg { width: 22px; height: 22px; }
.cart-incl__img img { width: 100%; height: 100%; object-fit: cover; }

.cart-incl__info { display: grid; gap: 3px; min-width: 0; }
.cart-incl__title { font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.cart-incl__meta {
  font: 700 11px/1 var(--font-mono);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
}

.cart-incl__tag {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(212, 255, 0, 0.12);
  font: 700 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-accent);
}

/* qty stepper: same pill shape as the plug-type tabs */
.cart-qty {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.cart-qty button {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  color: #fff;
  font-size: 16px;
  line-height: 1;
  transition: background-color 0.2s, color 0.2s;
}

.cart-qty button:hover { background: var(--c-accent); color: var(--c-accent-ink); }
.cart-qty span { min-width: 28px; text-align: center; font-size: 14px; font-weight: 700; }

/* ---------- delivery protection (optional $5 add-on, off by default) ---------- */

.cart-protect {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  column-gap: 14px;
  width: 100%;
  margin: 20px 0 24px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.25s, background-color 0.25s;
}

.cart-protect:hover { border-color: rgba(255, 255, 255, 0.3); }
.cart-protect:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 3px; }

.cart-protect.is-on {
  border-color: var(--c-accent);
  background: rgba(212, 255, 0, 0.06);
}

.cart-protect__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  transition: background-color 0.25s, color 0.25s;
}

.cart-protect__icon svg { width: 22px; height: 22px; }
.cart-protect.is-on .cart-protect__icon { background: var(--c-accent); color: var(--c-accent-ink); }

.cart-protect__head { display: grid; gap: 4px; min-width: 0; }

.cart-protect__title {
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1;
  text-transform: uppercase;
}

.cart-protect__price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font: 700 13px/1 var(--font-mono);
  color: rgba(255, 255, 255, 0.75);
}

.cart-protect__tag {
  padding: 3px 6px;
  border: 1px solid rgba(212, 255, 0, 0.5);
  border-radius: 4px;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
}

/* switch */
.cart-protect__switch {
  position: relative;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  transition: background-color 0.25s;
}

.cart-protect__switch span {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.25s var(--ease), background-color 0.25s;
}

.cart-protect.is-on .cart-protect__switch { background: var(--c-accent); }
.cart-protect.is-on .cart-protect__switch span { transform: translateX(20px); background: var(--c-accent-ink); }

.cart-protect__perks {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.14);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
}

.cart-protect__perks span { display: flex; align-items: center; gap: 6px; }
.cart-protect__perks svg { flex: none; width: 13px; height: 13px; color: var(--c-accent); }

/* ---------- empty ---------- */

.cart-empty { padding: 64px 0; text-align: center; }

.cart-empty__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  text-transform: uppercase;
}

.cart-empty__text { margin: 10px 0 24px; color: rgba(255, 255, 255, 0.6); }

/* ---------- footer ---------- */

.cart-drawer__foot {
  flex: none;
  padding: 18px var(--gutter) 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--c-ink);
}

.cart-drawer__foot[hidden] { display: none; }

.cart-nudge {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.cart-nudge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-accent); }

.cart-sum { margin: 0; }
.cart-sum div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; color: rgba(255, 255, 255, 0.7); }
.cart-sum dt, .cart-sum dd { margin: 0; }
.cart-sum__save dd { color: var(--c-accent); }

.cart-sum .cart-sum__total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}

.cart-sum__total dd { font-family: var(--font-display); font-size: 26px; font-weight: 400; line-height: 1; }

/* buttons: homepage primary button */
.cart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  border-radius: 1000rem;
  background: var(--c-accent);
  color: var(--c-accent-ink);
  font: 600 13px/1 var(--font-body);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.3s;
}

.cart-btn:hover { background: #fff; }
.cart-btn--full { width: 100%; height: 56px; margin-top: 16px; }

.cart-small { margin: 10px 0 0; text-align: center; font-size: 12px; color: rgba(255, 255, 255, 0.45); }
