/* Purchase-path shell: icon navigation and the right-hand cart drawer. */
#nav .ih-links > a.ih-acct,
#nav .ih-links > a.ih-cart,
#nav.solid .ih-links > a.ih-acct,
#nav.solid .ih-links > a.ih-cart {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; min-width: 44px; height: 44px; min-height: 44px; padding: 0;
  border: 0; border-radius: 999px; background: transparent; color: inherit;
  transition: background .2s var(--ih-ease, ease), color .25s var(--ih-ease, ease);
}
#nav.solid .ih-links > a.ih-acct,
#nav.solid .ih-links > a.ih-cart { color: var(--ink, #0b1b2b); }
#nav .ih-links > a.ih-acct:hover,
#nav .ih-links > a.ih-cart:hover { background: rgba(255,255,255,.14); color: inherit; }
#nav.solid .ih-links > a.ih-acct:hover,
#nav.solid .ih-links > a.ih-cart:hover { background: rgba(11,27,43,.06); }
#nav .ih-links > a.ih-acct > .ih-nav-icon,
#nav .ih-links > a.ih-cart > .ih-nav-icon {
  display: block; width: 24px; height: 24px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.6;
}
#nav .ih-links > a.ih-cart > .ih-cart-badge {
  position: absolute; top: 3px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--iw-accent, var(--accent, #2f7fae)); color: #fff;
  font: 700 11px/18px var(--iw-type); letter-spacing: 0; text-align: center;
  font-variant-numeric: tabular-nums; box-shadow: 0 0 0 2px rgba(255,255,255,.7);
}
#nav.solid .ih-cart-badge { box-shadow: 0 0 0 2px #fff; }
#nav .ih-cart-badge[hidden] { display: none; }
@media (max-width: 820px) {
  #nav .ih-links > a.ih-acct, #nav .ih-links > a.ih-cart { width: 44px; min-width: 44px; padding: 0; }
}
@media (max-width: 370px) {
  #nav .ih-links > a.ih-acct, #nav .ih-links > a.ih-cart { width: 44px; min-width: 44px; padding: 0; }
}

body.iw-cart-locked { overflow: hidden; }

.iw-cart-drawer {
  position: fixed; inset: 0; z-index: 130; visibility: hidden; pointer-events: none;
  --iw-drawer-ease: var(--ease, cubic-bezier(.22,.8,.24,1));
}
.iw-cart-drawer.is-open { visibility: visible; pointer-events: auto; }
.iw-cart-drawer.is-closing { visibility: visible; pointer-events: none; }
.iw-cart-overlay {
  position: absolute; inset: 0; background: rgba(11,27,43,.46);
  opacity: 0; transition: opacity 280ms var(--iw-drawer-ease);
}
.iw-cart-drawer.is-open .iw-cart-overlay { opacity: 1; }
.iw-cart-panel {
  position: absolute; top: 0; right: 0; display: flex; flex-direction: column;
  width: min(420px, 100%); height: 100dvh; max-height: 100dvh;
  background: #fff; color: var(--ink, #0b1b2b); box-shadow: -24px 0 70px rgba(11,27,43,.22);
  transform: translateX(100%); transition: transform 280ms var(--iw-drawer-ease);
  overscroll-behavior: contain;
}
.iw-cart-drawer.is-open .iw-cart-panel { transform: translateX(0); }
.iw-cart-head {
  flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 18px 18px 14px 22px; border-bottom: 1px solid var(--line, #dfe7ee);
}
.iw-cart-head h2 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; color: var(--ink, #0b1b2b); }
.iw-cart-close {
  appearance: none; display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: transparent; color: var(--ink, #0b1b2b); cursor: pointer;
}
.iw-cart-close:hover { background: var(--ice, #eef4f8); }
.iw-cart-close svg { width: 22px; height: 22px; display: block; }
.iw-cart-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 22px 28px; overscroll-behavior: contain; }
.iw-cart-drawer [data-cart-view] { display: block !important; }
.iw-cart-drawer .cart-items { display: block; }
.iw-cart-drawer .cart-item {
  display: grid; grid-template-columns: 80px minmax(0,1fr); grid-auto-rows: auto; gap: 1px 14px;
  margin: 0; padding: 16px 0; border: 0; border-bottom: 1px solid var(--line, #dfe7ee); border-radius: 0; min-width: 0;
}
.iw-cart-drawer .cart-item > * { grid-column: 2; min-width: 0; }
.iw-cart-drawer .cart-item > img.iw-cart-thumb {
  grid-column: 1; grid-row: 1 / span 5; align-self: start; width: 80px; height: 80px;
  object-fit: contain; background: var(--ice, #eef4f8); border-radius: 12px; padding: 6px;
}
.iw-cart-drawer .cart-item h2 { grid-row: 1; margin: 0; font-size: 15px; line-height: 1.35; font-weight: 600; }
.iw-cart-drawer .cart-item h2 a { color: var(--ink, #0b1b2b); text-decoration: none; }
.iw-cart-drawer .cart-item p { margin: 0; font-size: 13px; line-height: 1.45; color: var(--ink-2, #46596c); }
.iw-cart-drawer .cart-item p:nth-of-type(1) { grid-row: 2; }
.iw-cart-drawer .cart-item p:nth-of-type(2) { grid-row: 3; align-self: end; }
.iw-cart-drawer .cart-item strong {
  grid-row: 3; justify-self: end; align-self: end; margin: 0;
  font-size: 13px; line-height: 1.45; font-weight: 400; color: var(--ink-2, #46596c);
}
.iw-cart-drawer .cart-quantity-controls { grid-row: 4; display: flex; flex-wrap: nowrap; align-items: center; gap: 0; margin: 9px 0 2px; }
.iw-cart-drawer .cart-quantity-controls label { display: flex; align-items: center; order: 2; margin: 0; }
.iw-cart-drawer .iw-vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.iw-cart-drawer .cart-quantity-controls button {
  width: 32px; min-width: 32px; height: 32px; min-height: 32px; padding: 0;
  border: 1px solid var(--line, #dfe7ee); background: #fff; color: var(--ink, #0b1b2b);
  font: 500 16px/1 inherit; cursor: pointer;
}
.iw-cart-drawer .cart-quantity-controls button[data-cart-change="-1"] { order: 1; border-radius: 999px 0 0 999px; }
.iw-cart-drawer .cart-quantity-controls button[data-cart-change="1"] { order: 3; border-radius: 0 999px 999px 0; }
.iw-cart-drawer .cart-quantity-controls input {
  width: 36px; height: 32px; min-height: 32px; padding: 0 2px; border: 1px solid var(--line, #dfe7ee);
  border-inline: 0; border-radius: 0; text-align: center; font: 500 13px/1 inherit;
  color: var(--ink, #0b1b2b); background: #fff; appearance: textfield;
}
.iw-cart-drawer .cart-quantity-controls input::-webkit-inner-spin-button,
.iw-cart-drawer .cart-quantity-controls input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.iw-cart-drawer .cart-quantity-controls button[data-cart-remove] {
  order: 4; width: auto; min-width: 0; height: 32px; min-height: 32px; margin-left: auto; padding: 0 0 0 12px;
  border: 0; background: none; color: var(--ink-2, #46596c); font-size: 13px; font-weight: 400;
  text-decoration: underline; text-underline-offset: 2px;
}
.iw-cart-drawer .cart-quantity-controls button:disabled { opacity: .45; cursor: default; }
.iw-cart-drawer .cart-empty { border: 0; padding: 28px 4px; margin: 0; }
.iw-cart-drawer .cart-empty h2 { margin: 0 0 8px; font-size: 19px; }
.iw-cart-drawer .cart-empty p { margin: 0 0 16px; font-size: 13.5px; line-height: 1.55; color: var(--ink-2, #46596c); }
.iw-cart-drawer .cart-empty a.button { display: inline-flex; min-height: 44px; align-items: center; padding: 0 18px; border-radius: 999px; background: var(--ink, #0b1b2b); color: #fff; text-decoration: none; font-size: 13.5px; font-weight: 600; }

/* The drawer is at most 420px wide even on a desktop. Its recommendations
   use compact rows rather than the full cart page's four-column grid. */
.iw-cart-drawer .cart-empty-grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
.iw-cart-drawer .cart-empty-card {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 14px;
  padding: 12px; text-align: left; align-items: start;
}
.iw-cart-drawer .cart-empty-card > a {
  grid-column: 1; grid-row: 1 / span 3; width: 64px; height: 64px; margin: 0;
}
.iw-cart-drawer .cart-empty-card h3 { grid-column: 2; margin: 0; overflow-wrap: anywhere; }
.iw-cart-drawer .cart-empty-card .cart-empty-price { grid-column: 2; margin: 0 0 4px; }
.iw-cart-drawer .cart-empty-card .cart-empty-add {
  grid-column: 2; justify-self: start; min-width: 112px; min-height: 44px;
  width: auto; margin-top: 0; padding: 10px 14px; white-space: nowrap;
  font-family: var(--iw-type, sans-serif); font-size: 14px; line-height: 1.2;
}

.iw-cart-flash { flex: none; padding: 0 22px; }
.iw-cart-flash[hidden], .iw-cart-flash:empty { display: none; }
#iw-cart-drawer .iw-cart-flash .commerce-notice {
  width: auto !important; max-width: none !important; margin: 12px 0 0 !important;
  padding: 9px 12px 9px 32px !important; position: relative; font-size: 13px !important; line-height: 1.45 !important;
  color: var(--ink, #0b1b2b) !important; background: var(--ice, #eef4f8) !important;
  border: 0 !important; border-radius: 10px !important; opacity: 1; transition: opacity .22s ease, margin .22s ease;
}
#iw-cart-drawer .iw-cart-flash .commerce-notice::before {
  content: "✓"; position: absolute; left: 12px; top: 8px; font-size: 14px; font-weight: 700; color: var(--accent, #2f7fae);
}
#iw-cart-drawer .iw-cart-flash .commerce-notice.error {
  padding: 10px 12px !important; color: #a33131 !important; background: #fff6f6 !important;
  border-left: 3px solid #b74343 !important; border-radius: 8px !important;
}
#iw-cart-drawer .iw-cart-flash .commerce-notice.error::before { content: "!"; left: 9px; color: #b74343; }
#iw-cart-drawer .iw-cart-flash.is-hiding .commerce-notice { opacity: 0; margin-top: 0 !important; }
#iw-cart-drawer .iw-cart-flash .cart-recovery { display: none; margin: 6px 0 0; }
#iw-cart-drawer .iw-cart-flash .commerce-notice.error + .cart-recovery { display: block; }
#iw-cart-drawer .iw-cart-flash .cart-recovery > summary { font-size: 12.5px; color: var(--ink-2, #46596c); cursor: pointer; }
#iw-cart-drawer .iw-cart-flash .cart-recovery .cart-retry { font-size: 12.5px; color: var(--ink-2, #46596c); }
#iw-cart-drawer .iw-cart-scroll .commerce-notice,
#iw-cart-drawer .iw-cart-scroll .cart-recovery { display: none !important; }

.iw-cart-pair { padding: 16px 0 4px; border-top: 1px solid var(--line, #dfe7ee); }
.iw-cart-pair h3 {
  margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-2, #46596c);
}
.iw-cart-pair-card {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: var(--ice, #eef4f8); border-radius: 16px;
}
.iw-cart-pair-card img { width: 54px; height: 54px; object-fit: contain; flex: none; }
.iw-cart-pair-copy { min-width: 0; display: grid; gap: 2px; }
.iw-cart-pair-name { margin: 0; font-size: 13px; font-weight: 600; line-height: 1.35; color: var(--ink, #0b1b2b); }
.iw-cart-pair-price { margin: 0; font-size: 12.5px; color: var(--ink-2, #46596c); }
.iw-cart-pair-add {
  flex: none; margin-left: auto; min-height: 44px; padding: 0 18px; border: 0; border-radius: 999px;
  background: var(--ink, #0b1b2b); color: #fff; font: 600 13px/1 inherit; cursor: pointer;
}
.iw-cart-pair-add:hover { background: var(--deep, #0f2238); }

.iw-cart-trust {
  display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 14px;
  padding: 16px 0 6px; border-top: 1px solid var(--line, #dfe7ee);
}
.iw-cart-trust span {
  display: flex; align-items: flex-start; gap: 7px; min-width: 0;
  font-size: 13px; line-height: 1.45; color: var(--ink-2, #46596c); white-space: normal; overflow-wrap: anywhere;
}
.iw-cart-trust svg { flex: none; width: 18px; height: 18px; margin-top: 1px; color: var(--accent, #2f7fae); }

.iw-cart-foot { flex: none; position: relative; z-index: 1; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line, #dfe7ee); background: #fff; }
.iw-cart-foot:empty { display: none; }
#iw-cart-drawer .iw-cart-foot .cart-summary { margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: transparent !important; box-shadow: none !important; }
#iw-cart-drawer .iw-cart-foot .cart-summary h2 { display: none; }
#iw-cart-drawer .iw-cart-foot .cart-summary p:not(.cart-total) { display: none; }
.iw-cart-foot .cart-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 0 0 12px; font-size: 14px; line-height: 1.3; font-weight: 600; color: var(--ink, #0b1b2b);
}
.iw-cart-foot .cart-total strong { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
#iw-cart-drawer .iw-cart-foot .cart-summary a[data-checkout-link] {
  display: flex; align-items: center; justify-content: center; min-height: 52px;
  margin: 0; padding: 0 18px; border-radius: 12px;
  background: var(--ink, #0b1b2b); color: #fff; text-align: center; text-decoration: none;
  font-size: 15px; font-weight: 600;
}
#iw-cart-drawer .iw-cart-foot .cart-summary a[data-checkout-link]:hover { background: var(--deep, #0f2238); }
#iw-cart-drawer .iw-cart-foot .cart-summary a[data-checkout-link][aria-disabled="true"] { opacity: .55; pointer-events: none; }
#iw-cart-drawer .iw-cart-foot .cart-summary [data-cart-clear] { display: none; }
.iw-cart-foot .iw-cart-view-link {
  display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 2px;
  color: var(--ink-2, #46596c); font-size: 13.5px; font-weight: 500; text-decoration: underline;
}

@media (max-width: 480px) {
  .iw-cart-panel { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .iw-cart-overlay, .iw-cart-panel { transition: none !important; }
}
