/* Cart extends the existing forest/tea system without changing the landing-page world. */
.header-cart {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 10px 9px 16px;
  border: 1px solid #879c7e; border-radius: 999px; background: var(--forest); color: var(--tea);
  font-size: 13px; font-weight: 700; line-height: 20px; white-space: nowrap;
  transition: background-color .2s, color .2s, transform .2s;
}
.header-cart strong {
  display: grid; place-items: center; min-width: 26px; height: 26px; padding-inline: 6px;
  border-radius: 999px; background: var(--tea); color: var(--forest);
  font-size: 12px; font-variant-numeric: tabular-nums;
}
.header-cart:active { transform: translateY(1px); }
body[data-cart-open="true"] { overflow: hidden; }
.cart-toast {
  position: fixed; z-index: 15; top: 104px; right: max(20px, env(safe-area-inset-right));
  width: min(380px, calc(100% - 40px)); padding: 18px 20px;
  border: 1px solid #879c7e; border-radius: 18px;
  background: var(--paper); color: var(--forest); box-shadow: 0 16px 44px rgb(18 25 15 / .2);
}
.cart-toast > p { font-size: 14px; font-weight: 700; line-height: 1.5; text-wrap: pretty; }
.cart-toast-actions { display: flex; align-items: center; gap: 20px; margin-top: 13px; }
.cart-toast-actions button {
  min-height: 44px; padding: 8px 0; border: 0; border-bottom: 1px solid currentColor;
  background: transparent; color: inherit; font-size: 12px; font-weight: 700;
}
.cart-toast-actions button:last-child { margin-left: auto; color: #596551; font-weight: 400; }
.cart-toast-actions button:active { transform: translateY(1px); }
.cart-dialog {
  width: min(520px, 100%); max-width: none; height: 100dvh; max-height: none;
  margin: 0 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--forest);
  overflow: visible;
}
.cart-dialog::backdrop { background: rgb(18 25 15 / .62); }
.cart-panel {
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%;
  background: var(--paper); box-shadow: -18px 0 60px rgb(18 25 15 / .24);
}
.cart-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 24px;
  padding: 26px 28px 22px; border-bottom: 1px solid #c8cec3;
}
.cart-heading p { margin-bottom: 6px; color: #596551; font-size: 12px; }
.cart-heading h2 { font-size: 34px; line-height: 1.15; }
.cart-heading button, .cart-remove, .checkout-summary button {
  min-height: 44px; padding: 8px 0; border: 0; border-bottom: 1px solid currentColor;
  background: transparent; color: inherit; font-size: 13px; font-weight: 700;
}
.cart-lines { overflow-y: auto; padding: 4px 28px; overscroll-behavior: contain; }
.cart-line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px;
  padding: 22px 0; border-bottom: 1px solid #c8cec3;
}
.cart-line h3 { font: 700 15px/1.45 var(--body); text-wrap: pretty; }
.cart-line-copy p { margin-top: 6px; color: #596551; font-size: 12px; line-height: 1.5; }
.cart-line-total { align-self: start; font: 400 17px/1.4 var(--display); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cart-quantity { display: inline-grid; grid-template-columns: 44px 42px 44px; align-items: center; justify-self: start; margin-top: 2px; border: 1px solid #879c7e; border-radius: 999px; overflow: hidden; }
.cart-quantity button { width: 44px; height: 42px; border: 0; background: transparent; color: inherit; font-size: 20px; }
.cart-quantity button:disabled { opacity: .35; cursor: not-allowed; }
.cart-quantity output { text-align: center; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-remove { justify-self: end; align-self: center; color: #596551; font-weight: 400; }
.cart-empty { padding: 42px 0; }
.cart-empty p { font: 400 20px/1.45 var(--display); }
.cart-empty a { display: inline-block; margin-top: 18px; border-bottom: 1px solid; font-weight: 700; }
.cart-footer { padding: 22px 28px max(26px, env(safe-area-inset-bottom)); border-top: 1px solid #c8cec3; }
.cart-footer > div { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.cart-footer > div span { font-size: 13px; }
.cart-footer > div strong { font: 400 25px/1.3 var(--display); font-variant-numeric: tabular-nums; }
.cart-footer > p { margin-top: 8px; color: #596551; font-size: 12px; line-height: 1.5; }
.cart-footer .button { width: 100%; margin-top: 18px; justify-content: center; background: var(--forest); color: var(--tea); }
.cart-footer .button[aria-disabled="true"] { opacity: .42; pointer-events: none; }
@media (hover:hover) {
  .header-cart:hover { background: var(--tea); color: var(--forest); }
  .header-cart:hover strong { background: var(--forest); color: var(--tea); }
  .cart-quantity button:not(:disabled):hover { background: var(--tea); }
  .cart-toast-actions button:hover { text-decoration: underline; text-underline-offset: 4px; }
}
@media (max-width:700px) {
  .header-cart { padding-inline: 12px 8px; font-size: 11px; }
  .header-cart strong { min-width: 24px; height: 24px; }
  .cart-dialog { width: 100%; padding-top: min(11dvh, 76px); }
  .cart-panel { border-radius: 24px 24px 0 0; overflow: hidden; }
  .cart-heading, .cart-lines, .cart-footer { padding-inline: 20px; }
  .cart-heading { padding-top: 22px; }
  .cart-heading h2 { font-size: 30px; }
  .cart-toast { top: 92px; right: 20px; }
}
@media (max-width:370px) {
  .header-cart > span { display: none; }
  .header-cart { padding-left: 8px; }
}
