/* ========================================
   撑了吗外卖 V2 视觉规范（轻量化设计）
   ======================================== */

:root {
  --takeout-cream: #F4EFE6;
  --takeout-white: #FFFCF7;
  --takeout-sage: #7A9B76;
  --takeout-sage-hover: #6A8A66;
  --takeout-ink: #2A3428;
  --takeout-muted: #6B7268;
  --takeout-border: #E7E1D7;
}

/* ── 外卖屏幕容器 ── */
#takeoutScreen {
  background: var(--takeout-cream);
  width: 100%;
  height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ── Hero 区域 ── */
.takeout-hero {
  position: relative;
  width: 100%;
  height: 240px;
  min-height: 240px;
  overflow: hidden;
  background: #d4c4b0;
}

.takeout-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.takeout-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0) 30%,
    rgba(0,0,0,0) 60%,
    rgba(244,239,230,0.4) 85%,
    rgba(244,239,230,0.98) 100%
  );
  pointer-events: none;
}

.takeout-hero-back {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 44px;
  height: 44px;
  background: rgba(255,252,247,0.92);
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 20px;
  color: var(--takeout-ink);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2;
}

.takeout-hero-wallet {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255,252,247,0.92);
  border-radius: 999px;
  border: none;
  padding: 10px 18px 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  font-size: 16px;
  font-weight: 600;
  color: var(--takeout-ink);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2;
}

.takeout-hero-content {
  position: absolute;
  bottom: 32px;
  left: 24px;
  right: 24px;
  color: #F5E6D3;
  text-shadow: 0 1px 4px rgba(0,0,0,0.25);
  z-index: 1;
}

.takeout-hero-title {
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin: 0 0 4px;
  font-family: "Noto Serif SC", "STKaiti", "KaiTi", serif;
  line-height: 1.2;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.takeout-hero-subtitle {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.2px;
  margin: 0 0 8px;
  opacity: 0.85;
  font-family: -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.takeout-hero-tagline {
  font-size: 14px;
  font-weight: 400;
  margin: 0;
  opacity: 0.92;
  letter-spacing: 0.3px;
}

/* ── 配送信息卡（玻璃质感）── */
.takeout-delivery-card {
  background: linear-gradient(
    135deg,
    rgba(255, 252, 247, 0.65) 0%,
    rgba(255, 252, 247, 0.45) 100%
  );
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  margin: -24px 16px 0;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
  border: 1px solid rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.takeout-delivery-location {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.takeout-location-icon {
  font-size: 18px;
  line-height: 1;
}

.takeout-delivery-text {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  line-height: 1.3;
}

.takeout-delivery-city {
  font-size: 15px;
  font-weight: 600;
  color: var(--takeout-ink);
}

.takeout-delivery-divider {
  font-size: 13px;
  color: var(--takeout-muted);
  opacity: 0.5;
}

.takeout-delivery-time {
  font-size: 13px;
  color: var(--takeout-muted);
}

.takeout-delivery-fee-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.takeout-delivery-icon {
  font-size: 16px;
  line-height: 1;
}

.takeout-delivery-fee-text {
  font-size: 14px;
  color: var(--takeout-ink);
  font-weight: 600;
  white-space: nowrap;
}

.takeout-delivery-fee-info {
  font-size: 12px;
  color: #999;
  cursor: pointer;
  opacity: 0.7;
  line-height: 1;
}

/* ── 搜索与筛选 ── */
.takeout-search-section {
  padding: 20px 16px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.takeout-search-bar {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--takeout-white);
  border: 1px solid var(--takeout-border);
  border-radius: 10px;
  padding: 10px 14px;
}

.takeout-search-icon {
  font-size: 16px;
  opacity: 0.5;
}

.takeout-search-input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: var(--takeout-ink);
  font-family: inherit;
}

.takeout-search-input::placeholder {
  color: var(--takeout-muted);
  opacity: 0.6;
}

.takeout-filter-button {
  background: transparent;
  border: 1px solid var(--takeout-border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: var(--takeout-ink);
  white-space: nowrap;
}

.takeout-filter-icon {
  font-size: 14px;
  opacity: 0.7;
}

/* ── 区块标题 ── */
.takeout-section {
  padding: 24px 16px 16px;
}

.takeout-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.takeout-section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--takeout-ink);
  margin: 0;
}

.takeout-section-subtitle {
  font-size: 13px;
  color: var(--takeout-muted);
  margin-left: 8px;
  font-weight: 400;
}

.takeout-section-more {
  font-size: 13px;
  color: var(--takeout-sage);
  text-decoration: none;
  font-weight: 500;
}

/* ── 餐厅网格 ── */
.takeout-restaurants-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.takeout-restaurant-card {
  background: var(--takeout-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  cursor: pointer;
  transition: transform 0.2s;
}

.takeout-restaurant-card:hover {
  transform: translateY(-1px);
}

.takeout-restaurant-image {
  width: 100%;
  height: 95px;
  object-fit: cover;
}

.takeout-restaurant-info {
  padding: 10px;
}

.takeout-restaurant-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--takeout-ink);
  margin: 0 0 4px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.takeout-restaurant-type {
  font-size: 11px;
  color: var(--takeout-muted);
  margin: 0 0 6px;
  line-height: 1.2;
}

.takeout-restaurant-tags {
  font-size: 10px;
  color: var(--takeout-muted);
  margin: 0;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 本周推荐横向 Banner ── */
.takeout-featured-banner {
  position: relative;
  width: 100%;
  height: 185px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  cursor: pointer;
}

.takeout-featured-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
}

.takeout-featured-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.45) 50%, rgba(0,0,0,0.1) 100%);
}

.takeout-featured-content {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
}

.takeout-featured-badge {
  display: inline-block;
  background: rgba(255, 252, 247, 0.18);
  border: 1px solid rgba(255, 252, 247, 0.4);
  color: rgba(255, 252, 247, 0.95);
  font-size: 11px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 8px;
  margin-bottom: 10px;
  align-self: flex-start;
  backdrop-filter: blur(8px);
  letter-spacing: 0.3px;
}

.takeout-featured-name {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 5px;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
  line-height: 1.2;
}

.takeout-featured-name-en {
  font-size: 11px;
  color: rgba(255,255,255,0.88);
  margin: 0 0 10px;
  letter-spacing: 0.8px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  line-height: 1.2;
}

.takeout-featured-desc {
  font-size: 13px;
  color: rgba(255,255,255,0.92);
  line-height: 1.5;
  margin: 0 0 14px;
  max-width: 280px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.takeout-featured-footer {
  display: flex;
  align-items: center;
  gap: 14px;
}

.takeout-featured-price {
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 6px rgba(0,0,0,0.3);
}

.takeout-featured-cta {
  background: rgba(255, 252, 245, 0.15);
  border: 1px solid rgba(255, 252, 245, 0.65);
  color: #FFFCF5;
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  backdrop-filter: blur(8px);
  transition: background 0.2s;
  letter-spacing: 0.2px;
}

.takeout-featured-cta:hover {
  background: rgba(255, 252, 245, 0.22);
}

/* ── 人气菜品网格 ── */
.takeout-products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.takeout-product-card {
  background: var(--takeout-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.takeout-product-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.takeout-product-info {
  padding: 10px;
}

.takeout-product-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--takeout-ink);
  margin: 0 0 6px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 31px;
}

.takeout-product-desc {
  font-size: 10px;
  color: var(--takeout-muted);
  margin: 0 0 8px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.takeout-product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.takeout-product-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--takeout-ink);
}

.takeout-product-add {
  width: 26px;
  height: 26px;
  background: transparent;
  border: 1px solid rgba(122, 155, 118, 0.4);
  color: var(--takeout-sage);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 300;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
}

.takeout-product-add:hover {
  background: rgba(122, 155, 118, 0.08);
  border-color: var(--takeout-sage);
}

.takeout-sort-button {
  background: transparent;
  border: 1px solid var(--takeout-border);
  color: var(--takeout-ink);
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── 响应式调整 ── */
@media (max-width: 390px) {
  .takeout-product-name {
    font-size: 11px;
    min-height: 28px;
  }

  .takeout-product-desc {
    font-size: 9px;
  }

  .takeout-product-price {
    font-size: 13px;
  }

  .takeout-product-add {
    width: 24px;
    height: 24px;
    font-size: 14px;
  }

  .takeout-products-grid {
    gap: 8px;
  }

  .takeout-restaurants-grid {
    gap: 6px;
  }

  .takeout-restaurant-name {
    font-size: 12px;
  }

  .takeout-restaurant-type {
    font-size: 10px;
  }
}
