/*---------------------- toTop ------------------------*/
#toTop {
	position: fixed;
	right: 30px;
	bottom: 35px;
	width: 40px;
	height: 40px;
	background: url(../images/icon_top.svg) no-repeat rgba(0,0,0,0.3) center center;
	cursor: pointer;
	display: none;
	z-index: 123;
	text-indent: -9999px;
	-webkit-border-radius: 20px;
	border-radius: 20px;
}
#toTop:hover {
	background: url(../images/icon_top.svg) no-repeat #415f95 center center;
}


/* ==================================================
   2026 模具採購指南
   廣告廠商彩色型錄
   adv2026.css

   body：
   <body class="moldAdvPage">

   JS 自動判斷後會加入：
   .adLevel--spread  跨頁
   .adLevel--full    全頁
   .adLevel--half    半頁
================================================== */


/* ==================================================
   基本設定
================================================== */

html {
  margin: 0;
  padding: 0;
}


body.moldAdvPage {
  margin: 0;
  padding: 0;

  background: #f7f7f7;

  color: #292929;

  font-family:
    Arial,
    "Microsoft JhengHei",
    "微軟正黑體",
    sans-serif;

  font-size: 15px;
  line-height: 1.6;

  -webkit-text-size-adjust: 100%;
}


.moldAdvPage *,
.moldAdvPage *::before,
.moldAdvPage *::after {
  box-sizing: border-box;
}


.moldAdvPage img {
  max-width: 100%;
}


.moldAdvPage a {
  -webkit-tap-highlight-color: transparent;
}



/* ==================================================
   Header
================================================== */

.moldAdvPage .moldAdvHeader {
  width: 100%;

  background: #fff;

  border-bottom: 1px solid #e6e6e6;
}


.moldAdvPage .moldAdvHeaderInner {
  width: min(1190px, calc(100% - 40px));

  margin: 0 auto;
  padding: 14px 0 0;
}


.moldAdvPage .moldAdvHeaderInner a {
  display: block;
}


.moldAdvPage .moldAdvHeaderImg {
  display: block;

  width: 100%;
  height: auto;

  margin: 0 auto;
}



/* ==================================================
   Header 下方簡易導覽
================================================== */

/* ==================================================
   Header 下方導覽
   白底簡潔版
================================================== */

.moldAdvPage .moldAdvNav {
  display: flex;
  align-items: center;
  justify-content: space-between;

  width: min(1190px, calc(100% - 40px));
  margin: 0 auto;

  padding: 10px 0;

  background: #fff;

  border-top: 1px solid #ededed;
  border-bottom: 1px solid #ededed;
}


/* ==================================================
   回目錄
================================================== */

.moldAdvPage .moldAdvBackBtn {
  display: inline-flex;
  align-items: center;

  min-height: 36px;

  padding: 7px 13px;

  background: #fff;

  border: 1px solid #d6d9dc;
  border-radius: 4px;

  color: #33404a;

  font-size: 14px;
  font-weight: 600;
  text-decoration: none;

  transition:
    background .2s ease,
    border-color .2s ease,
    color .2s ease;
}


.moldAdvPage .moldAdvBackBtn:hover {
  background: #f4f5f6;
  border-color: #aeb4b8;

  color: #222;
}


/* ==================================================
   語言切換
================================================== */

.moldAdvPage .moldAdvLang {
  display: inline-flex;
  align-items: center;

  padding: 2px;

  background: #fff;

  border: 1px solid #d6d9dc;
  border-radius: 5px;
}


.moldAdvPage .moldAdvLangBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 72px;
  min-height: 32px;

  padding: 5px 11px;

  border-radius: 3px;

  color: #667078;

  font-size: 14px;
  text-decoration: none;

  transition:
    background .2s ease,
    color .2s ease;
}


/* 當前語言 */
.moldAdvPage .moldAdvLangBtn.is-active {
  background: #30363b;
  color: #fff;

  font-weight: 600;
}


/* 可切換語言 */
.moldAdvPage a.moldAdvLangBtn:hover {
  background: #f1f2f3;

  color: #222;
}


/* ==================================================
   手機
================================================== */

@media screen and (max-width: 700px) {

  .moldAdvPage .moldAdvNav {
    width: calc(100% - 24px);

    padding: 9px 0;
  }


  .moldAdvPage .moldAdvBackBtn {
    min-height: 33px;

    padding: 6px 9px;

    font-size: 12px;
  }


  .moldAdvPage .moldAdvLangBtn {
    min-width: 58px;
    min-height: 29px;

    padding: 5px 8px;

    font-size: 12px;
  }

}



/* ==================================================
   Main
================================================== */

.moldAdvPage .moldAdvMain {
  width: min(1240px, calc(100% - 50px));

  margin: 42px auto 70px;
}



/* ==================================================
   頁面標題
================================================== */

.moldAdvPage .moldAdvTitle {
  margin-bottom: 30px;

  text-align: center;
}


.moldAdvPage .moldAdvTitle h1 {
  margin: 0;

  color: #292929;

  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}


.moldAdvPage .moldAdvTitle p {
  margin: 6px 0 0;

  color: #8b9196;

  font-size: 13px;
  font-weight: 600;

  letter-spacing: 2px;
}


/* 標題下小線 */

.moldAdvPage .moldAdvTitle::after {
  content: "";

  display: block;

  width: 40px;
  height: 3px;

  margin: 15px auto 0;

  background: #91837b;

  border-radius: 3px;
}



/* ==================================================
   廣告列表

   桌機統一 3 欄
   不改 ASP / SQL 排序
================================================== */

.moldAdvPage .moldAdvGallery {
  display: grid;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 26px;

  align-items: stretch;

  margin: 0;
  padding: 0;

  list-style: none;
}



/* ==================================================
   單張 Card

   三種廣告 Card 寬度完全相同
================================================== */

.moldAdvPage .moldAdvCard {
  position: relative;

  display: flex;
  flex-direction: column;

  height: 100%;
  min-width: 0;

  overflow: hidden;

  background: #fff;
  border: 1px solid #dedede;
  border-radius: 8px;

  box-shadow:
    0 3px 12px rgba(0, 0, 0, .04);

  transition:
    transform .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}


.moldAdvPage .moldAdvCard:hover {
  transform: translateY(-4px);

  border-color: #aaa4a0;

  box-shadow:
    0 13px 28px rgba(0, 0, 0, .09);
}



/* ==================================================
   Card 上方等級線
================================================== */

.moldAdvPage .moldAdvCard::before {
  content: "";

  display: block;

  flex: 0 0 auto;

  width: 100%;
  height: 4px;

  background: #999;
}


/* 跨頁 */

.moldAdvPage .adLevel--spread::before {
  height: 5px;

  background: #907667;
}


/* 全頁 */

.moldAdvPage .adLevel--full::before {
  height: 4px;

  background: #62717c;
}


/* 半頁 */

.moldAdvPage .adLevel--half::before {
  height: 3px;

  background: #999ea1;
}



/* ==================================================
   廣告等級 Label

   HTML：
   <span class="moldAdvLevel"></span>
================================================== */

.moldAdvPage .moldAdvLevel {
  position: absolute;

  top: 15px;
  left: 15px;

  z-index: 5;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 25px;

  padding: 4px 10px;

  border-radius: 20px;

  color: #fff;

  font-size: 12px;
  font-weight: 600;
  line-height: 1;

  letter-spacing: .5px;

  box-shadow:
    0 2px 6px rgba(0, 0, 0, .12);
}


/* 跨頁 */

.moldAdvPage
.adLevel--spread
.moldAdvLevel {
  background: #907667;
}


/* 全頁 */

.moldAdvPage
.adLevel--full
.moldAdvLevel {
  background: #62717c;
}


/* 半頁 */

.moldAdvPage
.adLevel--half
.moldAdvLevel {
  background: #909598;
}



/* ==================================================
   廣告圖片連結
================================================== */

.moldAdvPage .moldAdvThumbLink {
  display: block;

  padding: 15px 15px 0;

  color: inherit;

  text-decoration: none;
}



/* ==================================================
   廣告圖片展示區

   重點：
   三種 Card 都使用同一個展示高度
   所以列表整齊、不會高高低低

   只改圖片在裡面的「視覺大小」
================================================== */

.moldAdvPage .moldAdvThumb {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 350px;

  overflow: hidden;

 /* background: #fafafa;

  border: 1px solid #ededed;
  border-radius: 5px;*/
}



/* ==================================================
   圖片共用
================================================== */

.moldAdvPage .moldAdvThumb img {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 100%;

  object-fit: contain;

  transition:
    transform .3s ease;
}


.moldAdvPage
.moldAdvCard:hover
.moldAdvThumb img {
  transform: scale(1.018);
}



/* ==================================================
   1. 跨頁
   約 450 × 320

   最大：
   橫式幾乎吃滿圖片區
================================================== */

.moldAdvPage
.adLevel--spread
.moldAdvThumb img {
  max-width: 100%;
  max-height: 91%;
}



/* ==================================================
   2. 全頁
   約 350 × 480

   次大：
   直式圖片以高度為主
================================================== */

.moldAdvPage
.adLevel--full
.moldAdvThumb img {
  width: 70%;
  height: auto;

  max-width: none;
  max-height: 100%;
}



/* ==================================================
   3. 半頁
   與全頁同寬，但因為本身是橫式，
   高度自然較低，所以會明顯看起來較小
================================================== */

.moldAdvPage
.adLevel--half
.moldAdvThumb img {
  width: 70%;
  height: auto;

  max-width: none;
  max-height: none;
}



/* ==================================================
   廠商資訊
   固定最低高度，沒有網站 / Email 也維持同樣卡片高度
================================================== */

.moldAdvPage .moldAdvInfo {
  display: flex;
  flex-direction: column;

  flex: 1;

  /* 沒有網站 / Email，也保留按鈕區的高度 */
  min-height: 130px;

  padding: 17px 18px 18px;
}

/* ==================================================
   公司名稱
================================================== */

.moldAdvPage .moldAdvCompany {
  display: -webkit-box;

  min-height: 46px;

  margin: 0 0 13px;

  overflow: hidden;

  color: #292929;

  font-size: 20px;
  font-weight: 600;
  line-height: 1.45;

  text-align: center;

  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}



/* 跨頁名稱可稍微明顯一點 */

.moldAdvPage
.adLevel--spread
.moldAdvCompany {
  font-size: 20px;
}



/* ==================================================
   官方網站 / 電子郵件
================================================== */

.moldAdvPage .moldAdvActions {
  display: flex;
  align-items: center;
  justify-content: center;

  flex-wrap: wrap;

  gap: 8px;

  margin-top: auto;
}



/* 小按鈕 */

.moldAdvPage .moldAdvAction {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 36px;

  padding: 7px 14px;

  background: #f7f7f7;

  border: 1px solid #dedede;
  border-radius: 4px;

  color: #4d6284;

  font-size: 14px;
  line-height: 1.2;

  text-decoration: none;

  transition:
    background .2s ease,
    border-color .2s ease,
    color .2s ease;
}


.moldAdvPage .moldAdvAction:hover {
  background: #616b73;

  border-color: #616b73;

  color: #fff;
}



/* ==================================================
   沒有資料
================================================== */

.moldAdvPage .moldAdvEmpty {
  grid-column: 1 / -1;

  padding: 70px 20px;

  background: #fff;

  border: 1px solid #e3e3e3;
  border-radius: 8px;

  color: #888;

  text-align: center;
}



/* ==================================================
   Footer

   對應 templates/footer.asp
================================================== */

.moldAdvPage .moldSiteFooter {
  width: 100%;

  margin: 0;
  padding: 45px 0 25px;

  background: #222;

  color:
    rgba(255, 255, 255, .78);
}



/* Footer 內容 */

.moldAdvPage .moldFooterInner {
  display: grid;

  grid-template-columns:
    repeat(2, minmax(0, 1fr));

  gap: 50px;

  width: min(1190px, calc(100% - 40px));

  margin: 0 auto;
}



/* Footer 單欄 */

.moldAdvPage .moldFooterBlock {
  min-width: 0;
}



/* 第二欄分隔線 */

.moldAdvPage
.moldFooterBlock
+ .moldFooterBlock {
  padding-left: 50px;

  border-left:
    1px solid rgba(255, 255, 255, .15);
}



/* Footer Title */

.moldAdvPage .moldFooterTitle {
  margin: 0 0 14px;

  color: #fff;

  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
}



/* Publisher / Editor */

.moldAdvPage
.moldFooterTitle span {
  display: block;

  margin-top: 2px;

  color: #c9ae83;

  font-size: 13px;
  font-weight: 400;
}



/* Footer 文字 */

.moldAdvPage
.moldFooterBlock p {
  margin: 3px 0;

  color:
    rgba(255, 255, 255, .78);

  font-size: 13px;
  line-height: 1.65;
}



/* Footer link */

.moldAdvPage
.moldSiteFooter a {
  color: #fff;

  text-decoration: none;

  transition: color .2s ease;
}


.moldAdvPage
.moldSiteFooter a:hover {
  color: #d5ba8e;
}



/* Copyright */

.moldAdvPage
.moldFooterBottom {
  width: min(1190px, calc(100% - 40px));

  margin: 35px auto 0;
  padding-top: 18px;

  border-top:
    1px solid rgba(255, 255, 255, .12);

  color:
    rgba(255, 255, 255, .4);

  font-size: 12px;

  text-align: center;
}



/* ==================================================
   平板
   <= 1000px
================================================== */

@media screen and (max-width: 1000px) {


  /* Main */

  .moldAdvPage .moldAdvMain {
    width: calc(100% - 30px);
  }


  /* 兩欄 */

  .moldAdvPage .moldAdvGallery {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    gap: 18px;
  }


  /* 圖片區稍微縮 */

  .moldAdvPage .moldAdvThumb {
    height: 350px;
  }


  /* Footer */

  .moldAdvPage .moldFooterInner {
    gap: 30px;
  }


  .moldAdvPage
  .moldFooterBlock
  + .moldFooterBlock {
    padding-left: 30px;
  }

}



/* ==================================================
   手機
   <= 700px
================================================== */

@media screen and (max-width: 700px) {


  /* ==================================================
     Header
  ================================================== */

  .moldAdvPage .moldAdvHeaderInner {
    width: calc(100% - 24px);

    padding-top: 10px;
  }



  /* ==================================================
     導覽
  ================================================== */

  .moldAdvPage .moldAdvNav {
    width: calc(100% - 30px);

    padding: 10px 0;

    font-size: 13px;
  }



  /* ==================================================
     Main
  ================================================== */

  .moldAdvPage .moldAdvMain {
    width: calc(100% - 24px);

    margin: 28px auto 45px;
  }



  /* ==================================================
     Title
  ================================================== */

  .moldAdvPage .moldAdvTitle {
    margin-bottom: 22px;
  }


  .moldAdvPage .moldAdvTitle h1 {
    font-size: 24px;
  }


  .moldAdvPage .moldAdvTitle p {
    font-size: 12px;

    letter-spacing: 1.5px;
  }



  /* ==================================================
     手機全部單欄
  ================================================== */

  .moldAdvPage .moldAdvGallery {
    grid-template-columns: 1fr;

    gap: 18px;
  }



  /* ==================================================
     Card
  ================================================== */

  .moldAdvPage .moldAdvThumbLink {
    padding: 12px 12px 0;
  }



  /* 手機圖片區 */

  .moldAdvPage .moldAdvThumb {
    height: clamp(
      280px,
      82vw,
      390px
    );
  }



  /* 跨頁 */

  .moldAdvPage
  .adLevel--spread
  .moldAdvThumb img {
    max-width: 100%;
    max-height: 90%;
  }



  /* 全頁 */

  .moldAdvPage
  .adLevel--full
  .moldAdvThumb img {
    max-width: 80%;
    max-height: 100%;
  }



  /* 半頁 */

  .moldAdvPage
  .adLevel--half
  .moldAdvThumb img {
    max-width: 86%;
    max-height: 70%;
  }



  /* Info */

  .moldAdvPage .moldAdvInfo {
    padding: 13px 12px 14px;
  }



  /* 公司名稱 */

  .moldAdvPage .moldAdvCompany {
    min-height: 0;

    margin-bottom: 11px;

    font-size: 18px;
  }


  .moldAdvPage
  .adLevel--spread
  .moldAdvCompany {
    font-size: 18px;
  }



  /* Actions */

  .moldAdvPage .moldAdvActions {
    gap: 7px;
  }


  .moldAdvPage .moldAdvAction {
    min-height: 35px;

    padding: 7px 12px;

    font-size: 13px;
  }



  /* ==================================================
     Footer
  ================================================== */

  .moldAdvPage .moldSiteFooter {
    padding: 35px 0 22px;
  }


  .moldAdvPage .moldFooterInner {
    grid-template-columns: 1fr;

    gap: 28px;

    width: calc(100% - 36px);
  }


  /* 第二區改上下分隔 */

  .moldAdvPage
  .moldFooterBlock
  + .moldFooterBlock {
    padding: 28px 0 0;

    border-left: 0;

    border-top:
      1px solid
      rgba(255, 255, 255, .15);
  }


  .moldAdvPage .moldFooterTitle {
    font-size: 15px;
  }


  .moldAdvPage
  .moldFooterBlock p {
    font-size: 12px;
    line-height: 1.7;
  }


  .moldAdvPage
  .moldFooterBottom {
    width: calc(100% - 36px);

    margin-top: 28px;
  }

}



/* ==================================================
   小手機
   <= 420px
================================================== */

@media screen and (max-width: 420px) {


  .moldAdvPage .moldAdvMain {
    width: calc(100% - 20px);
  }


  .moldAdvPage .moldAdvGallery {
    gap: 14px;
  }


  .moldAdvPage .moldAdvThumbLink {
    padding: 9px 9px 0;
  }


  .moldAdvPage .moldAdvThumb {
    height: 300px;
  }


  .moldAdvPage .moldAdvCompany {
    font-size: 18px;
  }


  .moldAdvPage .moldAdvAction {
    flex: 1 1 auto;
  }


  /* Label 再小一點 */

  .moldAdvPage .moldAdvLevel {
    top: 12px;
    left: 12px;

    min-height: 23px;

    padding: 4px 8px;

    font-size: 11px;
  }

}