/* ============================================================
   cinicase 赠品页（/gift.html）
   依赖 style.css + site.css，视觉沿用每日特价页（deals.css）语言
   ============================================================ */

/* ---------------- Hero ---------------- */
.gf-hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(150deg, #0a1120 0%, #101c33 45%, #1a1f4a 76%, #0d3b2c 100%);
  padding: 44px 22px 46px;
}
.gf-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(560px 280px at 88% -10%, rgba(6, 199, 85, .30), transparent 62%),
    radial-gradient(460px 240px at 4% 112%, rgba(250, 204, 21, .18), transparent 66%);
}
.gf-hero-in { position: relative; z-index: 1; max-width: 1120px; margin: 0 auto; }
.gf-hero-top { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.gf-hero-txt { flex: 1 1 440px; min-width: 0; }
.gf-chip {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 800; letter-spacing: .12em;
  color: #fde68a; background: rgba(250, 204, 21, .14);
  border: 1px solid rgba(250, 204, 21, .38); border-radius: 999px; padding: 5px 12px;
}
.gf-hero h1 { font-size: 33px; line-height: 1.3; margin: 12px 0 10px; letter-spacing: -.02em; }
.gf-hero h1 .hl { color: #4ade80; }
.gf-mini-line { font-size: 15px; font-weight: 700; color: #fff; }
.gf-hero .gf-lead { font-size: 13px; color: rgba(255, 255, 255, .66); margin: 10px 0 0; line-height: 1.85; max-width: 640px; }
.gf-hero-badge {
  flex: 0 0 216px; text-align: center; padding: 18px 16px 16px; border-radius: 18px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(6px);
}
.gf-hero-badge .gh-emoji { font-size: 30px; line-height: 1; }
.gf-hero-badge .gh-label { font-size: 11px; color: rgba(255, 255, 255, .68); margin-top: 6px; letter-spacing: .04em; }
.gf-hero-badge .gh-amount { font-size: 32px; font-weight: 900; color: #4ade80; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.gf-hero-badge .gh-sub { font-size: 12px; color: rgba(255, 255, 255, .8); font-weight: 700; }

.gf-wrap { max-width: 1120px; margin: 0 auto; padding: 22px 18px 10px; }

/* ---------------- 规则说明 ---------------- */
.gf-rules {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 16px;
  padding: 18px 20px 16px; margin-bottom: 26px; box-shadow: var(--shadow);
}
.gf-rules-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.gf-rules-head h2 { font-size: 16px; font-weight: 800; color: #92400e; margin: 0; }
.gf-rules-head .sub { font-size: 11.5px; color: #b45309; }
.gf-rules-list { list-style: none; counter-reset: gfrule; margin: 0; padding: 0; display: grid; gap: 9px; }
.gf-rules-list li {
  counter-increment: gfrule; position: relative; padding: 10px 12px 10px 42px;
  background: #fff; border: 1px solid #fef3c7; border-radius: 10px;
  font-size: 12.5px; line-height: 1.8; color: #78350f;
}
.gf-rules-list li::before {
  content: counter(gfrule); position: absolute; left: 12px; top: 10px;
  width: 20px; height: 20px; border-radius: 50%; background: #f59e0b; color: #fff;
  font-size: 11px; font-weight: 800; display: grid; place-items: center;
}

/* ---------------- 档位 ---------------- */
.gf-tier { margin-bottom: 30px; }
.gf-tier-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
  padding: 14px 18px; border-radius: 14px; color: #fff;
  background: linear-gradient(100deg, #065f46 0%, #0f9d58 60%, #06c755 100%);
  box-shadow: 0 10px 24px -14px rgba(6, 199, 85, .8);
}
.gf-tier-head .gt-emoji { font-size: 22px; }
.gf-tier-head .gt-main { flex: 1 1 260px; min-width: 0; }
.gf-tier-head .gt-title { font-size: 17px; font-weight: 800; line-height: 1.4; }
.gf-tier-head .gt-note { font-size: 11.5px; color: rgba(255, 255, 255, .82); margin-top: 3px; line-height: 1.6; }
.gf-tier-head .gt-amount {
  font-size: 13px; font-weight: 800; background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .34); border-radius: 999px; padding: 6px 14px; white-space: nowrap;
}
.gf-tier-head .gt-count { font-size: 11.5px; color: rgba(255, 255, 255, .82); font-weight: 700; }

.gf-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gf-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;
}
.gf-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #d7dee9; }
.gf-card.soldout { opacity: .72; }

/* 多图：一张主图在上，其余图片在主图下方 */
/* ⚠️ .gf-figs 同时带 .pd-imgs（供 site.js 灯箱分组用），会被 site.css 的
   「两列 grid」命中导致主图与缩略图左右并排，这里必须显式覆写为块级布局 */
.gf-figs {
  display: block; grid-template-columns: none; gap: 0; background: none;
  padding: 10px 10px 0;
}
.gf-main {
  position: relative; width: 100%; aspect-ratio: 1 / 1; border-radius: 11px; overflow: hidden;
  background: linear-gradient(135deg, #eef2ff, #f0fdf4); display: grid; place-items: center;
}
.gf-main img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.gf-main .ph { font-size: 42px; }
/* 角标放左下、库存状态放右上：分居对角，文字再长也不会互相重叠 */
.gf-tag {
  position: absolute; bottom: 8px; left: 8px; z-index: 2;
  background: linear-gradient(135deg, #ef4444, #f97316); color: #fff;
  font-size: 10.5px; font-weight: 800; padding: 4px 9px; border-radius: 8px;
  max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  box-shadow: 0 2px 8px rgba(15, 23, 42, .22);
}
.gf-stock {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  font-size: 10.5px; font-weight: 800; padding: 4px 9px; border-radius: 8px;
  background: rgba(15, 23, 42, .74); color: #fff;
  max-width: calc(100% - 16px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gf-stock.low { background: #f59e0b; }
.gf-stock.out { background: #dc2626; }
/* 其余图片全部平铺在主图下方，自动换行，点击可放大（灯箱可左右切换） */
.gf-thumbs { display: flex; gap: 6px; margin-top: 7px; flex-wrap: wrap; align-content: flex-start; }
.gf-thumbs img {
  width: 42px; height: 42px; border-radius: 8px; object-fit: cover; cursor: zoom-in;
  border: 1px solid var(--line); display: block;
}
.gf-thumbs img:hover { border-color: #06c755; }

.gf-body { padding: 11px 13px 14px; display: flex; flex-direction: column; gap: 7px; flex: 1; }
.gf-name {
  font-size: 13.5px; font-weight: 800; color: var(--ink); line-height: 1.55; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px;
}
.gf-desc { font-size: 11.5px; color: var(--muted); line-height: 1.75; margin: 0; white-space: pre-wrap; }
.gf-pick {
  display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: auto;
  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;
}
.gf-pick:hover { background: #05b04b; }

.gf-empty {
  background: #fff; border: 1px dashed var(--line); border-radius: 16px;
  padding: 44px 20px; text-align: center; grid-column: 1 / -1;
}
.gf-empty .em { font-size: 38px; margin-bottom: 8px; }
.gf-empty h3 { font-size: 15px; margin: 0 0 6px; color: var(--ink); }
.gf-empty p { font-size: 12.5px; color: var(--muted); margin: 0; line-height: 1.8; }

/* ---------------- CTA ---------------- */
.gf-cta {
  position: relative; overflow: hidden; border-radius: 18px; color: #fff;
  background: linear-gradient(150deg, #0a1120, #12203a 55%, #0d3b2c);
  padding: 26px 28px; margin: 8px 0 22px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.gf-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%); }
.gf-cta .ct-txt { position: relative; z-index: 1; flex: 1 1 420px; }
.gf-cta h3 { font-size: 18px; margin: 0 0 6px; }
.gf-cta p { font-size: 12.5px; color: rgba(255, 255, 255, .72); margin: 0; line-height: 1.8; }
.gf-cta .ct-acts { position: relative; z-index: 1; display: flex; gap: 9px; flex-wrap: wrap; }
.gf-cta .gfb { padding: 10px 18px; border-radius: 10px; font-size: 13px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.gf-cta .gfb.green { background: #06c755; color: #fff; }
.gf-cta .gfb.green:hover { background: #05b04b; text-decoration: none; color: #fff; }
.gf-cta .gfb.ghost { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .26); color: #fff; }
.gf-cta .gfb.ghost:hover { background: rgba(255, 255, 255, .18); text-decoration: none; color: #fff; }

/* ---------------- 联系方式弹窗 ---------------- */
.gf-modal { position: fixed; inset: 0; z-index: 200; display: none; }
.gf-modal.show { display: block; }
.gf-modal .mk { position: absolute; inset: 0; background: rgba(15, 23, 42, .55); backdrop-filter: blur(2px); }
.gf-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;
}
.gf-modal h3 { font-size: 17px; margin: 0 0 4px; color: var(--ink); }
.gf-modal .msub { font-size: 12.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.7; }
.gf-chosen {
  font-size: 12.5px; font-weight: 700; color: #065f46; background: #ecfdf5;
  border: 1px solid #a7f3d0; border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; line-height: 1.7;
}
.gf-qrs { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.gf-qrs figure { margin: 0; text-align: center; flex: 1 1 150px; }
.gf-qrs img { width: 100%; max-width: 165px; border-radius: 11px; border: 1px solid var(--line); display: block; margin: 0 auto; }
.gf-qrs figcaption { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.gf-ctlist { display: grid; gap: 8px; margin-bottom: 14px; }
.gf-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; }
.gf-ctlist .row b { color: var(--ink); }
.gf-ctlist .row i { font-style: normal; font-size: 15px; }
.gf-ctlist .row a { color: var(--brand); font-weight: 700; }
.gf-modal .close-row { display: flex; gap: 8px; justify-content: flex-end; }

.gf-loading { padding: 40px; text-align: center; color: var(--muted); font-size: 13px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1020px) { .gf-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 760px) {
  .gf-hero { padding: 32px 16px 34px; }
  .gf-hero h1 { font-size: 24px; }
  .gf-hero-badge { flex: 1 1 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 12px 16px; }
  .gf-hero-badge .gh-emoji { font-size: 24px; }
  .gf-hero-badge .gh-amount { font-size: 24px; margin: 0; }
  .gf-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gf-wrap { padding: 18px 14px 6px; }
  .gf-card { border-radius: 13px; }
  .gf-body { padding: 10px 10px 11px; }
  .gf-name { font-size: 12px; min-height: 37px; }
  .gf-thumbs img { width: 38px; height: 38px; }
  .gf-cta { padding: 22px 18px; }
  .gf-modal .mbox { padding: 18px 16px 16px; margin-top: 4vh; }
}
@media (max-width: 380px) { .gf-grid { grid-template-columns: 1fr; } }
