/* The original shipping form stays in place until the shop's cart is ready. */
.lhb-cart-ready [hidden] {
  display: none !important;
}

.lhb-cart-ready .store-header {
  flex-wrap: wrap;
  gap: 8px 24px;
}
.lhb-cart-ready .store-brand {
  margin-inline-end: auto;
}
.lhb-cart-ready .store-back,
.lhb-cart-link,
.lhb-back,
.lhb-continue {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--green, #35554c);
  font-size: 14px;
  text-underline-offset: 4px;
}
.lhb-cart-link {
  padding-inline: 14px;
  border: 1px solid var(--green, #35554c);
  border-radius: 4px;
  text-decoration: none;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.lhb-cart-ready:is([data-lhb-stage="cart"], [data-lhb-stage="checkout"]) .lhb-cart-link {
  display: none;
}
.lhb-cart-link:hover {
  background: var(--paper, #fffdf8);
}
.lhb-cart-ready[data-lhb-stage="catalog"] .store-product-body {
  display: grid;
  grid-template-rows: auto auto 1fr;
}
.lhb-add,
.lhb-checkout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 16px;
  border: 1px solid var(--green, #35554c);
  border-radius: 4px;
  background: var(--green, #35554c);
  color: #fff;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
}
.lhb-add:hover:not(:disabled),
.lhb-checkout:hover {
  background: #253f38;
}
.lhb-cart-status {
  margin: 12px auto;
  color: var(--ink, #283c40);
  text-align: center;
  font-size: 14px;
}
.lhb-cart-status:empty {
  margin: 0;
  padding: 0;
}

.lhb-cart-view {
  max-width: 820px;
  margin: clamp(18px, 4vw, 42px) auto 40px;
  padding: clamp(20px, 3.3vw, 42px);
  border: 1px solid var(--line, #ded8ca);
  border-radius: 5px;
  background: var(--paper, #fffdf8);
}
.lhb-cart-view h1,
.lhb-delivery-intro h1 {
  margin: 0 0 22px;
  font: 500 clamp(25px, 3vw, 35px)/1.5 "Yu Mincho", "Hiragino Mincho ProN", serif;
  letter-spacing: .05em;
}
.lhb-cart-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.lhb-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(6.4em, auto);
  align-items: center;
  gap: 10px clamp(12px, 2.5vw, 32px);
  padding-block: 18px;
  border-block-start: 1px solid var(--line, #ded8ca);
}
.lhb-item h2 {
  margin: 0 0 3px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.lhb-item p,
.lhb-shipping-note {
  margin: 0;
  color: #59655e;
  font-size: 13px;
}
.lhb-line-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.lhb-quantity {
  display: inline-flex;
  align-items: center;
}
.lhb-quantity button,
.lhb-quantity input {
  width: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid #afbaae;
  border-radius: 0;
  background: #f5f3eb;
  color: var(--ink, #283c40);
  font: inherit;
  line-height: 1;
  text-align: center;
}
.lhb-quantity input {
  width: 46px;
  height: 44px;
  border-inline-width: 0;
  background: white;
  appearance: textfield;
  font-size: 16px;
}
.lhb-quantity input::-webkit-inner-spin-button,
.lhb-quantity input::-webkit-outer-spin-button {
  appearance: none;
  margin: 0;
}
.lhb-quantity button:first-child { border-radius: 4px 0 0 4px; }
.lhb-quantity button:last-child { border-radius: 0 4px 4px 0; }
.lhb-quantity button:hover:not(:disabled) { background: #e8ebdf; }
.lhb-remove {
  min-height: 44px;
  min-width: 44px;
  padding: 4px;
  border: 0;
  background: none;
  color: #5a5350;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.lhb-line-total {
  justify-self: end;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.lhb-cart-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 0 4px;
  border-block-start: 1px solid var(--line, #ded8ca);
}
.lhb-cart-total strong {
  font-size: clamp(22px, 4vw, 28px);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.lhb-shipping-note {
  margin-block: 6px 12px;
}
.lhb-cart-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-top: 20px;
}
.lhb-checkout { min-width: 12em; }
.lhb-empty {
  margin: 24px 0 8px;
}
.lhb-delivery-intro {
  margin-top: 8px;
}
.lhb-back {
  margin-bottom: 12px;
}
.lhb-cart-ready[data-lhb-stage="checkout"] .store-order-layout {
  margin-top: 16px;
}
.lhb-cart-ready :is(.lhb-cart-link, .lhb-back, .lhb-add, .lhb-checkout,
                    .lhb-continue, .lhb-remove, .lhb-quantity button, .lhb-quantity input):focus-visible {
  outline: 3px solid #805929;
  outline-offset: 3px;
  z-index: 1;
}

@media (max-width: 760px) {
  .lhb-line {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }
  .lhb-item {
    grid-column: 1;
    grid-row: 1;
  }
  .lhb-line-total {
    grid-column: 2;
    grid-row: 1;
  }
  .lhb-line-controls {
    grid-column: 1 / -1;
    grid-row: 2;
  }
}
@media (max-width: 600px) {
  .lhb-cart-ready .store-header {
    gap: 6px 12px;
  }
  .lhb-cart-ready[data-lhb-stage="catalog"] .store-header {
    display: grid;
    grid-template: "brand cart" auto "back cart" auto / minmax(0, 1fr) auto;
    gap: 0 10px;
    padding-block: 10px;
  }
  .lhb-cart-ready[data-lhb-stage="catalog"] .store-brand {
    grid-area: brand;
    align-self: end;
    font-size: clamp(14px, 4vw, 17px);
  }
  .lhb-cart-ready[data-lhb-stage="catalog"] .store-back {
    grid-area: back;
    justify-self: start;
    min-height: 30px;
  }
  .lhb-cart-ready[data-lhb-stage="catalog"] .lhb-cart-link {
    grid-area: cart;
  }
  .lhb-cart-ready .store-back,
  .lhb-cart-link {
    font-size: 12px;
  }
  .lhb-cart-link {
    padding-inline: 9px;
  }
  .lhb-add {
    padding-inline: 5px;
    font-size: 13px;
  }
  .lhb-cart-view {
    margin: 8px auto 26px;
    padding: 18px 14px 20px;
  }
  .lhb-cart-actions {
    flex-direction: column-reverse;
    align-items: stretch;
    text-align: center;
  }
  .lhb-continue {
    justify-content: center;
  }
}
