/* Uses the accepted shared-header/checkout font. No catalog or checkout styling. */
html.dp-header-active .dp-mini-heading { display: none; }
html.dp-header-active .cart-content {
  --mc-ink: #181419;
  --mc-muted: #6b6570;
  --mc-line: #ded8e1;
  --mc-pink: #ff3c8f;
  color: var(--mc-ink);
  font-family: "DP Header Space", Arial, sans-serif;
  text-align: left;
}
html.dp-header-active .dp-header #cart-content.cart-content {
  width: 420px;
  max-width: calc(100vw - 32px);
  padding: 0;
  border: 1px solid #ded8e1;
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 16px 42px #18141924;
}
html.dp-header-active .cart-content > ul {
  display: flex;
  flex-direction: column;
  max-height: min(720px, calc(100vh - 128px));
  max-height: min(720px, calc(100dvh - 128px));
  padding: 0;
  margin: 0;
  background: #fff;
  border: 0;
  border-radius: inherit;
  list-style: none;
}
html.dp-header-active .cart-content .dp-mini-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: none;
  padding: 12px 16px 12px 22px;
  border-bottom: 1px solid var(--mc-line);
  background: #fff;
}
html.dp-header-active .dp-mini-heading h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--mc-ink);
  font: 700 20px/1.3 "DP Header Space", Arial, sans-serif;
  text-transform: none;
  letter-spacing: -.4px;
}
html.dp-header-active .dp-mini-heading h2 span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  padding: 0 7px;
  border-radius: 20px;
  background: #f5f0ff;
  font: 600 13px/1 "DP Header Space", Arial, sans-serif;
}
html.dp-header-active .dp-mini-close,
html.dp-header-active .cart-content .cart-products td:nth-child(5) button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  color: #6b6570 !important;
  box-shadow: none !important;
  cursor: pointer;
}
html.dp-header-active .dp-mini-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
html.dp-header-active .dp-mini-close:hover,
html.dp-header-active .cart-content .cart-products td:nth-child(5) button:hover { color: #b42346 !important; background: #fff1f4 !important; }
html.dp-header-active .cart-content .cart-products {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 22px !important;
  margin: 0;
  background: #fff;
  scrollbar-width: thin;
}
html.dp-header-active .cart-content .cart-products table,
html.dp-header-active .cart-content .cart-products tbody { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; }
html.dp-header-active .cart-content .cart-products tr {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 44px;
  grid-template-rows: auto auto;
  gap: 4px 14px;
  position: relative;
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid #eee9f0;
  background: none;
}
html.dp-header-active .cart-content .cart-products tr:last-child { border-bottom: 0; }
html.dp-header-active .cart-content .cart-products td {
  display: block;
  width: auto !important;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--mc-ink);
  white-space: normal;
  text-align: left;
  font: 400 13px/1.5 "DP Header Space", Arial, sans-serif;
  overflow-wrap: anywhere;
}
html.dp-header-active .cart-content .cart-products td:nth-child(1) { grid-column: 1; grid-row: 1 / 3; }
html.dp-header-active .cart-content .cart-products td:nth-child(1) a { display: block; width: 80px; height: 80px; border-radius: 12px; overflow: hidden; background: #f5f0ff; }
html.dp-header-active .cart-content .cart-products td:nth-child(1) img { display: block; width: 100% !important; height: 100% !important; max-width: none; object-fit: cover; border: 0; padding: 0; }
html.dp-header-active .cart-content .cart-products td:nth-child(2) { grid-column: 2; grid-row: 1; }
html.dp-header-active .cart-content .cart-products td:nth-child(2) > a { display: inline-block; padding: 0 0 5px; color: var(--mc-ink) !important; font: 600 16px/1.35 "DP Header Space", Arial, sans-serif; letter-spacing: -.2px; text-decoration: none; }
html.dp-header-active .cart-content .cart-products td:nth-child(2) > a:hover { color: #c82551 !important; text-decoration: underline; text-underline-offset: 3px; }
html.dp-header-active .cart-content .cart-products td:nth-child(2) span,
html.dp-header-active .cart-content .cart-products td:nth-child(2) small { color: var(--mc-muted); font: 400 12px/1.5 "DP Header Space", Arial, sans-serif; }
html.dp-header-active .cart-content .cart-products td:nth-child(2) span::before { content: none; }
html.dp-header-active .cart-content .cart-products td:nth-child(3) { grid-column: 2; grid-row: 2; align-self: end; padding-top: 5px !important; color: var(--mc-muted); font-size: 13px; }
html.dp-header-active .cart-content .cart-products td:nth-child(4) { grid-column: 3; grid-row: 2; align-self: end; justify-self: end; width: max-content !important; font-weight: 700; font-size: 15px; white-space: nowrap; }
html.dp-header-active .cart-content .cart-products td:nth-child(5) { grid-column: 3; grid-row: 1; align-self: start; justify-self: end; margin: -10px -10px 0 0; }
html.dp-header-active .cart-content .cart-products td:nth-child(5) i::before { font-size: 16px; }
html.dp-header-active .cart-content .cart-totals {
  position: static !important;
  flex: none;
  width: 100%;
  padding: 18px 22px 22px;
  margin: 0;
  background: #f5f0ff;
  border-top: 1px solid var(--mc-line);
}
html.dp-header-active .cart-content .cart-totals > div { padding: 0; background: none; border: 0; }
html.dp-header-active .cart-content .cart-totals table { width: 100%; padding: 0; margin: 0 0 16px; border: 0; background: none; }
html.dp-header-active .cart-content .cart-totals td { padding: 5px 0 !important; border: 0 !important; background: transparent !important; color: var(--mc-muted); font: 400 14px/1.45 "DP Header Space", Arial, sans-serif; }
html.dp-header-active .cart-content .cart-totals td:first-child { text-align: left; }
html.dp-header-active .cart-content .cart-totals td:last-child { text-align: right; font-weight: 600; white-space: nowrap; }
html.dp-header-active .cart-content .cart-totals tr:last-child td { padding-top: 12px !important; color: var(--mc-ink); font-weight: 700; font-size: 18px; }
html.dp-header-active .cart-content .cart-totals tr:last-child td:last-child { font-size: 24px; letter-spacing: -.6px; }
html.dp-header-active .cart-content .cart-buttons { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; background: transparent; }
html.dp-header-active .cart-content .cart-buttons .btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 10px 16px !important;
  margin: 0;
  border: 1px solid #cfc6d7 !important;
  border-radius: 11px;
  background: #fff !important;
  color: var(--mc-ink) !important;
  font: 600 15px/1.3 "DP Header Space", Arial, sans-serif !important;
  text-transform: none !important;
  letter-spacing: 0;
  text-decoration: none;
  box-shadow: none;
}
html.dp-header-active .cart-content .cart-buttons .btn span { font: inherit !important; color: inherit !important; }
html.dp-header-active .cart-content .cart-buttons .btn-checkout { order: -1; min-height: 54px; background: var(--mc-pink) !important; border: 2px solid var(--mc-ink) !important; box-shadow: 0 3px 0 var(--mc-ink); font-size: 17px !important; margin-bottom: 3px; }
html.dp-header-active .cart-content .cart-buttons .btn-checkout:hover { background: #ed2d7b !important; }
html.dp-header-active .cart-content .cart-buttons .btn-cart:hover { background: #fbf9fc !important; border-color: #a99bad !important; }
html.dp-header-active .cart-content .btn-cart i { display: none; }
html.dp-header-active .cart-content .btn-checkout i { display: none; }
html.dp-header-active .cart-content .btn-checkout::after { content: ""; width: 16px; height: 16px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15m-6-6 6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 12h15m-6-6 6 6-6 6' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/contain no-repeat; }
html.dp-header-active .dp-header #cart-content .cart-empty,
html.dp-header-active .mobile-cart-content-container .cart-empty { padding: 48px 28px; margin: 0; color: var(--mc-muted); background: #fff; font: 400 16px/1.6 "DP Header Space", Arial, sans-serif; text-align: center; }
html.dp-header-active .cart-content :focus-visible { outline: 2px solid #c82551 !important; outline-offset: 3px; }
/* Native Journal moves the same UL here. Totals take real space, never cover rows. */
html.dp-header-active.mobile-header-active .mobile-cart-content-container { display: flex; flex-direction: column; width: min(420px, 100vw) !important; max-width: 100vw; height: 100%; height: 100dvh; background: #fff; }
html.dp-header-active .mobile-cart-content-container > .mobile-wrapper-header { display: flex; flex: none; align-items: center; justify-content: space-between; height: 68px; padding: 10px 14px 10px 22px; border-bottom: 1px solid #ded8e1; background: #181419; color: #fff; }
html.dp-header-active .mobile-cart-content-container > .mobile-wrapper-header > span { padding: 0; font: 600 19px/1.3 "DP Header Space", Arial, sans-serif; text-transform: none; }
html.dp-header-active .mobile-cart-content-container > .mobile-wrapper-header > .x { width: 44px; height: 44px; color: #fff; }
html.dp-header-active.mobile-header-active .mobile-cart-content-wrapper.cart-content { display: flex; flex-direction: column; flex: 1; min-height: 0; height: auto; padding: 0; overflow-y: auto; }
/* Shared header can move the empty native host alongside Journal's relocated UL. */
html.dp-header-active.mobile-header-active .mobile-cart-content-wrapper > #cart-content:empty { display: none; }
html.dp-header-active.mobile-header-active .mobile-cart-content-wrapper.cart-content > ul { flex: 1; min-height: 0; height: auto; max-height: none; border-radius: 0; }
html.dp-header-active .mobile-cart-content-wrapper .dp-mini-heading { display: none; }
html.dp-header-active.mobile-header-active .cart-content .cart-totals { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
@media (max-width: 359px) {
  html.dp-header-active .cart-content .cart-products { padding-inline: 16px !important; }
  html.dp-header-active .cart-content .cart-products tr { grid-template-columns: 64px minmax(0, 1fr) 38px; column-gap: 10px; }
  html.dp-header-active .cart-content .cart-products td:nth-child(1) a { width: 64px; height: 64px; }
  html.dp-header-active .cart-content .cart-products td:nth-child(2) > a { font-size: 15px; }
  html.dp-header-active .cart-content .cart-totals { padding-inline: 16px; }
}
@media (max-height: 540px) {
  html.dp-header-active .cart-content > ul { max-height: calc(100dvh - 112px); }
  html.dp-header-active.mobile-header-active .mobile-cart-content-wrapper.cart-content > ul { flex: 0 0 auto; min-height: 100%; }
  html.dp-header-active .cart-content .cart-products { flex: 1 0 auto; }
  html.dp-header-active .dp-header #cart-content > ul { overflow-y: auto; }
}

/* Add-to-cart success notice only; wishlist, compare and option errors stay native. */
html.dp-header-active .notification.notification-cart {
  box-sizing: border-box;
  width: 420px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: 16px;
  padding: 0;
  overflow-y: auto;
  border: 1px solid #ded8e1;
  border-radius: 18px;
  background: #fff;
  color: #181419;
  box-shadow: 0 16px 42px #18141924;
  font: 400 14px/1.5 "DP Header Space", Arial, sans-serif;
  text-align: left;
}
html.dp-header-active .notification-cart * { box-sizing: border-box; }
html.dp-header-active .notification-cart .notification-content {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  padding: 24px 52px 24px 22px;
  background: #fff;
}
html.dp-header-active .notification-cart .notification-content > img {
  display: block;
  flex: 0 0 80px;
  width: 80px !important;
  height: 80px !important;
  max-width: 80px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  object-fit: cover;
  background: #f5f0ff;
}
html.dp-header-active .notification-cart .notification-content > div { flex: 1; min-width: 0; }
html.dp-header-active .notification-cart .notification-title {
  margin: 0 0 8px;
  color: #181419;
  font: 600 18px/1.35 "DP Header Space", Arial, sans-serif;
  letter-spacing: -.3px;
  text-transform: none;
  overflow-wrap: anywhere;
}
html.dp-header-active .notification-cart .notification-text {
  color: #6b6570;
  font: 400 14px/1.5 "DP Header Space", Arial, sans-serif;
  overflow-wrap: anywhere;
}
html.dp-header-active .notification-cart .notification-text a { color: #c82551; text-decoration: underline; text-underline-offset: 3px; }
html.dp-header-active .notification-cart .notification-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 22px 22px;
  margin: 0;
  border: 0;
  border-top: 1px solid #ded8e1;
  background: #f5f0ff;
}
html.dp-header-active .notification-cart .notification-buttons > a {
  display: flex;
  flex: 1 1 130px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px !important;
  margin: 0;
  border: 1px solid #cfc6d7 !important;
  border-radius: 11px;
  background: #fff !important;
  color: #181419 !important;
  font: 600 15px/1.35 "DP Header Space", Arial, sans-serif !important;
  text-transform: none !important;
  text-align: center;
  letter-spacing: 0;
  text-decoration: none;
  white-space: normal;
  box-shadow: none;
}
html.dp-header-active .notification-cart .notification-buttons > .notification-checkout {
  border: 2px solid #181419 !important;
  background: #ff3c8f !important;
  box-shadow: 0 3px 0 #181419;
}
html.dp-header-active .notification-cart .notification-checkout:hover { background: #ed2d7b !important; }
html.dp-header-active .notification-cart .notification-view-cart:hover { background: #fbf9fc !important; border-color: #a99bad !important; }
html.dp-header-active .notification-cart .notification-view-cart::before { display: none; }
html.dp-header-active .notification-cart .notification-close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0 !important;
  margin: 0;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  color: #6b6570 !important;
  box-shadow: none;
}
html.dp-header-active .notification-cart .notification-close::before { font-size: 20px; }
html.dp-header-active .notification-cart .notification-close:hover { background: #fff1f4 !important; color: #b42346 !important; }
html.dp-header-active .notification-cart :focus-visible { outline: 2px solid #c82551 !important; outline-offset: 3px; }
@media (max-width: 430px) {
  html.dp-header-active .notification-cart .notification-content { gap: 12px; padding: 22px 48px 22px 18px; }
  html.dp-header-active .notification-cart .notification-content > img { flex-basis: 64px; width: 64px !important; height: 64px !important; }
  html.dp-header-active .notification-cart .notification-title { font-size: 17px; }
  html.dp-header-active .notification-cart .notification-text { font-size: 15px; }
  html.dp-header-active .notification-cart .notification-buttons { padding: 16px 18px 20px; }
}
@media (max-width: 359px) {
  html.dp-header-active .notification-cart .notification-buttons { flex-direction: column; }
  html.dp-header-active .notification-cart .notification-buttons > a { flex: none; width: 100%; }
  html.dp-header-active .notification-cart .notification-checkout { order: -1; margin-bottom: 3px; }
}
@media (prefers-reduced-motion: reduce) {
  /* Journal removes the dismissed notice on transitionend; keep that event. */
  html.dp-header-active .notification.notification-cart { animation: none; transition: opacity .01s linear; }
}
