.cart-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.cart-link:hover {
  color: var(--ink);
}

.cart-count {
  position: static;
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.product-add {
  margin: 0;
}

.product-add .btn:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.cart-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 18px;
  align-items: start;
  margin-top: 18px;
}

.cart-product {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cart-thumb {
  width: 52px;
  height: 52px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  font-size: 22px;
}

.cart-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.cart-meta {
  color: var(--muted);
  font-size: 11.5px;
}

.cart-qty {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cart-qty input {
  width: 64px;
  height: 34px;
  padding: 0 8px;
  text-align: center;
}

.cart-summary {
  padding: 18px;
  position: sticky;
  top: 20px;
}

.cart-summary h2 {
  margin: 0 0 14px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  font-size: 13px;
  color: var(--muted);
}

.summary-row b {
  color: var(--ink);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 750;
}

.btn-block {
  width: 100%;
  justify-content: center;
  margin-top: 9px;
}

.cart-empty {
  padding: 44px 24px;
  text-align: center;
  margin-top: 18px;
}

.cart-empty h2 {
  margin: 0 0 8px;
}

@media (max-width: 800px) {
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .cart-summary {
    position: static;
  }
}

.qty-btn {
  width: 34px;
  height: 34px;
  flex: none;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
}

.qty-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.cart-qty input {
  width: 52px;
}

[data-item-id].is-updating {
  opacity: .55;
}

.product-add .btn.is-added {
  background: #15803d;
}

.cart-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  max-width: 320px;
  padding: 11px 15px;
  border-radius: 9px;
  background: #15803d;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .18);
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.cart-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.cart-toast.error {
  background: #b91c1c;
}
.cart-js .cart-update-btn {
  display: none;
}

.cart-js .cart-qty input {
  width: 46px;
}
