* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: #eef1f5;
  color: #20242c;
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.preview-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) 450px;
  gap: 28px;
  padding: 32px;
}

.preview-tools {
  align-self: start;
  display: grid;
  gap: 18px;
}

h1 {
  margin: 0;
  font-size: 28px;
}

p {
  margin: 6px 0 0;
  color: #687181;
}

.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

button {
  height: 40px;
  border: 0;
  border-radius: 8px;
  padding: 0 16px;
  background: #fff;
  color: #333943;
  cursor: pointer;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(18, 22, 30, .08);
}

button.active {
  background: #ff5558;
  color: #fff;
}

button.ghost {
  border: 1px solid #d7dce5;
  box-shadow: none;
}

.status {
  min-height: 24px;
  color: #687181;
}

.phone {
  justify-self: center;
  width: 414px;
  height: 844px;
  padding: 10px;
  border-radius: 32px;
  background: #111;
  box-shadow: 0 24px 80px rgba(25, 31, 44, .25);
}

.screen {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 24px;
  background: #f6f6f6;
}

.page {
  height: 100%;
  overflow: auto;
  padding-bottom: 74px;
  background: #f6f6f6;
}

.nav {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .92);
  font-size: 17px;
  font-weight: 800;
}

.capsule {
  position: absolute;
  right: 12px;
  top: 18px;
  display: flex;
  gap: 8px;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #dadde3;
  border-radius: 18px;
  color: #222;
  font-weight: 700;
  background: rgba(255, 255, 255, .88);
}

.hero {
  height: 360px;
  margin: 0 2px;
  overflow: hidden;
  border-radius: 4px;
  background: #ddd;
}

.hero img,
.product-image,
.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.image-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  padding: 18px;
  background: linear-gradient(135deg, #eff2f7, #d9e0ec);
  color: #687181;
  text-align: center;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 56px;
  gap: 8px;
  padding: 12px;
}

.search-row input {
  height: 32px;
  border: 1px solid #e2e5ea;
  border-radius: 4px;
  padding: 0 10px;
  font: inherit;
}

.search-row span {
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: #111;
  color: #fff;
  font-weight: 800;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 12px 12px;
}

.card {
  overflow: hidden;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.cover {
  height: 154px;
  background: #e7eaf0;
}

.card-body {
  padding: 10px;
}

.title {
  min-height: 40px;
  color: #111;
  font-size: 15px;
  line-height: 1.35;
}

.price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 8px;
}

.price {
  color: #ff4747;
  font-size: 21px;
  font-weight: 900;
}

.cart-dot {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid #ff6568;
  border-radius: 50%;
  color: #ff5558;
}

.category-page {
  display: grid;
  grid-template-columns: 108px 1fr;
}

.cat-menu {
  min-height: calc(100vh - 64px);
  background: #fff;
}

.cat-item {
  padding: 18px 14px;
  color: #222;
}

.cat-item.active {
  border-left: 4px solid #ff5558;
  color: #ff4747;
  background: #f5f5f5;
}

.product-list {
  padding: 12px;
  display: grid;
  gap: 12px;
}

.list-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.list-card .cover {
  height: 96px;
}

.detail-hero {
  height: 410px;
  background: #ddd;
}

.detail-card,
.panel {
  margin: 12px;
  padding: 14px;
  border-radius: 8px;
  background: #fff;
}

.origin {
  margin-left: 12px;
  color: #8c929d;
  text-decoration: line-through;
}

.desc {
  margin-top: 8px;
  color: #8b929c;
}

.specs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.spec {
  padding: 7px 12px;
  border-radius: 16px;
  background: #f1f3f6;
}

.review {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 10px;
  margin-top: 12px;
}

.avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #ffe5e6;
  color: #ff4747;
  font-weight: 800;
}

.muted {
  color: #8b929c;
}

.cart-empty {
  height: 270px;
  display: grid;
  place-items: center;
  color: #8b929c;
}

.cart-row {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 10px;
  margin: 12px;
  padding: 10px;
  background: #fff;
  border-radius: 8px;
}

.cart-row .cover {
  height: 86px;
}

.profile-head {
  padding: 56px 20px 34px;
  background: linear-gradient(135deg, #ff4144, #ff7a58);
  color: #fff;
}

.profile-name {
  font-size: 22px;
  font-weight: 900;
}

.mine-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px 8px;
  margin: 12px;
  padding: 16px 8px;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid #e5e7eb;
  background: #fff;
}

.tab {
  display: grid;
  place-items: center;
  color: #6b7280;
  font-size: 12px;
}

.tab.active {
  color: #ff4747;
  font-weight: 800;
}

.buybar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 62px;
  display: grid;
  grid-template-columns: 74px 74px 1fr 1fr;
  background: #fff;
}

.buybar div {
  display: grid;
  place-items: center;
}

.buybar .add {
  background: #ffa21a;
  color: #fff;
  font-weight: 900;
}

.buybar .buy {
  background: #ff6568;
  color: #fff;
  font-weight: 900;
}

@media (max-width: 900px) {
  .preview-shell {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .phone {
    width: min(414px, 100%);
  }
}
