/* site.css v2 — 补齐万小智原站有、快照丢失的交互样式
 * 配色不写死：主色取 --wb-ink / --wb-on（由 site.js 从页面按钮计算得出）
 * 只加：手机菜单、header 阴影、表单提示、购物车、时段选择
 */

/* ---- 手机汉堡下拉层（底色跟随主题）---- */
.wb-mmenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--wb-ink, #1f2937);
  border-top: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
  padding: 8px 0 14px;
  z-index: 60;
}
.wb-mmenu.open { display: block; }
.wb-mmenu a {
  display: block;
  padding: 13px 24px;
  color: rgba(255, 255, 255, .82);
  font-size: 15px;
  line-height: 1.2;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.wb-mmenu a:last-child { border-bottom: 0; }
.wb-mmenu a.on { color: #fff; font-weight: 600; }
.wb-mmenu a.cta {
  margin: 12px 24px 0;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: var(--wb-ink, #1f2937);
  font-weight: 600;
  text-align: center;
  padding: 11px 16px;
}
.wb-mmenu a.cta:hover { background: #eef2f9; }

/* ---- 滚动后 header 落阴影 ---- */
header.wb-scrolled { box-shadow: 0 2px 16px rgba(0, 0, 0, .14); }

/* ---- 表单提交提示 ---- */
.wb-form-ok {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 6px;
  background: #eef7ee;
  border: 1px solid #cfe8cf;
  color: #2c6b2c;
  font-size: 13px;
  line-height: 1.6;
}

/* ---- 筛选无结果兜底 ---- */
#wbFilterEmpty {
  padding: 56px 0;
  text-align: center;
  color: #6b7280;
  font-size: 15px;
}

/* ================= 购物车 ================= */
.wb-cart-fab {
  position: fixed;
  right: 24px;
  bottom: 28px;
  z-index: 900;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--wb-ink, #1f2937);
  color: var(--wb-on, #fff);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .22);
  transition: transform .18s ease, box-shadow .18s ease;
}
.wb-cart-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0, 0, 0, .28); }
.wb-cart-ico { font-size: 16px; line-height: 1; }
.wb-cart-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 19px;
  height: 19px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ff4d4f;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.wb-cart-wrap {
  position: fixed;
  inset: 0;
  z-index: 950;
  pointer-events: none;
}
.wb-cart-wrap.open { pointer-events: auto; }
.wb-cart-mask {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  transition: opacity .25s ease;
}
.wb-cart-wrap.open .wb-cart-mask { opacity: 1; }

.wb-cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 380px;
  max-width: 92vw;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(.22, .61, .36, 1);
  box-shadow: -8px 0 32px rgba(0, 0, 0, .16);
}
.wb-cart-wrap.open .wb-cart-panel { transform: translateX(0); }

.wb-cart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px;
  border-bottom: 1px solid #eee;
}
.wb-cart-head h2 { margin: 0; font-size: 17px; font-weight: 600; color: #111; }
.wb-cart-x {
  width: 32px; height: 32px;
  border: 0; background: transparent;
  font-size: 22px; line-height: 1;
  color: #888; cursor: pointer; border-radius: 6px;
}
.wb-cart-x:hover { background: #f3f4f6; color: #333; }

.wb-cart-body { flex: 1; overflow-y: auto; padding: 8px 22px; }
.wb-cart-empty { padding: 64px 0; text-align: center; color: #9ca3af; font-size: 14px; }

.wb-cart-item {
  display: flex;
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid #f1f1f1;
  align-items: flex-start;
}
.wb-cart-item img, .wb-cart-ph {
  width: 64px; height: 64px;
  border-radius: 6px;
  object-fit: cover;
  background: #f3f4f6;
  flex: 0 0 64px;
}
.wb-cart-info { flex: 1; min-width: 0; }
.wb-cart-name {
  margin: 0 0 4px;
  font-size: 14px;
  color: #111;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wb-cart-price { margin: 0 0 8px; font-size: 13px; color: #6b7280; }
.wb-cart-qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  height: 28px;
}
.wb-cart-qty button {
  width: 26px; height: 100%;
  border: 0; background: #fff;
  font-size: 14px; color: #555;
  cursor: pointer;
}
.wb-cart-qty button:hover { background: #f3f4f6; }
.wb-cart-qty span {
  min-width: 30px;
  text-align: center;
  font-size: 13px;
  color: #111;
}
.wb-cart-del {
  border: 0; background: transparent;
  color: #9ca3af; font-size: 12px;
  cursor: pointer; padding: 2px 4px;
}
.wb-cart-del:hover { color: #ef4444; }

.wb-cart-foot {
  padding: 16px 22px 22px;
  border-top: 1px solid #eee;
  background: #fff;
}
.wb-cart-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  color: #6b7280;
  padding: 4px 0;
}
.wb-cart-row b { color: #111; font-weight: 500; }
.wb-cart-sum { margin-top: 6px; padding-top: 10px; border-top: 1px dashed #e5e7eb; }
.wb-cart-sum span { color: #111; font-weight: 600; }
.wb-cart-sum b { font-size: 17px; font-weight: 700; }
.wb-cart-go {
  width: 100%;
  margin-top: 14px;
  height: 44px;
  border: 0;
  border-radius: 6px;
  background: var(--wb-ink, #1f2937);
  color: var(--wb-on, #fff);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.wb-cart-go:hover { opacity: .9; }

/* ================= 预约时段 ================= */
.wb-slots { margin-top: 4px; }
.wb-slots-label { color: inherit; }
/* 日期选中态：原站快照里没有选中样本，这里按页面主色生成 */
.wb-date-on {
  background: var(--wb-ink, #1f2937) !important;
  color: var(--wb-on, #fff) !important;
  border-color: var(--wb-ink, #1f2937) !important;
}
.wb-slot-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.wb-slot {
  height: 42px;
  border: 0;
  border-radius: 8px;
  background: #f3f4f6;
  color: #374151;
  font-size: 13px;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.wb-slot:hover { background: #e5e7eb; }
.wb-slot.on {
  background: var(--wb-ink, #1f2937);
  color: var(--wb-on, #fff);
  font-weight: 600;
}

@media (max-width: 640px) {
  .wb-cart-fab { right: 16px; bottom: 18px; height: 42px; padding: 0 14px; font-size: 13px; }
  .wb-cart-panel { width: 100%; }
  .wb-slot-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
