/* ============================================================
   mamicase 每日特价页面（/sales.html）
   依赖 style.css + site.css
   ============================================================ */

/* ---------------- Hero ---------------- */
.dl-hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(150deg, #0a1120 0%, #101c33 45%, #16224a 78%, #0d3b2c 100%);
  padding: 44px 22px 46px;
}
.dl-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 280px at 86% -10%, rgba(6, 199, 85, .30), transparent 62%),
    radial-gradient(460px 240px at 6% 112%, rgba(239, 68, 68, .22), transparent 66%);
}
.dl-hero-in { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; }
.dl-hero-top { display: flex; align-items: flex-end; gap: 22px; flex-wrap: wrap; }
.dl-hero-txt { flex: 1 1 420px; min-width: 0; }
.dl-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; letter-spacing: .12em;
  color: #fecaca; background: rgba(239, 68, 68, .16);
  border: 1px solid rgba(248, 113, 113, .38); border-radius: 999px; padding: 5px 12px;
}
.dl-chip .dot-live {
  width: 6px; height: 6px; border-radius: 50%; background: #f87171;
  box-shadow: 0 0 0 0 rgba(248, 113, 113, .6); animation: dl-pulse 1.8s infinite;
}
@keyframes dl-pulse {
  0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, .55); }
  70% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}
.dl-hero h1 { font-size: 32px; line-height: 1.3; margin: 12px 0 8px; letter-spacing: -.02em; }
.dl-hero h1 .hl { color: #4ade80; }
.dl-date-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: rgba(255, 255, 255, .78); }
.dl-date-line b { color: #fff; font-size: 15px; }
.dl-hero .dl-lead { font-size: 13px; color: rgba(255, 255, 255, .6); margin: 10px 0 0; line-height: 1.8; max-width: 620px; }

/* 倒计时 */
.dl-count { display: flex; gap: 8px; align-items: center; }
.dl-count .cn {
  min-width: 74px; padding: 10px 8px 9px; border-radius: 13px; text-align: center;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(6px);
}
.dl-count .cn b { display: block; font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.dl-count .cn span { display: block; font-size: 10px; color: rgba(255, 255, 255, .55); margin-top: 3px; letter-spacing: .08em; }
.dl-count .sep { font-size: 20px; color: rgba(255, 255, 255, .35); font-weight: 700; }
.dl-count.ended .cn b { color: rgba(255, 255, 255, .45); }
.dl-count-note { font-size: 11px; color: rgba(255, 255, 255, .55); margin-top: 7px; text-align: right; }

/* ---------------- 分享条 ---------------- */
.dl-share {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow); padding: 12px 14px; margin-bottom: 18px;
}
.dl-share .sh-label { font-size: 12.5px; font-weight: 800; color: var(--ink); margin-right: 2px; }
.dl-share .sh-sp { flex: 1; }
.sh-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 700;
  cursor: pointer; transition: .15s; font-family: var(--font); white-space: nowrap;
}
.sh-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.sh-btn.line { background: #06c755; border-color: #06c755; color: #fff; }
.sh-btn.line:hover { background: #05b04b; }
.sh-btn.x { background: #0f172a; border-color: #0f172a; color: #fff; }
.sh-btn.x:hover { background: #1e293b; }
.sh-btn.fb { background: #1877f2; border-color: #1877f2; color: #fff; }
.sh-btn.fb:hover { background: #166fe5; }
.sh-btn.wa { background: #25d366; border-color: #25d366; color: #fff; }
.sh-btn.wa:hover { background: #1ebe5b; }
.sh-btn.img { background: linear-gradient(135deg, #ef4444, #f97316); border-color: transparent; color: #fff; }
.sh-btn.img:hover { filter: brightness(1.05); }

/* ---------------- 主体 ---------------- */
.dl-wrap { max-width: 1120px; margin: 0 auto; padding: 22px 18px 10px; }
.dl-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.dl-bar h2 { font-size: 17px; font-weight: 800; color: var(--ink); margin: 0; display: flex; align-items: center; gap: 8px; }
.dl-bar .cnt { font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; font-weight: 700; }
.dl-bar .sp { flex: 1; }
.dl-bar .dl-sort { font-size: 12px; color: var(--muted); }

.dl-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dl-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; transition: .18s; position: relative;
}
.dl-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d7dee9; }
.dl-fig { position: relative; background: #f1f5f9; aspect-ratio: 1 / 1; overflow: hidden; }
.dl-fig img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-fig .ph { width: 100%; height: 100%; display: grid; place-items: center; font-size: 40px; background: linear-gradient(135deg, #eef2ff, #f0fdf4); }
.dl-off {
  position: absolute; top: 9px; left: 9px;
  background: linear-gradient(135deg, #ef4444, #f97316); color: #fff;
  font-size: 11.5px; font-weight: 800; padding: 4px 9px; border-radius: 8px;
  box-shadow: 0 6px 14px -8px rgba(239, 68, 68, .9); letter-spacing: .02em;
}
.dl-slotno {
  position: absolute; top: 9px; right: 9px;
  background: rgba(15, 23, 42, .72); color: #fff; font-size: 10.5px; font-weight: 700;
  padding: 3px 8px; border-radius: 999px; backdrop-filter: blur(4px);
}
.dl-body { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.dl-name {
  font-size: 13px; font-weight: 700; color: var(--ink); line-height: 1.55; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 40px;
}
.dl-note { font-size: 11px; color: #15803d; font-weight: 700; }
.dl-price { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.dl-price .now { font-size: 21px; font-weight: 800; color: #dc2626; letter-spacing: -.02em; line-height: 1.2; }
.dl-price .now small { font-size: 12px; font-weight: 700; margin-left: 1px; }
.dl-price .was { font-size: 12px; color: var(--muted-2); text-decoration: line-through; }
.dl-save { font-size: 10.5px; color: #b91c1c; background: #fef2f2; border-radius: 6px; padding: 2px 7px; font-weight: 700; align-self: center; }
.dl-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 3px; padding: 9px 10px; border-radius: 9px; border: none;
  background: #06c755; color: #fff; font-size: 12.5px; font-weight: 800;
  cursor: pointer; font-family: var(--font); transition: .15s;
}
.dl-btn:hover { background: #05b04b; }
.dl-btn.sub { background: #f1f5f9; color: var(--ink-2); }
.dl-btn.sub:hover { background: #e2e8f0; }

/* 空状态 */
.dl-empty {
  background: #fff; border: 1px dashed var(--line); border-radius: 16px;
  padding: 54px 20px; text-align: center;
}
.dl-empty .em { font-size: 40px; margin-bottom: 10px; }
.dl-empty h3 { font-size: 16px; margin: 0 0 6px; color: var(--ink); }
.dl-empty p { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; line-height: 1.8; }

/* 底部 CTA */
.dl-cta {
  position: relative; overflow: hidden; border-radius: 18px; color: #fff;
  background: linear-gradient(150deg, #0a1120, #12203a 55%, #0d3b2c);
  padding: 26px 28px; margin: 22px 0 0; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.dl-cta::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(460px 220px at 88% 0%, rgba(6, 199, 85, .26), transparent 60%); }
.dl-cta .ct-txt { position: relative; z-index: 1; flex: 1 1 420px; }
.dl-cta h3 { font-size: 18px; margin: 0 0 6px; }
.dl-cta p { font-size: 12.5px; color: rgba(255, 255, 255, .72); margin: 0; line-height: 1.8; }
.dl-cta .ct-acts { position: relative; z-index: 1; display: flex; gap: 9px; flex-wrap: wrap; }
.dl-cta .dlb { padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.dl-cta .dlb.green { background: #06c755; color: #fff; }
.dl-cta .dlb.green:hover { background: #05b04b; text-decoration: none; color: #fff; }
.dl-cta .dlb.ghost { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .26); color: #fff; }
.dl-cta .dlb.ghost:hover { background: rgba(255, 255, 255, .18); text-decoration: none; color: #fff; }

/* 历史 */
.dl-archive { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-top: 18px; }
.dl-archive h3 { font-size: 14px; margin: 0 0 10px; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.dl-dates { display: flex; gap: 8px; flex-wrap: wrap; }
.dl-dates a {
  font-size: 12px; font-weight: 700; color: var(--ink-2); background: #f8fafc;
  border: 1px solid var(--line-soft); border-radius: 9px; padding: 7px 11px;
}
.dl-dates a:hover { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; text-decoration: none; }
.dl-dates a.on { background: #06c755; border-color: #06c755; color: #fff; }
.dl-dates a small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.dl-dates a.on small { color: rgba(255, 255, 255, .8); }

/* ---------------- 联系方式弹窗 ---------------- */
.dl-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.dl-modal.show { display: block; }
.dl-modal .mk { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.dl-modal .mbox {
  position: relative; z-index: 1; width: min(560px, calc(100% - 28px)); max-height: calc(100vh - 60px); overflow: auto;
  margin: 8vh auto 0; background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px 24px 20px;
}
.dl-modal h3 { font-size: 17px; margin: 0 0 4px; color: var(--ink); }
.dl-modal .msub { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.7; }
.dl-qrs { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.dl-qrs figure { margin: 0; text-align: center; flex: 1 1 150px; }
.dl-qrs img { width: 100%; max-width: 165px; border-radius: 11px; border: 1px solid var(--line); display: block; margin: 0 auto; }
.dl-qrs figcaption { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.dl-ctlist { display: grid; gap: 8px; margin-bottom: 14px; }
.dl-ctlist .row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--ink-2); background: #f8fafc; border: 1px solid var(--line-soft); border-radius: 10px; padding: 9px 12px; }
.dl-ctlist .row b { color: var(--ink); }
.dl-ctlist .row i { font-style: normal; font-size: 15px; }
.dl-ctlist .row a { color: var(--brand); font-weight: 700; }
.dl-modal .close-row { display: flex; gap: 8px; justify-content: flex-end; }

/* ---------------- 促销图预览 ---------------- */
.dl-imgbox { position: fixed; inset: 0; z-index: 210; display: none; }
.dl-imgbox.show { display: block; }
.dl-imgbox .mk { position: absolute; inset: 0; background: rgba(15, 23, 42, .68); }
.dl-imgbox .ibox {
  position: relative; z-index: 1; width: min(520px, calc(100% - 24px)); margin: 4vh auto 0;
  background: #fff; border-radius: 18px; padding: 16px; box-shadow: var(--shadow-lg); max-height: 92vh; overflow: auto;
}
.dl-imgbox img { width: 100%; border-radius: 12px; display: block; border: 1px solid var(--line); }
.dl-imgbox .ib-title { font-size: 14px; font-weight: 800; color: var(--ink); margin: 0 0 10px; }
.dl-imgbox .ib-acts { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dl-imgbox .ib-acts .btn { flex: 1 1 auto; }
.dl-imgbox .ib-tip { font-size: 11px; color: var(--muted); margin: 9px 0 0; line-height: 1.7; }
.dl-loading { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1020px) { .dl-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .dl-hero { padding: 32px 16px 34px; }
  .dl-hero h1 { font-size: 24px; }
  .dl-count .cn { min-width: 62px; padding: 8px 6px; }
  .dl-count .cn b { font-size: 21px; }
  .dl-count-note { text-align: left; }
  .dl-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .dl-wrap { padding: 18px 14px 6px; }
  .dl-card { border-radius: 13px; }
  .dl-body { padding: 10px 10px 11px; }
  .dl-name { font-size: 12px; min-height: 37px; }
  .dl-price .now { font-size: 18px; }
  .dl-share .sh-sp { display: none; }
  .sh-btn { padding: 7px 11px; font-size: 12px; }
  .dl-cta { padding: 22px 18px; }
  .dl-modal .mbox { padding: 18px 16px 16px; margin-top: 4vh; }
}
@media (max-width: 380px) { .dl-grid { grid-template-columns: 1fr; } }
