* {
  /*框線*/
  /* border: #000 solid 1px; */
}

/* :root {
  --main-color: #cde3db;
  --accent-color: #e8f3f1;
  --hover-color: #f9faf4;
} */
:root {
  --main-color: #cde3db; /*主要框線*/
  --accent-color: #e8f3f1; /*背景顏色*/
  --hover-color: #f0e9c9;
  --skyblue-color: #86c4d2;
}
body {
  margin: 0;
  font-family: "Noto Sans TC", sans-serif;
  background-color: var(--accent-color);
  color: #333;
}

/* .banner {
        width: 100%;
        height: 200px;
        /* background: url("./images/2025\ banner_ver1.jpg") center/cover no-repeat; */
/* background: url("./images/2025\ banner_ver1.jpg") center/contain
          no-repeat; */
/* } */
/*==================================*/
.banner {
  width: 100%;
  /* height: 200px; */
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-image: linear-gradient(to bottom, #62a9e9 30%, #d5f8fe 70%);
}
.banner img {
  width: 100%;
  max-width: 600px; /* 限制圖片最大寬度 */
  align-items: center;
  justify-content: center;
  height: auto;
  display: block;
  margin: 0 auto; /*水平置中的關鍵 */
}

/*==================================*/
/*篩選3人商品的列表*/
.icon-bar {
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
  padding: 1em;
  background-color: var(--hover-color);
}

.icon-button {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  cursor: pointer;
  margin: 0 0.5rem;
}

.icon-button img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.icon-button.all {
  font-size: 1.3em;
  line-height: 50px;
}
.icon-button:active {
  border: 2px solid #007bff; /* 藍色外框 */
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.8); /* 外圍發光 */
}
/*圖片*/
/*商品區域(綜合)*/
.products {
  /*固定好每個要幾欄，因此將flex改為grid*/
  display: grid;
  /* display: flex; */
  flex-wrap: wrap;
  justify-content: center; /* 所有模式都置中 */
  /* 
  flex-direction: column;
  */
  gap: 1em; /*1em換算為16pt*/
  padding: 1em;
}
/*單一商品區*/
.card {
  border: 2px solid var(--main-color);
  border-radius: 10px;
  padding: 1em;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card img {
  display: block;
  max-width: 90%;
  height: auto;
  object-fit: contain;
}
/*商品iframe 調整*/
.card iframe {
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 3 / 4; /*可以維持圖片的正常比例 寬/高 */
  display: block;
  border: none;
}

.card h3 {
  margin: 0.5em 0 0.2em;
}

.card button {
  margin-top: 0.5em;
  padding: 0.5em 1em;
  border: none;
  border-radius: 5px;
  background-color: var(--main-color);
  color: #333;
}
.card p {
  margin: 5px;
}
.card button:hover {
  background-color: var(--hover-color);
}
/*為了手機板調整*/
@media (min-width: 600px) {
  .products {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }

  /* .card {
    width: calc(50% - 1em);
  } */
}

@media (max-width: 480px) {
  .products.model-3 {
    grid-template-columns: repeat(3, 1fr); /* 強制塞進去 */
  }
}

/*------------------------------*/
/*切換模式*/

/* 預設單欄 */
.products.model-1 {
  grid-template-columns: 1fr;
}

.products.model-1 .card {
  margin: 0 auto;
  width: 90%;
  max-width: 400px;
}
/* 雙欄 */
.products.model-2 {
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  justify-content: center; /* 所有模式都置中 */
}
.products.model-2 .card {
  /* width: 45%; */
  max-width: 360px;
  margin: 0 auto;
}

/* 三欄 */
.products.model-3 {
  grid-template-columns: repeat(3, minmax(120px, 1fr));
}
.products.model-3 .card {
  /* width: 30%; */
  max-width: 320px;
}
.products.model-3 .card iframe {
  /* max-width: 300px; */
  max-height: 80%;
}
/*------------------------------*/
/*.view-model 包住單欄雙欄三欄*/
.view-model {
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
  padding: 1em;
}
.view-model-page {
  width: 60px;
  height: 40px;
  align-items: center;

  cursor: pointer;
  margin: 0 0.5rem;
  text-align: center; /*文字置中*/
  line-height: 40px;
  /* vertical-align: middle; */
  font-size: 1.3em;
  border-radius: 5px;
  border: #333;
  background-color: #86c4d2;
  color: #fff;
}
.view-model-page:hover {
  background-color: #62a9e9;
  color: #fff;
}

.model-1 {
  grid-template-columns: 1fr;
}

.model-2 {
  grid-template-columns: repeat(2, 1fr);
}

.model-3 {
  grid-template-columns: repeat(3, 1fr);
}

/*===================================*/
/* 頁腳 */
footer {
  background-color: var(--hover-color);
  /* color: white; */
  color: #433131;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
  font-size: 0.9em;
}
