dialog.cart-drawer {
  --cart-paper: #f8f7f3;
  --cart-ink: #171715;
  --cart-muted: #5e5b54;
  --cart-line: #dbd8d0;
  --cart-gutter: clamp(16px, 4vw, 28px);
  background: var(--cart-paper);
  color: var(--cart-ink);
  width: min(504px, 100%);
  height: 100dvh;
  max-height: 100dvh;
  padding: 0;
  overflow: hidden;
  border: 0;
  box-shadow: -16px 0 50px #0002;
}
.cart-drawer[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  animation: cart-drawer-in .46s cubic-bezier(.22,1,.36,1) both;
}
.cart-drawer::backdrop { background: #0808088c; backdrop-filter: blur(4px); }
.cart-drawer[open]::backdrop { animation: cart-shade-in .32s ease-out both; }
@keyframes cart-drawer-in { from { transform: translateX(100%); } to { transform: none; } }
@keyframes cart-shade-in { from { opacity: 0; } to { opacity: 1; } }
.cart-drawer [hidden] { display: none !important; }
.cart-drawer :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.cart-drawer .cart-scroll:focus-visible { outline-offset: -3px; }
.cart-drawer svg { display: block; width: 18px; height: 18px; flex: 0 0 auto; }

.cart-drawer .cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: calc(14px + env(safe-area-inset-top)) var(--cart-gutter) 14px;
  border-bottom: 1px solid #373737;
  background: #111;
  color: #fff;
}
.cart-heading-copy { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cart-brand { width: 48px; height: 44px; flex: 0 0 auto; }
.cart-brand .chrome-logo { width: 100%; height: 100%; }
.cart-brand img { width: 100%; height: 100%; object-fit: contain; }
.cart-drawer #cart-heading {
  margin: 0;
  font: 700 clamp(1.3rem, 4.7vw, 1.72rem)/1 "Chakra Petch", system-ui, sans-serif;
  letter-spacing: -.038em;
  text-transform: uppercase;
}
#bag-total-count {
  display: grid;
  place-items: center;
  min-width: 25px;
  height: 25px;
  padding-inline: 5px;
  border-radius: 20px;
  background: #303030;
  font-size: .75rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.cart-close, .cart-drawer .remove-line {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  color: inherit;
  transition: background-color .2s, border-color .2s;
}
.cart-close { border-color: #555; }
.cart-close:hover { background: #303030; border-color: #929292; }
.cart-drawer .remove-line:hover { background: #ebe8e0; }

.cart-scroll {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #b6b1a5 transparent;
  padding: 0 var(--cart-gutter) 22px;
}
.cart-line {
  display: grid;
  grid-template-columns: clamp(96px, 25vw, 136px) minmax(0, 1fr);
  align-items: start;
  gap: clamp(10px, 3vw, 17px);
  padding-block: 18px;
  border-bottom: 1px solid var(--cart-line);
}
.cart-line-photo { aspect-ratio: 4 / 5; background: #eceae4; }
.cart-line-photo img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.cart-line-verify {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 0;
  color: #6f2430;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-align: left;
  font-size: .75rem;
  font-weight: 700;
}
.cart-line-verify svg { width: 14px; height: 14px; }
.cart-line-copy { display: grid; gap: 6px; min-width: 0; }
.cart-line-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; }
.cart-line h3 { margin: 0; font-size: .9rem; line-height: 1.35; overflow-wrap: anywhere; }
.cart-line-spec { color: var(--cart-muted); margin: 0; font-size: .8rem; line-height: 1.45; }
.cart-line-spec b { color: var(--cart-ink); font-weight: 650; }
.cart-line-price {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cart-line-price small { color: var(--cart-muted); font-size: .65rem; font-weight: 650; }
.cart-line-price[data-unpriced] { color: var(--cart-muted); font-size: .76rem; font-weight: 600; white-space: normal; }
.cart-line-status {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 4px 7px;
  border: 1px solid #dfd3c1;
  background: #f1ece2;
  color: #5b4330;
  font-size: .75rem;
  font-weight: 700;
}
.cart-line-status svg { width: 13px; height: 13px; }
.cart-line-actions { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.cart-quantity {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--cart-line);
  background: #f0eee8;
  font-variant-numeric: tabular-nums;
}
.cart-quantity button {
  width: 40px;
  height: 38px;
  color: inherit;
  font-size: 1.1rem;
  transition: background-color .2s;
}
.cart-quantity button:hover:not(:disabled) { background: #e2ded4; }
.cart-quantity span { min-width: 22px; text-align: center; font-size: .875rem; font-weight: 700; }
.cart-drawer .remove-line { color: var(--cart-muted); }
.cart-drawer .remove-line:hover { color: var(--cart-ink); }

#cart-first-purchase {
  margin-top: 18px;
  padding: 17px;
  background: #121212;
  color: #fff;
  border: 1px solid #32312e;
  color-scheme: dark;
}
#cart-first-purchase :focus-visible { outline-color: #fff; }
.cart-offer-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 3vw, 17px);
  margin: 0 0 12px;
}
.cart-offer-amount {
  font-size: clamp(2.7rem, 9.8vw, 3.6rem);
  font-weight: 740;
  line-height: .98;
  letter-spacing: -.075em;
}
.cart-offer-title {
  font-size: .93rem;
  font-weight: 670;
  line-height: 1.22;
  text-wrap: balance;
}
:is(.cart-offer-amount,.cart-offer-title) {
  transform-origin: left center;
  transition: transform .32s cubic-bezier(.2,.78,.25,1), font-weight .32s ease;
}
#cart-first-purchase:focus-within :is(.cart-offer-amount,.cart-offer-title) { font-weight: 850; transform: scale(1.04, 1.035); }
@media (hover: hover) and (pointer: fine) {
  #cart-first-purchase:hover :is(.cart-offer-amount,.cart-offer-title) { font-weight: 850; transform: scale(1.04, 1.035); }
}
.cart-offer-emblem {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #56534e;
  color: #f1e7d4;
}
.cart-offer-content { display: grid; justify-items: start; gap: 9px; font-size: .85rem; line-height: 1.48; }
.cart-offer-content p { margin: 0; color: #e0ddd6; }
.cart-offer-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 35px;
  padding: 6px 9px;
  border: 1px solid #5b5955;
  background: transparent;
  color: #fff;
  font-weight: 650;
  text-align: left;
  text-decoration: none;
  transition: color .2s, background-color .2s, border-color .2s;
}
.cart-offer-action svg { width: 15px; height: 15px; }
.cart-offer-action:is(:hover,:focus-visible):not(:disabled) { background: #f4f1ea; border-color: #f4f1ea; color: #151515; }
.cart-offer-action:disabled { opacity: .62; }
.cart-offer-content code { display: inline-block; padding: 2px 7px; color: white; background: #ffffff1a; font-weight: 700; overflow-wrap: anywhere; }
.cart-offer-content label { display: flex; gap: 8px; align-items: center; }
.cart-offer-content form { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }
.cart-offer-content form label { flex: 0 0 100%; }
.cart-offer-content input:not([type=checkbox]) {
  min-width: 0;
  flex: 1 1 120px;
  min-height: 38px;
  padding: 6px 8px;
  background: #202020;
  color: #fff;
  border: 1px solid #716d65;
  font-size: 1rem;
}

#cart-empty { display: grid; gap: 18px; justify-items: center; text-align: center; padding: 42px 0 20px; }
#cart-empty h3 { margin: 0; font-size: 1.25rem; }
.cart-empty-symbol { display: grid; place-items: center; width: 52px; height: 52px; background: #eceae4; }
.cart-empty-symbol svg { width: 25px; height: 25px; }
.cart-recommendations { margin-top: 24px; }
.cart-recommendations h3 { margin: 0 0 5px; font-size: 1rem; }
.cart-suggestion {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 0;
  border-bottom: 1px solid var(--cart-line);
  text-align: left;
  background: transparent;
  color: inherit;
}
.cart-suggestion:hover { background: #efede6; }
.cart-suggestion img { height: 55px; object-fit: contain; background: #eceae4; }
.cart-suggestion > span { display: grid; gap: 4px; font-size: .8rem; }
.cart-suggestion small { color: var(--cart-muted); font-size: .75rem; }

.cart-footer {
  padding: 0 var(--cart-gutter) calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--cart-line);
  background: var(--cart-paper);
  box-shadow: 0 -8px 24px #1717150b;
}
#cart-summary { padding-top: 15px; }
.cart-subtotal { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.cart-subtotal > b { font-size: .79rem; font-weight: 800; letter-spacing: .075em; text-transform: uppercase; }
.cart-total { white-space: nowrap; font-variant-numeric: tabular-nums; }
#subtotal { font: 700 clamp(1.5rem, 6vw, 2rem)/1 "Chakra Petch", system-ui, sans-serif; letter-spacing: -.035em; }
.cart-total small { color: var(--cart-muted); font-size: .7rem; font-weight: 700; }
#cart-delivery-note { margin: 6px 0 10px; color: var(--cart-muted); font-size: .75rem; }
.cart-checkout-note {
  display: flex;
  align-items: start;
  gap: 7px;
  padding: 8px;
  margin: 9px 0;
  background: #f3e4e4;
  color: #672630;
  font-size: .75rem;
  line-height: 1.4;
}
.cart-checkout-note svg { width: 14px; height: 14px; margin-top: 1px; }
#checkout-demo {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 51px;
  width: 100%;
  padding: 11px 14px;
  color: #fff;
  background: #17603a;
  border: 1px solid #17603a;
  font-size: .89rem;
  font-weight: 800;
  letter-spacing: .045em;
  text-transform: uppercase;
  transition: background-color .2s, scale .2s;
}
#checkout-demo > span { position: relative; display: flex; align-items: center; justify-content: center; gap: 9px; }
#checkout-demo:hover:not(:disabled) { background: #114d2e; }
#checkout-demo:active:not(:disabled) { scale: .99; }
#checkout-demo:disabled { opacity: 1; color: #fff6f7; background: #842b37; border-color: #842b37; cursor: not-allowed; }
#checkout-demo:not(:disabled)::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -95%;
  left: -95%;
  width: 95%;
  height: 310%;
  background: radial-gradient(ellipse at 50% 56%, #d2f6cd52, #d2f6cd1a 39%, transparent 68%);
  pointer-events: none;
  opacity: 0;
}
.cart-drawer[open] #checkout-demo:not(:disabled)::before { animation: cart-pay-wave 5.2s ease-in-out infinite; }
@keyframes cart-pay-wave {
  0% { opacity: 0; transform: translate(0, 18%) rotate(-25deg); }
  16% { opacity: 1; }
  44%, 100% { opacity: 0; transform: translate(220%, -18%) rotate(-10deg); }
}
.cart-continue { display: block; min-height: 40px; margin: 0 auto; color: var(--cart-muted); font-size: .78rem; font-weight: 700; }
.cart-trust { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 14px; padding-top: 3px; color: var(--cart-muted); font-size: .7rem; }
.cart-trust > span { display: inline-flex; align-items: center; gap: 5px; }
.cart-trust svg { width: 13px; height: 13px; }
.cart-footer:has(#cart-summary[hidden]) .cart-trust { padding-top: 9px; }

@media (max-width: 520px) {
  dialog.cart-drawer { width: 100%; }
}
@media (pointer: coarse) {
  .cart-quantity button { height: 42px; }
}
@media (max-height: 620px) {
  .cart-drawer .cart-header { padding-block: calc(7px + env(safe-area-inset-top)) 7px; }
  #cart-summary { padding-top: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .cart-drawer[open], .cart-drawer[open]::backdrop, .cart-drawer[open] #checkout-demo:not(:disabled)::before { animation: none; }
  .cart-drawer :is(button,.cart-offer-action,.cart-offer-amount,.cart-offer-title) { transition: none; transform: none !important; }
}
html.studio-motion-off .cart-drawer[open],
html.studio-motion-off .cart-drawer[open]::backdrop,
html.studio-motion-off .cart-drawer[open] #checkout-demo:not(:disabled)::before { animation: none; }
html.studio-motion-off .cart-drawer :is(button,.cart-offer-action,.cart-offer-amount,.cart-offer-title) { transition: none; transform: none !important; }
