/* =============================================================
 * giftbox.css —— 族谱高端礼盒定制页专属样式
 * 数据来源：Figma 设计稿 node 471:1902 (Slide 16:9 - 19)
 * 整页结构（按从上到下顺序）：
 *   1. 公共头部导航 (复用 public.css)
 *   2. Banner —— 纯图片 1920x1072，进入页面缩放动效
 *   3. 套餐一 精装族谱细册
 *      · 选择颜色（两个选项，红线框选中态）
 *      · 选择姓氏扣定制（两个选项，各带价格）
 *   4. 套餐二 高端族谱礼盒
 *      · 选择颜色
 *      · 选择姓氏扣定制
 *   5. 立即购买按钮
 *   6. 公共页脚 (复用 public.css)
 * 关键设计点：
 *   ① Banner 纯图片，进入页面 scale 1.12→1 缩放动效
 *   ② 选项卡片用红线框（#B81C22）标识选中态
 *   ③ 每个组合可点击切换选中
 * ============================================================= */

/* ---------- 1. 整页容器 ---------- */
.page-giftbox {
  width: 100%;
  background: #fff;
  position: relative;
}

/* =============================================================
 * 区块一：Banner —— 纯图片 + 缩放动效
 * Figma 470:1412 1920x1072 (top:92)
 * ============================================================= */
.giftbox-banner {
  position: relative;
  width: 100%;
  height: 1072px;
  overflow: hidden;
  background: #1a1a1a;              /* 图片加载前的占位底色 */
}
.giftbox-banner img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 进入页面缩放动效：1.12 → 1 */
  animation: giftboxBannerZoom 1.8s cubic-bezier(.22,.61,.36,1) both;
}
@keyframes giftboxBannerZoom {
  0%   { transform: scale(1.12); }
  100% { transform: scale(1); }
}

/* =============================================================
 * 通用：套餐大区块
 * ============================================================= */
.giftbox-package {
  position: relative;
  width: 100%;
  padding: 100px 0 40px;
  background: #fff;
}

/* 套餐标题：套餐X（红）+ 名称（黑），居中 */
.giftbox-package .package-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 24px;
  margin: 0 0 60px;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 48px;
  line-height: 1.2;
  white-space: nowrap;
}
.giftbox-package .title-package {
  color: var(--color-accent);      /* #B81C22 红色 */
}
.giftbox-package .title-name {
  color: #000;
}

/* =============================================================
 * 通用：选项行（label + 卡片组 + 价格）
 * 整体宽度 80%，标题在卡片上方靠左，价格在卡片上方靠右
 * ============================================================= */
.giftbox-package .option-section {
  width: 60%;
  margin: 0 auto 60px;
  display: flex;
  flex-direction: column;
}

/* 顶部行：标题(左) + 价格(右) */
.giftbox-package .section-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}

/* 左侧标签："选择颜色" / "选择姓氏扣定制" */
.giftbox-package .section-label {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 28px;
  color: #000;
  text-align: left;
  line-height: 1.3;
}

/* 右侧价格（section 级别，如 ￥800.00 / ￥1200.00） */
.giftbox-package .section-price {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 36px;
  color: #EA0000;
  text-align: right;
  line-height: 1;
  white-space: nowrap;
}

/* 中间卡片组 */
.giftbox-package .section-cards {
  display: flex;
  gap: 20px;
  align-items: stretch;
}

/* =============================================================
 * 核心：选项卡片
 * 默认 1px 透明边框，选中态 1px #B81C22
 * 图片与边框间距 18px
 * ============================================================= */
.giftbox-package .option-card {
  position: relative;
  flex: 1 1 0;
  aspect-ratio: 1 / 1;
  border: 1px solid transparent;
  padding: 18px;
  background: #fff;
  cursor: pointer;
  transition: border-color .3s ease, transform .3s ease, box-shadow .3s ease;
}
.giftbox-package .option-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.giftbox-package .option-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
/*.giftbox-package .option-card:hover img {*/
/*  transform: scale(1.04);*/
/*}*/
/* 选中态：1px 红色边框 */
.giftbox-package .option-card.is-selected {
  border-color: #B81C22;
}

/* 卡片列：价格 + 卡片上下排列 */
.giftbox-package .card-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
}

/* 卡片上方价格，右对齐，不含￥前缀（已写在 HTML 中） */
.giftbox-package .card-item .card-price {
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 24px;
  color: #EA0000;
  text-align: right;
  line-height: 1;
  margin-bottom: 30px;
}

/* =============================================================
 * 套餐二（与套餐一结构完全相同，沿用样式）
 * 通过 :nth-child 或额外 class 区分
 * ============================================================= */
.giftbox-package:nth-of-type(2) {
  padding-top: 60px;
}

/* =============================================================
 * 立即购买按钮
 * Figma 470:1467 bg #c30d23, 474x118, rounded 35px, top:5026px left:724px
 * ============================================================= */
.giftbox-action {
  width: 100%;
  padding: 60px 0 80px;
  background: #fff;
  text-align: center;
}
.giftbox-action .buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 474px;
  max-width: 90%;
  height: 118px;
  background: #C30D23;
  border: 0;
  border-radius: 35px;
  color: #fff;
  font-family: var(--font-serif);
  font-weight: 900;
  font-size: 48px;
  line-height: 1;
  cursor: pointer;
  transition: background .3s ease, transform .3s ease, box-shadow .3s ease;
  box-shadow: 0 8px 24px rgba(195, 13, 35, .25);
}
.giftbox-action .buy-btn:hover {
  background: #A80009;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(195, 13, 35, .35);
}
.giftbox-action .buy-btn:active {
  transform: translateY(0);
}

/* =============================================================
 * 入场动效适配（wow.js）
 * ============================================================= */
.wow { visibility: hidden; }

/* =============================================================
 * 响应式
 * ============================================================= */
@media (max-width: 1200px) {
  .giftbox-banner { height: 700px; }
  .giftbox-package { padding: 60px 0 20px; }
  .giftbox-package .package-title { font-size: 36px; gap: 16px; margin-bottom: 40px; }
  .giftbox-package .option-section {
    width: 90%;
    margin-bottom: 40px;
  }
  .giftbox-package .section-label { font-size: 22px; }
  .giftbox-package .section-cards { gap: 14px; }
  .giftbox-package .section-price { font-size: 28px; }
  .giftbox-action .buy-btn { width: 360px; height: 90px; font-size: 36px; }
}

@media (max-width: 768px) {
  .giftbox-banner { height: 220px; }
  .giftbox-package { padding: 32px 0 16px; }
  .giftbox-package .package-title { font-size: 22px; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; }
  /* 小屏：选项改为两列横排，避免每个卡片占满一屏 */
  .giftbox-package .option-section {
    width: 94%;
    margin-bottom: 24px;
  }
  .giftbox-package .section-header { flex-direction: column; align-items: flex-start; gap: 6px; margin-bottom: 12px; }
  .giftbox-package .section-label { font-size: 17px; }
  .giftbox-package .section-cards { flex-direction: row; gap: 12px; }
  .giftbox-package .card-item { flex: 1 1 0; min-width: 0; }
  .giftbox-package .card-item .card-price {
    font-size: 15px;
    margin-bottom: 12px;
    white-space: nowrap;
  }
  .giftbox-package .option-card {
    aspect-ratio: 1 / 1;
    padding: 10px;
  }
  .giftbox-package .option-card img { aspect-ratio: auto; }
  .giftbox-package .section-price { font-size: 18px; }
  .giftbox-action { padding: 24px 0 44px; }
  .giftbox-action .buy-btn { width: 240px; height: 60px; font-size: 22px; border-radius: 20px; }
}

@media (max-width: 480px) {
  .giftbox-banner { height: 170px; }
  .giftbox-package { padding: 26px 0 14px; }
  .giftbox-package .package-title { font-size: 19px; margin-bottom: 16px; }
  .giftbox-package .section-label { font-size: 15px; }
  .giftbox-package .card-item .card-price { font-size: 13px; }
  .giftbox-action .buy-btn { width: 220px; height: 54px; font-size: 20px; }
}
