/* Cart feedback never changes the header or product button dimensions. */
.ref8-header .ref8-header-catalog { position: relative; overflow: visible; }
.ref8-header .ref8-header-catalog > .catalog-header-count {
  position: absolute;
  top: -4px;
  right: -3px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  margin: 0;
  padding: 0 3px;
  border: 2px solid var(--color-white);
  border-radius: 999px;
  background: var(--color-action);
  color: var(--color-on-action);
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
  pointer-events: none;
}
.ref8-header [data-site-cart-count][hidden] { display: none !important; }

.catalog-add[data-cart-added="true"] {
  position: relative;
  background: var(--color-action);
  color: var(--color-on-action);
}
.catalog-add[data-cart-added="true"] > svg { visibility: hidden; }
.catalog-add[data-cart-added="true"]::after {
  content: "";
  position: absolute;
  top: 47%;
  left: 50%;
  width: 8px;
  height: 13px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
}

.catalog-feedback-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 90;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  width: min(360px, calc(100% - 32px));
  margin: 0;
  padding: 16px;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  background: var(--color-white);
  color: var(--color-ink);
  box-shadow: 0 8px 28px rgb(30 41 59 / .1);
  font-family: var(--font-ui);
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translate3d(0, 8px, 0);
  transition: opacity 200ms cubic-bezier(.22, 1, .36, 1), transform 200ms cubic-bezier(.22, 1, .36, 1), visibility 0s 200ms;
}
.catalog-feedback-toast.is-visible { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
@starting-style {
  .catalog-feedback-toast.is-visible { opacity: 0; transform: translate3d(0, 8px, 0); }
}
.catalog-feedback-toast[hidden] { display: none !important; }
.catalog-feedback-check {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 7px;
  border-radius: 50%;
  background: var(--color-action);
  color: var(--color-on-action);
}
.catalog-feedback-check > svg,
svg.catalog-feedback-check {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.catalog-feedback-check > svg { display: block; width: 18px; height: 18px; }
.catalog-feedback-copy { display: grid; gap: 4px; min-width: 0; }
.catalog-feedback-title { margin: 0; font-size: 15px; font-weight: 600; line-height: 1.4; }
.catalog-feedback-product {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.catalog-feedback-toast[data-kind="error"] .catalog-feedback-check {
  background: var(--color-error-surface);
  color: var(--color-error);
}

.catalog-cart-flight {
  position: fixed;
  z-index: 95;
  display: block;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 4px;
  border: 1px solid var(--color-line);
  border-radius: 10px;
  background: var(--color-white);
  object-fit: contain;
  object-position: center;
  box-shadow: 0 6px 18px rgb(30 41 59 / .08);
  transform-origin: center;
  pointer-events: none;
  will-change: transform, opacity;
}

[data-catalog-favorite] .catalog-icon { transition: fill 160ms ease, color 160ms ease; }

@media (max-width: 767px) {
  .catalog-feedback-toast {
    right: 16px;
    bottom: calc(88px + env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .catalog-cart-flight { display: none !important; }
  .catalog-feedback-toast,
  [data-catalog-favorite] .catalog-icon,
  .catalog-add[data-cart-added="true"],
  .ref8-header .ref8-header-catalog > .catalog-header-count { animation: none; transition: none; }
}
