* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 10px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Helvetica Neue',
    'Microsoft YaHei', sans-serif;
  background: #8f0000;
  color: #333;
  line-height: 1.4;
}

.page {
  max-width: 37.5rem;
  margin: 0 auto;
  min-height: 100vh;
  background: #b20000 url('../活动页_slices/矩形@2x.png') no-repeat center top;
  background-size: 100% auto;
  padding-bottom: 2rem;
}

/* 顶部搜索栏 */
.top-bar {
  display: flex;
  align-items: center;
  margin: 0.8rem 1rem 0;
  padding: 0.7rem 1rem 0.7rem 0.8rem;
  background: #fff;
  border-radius: 1rem;
  box-shadow: 0 0.2rem 0.8rem rgba(0, 0, 0, 0.08);
}

.icon-search {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  margin-right: 0.4rem;
}

.search-placeholder {
  flex: 1;
  min-width: 0;
  font-size: 1.3rem;
  color: #999;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Banner */
.hero {
  margin: 0.8rem 0 0;
  line-height: 0;
}

.hero img {
  width: 100%;
  height: auto;
  display: block;
}

/* 分区标题 */
.section-title {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0.8rem;
}

.section-title img {
  height: 1.4rem;
  width: auto;
}

/* 商品列表 */
.product-list {
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.product-card {
  display: flex;
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  padding: 0.8rem;
  gap: 0.8rem;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.15s;
}

.product-card:active {
  opacity: 0.92;
}

.card-thumb {
  position: relative;
  flex-shrink: 0;
  width: 12.8rem;
  height: 12.8rem;
  border-radius: 0.6rem;
  overflow: hidden;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.tag-badge {
  position: absolute;
  top: 0;
  left: 0;
  width: 6rem;
  height: auto;
  z-index: 1;
}

.card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.2rem 0;
}

.shop-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem 0.4rem;
  font-size: 1.1rem;
  color: #666;
  line-height: 1.3;
}

.shop-logo {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 0.2rem;
  object-fit: cover;
  flex-shrink: 0;
}

.shop-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1.1rem;
}

.tag-delivery {
  flex-shrink: 0;
  font-size: 1rem;
  color: #c8960c;
  background: #fff8e6;
  border: 1px solid #f5d78e;
  border-radius: 0.2rem;
  padding: 0 0.3rem;
  line-height: 1.4;
}

.delivery-time {
  flex-shrink: 0;
  font-size: 1.1rem;
  color: #999;
}

.product-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0.4rem 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.price-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.price-info {
  flex: 1;
  min-width: 0;
}

.origin-price {
  font-size: 1.2rem;
  color: #999;
  text-decoration: line-through;
}

.discount-text {
  font-size: 1.1rem;
  color: #ff3b30;
  margin-top: 0.2rem;
}

.price-badge {
  position: relative;
  flex-shrink: 0;
  width: 7.4rem;
  height: 3.6rem;
  margin-right: -0.4rem;
}

.badge-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
}

.badge-price {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0.6rem;
  font-size: 1.6rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

/* 下单引导弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.55);
}

.modal-mask[hidden] {
  display: none;
}

.modal-dialog {
  width: 100%;
  max-width: 32rem;
  padding: 2rem 1.6rem 1.6rem;
  background: #fff;
  border-radius: 1.2rem;
  text-align: center;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1a1a1a;
  margin-bottom: 0.8rem;
}

.modal-desc {
  font-size: 1.4rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 1.2rem;
}

.modal-link {
  padding: 1rem;
  background: #f5f5f5;
  border-radius: 0.6rem;
  font-size: 1.3rem;
  color: #e1251b;
  word-break: break-all;
  line-height: 1.4;
  margin-bottom: 1.6rem;
}

.modal-actions {
  display: flex;
  gap: 0.8rem;
}

.modal-actions button {
  flex: 1;
  height: 4.4rem;
  border: none;
  border-radius: 2.2rem;
  font-size: 1.5rem;
  font-weight: 500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.btn-copy {
  background: #e1251b;
  color: #fff;
}

.btn-copy:active {
  background: #c41e17;
}

.btn-close {
  background: #f0f0f0;
  color: #333;
}

.btn-close:active {
  background: #e0e0e0;
}

@media (min-width: 376px) {
  body {
    background: #6b0000;
  }
}
