﻿/* =========================
   基本設定
========================= */

article,
article * {
  box-sizing: border-box;
}

article {
  width: 100%;
  height: auto;
  margin: 0 auto;
  overflow: hidden;
}


/*
  不要再使用：

  section div {
    width: 850px;
    margin: 20px auto;
  }

  因為它會影響所有內層元件。
*/


/* =========================
   整個延伸教具區
========================= */

.extension-section {
  width: 1000px;
  max-width: calc(100% - 30px);
  height: auto;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  text-align: center;
}

.extension-learning-section {
  width: 100%;
  margin: 0 auto;
}

/* =========================
   產品名稱與說明
========================= */


.page_font {
  width: 900px;
  max-width: 100%;
  height: auto;
  margin: 5px auto ;
  padding: 5px 0;

  overflow: hidden;

  color: #fff;
  font-size: 16px;
  line-height: 1.8;
  text-align: justify;
}

.page_img {
  width: 100%;
  margin: 0 auto;
  text-align: center;
}

.page_font .page_img h2 {
  margin: 0 0 10px;

  color: #ffd70d;
  font-size: 27px;
  line-height: 1.5;
  text-align: center;
}

.BSP_title {
  display: inline-block;
}

.page_font .BSP_subtitle {
  display: inline-block;
  max-width: 100%;

  margin: 20px auto;
  padding: 5px 10px;

  border-radius: 5px;
  background: #fbb034;
  color: #111;

  font-size: 18px;
  font-weight: bold;
  line-height: 1.5;
  text-align: center;
}

.page_font > p {
  margin: 0;
  color: #fff;
  font-size: 17px;
  line-height: 1.8;
  text-align: justify;
}


/* =========================
   圖片與資訊主區塊
========================= */

.bs-game-wrap {
  width: 1000px;
  max-width: 100%;
  margin: 0 auto 10px;
}

.bs-game-detail {
  display: grid;
  grid-template-columns: 400px 600px;
  gap: 0;

  width: 1000px;
  max-width: 100%;
  margin: 0 auto;

  text-align: left;
}


/* =========================
   左側圖片區
========================= */

.bs-game-gallery {
  display: flex;
  flex-direction: column;

  width: 400px;
  height: 410px;
  margin: 0;
  padding: 10px;

  overflow: hidden;

}


/* 上方主圖 */

.bs-game-main {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 285px;
  margin: 0 0 10px;
  padding: 0;

  overflow: hidden;
}

.bs-game-main img {
  display: block;

  width: 100%;
  height: 100%;
  margin: 0;

  border: 0;
  box-shadow: none;

  object-fit: contain;
  object-position: center;

  opacity: 1;
  transform: scale(1);

  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.bs-game-main img.is-changing {
  opacity: 0;
  transform: scale(0.98);
}


/* 下方縮圖 */

.bs-game-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));

  width: 100%;
  height: 90px;
  margin: 0;
  padding: 0;

  overflow: hidden;

  border: 1px solid #ccc;
}

.bs-game-thumb {
  position: relative;

  display: block;
  width: 100%;
  min-width: 0;
  height: 100%;

  margin: 0 ;
  padding: 0;

  overflow: hidden;
  border: 0;
  border-right: 1px solid #ccc;

  cursor: pointer;
}

.bs-game-thumb:last-child {
  border-right: 0;
}

.bs-game-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  margin: 0 3px;

  border: 0;
  box-shadow: none;

  object-fit: cover;
  object-position: center;

  opacity: 0.65;

  transition:
    opacity 0.2s ease,
    transform 0.25s ease;
	padding:0;

}

.bs-game-thumb:hover img,
.bs-game-thumb.active img {
  opacity: 1;
}

.bs-game-thumb:hover img {
  transform: scale(1.04);
}

.bs-game-thumb.active::after {
  position: absolute;
  inset: 0;

  border: 3px solid #16a9e5;
  content: "";

  pointer-events: none;
}


/* =========================
   右側資訊區
========================= */

.bs-game-info {
  position: relative;

  width: 600px;
  height: 410px;
  margin: 0;
  padding: 0;

  overflow: hidden;
}


/* 滑動視窗 */

.bs-game-slider {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;

  overflow: hidden;

  cursor: grab;
  touch-action: pan-y;
  user-select: none;
}

.bs-game-slider.is-dragging {
  cursor: grabbing;
}


/* 滑動軌道 */

.bs-game-track {
  display: flex;

  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;

  transform: translate3d(0, 0, 0);
  transition: transform 0.4s ease;
}


/* 每一頁 */

.bs-game-page {
  flex: 0 0 100%;

  width: 100%;
  min-width: 100%;
  height: 100%;

  margin: 0;
  padding: 15px 28px 70px;

  overflow-x: hidden;
  overflow-y: auto;


  text-align: left;
  white-space: normal;
  word-break: normal;
  overflow-wrap: break-word;
}


/* =========================
   黃色標題
========================= */

.bs-game-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  width: 160px;
  min-width: 150px;
  min-height: 40px;

  margin: 0 0 20px;
  padding: 5px 25px 5px 8px;

  border-radius: 20px;
  background: #ffc800;
}

.bs-game-star {
  display: flex;
  flex: 0 0 30px;
  align-items: center;
  justify-content: center;

  width: 30px;
  height: 30px;

  border-radius: 50%;

  background: #fff;
  color: #efb900;

  font-size: 24px;
  line-height: 1;
}

.bs-game-title h2 {
  margin: 0;
  padding: 0;

  color: #000;

  font-family: "Microsoft JhengHei", sans-serif;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 1px;

  white-space: nowrap;
}


/* =========================
   特色與規格文字
========================= */

.bs-game-intro {
  margin: 0 0 10px;
  padding: 0;

  color: #FFF;
  font-size: 1.125rem;
  line-height: 1.7;
  text-align: left;
}

.bs-game-list {
  width: 100%;

  margin: 0;
  padding: 0;

  color: #FFF;
  font-size: 1rem;
  line-height: 1.7;

  list-style: none;
  text-align: left;
}

.bs-game-list li {
  position: relative;

  width: 100%;
  margin: 0 0 10px;
  padding: 0 0 0 30px;

  text-align: left;
  white-space: normal;
  overflow-wrap: break-word;
}

.bs-game-list li::before {
  position: absolute;
  top: 1px;
  left: 0;

  color: #44c7f4;

  content: "★";
  font-size: 17px;
  font-weight: bold;
}


/* =========================
   下方控制列
========================= */
/* 控制列固定於右側資訊區底部 */
.bs-game-controls {
  position: absolute;
  right: 0;
  bottom: 14px;
  left: 0;
  z-index: 20;

  display: grid;
  grid-template-columns: 46px 1fr 46px;
  align-items: center;

  width: 100%;
  height: 42px;
  margin: 0;
  padding: 0 22px;

  pointer-events: none;
}

.bs-game-prev {
  grid-column: 1;
  justify-self: start;
}

.bs-game-dots {
  grid-column: 2;

  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;

  width: auto;
  margin: 0;
  padding: 0;
}

.bs-game-next {
  grid-column: 3;
  justify-self: end;
}

.bs-game-arrow,
.bs-game-dot {
  pointer-events: auto;
}


/* 圓形箭頭 */
.bs-game-arrow {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 38px;
  height: 38px;
  margin: 0;
  padding: 0 0 3px;

  border: 2px solid #a4c639;
  border-radius: 50%;

  background: #fff;
  color: #a4c639;

  font-family: Arial, sans-serif;
  cursor: pointer;

  box-shadow: 0 3px 8px rgb(0 0 0 / 12%);

  transition:
    color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.bs-game-arrow span {
  display: block;
  font-size: 34px;
  font-weight: normal;
  line-height: 1;
}

.bs-game-arrow:hover {
  background: #a4c639;
  color: #fff;

  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgb(0 0 0 / 18%);
}

.bs-game-arrow:active {
  transform: translateY(0);
}

/* 禁用時保留位置，不讓圓點跑掉 */
.bs-game-arrow:disabled {
  opacity: 0.2;
  pointer-events: none;
}


/* 頁碼圓點 */
.bs-game-dot {
  width: 9px;
  height: 9px;
  margin: 0;
  padding: 0;

  border: 0;
  border-radius: 50%;

  background: #c8c8c8;
  cursor: pointer;

  transition:
    width 0.2s ease,
    border-radius 0.2s ease,
    background 0.2s ease;
}

.bs-game-dot.active {
  width: 25px;
  border-radius: 10px;
  background: #a4c639;
}

/* =========================
   下方四張圖片
========================= */

.product-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 20px;

  width: 1000px;
  max-width: 100%;

  margin:40px auto 40px;
  padding: 0;
}

.product-board-item {
  display: flex;
  flex-direction: column;

  width: 100%;
  min-width: 0;
  height: 100%;

  margin: 0;
  padding: 0;

  text-align: center;
}

.product-board-image {
  display: block;

  width: 100%;
  height: 180px;

  margin: 0;
  padding: 0;

  overflow: hidden;

  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

.product-board-image img {
  display: block;

  width: 100%;
  height: 100%;

  margin: 0;
  padding: 0;

  border: 0;
  box-shadow: none;

  object-fit: cover;
  object-position: center;

  transition: transform 0.3s ease;
}

.product-board-image:hover img {
  transform: scale(1.04);
}

.product-board-name {
  display: flex;
  align-items: flex-start;
  justify-content: center;

  width: 100%;
  min-height: 55px;

  margin: 10px 0 0;
  padding: 0 5px;

  color: #fff;
  font-size: 17px;
  font-weight: bold;
  line-height: 1.45;
  text-align: center;
}


/* =========================
   平板
========================= */

@media (max-width: 1150px) {
  .bs-game-detail {
    display: block;
    width: 600px;
    max-width: 100%;
  }

  .bs-game-gallery,
  .bs-game-info {
    width: 100%;
  }

  .bs-game-gallery {
    height: auto;
    margin-bottom: 20px;
  }

  .bs-game-main {
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .bs-game-thumbs {
    height: auto;
  }

  .bs-game-thumb {
    aspect-ratio: 1 / 0.75;
  }

  .product-board { 
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: baseline  ;
  gap: 20px;

  width: 80%;
  max-width: auto;

  margin:20px auto ;
  text-align: center;
  
  padding: 0;

  }
  
.product-board-item { 
 display: block;
  flex-direction: row;

  width: 100%;
  min-width: 0;
  height: 100%;

  margin: 0 auto;
  padding: 0;

  text-align: center;
  
}

.product-board-item img {
  display: block;

  width: 200px;
  height: auto;

  text-align: center;
}
}


/* =========================
   手機
========================= */

@media (max-width: 600px) {
  .extension-section {
    max-width: calc(100% - 20px);
  }

  .extension-learning-title {
    gap: 5px;
    font-size: 21px;
  }

  .extension-learning-title .icon {
    width: 35px;
  }

  .page_font .page_img h2 {
    font-size: 22px;
  }

  .page_font .BSP_subtitle {
    font-size: 16px;
  }

  .page_font > p {
    font-size: 16px;
  }

  .bs-game-gallery {
    padding: 8px;
  }

  .bs-game-thumbs {
    gap: 5px;
    border: 0;
  }

  .bs-game-thumb {
    border: 1px solid #ddd;
    border-radius: 4px;
  }

  .bs-game-thumb:last-child {
    border-right: 1px solid #ddd;
  }

  .bs-game-info {
    height: 480px;
  }

  .bs-game-page {
    padding: 25px 16px 68px;
  }

  .bs-game-title {
    min-width: 210px;
    min-height: 45px;
    padding: 4px 18px 4px 6px;
  }

  .bs-game-star {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    font-size: 20px;
  }

  .bs-game-title h2 {
    font-size: 22px;
  }

  .bs-game-intro,
  .bs-game-list {
    font-size: 16px;
  }

  .bs-game-list li {
    padding-left: 26px;
  }

  .bs-game-controls {
    padding: 0 8px;
  }

  .bs-game-arrow {
    width: 44px;
    font-size: 40px;
  }

  .product-board {
  width:100%;
  text-align:center;
  grid-template-columns: repeat(2, minmax(0, 1fr));
	margin:0 auto;
    gap: 20px;
  }

  .product-board-item image {
  width: 100%;
  text-align:center;
  height: auto;
	margin:0 auto;

  }

  .product-board-name {
    min-height: 0;
  }
}


 	
#TOP{
  margin-left:1200px;
}	

#BUY{
  font-family: Butterfly ;
	width:70px;
	height:auto;
	border-radius:10px;
	padding:0px;	
	position:fixed; /*固定位置定位*/
  top:190px; 
  margin-left:1000px;
  z-index:1; /*重疊時會在其他元素之上*/
  font-size:28px;
  border:#FFF 1px solid;
  padding:5px 0;
  font-weight:bold;
}	
#BUY a{
  color:#FFF;
}
