.eb-shop {
  --eb-shop-border: #d9dde3;
  --eb-shop-muted: #6b7280;
  --eb-shop-bg-soft: #f8fafc;
  --eb-shop-danger: #b42318;
  --eb-shop-success: #067647;
  font: inherit;
}

.eb-shop a {
  text-decoration: none;
}

.eb-shop-header,
.eb-shop-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1rem;
}

.eb-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.eb-shop-card,
.eb-shop-cart-item,
.eb-shop-summary,
.eb-shop-notice,
.eb-shop-error,
.eb-shop-success {
  border: 1px solid var(--eb-shop-border);
  border-radius: .75rem;
  padding: 1rem;
  background: #fff;
}

.eb-shop-card h3,
.eb-shop-detail h2 {
  margin-top: 0;
}

.eb-shop-product-image,
.eb-shop-product-image-large {
  display: block;
  width: 100%;
  height: auto;
  border-radius: .5rem;
  margin-bottom: .75rem;
  object-fit: cover;
}

.eb-shop-product-image {
  aspect-ratio: 4 / 3;
}

.eb-shop-product-image-large {
  max-width: 520px;
}

.eb-shop-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: 2rem;
}

.eb-shop-muted {
  color: var(--eb-shop-muted);
  font-size: .925em;
}

.eb-shop-price,
.eb-shop-line-total,
.eb-shop-total-gross {
  font-weight: 700;
}

.eb-shop-inline-form,
.eb-shop-cart-actions,
.eb-shop-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
}

.eb-shop-quantity {
  width: 5rem;
  padding: .45rem .55rem;
  border: 1px solid var(--eb-shop-border);
  border-radius: .45rem;
}

.eb-shop-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .55rem .85rem;
  border: 1px solid #111827;
  border-radius: .5rem;
  background: #111827;
  color: #fff;
  cursor: pointer;
  line-height: 1.2;
}

.eb-shop-button:hover,
.eb-shop-button:focus {
  filter: brightness(1.1);
  color: #fff;
}

.eb-shop-button-secondary {
  background: #fff;
  color: #111827;
}

.eb-shop-button-secondary:hover,
.eb-shop-button-secondary:focus {
  color: #111827;
}

.eb-shop-button-danger {
  background: #fff;
  color: var(--eb-shop-danger);
  border-color: var(--eb-shop-danger);
}

.eb-shop-button-danger:hover,
.eb-shop-button-danger:focus {
  color: var(--eb-shop-danger);
}

.eb-shop-button-large {
  width: 100%;
  padding: .8rem 1rem;
  font-weight: 700;
}

.eb-shop-cart-list {
  display: grid;
  gap: .75rem;
}

.eb-shop-cart-item {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 1rem;
  align-items: center;
}

.eb-shop-totals {
  max-width: 420px;
  margin: 1rem 0 1rem auto;
  border: 1px solid var(--eb-shop-border);
  border-radius: .75rem;
  overflow: hidden;
}

.eb-shop-totals > div,
.eb-shop-summary-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .65rem .8rem;
  border-bottom: 1px solid var(--eb-shop-border);
}

.eb-shop-totals > div:last-child,
.eb-shop-summary-line:last-child {
  border-bottom: 0;
}

.eb-shop-total-gross {
  background: var(--eb-shop-bg-soft);
}

.eb-shop-checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 1.5rem;
  align-items: start;
}

.eb-shop-checkout-form {
  display: grid;
  gap: .8rem;
}

.eb-shop-checkout-form label {
  display: grid;
  gap: .25rem;
  font-weight: 600;
}

.eb-shop-checkout-form input,
.eb-shop-checkout-form textarea {
  width: 100%;
  border: 1px solid var(--eb-shop-border);
  border-radius: .5rem;
  padding: .55rem .65rem;
  font: inherit;
}

.eb-shop-checkbox {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: .6rem !important;
  font-weight: 400 !important;
}

.eb-shop-checkbox input {
  width: auto;
  margin-top: .2rem;
}

.eb-shop-error {
  border-color: #fecdca;
  background: #fffbfa;
  color: var(--eb-shop-danger);
  margin-bottom: 1rem;
}

.eb-shop-success {
  border-color: #abefc6;
  background: #f6fef9;
  color: var(--eb-shop-success);
}

@media (max-width: 800px) {
  .eb-shop-detail,
  .eb-shop-checkout-layout,
  .eb-shop-cart-item {
    grid-template-columns: 1fr;
  }

  .eb-shop-header,
  .eb-shop-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
