.yun-overlay-open {
  overflow: hidden;
}

.yun-cart-drawer {
  --yun-cart-ivory: var(--yun-ivory, var(--yun-color-background));
  --yun-cart-paper: var(--yun-paper, var(--yun-color-surface));
  --yun-cart-ink: var(--yun-ink, var(--yun-color-text));
  --yun-cart-muted: var(--yun-muted, var(--yun-color-muted));
  --yun-cart-link: var(--yun-color-link);
  --yun-cart-line: var(--yun-line, var(--yun-color-line));
  --yun-cart-line-light: var(--yun-line-light, var(--yun-color-line-light));
  position: fixed;
  inset: 0;
  z-index: 60;
  color: var(--yun-cart-ink);
  font-family: var(--yun-font-sans);
  font-weight: 300;
  line-height: normal;
  pointer-events: none;
}

.yun-cart-drawer,
.yun-cart-drawer *,
.yun-cart-drawer *::before,
.yun-cart-drawer *::after {
  box-sizing: border-box;
}

.yun-cart-drawer a {
  color: inherit;
  text-decoration: none;
}

.yun-cart-drawer button {
  padding: 0;
  border: 0;
  border-radius: 0;
  color: inherit;
  background: none;
  font: inherit;
  cursor: pointer;
}

.yun-cart-drawer h2,
.yun-cart-drawer p {
  margin: 0;
}

.yun-cart-drawer img,
.yun-cart-drawer svg {
  display: block;
  max-width: 100%;
}

.yun-cart-drawer :focus-visible {
  outline: 2px solid var(--yun-cart-ink);
  outline-offset: 2px;
}

.yun-cart-drawer.is-open {
  pointer-events: auto;
}

.yun-cart-drawer__backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(17, 17, 17, 0.44) !important;
  opacity: 0;
  transition: opacity 500ms ease;
}

.yun-cart-drawer.is-open .yun-cart-drawer__backdrop {
  opacity: 1;
}

.yun-cart-drawer__panel {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  color: var(--yun-cart-ink);
  background: var(--yun-cart-ivory);
  transform: translateX(100%);
  transition: transform 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

.yun-cart-drawer.is-open .yun-cart-drawer__panel {
  transform: translateX(0);
}

.yun-cart-drawer__header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  padding: 0 22px;
  border-bottom: 1px solid var(--yun-cart-line);
}

.yun-cart-drawer__header h2 {
  color: var(--yun-cart-ink);
  font-family: var(--yun-font-sans);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.yun-cart-drawer__header h2 > span {
  color: var(--yun-cart-muted);
}

/* An empty cart's title reads "Cart": the count appears only with items. */
.yun-cart-drawer__header h2 > span:has([data-yun-cart-count]:not(.has-items)) {
  display: none;
}

.yun-cart-drawer__header button {
  display: flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
}

.yun-cart-drawer__header svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.2;
}

.yun-cart-drawer__body {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
}

.yun-cart-drawer__empty {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 28px;
  text-align: center;
}

.yun-cart-drawer__empty p {
  color: var(--yun-cart-ink);
  font-family: var(--yun-font-serif);
  font-size: 27px;
  line-height: 1.08;
}

.yun-cart-drawer__empty span {
  margin-top: 10px;
  color: var(--yun-cart-muted);
  font-size: 12px;
}

.yun-cart-drawer__empty button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 22px;
  padding: 0 6px;
  color: var(--yun-cart-link);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.yun-cart-drawer__empty button:focus-visible {
  outline-color: var(--yun-cart-link);
}

.yun-cart-drawer__items {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 0 22px;
}

.yun-cart-item {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 13px;
  padding: 20px 0;
  border-bottom: 1px solid var(--yun-cart-line-light);
}

.yun-cart-item__image {
  display: block;
  width: 52px;
  height: 52px;
  overflow: hidden;
  background: var(--yun-cart-paper);
}

.yun-cart-item__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.yun-cart-item__copy {
  min-width: 0;
}

.yun-cart-item__name {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--yun-font-serif);
  font-size: 13px;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.yun-cart-item__copy span {
  display: block;
  margin-top: 4px;
  color: var(--yun-cart-muted);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.yun-cart-item__total {
  text-align: right;
}

.yun-cart-item__total > span {
  display: block;
  font-family: var(--yun-font-sans);
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.yun-cart-item__total a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  margin-top: 0;
  color: var(--yun-cart-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.yun-cart-drawer__summary {
  flex: 0 0 auto;
  padding: 20px 22px;
  border-top: 1px solid var(--yun-cart-line);
}

.yun-cart-drawer__total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 18px;
}

.yun-cart-drawer__total > span {
  color: var(--yun-cart-muted);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.yun-cart-drawer__total strong {
  font-family: var(--yun-font-sans);
  font-size: 18px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* The site's primary action: the homepage button's shape and type as an ink
   outline. The drawer prefix outranks the homepage's ".yun-home a" colour. */
.yun-cart-drawer .yun-cart-drawer__checkout {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  border: 1px solid var(--yun-cart-ink);
  border-radius: 2px;
  color: var(--yun-cart-ink);
  background: transparent;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.yun-cart-drawer .yun-cart-drawer__checkout:hover {
  color: #ffffff;
  background: var(--yun-cart-ink);
}

.yun-cart-drawer__summary p {
  margin-top: 13px;
  color: var(--yun-cart-muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.yun-cart-noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 80;
  padding: 10px 14px;
  border-radius: var(--yun-button-radius);
  color: #ffffff !important;
  background: var(--yun-ink, #111111);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

@media (min-width: 760px) {
  .yun-cart-drawer__panel {
    width: 400px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .yun-cart-drawer__backdrop,
  .yun-cart-drawer__panel,
  .yun-cart-drawer .yun-cart-drawer__checkout {
    transition: none;
  }
}
