.cart-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 4px 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #4d3026;
  font: inherit;
  font-size: .76rem;
  font-weight: 850;
  cursor: pointer;
  transition: color .16s ease, background-color .16s ease;
}
.cart-trigger:hover { background: #efd8b8; color: #452b21; }
.cart-trigger:focus-visible { outline: 2px solid #9f493c; outline-offset: 1px; }
.cart-trigger-icon {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: #8b352b;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-count {
  display: inline-grid;
  min-width: 24px;
  min-height: 24px;
  place-items: center;
  padding: 2px 6px;
  border-radius: 6px;
  background: #883029;
  color: #fff1d6;
  font-size: .7rem;
  box-shadow: inset 0 1px #d8785c;
}

.cart-dialog {
  width: min(720px, calc(100% - 26px));
  max-height: calc(100% - 26px);
  padding: 0;
  border: 1px solid #b98d69;
  border-radius: 14px;
  background: #f8ead0;
  color: #432d24;
  box-shadow: 0 24px 80px #29170d99;
}
.cart-dialog::backdrop { background: #2f1c15b8; backdrop-filter: blur(2px); }
.cart-shell { padding: clamp(16px, 4vw, 28px); }
.cart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid #c9a47e;
}
.cart-head h2 { margin: 2px 0 0; font-size: clamp(1.7rem, 5vw, 2.35rem); letter-spacing: -.06em; }
.cart-eyebrow {
  margin: 0;
  color: #7d4435;
  font-size: .73rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.cart-close {
  display: grid;
  width: 42px;
  height: 42px;
  flex: none;
  place-items: center;
  padding: 0 0 3px;
  border: 1px solid #b78d6d;
  border-radius: 50%;
  background: #fff2d9;
  color: #6f2a22;
  font: inherit;
  font-size: 1.45rem;
  font-weight: 700;
  cursor: pointer;
}
.cart-close:hover { background: #efd5ae; }
.cart-empty { padding: 38px 0 24px; text-align: center; }
.cart-empty strong { display: block; font-size: 1.15rem; }
.cart-empty p { margin: 7px 0 0; color: #6f5145; }
.cart-items { display: grid; gap: 0; margin: 0; padding: 8px 0 0; list-style: none; }
.cart-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: start;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid #d0b18b;
}
.cart-item-copy { min-width: 0; }
.cart-item-copy strong { display: block; overflow-wrap: anywhere; }
.cart-item-quantity { color: #77564a; white-space: nowrap; }
.cart-item-copy small { display: block; margin-top: 3px; color: #77564a; font-size: .78rem; font-weight: 700; }
.cart-item-bundle {
  display: grid;
  gap: 4px;
  margin: 10px 0 0;
  padding: 0;
  color: #60473d;
  font-size: .78rem;
  line-height: 1.35;
  list-style: none;
}
.cart-item-bundle li {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(14px, 1fr) auto;
  align-items: baseline;
  gap: 7px;
}
.cart-item-bundle li > span:first-child { overflow-wrap: anywhere; }
.cart-item-bundle-leader {
  min-width: 14px;
  border-bottom: 1px dotted #a17c69;
  transform: translateY(-2px);
}
.cart-item-bundle-quantity { flex: none; color: #77564a; white-space: nowrap; font-weight: 800; }
.cart-item-price { padding-top: 2px; white-space: nowrap; font-weight: 900; }
.cart-remove {
  min-height: 37px;
  padding: 5px 9px;
  border: 1px solid #c19b77;
  border-radius: 6px;
  background: transparent;
  color: #78352b;
  font: inherit;
  font-size: .76rem;
  font-weight: 800;
  cursor: pointer;
}
.cart-remove:hover { background: #f1d6b1; }
.cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin: 18px 0 0;
  font-size: 1.05rem;
  font-weight: 900;
}
.cart-total dd { margin: 0; font-size: 1.35rem; }
.checkout-form {
  display: grid;
  gap: 13px;
  margin-top: 22px;
  padding: 18px;
  border: 1px solid #d0a77e;
  border-radius: 10px;
  background: #fff1d6;
}
.checkout-form h3 { margin: 0 0 2px; font-size: 1.14rem; }
.checkout-form label { display: grid; gap: 6px; font-size: .84rem; font-weight: 850; }
.checkout-method { position: relative; display: block; }
.checkout-method-icon {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #8a3b31;
  pointer-events: none;
  transform: translateY(-50%);
}
.checkout-method-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.65; }
.checkout-form input,
.checkout-form select {
  width: 100%;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #b98b68;
  border-radius: 7px;
  background-color: #fffaf0;
  color: #432d24;
  font: inherit;
  font-size: 1rem;
}
.checkout-form select {
  appearance: none;
  padding-right: 42px;
  padding-left: 43px;
  background-image: linear-gradient(45deg, transparent 50%, #71372d 50%), linear-gradient(135deg, #71372d 50%, transparent 50%);
  background-position: calc(100% - 19px) 21px, calc(100% - 13px) 21px;
  background-repeat: no-repeat;
  background-size: 6px 6px, 6px 6px;
}
.checkout-form input:focus,
.checkout-form select:focus { outline: 3px solid #a64c3e; outline-offset: 1px; }
.checkout-form select:disabled { opacity: .7; }
.checkout-hint { margin: -7px 0 0; color: #745448; font-size: .78rem; line-height: 1.45; }
.checkout-submit,
.payment-open {
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid #71261f;
  border-radius: 7px;
  background: #883029;
  color: #fff2db;
  font: inherit;
  font-size: .88rem;
  font-weight: 900;
  cursor: pointer;
}
.checkout-submit:hover:not(:disabled),
.payment-open:hover:not(:disabled) { background: #6f241e; }
.checkout-submit:disabled,
.payment-open:disabled { opacity: .55; cursor: default; }
.checkout-continue {
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid #b98b68;
  border-radius: 7px;
  background: transparent;
  color: #71372d;
  font: inherit;
  font-size: .86rem;
  font-weight: 850;
  cursor: pointer;
}
.checkout-continue:hover { background: #f4dec0; }
.checkout-continue:focus-visible { outline: 3px solid #9f493c; outline-offset: 2px; }
.payment-panel { padding-top: 20px; }
.payment-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.payment-heading h3 { margin: 0; font-size: 1.35rem; }
.payment-heading strong { display: block; margin-top: 3px; font-size: .86rem; overflow-wrap: anywhere; }
.payment-qr { display: block; width: min(260px, 100%); margin: 20px auto; border: 10px solid #fff; border-radius: 10px; }
.payment-qr[hidden],
.payment-qr-hint[hidden],
.payment-notice[hidden],
[data-payment-expiry-row][hidden] { display: none; }
.payment-qr-hint {
  max-width: 470px;
  margin: -8px auto 16px;
  color: #75584a;
  font-size: .76rem;
  line-height: 1.4;
  text-align: center;
}
.payment-details { display: grid; gap: 11px; margin: 18px 0 0; }
.payment-details > div { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: start; }
.payment-details dt { color: #745448; font-size: .8rem; font-weight: 800; }
.payment-details dd { margin: 0; font-weight: 900; overflow-wrap: anywhere; }
.payment-details code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .82rem; }
.payment-address-value { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.payment-address-value code { flex: 1 1 250px; min-width: 0; }
.payment-copy-control { display: inline-flex; align-items: center; gap: 8px; }
.payment-copy {
  display: grid;
  width: 36px;
  height: 36px;
  flex: none;
  place-items: center;
  padding: 0;
  border: 1px solid #b98b68;
  border-radius: 7px;
  background: transparent;
  color: #71372d;
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.payment-copy svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; }
.payment-copy:hover { background: #f1d6b1; }
.payment-copy:focus-visible { outline: 3px solid #9f493c; outline-offset: 2px; }
.payment-copy:disabled { border-color: #c7bcae; color: #91877d; cursor: default; opacity: .68; }
.payment-copy.is-copied {
  border-color: #3d8063;
  background: #e3f2e8;
  color: #286147;
  box-shadow: 0 0 0 3px #4b967227, 0 0 16px #4b967238;
}
.payment-copy-feedback { color: #286147; font-size: .78rem; font-weight: 850; white-space: nowrap; }
.payment-notice {
  margin: 15px 0 0;
  padding: 11px 12px;
  border: 1px solid #d5a45f;
  border-radius: 7px;
  background: #fff0c9;
  color: #61382a;
  font-size: .8rem;
  font-weight: 800;
  line-height: 1.45;
}
.payment-reported,
.payment-receive {
  min-height: 48px;
  padding: 8px 13px;
  border: 1px solid #b98b68;
  border-radius: 7px;
  background: transparent;
  color: #71372d;
  font: inherit;
  font-size: .8rem;
  font-weight: 850;
  cursor: pointer;
}
.payment-reported:not(:disabled) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-color: #71261f;
  background: #953129;
  color: #fff7e6;
  letter-spacing: .01em;
  transition: background 150ms ease;
}
.payment-reported:hover:not(:disabled) {
  background: #6f241e;
}
.payment-reported:active:not(:disabled) {
  background: #5d1f1a;
}
.payment-reported:focus-visible { outline: 3px solid #8f3d2f; outline-offset: 3px; }
.payment-actions { display: grid; gap: 9px; margin-top: 15px; }
.payment-open { width: 100%; }
.payment-open[hidden],
.payment-reported[hidden],
.payment-receive[hidden] { display: none; }
.payment-actions-secondary { display: grid; grid-template-columns: 1fr; gap: 9px; }
.payment-receive:not(:disabled) { border-color: #71261f; background: #953129; color: #fff7e6; }
.payment-receive:hover:not(:disabled) { background: #6f241e; }
.payment-receive:active:not(:disabled) { background: #5d1f1a; }
.payment-receive:focus-visible { outline: 3px solid #8f3d2f; outline-offset: 3px; }
.payment-reported:disabled,
.payment-receive:disabled { border-color: #c7bcae; background: #d8d0c4; color: #877d72; box-shadow: none; cursor: default; }
.payment-status,
.cart-message { margin: 12px 0 0; padding: 11px 12px; border-radius: 7px; font-size: .83rem; font-weight: 750; line-height: 1.45; }
.payment-status { border: 1px solid #cfaa79; background: #fff2d4; }
.payment-panel[data-status="expired"] .payment-status { border-color: #bd685b; background: #ffe0d4; color: #74271f; }
.cart-message { border: 1px solid #b84a3d; background: #ffe2d2; color: #74271f; }
.cart-message[data-tone="success"] { border-color: #5e9578; background: #e2f3e9; color: #24543f; }
body:has(.cart-dialog[open]) { overflow: hidden; }

@media (max-width: 760px) {
  .cart-trigger { padding-inline: 7px; }
}

@media (max-width: 520px) {
  .cart-trigger [data-cart-label] { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .cart-trigger { padding: 5px 7px; }
  .cart-dialog { width: calc(100% - 12px); max-height: calc(100% - 12px); }
  .cart-shell { padding: 15px 13px 18px; }
  .cart-item { grid-template-columns: minmax(0, 1fr) auto; }
  .cart-remove { grid-column: 1 / -1; justify-self: start; }
  .checkout-form { padding: 14px 12px; }
  .payment-heading { display: grid; }
  .payment-details > div { grid-template-columns: minmax(0, 1fr); gap: 3px; }
}
