.store-header {
  background: var(--brand);
  color: #fff;
}

.store-bar {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.8rem 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 700;
}

.brand img {
  border-radius: 8px;
}

.store-bar .spacer {
  flex: 1;
}

.cart-button {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
}

.cart-button:hover:not(:disabled) {
  background: var(--brand-tint);
}

.cart-count {
  background: var(--gold);
  color: #fff;
  border-radius: 999px;
  min-width: 1.6rem;
  padding: 0 0.4rem;
  font-size: 0.85rem;
  text-align: center;
}

.hero {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.6rem 1rem 2rem;
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  max-width: 18ch;
}

.search-form {
  display: flex;
  gap: 0.5rem;
  margin-top: 1.2rem;
  max-width: 34rem;
}

.search-form .input {
  flex: 1;
  border-color: transparent;
}

.search-form .button {
  background: var(--gold);
  border-color: var(--gold);
}

.categories {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem 1rem 0;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.chip {
  appearance: none;
  font: inherit;
  white-space: nowrap;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  padding: 0.3rem 1rem;
  border-radius: 999px;
  cursor: pointer;
}

.chip[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.catalog {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1rem;
}

.book-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 1.4rem 1rem;
}

.book-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 0.6rem;
}

.book-cover {
  appearance: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  aspect-ratio: 2 / 3;
  width: 100%;
  background: var(--brand);
  color: #fff;
  border-radius: 3px 8px 8px 3px;
  box-shadow: inset -7px 0 0 rgba(0, 0, 0, 0.22), 0 6px 14px rgba(20, 27, 51, 0.22);
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  line-height: 1.4;
  text-align: center;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover span {
  padding: 1rem 1.3rem;
}

.book-meta h3 {
  font-size: 1.1rem;
}

.book-meta h3 button {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-align: start;
  cursor: pointer;
}

.book-author {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.book-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.price {
  font-weight: 700;
  color: var(--gold);
  white-space: nowrap;
}

.book-detail {
  display: grid;
  gap: 1rem;
}

.book-detail .book-cover {
  max-width: 11rem;
  cursor: default;
}

.book-detail p {
  margin: 0;
  white-space: pre-line;
}

@media (min-width: 40rem) {
  .book-detail {
    grid-template-columns: 11rem 1fr;
  }
}

.cart-lines {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.cart-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 0.8rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid var(--line);
}

.cart-line-title {
  font-weight: 600;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.stepper output {
  min-width: 2rem;
  text-align: center;
}

.cart-total {
  display: flex;
  justify-content: space-between;
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.note {
  background: var(--brand-tint);
  border-radius: var(--radius-small);
  padding: 0.7rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.dialog-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.done {
  text-align: center;
  display: grid;
  gap: 0.8rem;
  justify-items: center;
}

.done h3 {
  font-size: 1.6rem;
}

.store-footer {
  max-width: 72rem;
  margin: 0 auto;
  padding: 2rem 1rem;
  color: var(--ink-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.store-footer a {
  color: inherit;
}
