.shop-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.shop-modal.is-open {
  display: flex;
}

.shop-panel {
  width: min(520px, 100%);
  max-height: 90vh;
  overflow: auto;
  padding: 28px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.shop-panel.wide {
  width: min(720px, 100%);
}

.shop-panel h3 {
  margin: 0 0 8px;
  font-size: 28px;
}

.shop-panel p.lead {
  margin: 0 0 20px;
  color: var(--gray-700);
}

.shop-form {
  display: grid;
  gap: 14px;
}

.shop-form label {
  display: grid;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
}

.shop-form input,
.shop-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--gray-200);
  border-radius: 10px;
  font: inherit;
}

.shop-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.shop-actions .button,
.shop-actions .add-button {
  cursor: pointer;
  border: none;
}

.shop-close {
  float: right;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.shop-message {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.shop-message.error {
  background: #ffe8e8;
  color: #a40000;
}

.shop-message.success {
  background: #e8fff0;
  color: #0b6b2f;
}

.utility-actions button,
.utility-actions [data-cart-button] {
  border: none;
  background: transparent;
  cursor: pointer;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-left: 6px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--yellow);
  color: var(--black);
  font-size: 12px;
  font-weight: 700;
}

.cart-count:empty,
.cart-count[data-empty="true"] {
  display: none;
}

.cart-list {
  display: grid;
  gap: 14px;
  margin: 18px 0;
}

.cart-item {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--gray-200);
}

.cart-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: var(--gray-100);
}

.cart-item strong {
  display: block;
  margin-bottom: 4px;
}

.cart-item .line-price {
  font-weight: 700;
}

.cart-qty {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.cart-qty button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 18px;
  font-weight: 700;
}

.account-label {
  font-size: 13px;
  font-weight: 700;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.checkout-grid .full {
  grid-column: 1 / -1;
}

@media (max-width: 640px) {
  .checkout-grid {
    grid-template-columns: 1fr;
  }
}
