/* 商城页 */
.page-shop main { padding-bottom: 4rem; }

.shop-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
  align-items: center;
}

.shop-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.shop-filter {
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong, rgba(26, 24, 20, 0.18));
  background: transparent;
  color: var(--ink-soft, #4a4540);
  cursor: pointer;
  font: inherit;
  font-size: 0.88rem;
}

.shop-filter:hover {
  border-color: var(--ink, #1a1814);
  color: var(--ink, #1a1814);
}

.shop-filter.active {
  border-color: var(--ink, #1a1814);
  background: rgba(26, 24, 20, 0.06);
  color: var(--ink, #1a1814);
  font-weight: 500;
}

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

.shop-membership-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(201, 184, 150, 0.15), rgba(126, 184, 255, 0.08));
  border: 1px solid rgba(201, 184, 150, 0.35);
  margin-bottom: 1.5rem;
}

.shop-membership-banner h2 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.shop-membership-banner p {
  margin: 0;
  color: var(--text-muted, #8b92a8);
  font-size: 0.9rem;
  max-width: 520px;
}

.shop-orders-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.shop-order-card {
  padding: 1rem 1.15rem;
  border-radius: 10px;
  background: var(--bg-card, rgba(13, 18, 40, 0.6));
  border: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.shop-order-card header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}

.shop-order-meta,
.shop-order-items {
  font-size: 0.88rem;
  color: var(--text-muted, #8b92a8);
  margin: 0.25rem 0 0;
}

.cart-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 90;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  border: none;
  background: var(--accent, #c9b896);
  color: #0d1228;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

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

.cart-overlay,
.checkout-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.cart-overlay.open,
.checkout-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, 380px);
  height: 100%;
  z-index: 101;
  background: var(--bg-panel, #0d1228);
  border-left: 1px solid var(--line, rgba(255, 255, 255, 0.1));
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.25s ease;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cart-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.cart-close,
.checkout-close {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.cart-list {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.15rem;
}

.cart-item {
  display: flex;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.06));
}

.cart-item-title {
  margin: 0 0 0.25rem;
  font-weight: 500;
}

.cart-item-meta {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #8b92a8);
}

.cart-item-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.cart-item-qty button {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.cart-item-remove {
  border: none;
  background: transparent;
  color: #e87878;
  cursor: pointer;
  font-size: 0.82rem;
}

.cart-empty {
  color: var(--text-muted, #8b92a8);
  text-align: center;
  padding: 2rem 0;
}

.cart-drawer-foot {
  padding: 1rem 1.15rem;
  border-top: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.cart-total-row {
  margin: 0 0 0.75rem;
}

.checkout-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 102;
  width: min(92vw, 440px);
  max-height: 90vh;
  overflow: auto;
  padding: 0;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
  border-radius: 12px;
  background: var(--bg-panel, #0d1228);
  color: inherit;
}

.checkout-modal::backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.checkout-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line, rgba(255, 255, 255, 0.08));
}

.checkout-order-list,
.checkout-form {
  padding: 0 1.15rem 1.15rem;
}

.checkout-line {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  margin: 0.35rem 0;
}

.checkout-total {
  padding: 0 1.15rem;
  margin: 0 0 0.75rem;
}

.checkout-error {
  margin: 0 1.15rem 0.75rem;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  color: #8b3a3a;
  background: rgba(139, 58, 58, 0.08);
  border: 1px solid rgba(139, 58, 58, 0.2);
}

.checkout-form.is-submitting button[type="submit"] {
  opacity: 0.72;
  cursor: wait;
}

.checkout-form label {
  display: block;
  margin-bottom: 0.65rem;
  font-size: 0.88rem;
}

.checkout-form input,
.checkout-form textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--line, rgba(255, 255, 255, 0.15));
  background: rgba(7, 11, 24, 0.5);
  color: inherit;
  font: inherit;
  box-sizing: border-box;
}

.checkout-pay {
  border: none;
  margin: 0.75rem 0;
  padding: 0;
}

.checkout-pay label {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-right: 1rem;
}

.checkout-demo-note {
  font-size: 0.82rem;
  color: var(--text-muted, #8b92a8);
  margin: 0 0 0.75rem;
}

.checkout-success {
  position: fixed;
  inset: 0;
  z-index: 103;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(7, 11, 24, 0.92);
  text-align: center;
  padding: 2rem;
}

.checkout-success[hidden] {
  display: none !important;
}

.card-btn.shop-add {
  margin-top: 0.5rem;
}

.card-btn.shop-add:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
