@charset "utf-8";
/* =============================================================
   A03-3「開始設計」婚鞋選配（資料庫版，移植自舊站 weddings.php）
   請在 custom-made-start.css 之後載入
   互動：assets/js/custom-made-start-db.js
   ============================================================= */

/* ---------- 左側預覽：鞋款照片是白底去背圖，改白底＋完整顯示 ---------- */
.builder__fig--db .media { background: #fff; }
.builder__fig--db .media > img { object-fit: contain; transition: opacity .3s ease; }
.builder.is-loading .builder__fig--db .media > img { opacity: .35; }
.builder.is-loading [data-cm-region="steps"] { pointer-events: none; opacity: .6; transition: opacity .2s ease; }

/* ---------- 01 款式：上一款／目前款式／下一款 ---------- */
.stylepick { display: flex; align-items: center; gap: 12px; }
.stylepick__nav {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--c-rule); color: var(--c-text);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.stylepick__nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.stylepick__nav:hover { background: var(--c-text); border-color: var(--c-text); color: #fff; }
.stylepick__cur {
  flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 14px;
  padding: 8px 14px 8px 8px; border: 1px solid var(--c-line); border-radius: 999px;
  background: #fff; font: inherit; color: inherit; text-align: left; cursor: pointer;
  transition: box-shadow .2s ease;
}
.stylepick__cur:hover { box-shadow: 0 0 0 1px var(--c-gold); }
.stylepick__img { flex: none; width: 64px; height: 64px; border-radius: 50%; background: #fff; }
.stylepick__img img { object-fit: contain; }
.stylepick__txt { display: flex; flex-direction: column; min-width: 0; }
.stylepick__code { font-family: var(--ff-display); font-size: var(--fs-lead); line-height: 1.3; }
.stylepick__title { font-size: var(--fs-small, 13px); line-height: 1.5; color: var(--c-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stylepick__count { font-size: var(--fs-small, 13px); line-height: 1.6; color: var(--c-muted); letter-spacing: .06em; }

/* ---------- 02 面料／05 跟高：文字膠囊 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 20px;
  border: 1px solid var(--c-rule); border-radius: 999px;
  font-size: var(--fs-body); line-height: 1.4; color: var(--c-text); background: #fff;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.chip:hover { border-color: var(--c-gold); }
.chip.is-checked { background: var(--c-text); border-color: var(--c-text); color: #fff; }

/* ---------- 03 面料色／04 鞋底色：色票 ---------- */
.swatches { display: flex; flex-wrap: wrap; gap: 16px 14px; }
.swatch { width: 72px; display: flex; flex-direction: column; align-items: center; text-align: center; color: var(--c-text); }
.swatch__dot {
  display: block; width: 52px; height: 52px; border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.12);
  transition: box-shadow .2s ease, transform .2s ease;
}
.swatch:hover .swatch__dot { transform: scale(1.06); }
.swatch.is-checked .swatch__dot { box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 0 0 3px #fff, 0 0 0 5px var(--c-gold); }
.swatch__en { margin-top: 8px; font-size: 12px; line-height: 16px; color: var(--c-muted); }
.swatch__zh { font-size: 14px; line-height: 22px; }
.swatch__dot + .swatch__zh { margin-top: 8px; }
.swatch.is-checked .swatch__zh { font-weight: 600; }

/* ---------- 06 尺寸 ---------- */
.sizepick__select {
  width: 100%; height: 48px; padding: 0 44px 0 18px;
  border: 1px solid var(--c-rule); border-radius: 999px; background: #fff;
  font: inherit; font-size: var(--fs-body); color: var(--c-text);
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23212121' stroke-width='1.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; background-size: 18px;
}
.sizepick__select:focus-visible { outline: 2px solid var(--c-gold); outline-offset: 2px; }
.sizepick__note { margin-top: 8px; font-size: var(--fs-small, 13px); line-height: 1.6; color: var(--c-muted); }

.cm-empty { font-size: var(--fs-small, 13px); color: var(--c-muted); }

/* ---------- 下方確認區：鞋款照片＋點擊回到上方 ---------- */
.summary__fig--db .media { background: #fff; }
.summary__fig--db .media > img { object-fit: contain; transition: transform .6s ease; }
.summary__link { display: block; height: 100%; }
.summary__link:hover .media > img { transform: scale(1.03); }

/* ---------- 「看全部款式」視窗 ---------- */
.cm-dialog {
  width: min(960px, calc(100vw - 32px)); max-height: min(86vh, 900px);
  padding: 0; border: 0; border-radius: 4px; background: #fff; color: var(--c-text);
  box-shadow: 0 20px 60px rgba(40,25,15,.25);
}
.cm-dialog::backdrop { background: rgba(33,33,33,.45); }
.cm-dialog__head {
  position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; background: #fff; border-bottom: 1px solid var(--c-line);
}
.cm-dialog__title { font-family: var(--ff-display); font-size: var(--fs-t3); line-height: 1.2; }
.cm-dialog__title span { margin-left: 10px; font-family: var(--ff-base); font-size: 14px; color: var(--c-muted); }
.cm-dialog__close { width: 40px; height: 40px; border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--c-text); }
.cm-dialog__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px 16px; padding: 24px; margin: 0; list-style: none; }
.cm-style { display: block; text-align: center; color: var(--c-text); }
.cm-style__img { display: block; aspect-ratio: 1 / 1; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 1px var(--c-line); transition: box-shadow .2s ease; }
.cm-style__img img { object-fit: contain; padding: 10%; background: #fff; }
.cm-style:hover .cm-style__img { box-shadow: 0 0 0 1px var(--c-gold); }
.cm-style.is-checked .cm-style__img { box-shadow: 0 0 0 2px var(--c-gold); }
.cm-style__name { display: block; margin-top: 8px; font-family: var(--ff-display); font-size: 14px; line-height: 1.4; }
.cm-style.is-checked .cm-style__name { font-weight: 600; }

@media (max-width: 1023.98px) {
  .builder__fig--db .media { aspect-ratio: 4 / 3; }       /* 單張鞋照在 16:9 太小，手機版改 4:3 */
  .stylepick__img { width: 52px; height: 52px; }
  .swatch { width: 64px; }
  .swatch__dot { width: 44px; height: 44px; }
  .cm-dialog__grid { grid-template-columns: repeat(3, 1fr); gap: 16px 12px; padding: 16px; }
}
