/* Store chrome: header cart icon, slide-out cart drawer, "added to your cart" card (HORIZON-20261026-031).
   Ported from Horizon Core hp-commerce-chrome.css into this site's tokens. On every page with the shared header,
   so every selector is .hz-cart-* / .hz-added-* and nothing else is touched. */

/* ── Header cart icon ── */
.hz-cart-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: var(--hz-text);
  text-decoration: none;
}
.hz-cart-trigger:hover { color: var(--hz-primary-light); }
.hz-cart-trigger:focus-visible { outline: 2px solid var(--hz-primary); outline-offset: 2px; border-radius: var(--hz-radius); }
.hz-cart-trigger__count {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--hz-radius-full);
  background: var(--hz-primary);
  color: #050505;
  font-family: var(--hz-font-body);
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.hz-cart-trigger__count.is-zero { display: none; }

/* ── Drawer ── */
.hz-cart-drawer { position: fixed; inset: 0; z-index: 10000; pointer-events: none; visibility: hidden; }
.hz-cart-drawer.is-open { pointer-events: auto; visibility: visible; }
.hz-cart-drawer__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity var(--hz-transition); }
.hz-cart-drawer.is-open .hz-cart-drawer__scrim { opacity: 1; }
/* The panel prints before the scrim and both are absolute, so it needs its own layer (Core G1 R3). */
.hz-cart-drawer__panel {
  position: absolute;
  z-index: 1;
  top: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  height: 100%;
  background: var(--hz-bg-surface);
  border-left: 1px solid var(--hz-border);
  box-shadow: var(--hz-shadow-lg);
  color: var(--hz-text);
  font-family: var(--hz-font-body);
  transform: translateX(100%);
  transition: transform 0.28s ease;
}
.hz-cart-drawer.is-open .hz-cart-drawer__panel { transform: translateX(0); }
.hz-cart-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--hz-border);
}
.hz-cart-drawer__title { margin: 0; font-family: var(--hz-font-display); font-size: var(--hz-text-2xl); font-weight: 400; color: var(--hz-text); }
.hz-cart-drawer__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--hz-radius);
  background: none;
  color: var(--hz-text-muted);
  cursor: pointer;
}
.hz-cart-drawer__close:hover { color: var(--hz-text); background: var(--hz-bg-raised); }
/* The inner node is replaced wholesale by fragments, so it owns the scroll region. */
.hz-cart-drawer__inner { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; overflow-y: auto; }
.hz-cart-drawer.is-busy .hz-cart-drawer__inner { opacity: 0.5; pointer-events: none; }
.hz-cart-drawer__items { flex: 1 1 auto; margin: 0; padding: 8px 24px; list-style: none; }
.hz-cart-drawer__item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hz-border);
}
.hz-cart-drawer__item:last-child { border-bottom: 0; }
.hz-cart-drawer__thumb { display: block; width: 72px; height: 72px; overflow: hidden; border-radius: var(--hz-radius); background: var(--hz-bg-raised); }
.hz-cart-drawer__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; } /* the screenshot's heading is on the left */
.hz-cart-drawer__thumb .hz-store-tile span { font-size: 11px; }
.hz-cart-drawer__detail { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.hz-cart-drawer__name, .hz-cart-drawer__name a { color: var(--hz-text); font-size: var(--hz-text-sm); font-weight: 600; line-height: 1.4; text-decoration: none; }
.hz-cart-drawer__name a:hover { color: var(--hz-primary-light); }
.hz-cart-drawer__price { color: var(--hz-text-muted); font-size: var(--hz-text-sm); line-height: 1.5; overflow-wrap: anywhere; }
.hz-cart-drawer__remove {
  align-self: flex-start;
  min-height: 44px;
  margin: -6px 0 -12px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--hz-text-muted);
  font: inherit;
  font-size: var(--hz-text-xs);
  letter-spacing: 0.08em;
  text-decoration: underline;
  text-transform: uppercase;
  text-underline-offset: 3px;
  cursor: pointer;
}
.hz-cart-drawer__remove:hover { color: var(--hz-text); background: none; }
.hz-cart-drawer__footer { position: sticky; bottom: 0; padding: 20px 24px 24px; border-top: 1px solid var(--hz-border); background: var(--hz-bg-surface); }
.hz-cart-drawer__total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; font-size: var(--hz-text-base); }
.hz-cart-drawer__note { margin: 0 0 16px; color: var(--hz-text-muted); font-size: var(--hz-text-xs); line-height: 1.55; }
.hz-cart-drawer__checkout { width: 100%; }
.hz-cart-drawer__viewcart { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 4px; color: var(--hz-text-muted); font-size: var(--hz-text-sm); text-decoration: underline; text-underline-offset: 3px; }
.hz-cart-drawer__viewcart:hover { color: var(--hz-text); }
.hz-cart-drawer__empty { display: flex; flex: 1 1 auto; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 48px 24px; color: var(--hz-text-muted); text-align: center; }
.hz-cart-drawer__empty p { margin: 0; font-size: var(--hz-text-sm); }
body.hz-cart-drawer-open { overflow: hidden; }

/* Buttons the drawer and the store share (the store sheet is not loaded on marketing pages). */
.hz-store-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--hz-radius);
  font-family: var(--hz-font-body);
  font-size: var(--hz-text-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--hz-transition), color var(--hz-transition), border-color var(--hz-transition);
}
.hz-store-btn--primary { background: var(--hz-primary); color: #050505; }
.hz-store-btn--primary:hover, .hz-store-btn--primary:focus { background: var(--hz-primary-light); color: #050505; }
.hz-store-btn--ghost { border-color: var(--hz-border); background: transparent; color: var(--hz-text); }
.hz-store-btn--ghost:hover, .hz-store-btn--ghost:focus { border-color: var(--hz-text-muted); color: var(--hz-text); }
.hz-store-btn:focus-visible { outline: 2px solid var(--hz-primary-light); outline-offset: 3px; }
.hz-store-btn.loading { opacity: 0.6; pointer-events: none; }
.hz-store-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 12px;
  background: radial-gradient(120% 90% at 20% 10%, rgba(16, 171, 242, 0.22), transparent 60%), linear-gradient(160deg, #141414, #070707);
  color: var(--hz-text);
  text-align: center;
}
.hz-store-tile span { font-family: var(--hz-font-display); font-size: clamp(1.1rem, 0.9rem + 1vw, 1.6rem); line-height: 1.15; }

/* ── "Added to your cart" card (Core hpAddedCard) ── */
.hz-added-host {
  position: fixed;
  z-index: 9990;
  top: calc(var(--hz-header-h, 72px) + 16px);
  right: 24px;
  width: 380px;
  max-width: calc(100% - 32px);
}
.hz-added-host.is-leaving { opacity: 0; transform: translateY(-8px); transition: opacity 0.4s ease, transform 0.4s ease; pointer-events: none; }
.hz-added {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 20px;
  border: 1px solid var(--hz-border);
  border-radius: var(--hz-radius-lg);
  background: var(--hz-bg-surface);
  box-shadow: var(--hz-shadow-lg);
  color: var(--hz-text);
  font-family: var(--hz-font-body);
  animation: hz-added-in 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}
@keyframes hz-added-in { from { opacity: 0; transform: translateY(-12px) scale(0.98); } to { opacity: 1; transform: none; } }
.hz-added__head { display: flex; align-items: center; gap: 12px; margin: -8px -12px 10px 0; }
.hz-added__check { flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--hz-primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23050505' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat; }
.hz-added__title { flex: 1 1 auto; font-size: var(--hz-text-sm); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hz-added__close { flex: 0 0 44px; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--hz-radius-full); background: transparent; color: var(--hz-text-muted); font-size: 1.5rem; line-height: 1; cursor: pointer; }
.hz-added__close:hover { background: var(--hz-bg-raised); color: var(--hz-text); }
.hz-added__item { display: flex; align-items: center; gap: 16px; padding: 12px 0 16px; border-top: 1px solid var(--hz-border); }
.hz-added__thumb { flex: 0 0 64px; height: 64px; overflow: hidden; border: 1px solid var(--hz-border); border-radius: var(--hz-radius); background: var(--hz-bg-raised); }
.hz-added__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.hz-added__name { margin: 0; font-size: var(--hz-text-sm); font-weight: 600; line-height: 1.4; }
.hz-added__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hz-added__actions .hz-store-btn { min-height: 44px; padding: 0 12px; }
.hz-added__timer { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--hz-primary); transform-origin: left; transform: scaleX(0); }
.hz-added.is-counting .hz-added__timer { animation: hz-added-count 7s linear forwards; }
@keyframes hz-added-count { from { transform: scaleX(1); } to { transform: scaleX(0); } }
/* WooCommerce's own "added" message stays in the DOM, hidden, as the no-JS fallback. */
.woocommerce-message.hz-added-source { display: none !important; }

@media (max-width: 520px) {
  .hz-added-host { top: auto; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) {
  .hz-cart-drawer__panel, .hz-cart-drawer__scrim { transition: none; }
  .hz-added { animation: none; }
}
