/* ============================================================
   工藝圖鑑靜態頁（Materials / Backings / Borders & Edges）
   沿用 main.css 的設計 token（字型、色彩、按鈕、.card、.final-cta、
   .technique-hero），此檔只新增 .craft-* 類別，不覆寫既有元件。
   ============================================================ */

/* ── Hero：沿用 .technique-hero 結構，標題放大為頁級 H1 ── */
.craft-hero .technique-hero__title {
  font-size: 32px;
}
@media (max-width: 767px) {
  .craft-hero .technique-hero__title {
    font-size: 28px;
  }
}

/* ── 通用區塊容器（Figma 3.4：區塊上下留白 120、標題與內容間距 48） ── */
.craft-section {
  padding: 120px 24px;
  background: #ffffff;
  color: #181a1b;
}
.craft-section--alt {
  background: #f6f8fa;
}
@media (max-width: 767px) {
  .craft-section {
    padding: 64px 20px;
  }
}

.craft-section__inner {
  max-width: 1152px;
  margin: 0 auto;
}

.craft-section__header {
  max-width: 800px;
  margin: 0 auto 48px;
  text-align: center;
}

/* 區塊標題：Figma 為 48px Semibold（與 .final-cta__title 同級） */
.craft-section__title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.3px;
  margin-bottom: 12px;
}
@media (max-width: 767px) {
  .craft-section__title {
    font-size: 28px;
    font-weight: 600;
  }
}

.craft-section__subtitle {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  color: #4c5152;
}

/* ── 圖文交錯（Materials，Figma 3.2：圖 426×426 圓角 16、文字欄 646、間距 80） ── */
.craft-feature {
  display: grid;
  grid-template-columns: minmax(0, 426fr) minmax(0, 646fr);
  gap: 80px;
  align-items: center;
}
@media (max-width: 1023px) {
  .craft-feature {
    gap: 40px;
  }
}
@media (max-width: 767px) {
  .craft-feature {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 480px;
    margin: 0 auto;
  }
}

.craft-feature__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 16px;
}

@media (min-width: 768px) {
  .craft-feature--reverse .craft-feature__media {
    order: 2;
  }
}

/* 標題：Figma Headline/Large 600（48／115%） */
.craft-feature__title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 48px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.96px;
  margin-bottom: 20px;
}
@media (max-width: 767px) {
  .craft-feature__title {
    font-size: 28px;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
  }
}

.craft-feature__desc {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #4c5152;
}

/* ── 圓形材質圖樣列（110px 圓形圖 + 名稱，間距 24） ── */
.craft-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
  margin-top: 48px;
}

.craft-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 110px;
  text-align: center;
}

.craft-swatch__dot {
  display: block;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid #ebecec;
  background: #f6f8fa;
}
.craft-swatch__dot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.craft-swatch__label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #181a1b;
}
@media (max-width: 767px) {
  .craft-swatches { gap: 16px; margin-top: 32px; }
  .craft-swatch { width: 84px; }
  .craft-swatch__dot { width: 84px; height: 84px; }
}

/* ── 特殊材質 4 卡（Figma：深藍圓角圖框 270×180 + 標題／說明置中） ── */
.craft-specials {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}
@media (max-width: 1023px) {
  .craft-specials {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Figma 3.2 mobile：特殊材質卡改為橫向滑動列（卡寬 226、間距 16、右側露出下一張） */
@media (max-width: 767px) {
  .craft-specials {
    display: flex;
    gap: 16px;
    margin: 0 -20px;
    padding: 0 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .craft-specials::-webkit-scrollbar {
    display: none;
  }
  .craft-special {
    flex: 0 0 226px;
    scroll-snap-align: start;
  }
}

.craft-special {
  text-align: center;
}

.craft-special__media {
  aspect-ratio: 3 / 2;
  border-radius: 16px;
  overflow: hidden;
  background: #101f35;
  margin-bottom: 16px;
}
.craft-special__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.craft-special__title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 4px;
}

.craft-special__desc {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: #4c5152;
}

/* ── 左標題右清單（Figma 3.3_Backings：左 450 標題＋說明、右 556 直列清單） ── */
.craft-split {
  display: grid;
  grid-template-columns: minmax(0, 450fr) minmax(0, 556fr);
  gap: 146px;
  align-items: start;
}
@media (max-width: 1023px) {
  .craft-split {
    gap: 48px;
  }
}
@media (max-width: 767px) {
  .craft-split {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  /* Figma 3.3 mobile：區塊標題＋說明置中 */
  .craft-split__intro {
    text-align: center;
  }
}

.craft-split__intro .craft-section__title {
  margin-bottom: 20px;
}
.craft-split__intro .craft-section__subtitle {
  line-height: 1.5;
}

.craft-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.craft-item--row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.craft-item--row .craft-item__media {
  flex: 0 0 180px;
  width: 180px;
  height: 180px;
  border-radius: 16px;
  margin-bottom: 0;
}
.craft-item--row .craft-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
}
.craft-item--row .craft-item__body {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 4px;
}
.craft-item--row .craft-item__title {
  margin-bottom: 8px;
}
.craft-item--row .craft-item__desc {
  margin-bottom: 20px;
}
/* Figma 3.3 mobile：清單項目改為圖片滿版在上、文字在下，項目間距 40 */
@media (max-width: 767px) {
  .craft-list {
    gap: 40px;
  }
  .craft-item--row {
    flex-direction: column;
    gap: 16px;
  }
  .craft-item--row .craft-item__media {
    flex-basis: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 10 / 7;
    border-radius: 12px;
  }
  .craft-item--row .craft-item__body {
    padding-top: 0;
  }
}

/* ── 項目卡（背面處理／收邊類型） ── */
.craft-items {
  display: grid;
  gap: 48px 24px;
}
.craft-items--2 {
  grid-template-columns: repeat(2, 1fr);
}
.craft-items--4 {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 767px) {
  .craft-items--2,
  .craft-items--4 {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin: 0 auto;
  }
}

.craft-item__media {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 20px;
}

.craft-item__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 0.3s ease;
}
.craft-items--4 .craft-item__media img {
  aspect-ratio: 1 / 1;
}
.craft-item:hover .craft-item__media img {
  transform: scale(1.05);
}

.craft-item__title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.craft-item__desc {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #4c5152;
  margin-bottom: 24px;
}

/* Best For：Figma 為 12px 一般字重、不轉大寫 */
.craft-item__best-label {
  display: block;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: #656b6e;
  margin-bottom: 8px;
}

.craft-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 標籤：白底、深色 1px 細框膠囊（Figma 3.4 Border Types） */
.craft-chip {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  padding: 0 10px;
  border: 1px solid #181a1b;
  border-radius: 99px;
  background: #ffffff;
  color: #181a1b;
  white-space: nowrap;
}

/* ── 比較表（Figma 3.3_Backings：白色圓角卡 48 內距、灰底圖示表頭 116 高、每列 64 高） ── */
.craft-table-wrap {
  overflow-x: auto;
  border-radius: 24px;
  padding: 48px;
  background: #ffffff;
}
@media (max-width: 767px) {
  /* Figma 3.3 mobile：比較表改為「每種背面處理一張卡」的輪播（.craft-cards），表格僅桌機顯示 */
  .craft-table-wrap {
    display: none;
  }
}

/* ── 比較卡輪播（僅手機；Figma 3.3 mobile「Which Backing Is Right for You?」） ── */
.craft-cards {
  display: none;
}
@media (max-width: 767px) {
  .craft-cards {
    display: block;
  }
}
.craft-cards__carousel {
  overflow: hidden;
}
.craft-cards__track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.craft-cards__track::-webkit-scrollbar {
  display: none;
}
.craft-card {
  scroll-snap-align: start;
  background: #ffffff;
  border-radius: 16px;
  padding: 16px;
}
.craft-card__title {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  color: #181a1b;
  background: #f6f8fa;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 4px;
}
.craft-card__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.craft-card__row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 8px 4px;
  border-bottom: 1px solid #ebecec;
}
.craft-card__row:last-child {
  border-bottom: 0;
}
.craft-card__icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
}
.craft-card__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.craft-card__label {
  flex: 1 1 auto;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #181a1b;
}
.craft-card__value {
  flex: 0 0 auto;
  min-width: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #181a1b;
}
.craft-card__value .craft-check {
  width: 20px;
  height: 20px;
}
.craft-card__value .craft-table__no {
  color: #656b6e;
}
.craft-cards__nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}
.craft-cards__nav [data-carousel-arrow] {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid #ebecec;
  background: #ffffff;
  color: #181a1b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.craft-cards__nav [data-carousel-arrow] svg {
  width: 16px;
  height: 16px;
}
.craft-cards__nav .carousel__dots-list {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.craft-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  color: #181a1b;
}

.craft-table th,
.craft-table td {
  position: relative;
  padding: 20px 16px;
  text-align: center;
  vertical-align: middle;
  line-height: 1.5;
}

/* 表頭：灰底圓角條，每欄圖示 56 + 名稱 */
.craft-table thead th {
  padding: 14px 16px;
  background: #f6f8fa;
  font-weight: 600;
  color: #181a1b;
  white-space: nowrap;
}
.craft-table thead th:first-child {
  border-radius: 16px 0 0 16px;
  text-align: left;
  padding-left: 32px;
}
.craft-table thead th:last-child {
  border-radius: 0 16px 16px 0;
}

.craft-table__icon {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 8px;
}
.craft-table__icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.22));
}

.craft-table__col-label {
  display: block;
}

.craft-table tbody th,
.craft-table tbody td {
  height: 64px;
  border-bottom: 1px solid #ebecec;
}

.craft-table tbody th {
  text-align: left;
  padding-left: 32px;
  font-weight: 600;
  white-space: nowrap;
}

/* 藍色圓形勾 */
.craft-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #3360ff;
  color: #ffffff;
  vertical-align: middle;
}
.craft-check svg {
  width: 16px;
  height: 16px;
}

.craft-table__no {
  color: #9a9fa1;
}

/* 螢幕閱讀器用（✓ 圖示的文字替代）
   註：改用 clip-path 而非 position:absolute。絕對定位的元素若無定位祖先，
   containing block 會是初始包含區塊，導致它逃出比較表的橫向捲動容器，
   把整份文件撐寬（手機版整站橫向溢出）。 */
.visually-hidden-craft {
  position: static;
  display: inline-block;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ── 收邊效果比較（See the Difference） ── */
.craft-diff {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
/* Figma 3.4 mobile：See the Difference 改為橫向滑動列（卡寬 226、間距 16） */
@media (max-width: 767px) {
  .craft-diff {
    display: flex;
    gap: 16px;
    margin: 0 -20px;
    padding: 0 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .craft-diff::-webkit-scrollbar {
    display: none;
  }
  .craft-diff > * {
    flex: 0 0 226px;
    scroll-snap-align: start;
  }
  .craft-diff__media {
    border-radius: 12px;
  }
}

.craft-diff__media {
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 12px;
}

.craft-diff__media img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.craft-diff__label {
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  color: #181a1b;
}

/* ── FAQ：左右兩欄（Figma 3.4：左欄 456 標題＋說明、右欄 600 手風琴，純 CSS details/summary） ── */
.craft-faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 456fr) minmax(0, 600fr);
  gap: 96px;
  align-items: start;
}
@media (max-width: 1023px) {
  .craft-faq__grid {
    gap: 48px;
  }
}
@media (max-width: 767px) {
  .craft-faq__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  /* Figma mobile：FAQ 標題＋說明置中 */
  .craft-faq__intro {
    text-align: center;
  }
}

.craft-faq__intro .craft-section__title {
  margin-bottom: 16px;
}
.craft-faq__intro .craft-section__subtitle {
  line-height: 1.5;
}

.craft-faq__list {
  min-width: 0;
}

.craft-faq__item {
  border-bottom: 1px solid #ebecec;
}

.craft-faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  cursor: pointer;
  list-style: none;
}
.craft-faq__item:first-child .craft-faq__question {
  padding-top: 4px;
}
.craft-faq__question::-webkit-details-marker {
  display: none;
}

.craft-faq__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: #181a1b;
  transition: transform 0.2s ease;
}
.craft-faq__item[open] .craft-faq__icon {
  transform: rotate(180deg);
}

.craft-faq__answer {
  padding: 0 32px 20px 0;
  font-family: "Plus Jakarta Sans", sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  color: #4c5152;
}

/* ── 頁尾 CTA（沿用 .final-cta）：容器放寬讓標題在寬螢幕維持一行、副標限寬兩行（Figma Final CTA） ── */
.final-cta--craft .final-cta__inner {
  max-width: 1152px;
}
.final-cta--craft .final-cta__subtitle {
  max-width: 480px;
  line-height: 1.5;
}

/* ── 收邊方式：卡片為「圖左文右」（Figma 3.4 Borders & Edges） ──
   2×2 排列、行列間距 40，卡片內圖片 200×200 置左、文字置右。 */
.craft-items--row {
  gap: 40px;
}
.craft-items--row .craft-item__title {
  margin-bottom: 8px;
}
.craft-items--row .craft-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.craft-items--row .craft-item__media {
  flex: 0 0 200px;
  width: 200px;
  height: 200px;
  border-radius: 16px;
  margin-bottom: 0;
}
.craft-items--row .craft-item__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: auto;
}
.craft-items--row .craft-item__body {
  flex: 1 1 auto;
  min-width: 0;
}
@media (max-width: 1023px) {
  .craft-items--row .craft-item__media {
    flex-basis: 140px;
    width: 140px;
    height: 140px;
  }
}
@media (max-width: 767px) {
  .craft-items--row .craft-item {
    flex-direction: column;
  }
  .craft-items--row .craft-item__media {
    flex-basis: auto;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
  }
}
