.store-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}
.store-card {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1rem;
  min-width: 0;
  padding: 1.4rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(10, 22, 40, 0.06);
}
.store-book-image {
  display: grid;
  place-items: center;
  min-height: 320px;
  background: transparent;
  overflow: visible;
}
.store-book-image img {
  width: 100%;
  height: 320px;
  object-fit: contain;
  filter: drop-shadow(0 22px 18px rgba(10, 22, 40, 0.18));
}
.store-book-meta {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  color: var(--purple);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.store-price {
  font: 700 1.65rem var(--serif);
  color: var(--navy);
}
.store-price del {
  margin-left: 0.5rem;
  color: var(--muted);
  font: 500 0.95rem var(--sans);
}
.store-stock {
  font-size: 0.82rem;
  color: var(--muted);
}
.store-stock.low {
  color: #9d2f2f;
  font-weight: 800;
}
.store-stock.ok {
  color: #1e6b49;
  font-weight: 800;
}
.store-actions {
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
  align-items: center;
}
.store-actions .button {
  flex: 1 1 auto;
}
.store-cart-trigger {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.store-cart-count {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--purple);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 900;
}
.store-cart-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(10, 22, 40, 0.52);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
.store-cart-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.store-cart {
  position: absolute;
  right: 0;
  top: 0;
  width: min(420px, 100%);
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: var(--paper);
  box-shadow: -20px 0 60px rgba(10, 22, 40, 0.22);
  transform: translateX(100%);
  transition: transform 0.25s;
}
.store-cart-backdrop.open .store-cart {
  transform: none;
}
.store-cart-head,
.store-cart-foot {
  padding: 1.25rem;
  border-bottom: 1px solid var(--line);
}
.store-cart-foot {
  border-bottom: 0;
  border-top: 1px solid var(--line);
}
.store-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.store-cart-head h2 {
  font-size: 1.7rem;
}
.store-cart-close {
  border: 0;
  background: transparent;
  font-size: 1.8rem;
  cursor: pointer;
}
.store-cart-items {
  padding: 1rem;
  overflow: auto;
}
.store-cart-item {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.store-cart-item img {
  width: 70px;
  height: 88px;
  object-fit: contain;
}
.store-cart-item h3 {
  font: 700 1rem var(--serif);
}
.store-qty {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.store-qty button {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: #fff;
  cursor: pointer;
}
.store-cart-total {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.store-toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1200;
  max-width: 340px;
  padding: 0.9rem 1.1rem;
  border-radius: 8px;
  background: var(--navy);
  color: #fff;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: 0.2s;
}
.store-toast.show {
  opacity: 1;
  transform: none;
}
.store-loading,
.store-empty {
  grid-column: 1/-1;
  padding: 2rem;
  border: 1px dashed #b8ae9c;
  text-align: center;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
}
@media (max-width: 900px) {
  .store-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .store-book-image,
  .store-book-image img {
    min-height: 280px;
    height: 280px;
  }
}
@media (max-width: 600px) {
  .store-grid {
    grid-template-columns: 1fr;
  }
  .store-card {
    padding: 1.1rem;
  }
  .store-book-image,
  .store-book-image img {
    min-height: 300px;
    height: 300px;
  }
  .store-cart-item {
    grid-template-columns: 58px 1fr;
  }
  .store-cart-item > strong {
    grid-column: 2;
  }
  .store-cart-item img {
    width: 58px;
    height: 75px;
  }
}
