:root {
  --brand-red: #a31f1f;
  --brand-red-dark: #8f1b1b;
  --accent-gold: #c8a24a;
  --bg-light: #f4efe4;
  --page-bg-image: url("../../小图/微信图片_20260414214619_122_535.jpg");
  --text-main: #2f2520;
  --text-sub: #6f6156;
  --price-red: #c71d1d;
  --tab-gray: #9fa3a9;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #e8e2d5;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
}

.page {
  max-width: 375px;
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(rgba(244, 239, 228, 0.76), rgba(244, 239, 228, 0.76)),
    var(--page-bg-image) center top / cover no-repeat;
  position: relative;
  overflow-x: hidden;
  box-shadow: 0 0 0 1px rgba(120, 92, 63, 0.06);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--brand-red);
  color: #fff;
}

.topbar-main {
  height: calc(58px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-btn {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 34px;
  line-height: 1;
  padding: 0;
  width: 28px;
  cursor: pointer;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.topbar-spacer {
  width: 28px;
  height: 1px;
}

.right-actions {
  width: 86px;
  height: 30px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
  color: #2f2520;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  font-size: 14px;
}

.right-actions .divider {
  width: 1px;
  height: 15px;
  background: rgba(47, 37, 32, 0.2);
}

.tab-row {
  padding: 0 12px 8px;
}

.tab {
  border: 0;
  background: transparent;
  color: #fefefe;
  font-size: 16px;
  line-height: 1.1;
  padding: 0 4px 7px;
  opacity: 0.95;
}

.tab.active {
  border-bottom: 3px solid #fff;
}

.content {
  min-height: calc(100vh - 142px);
  padding: 10px 12px 96px;
  background: transparent;
}

.goods-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.goods-item {
  display: grid;
  grid-template-columns: 120px 1fr 90px;
  gap: 10px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid rgba(176, 152, 122, 0.22);
}

.goods-item img {
  width: 120px;
  height: 84px;
  object-fit: cover;
  border-radius: 2px;
}

.goods-info h2 {
  margin: 0 0 2px;
  font-size: 18px;
  line-height: 1.15;
  font-weight: 600;
}

.goods-info p {
  margin: 0;
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.25;
}

.goods-info .price {
  margin-top: 4px;
  color: var(--price-red);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.05;
}

.adopt-btn {
  align-self: center;
  border: 0;
  border-radius: 10px;
  width: 90px;
  height: 40px;
  background: var(--brand-red);
  color: #fff;
  font-size: 17px;
  line-height: 1;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(134, 24, 24, 0.24);
  cursor: pointer;
}

.adopt-btn:active {
  background: var(--brand-red-dark);
}

.bottom-tab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(375px, 100vw);
  height: calc(70px + env(safe-area-inset-bottom));
  background: #f1ebdf;
  border-top: 1px solid #ded5c3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 2px env(safe-area-inset-bottom);
}

.tab-item {
  text-decoration: none;
  color: var(--tab-gray);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
}

.tab-item .icon {
  font-size: 18px;
  line-height: 1;
}

.tab-item.active {
  color: var(--accent-gold);
  font-weight: 600;
}
