body {
  margin: 0;
  font-family: Arial, sans-serif;
  background-color: #333;
  color: #fff;
}

.i-prev {
  left: 10px;
}

.i-next {
  right: 10px;
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px auto;
  width: 50%;
  
}
.logo {
  padding: 10px;
  width: 15%;
  border-radius: 20px;
  background-color: #ccc;
  color: black;
  font-size: 24px;
  text-decoration: none;
  text-align: center;
}

.nav-links {
  padding: 10px;
  width: 15%;
  border-radius: 20px;
  background-color: #cccccc;
  color: black;
  font-size: 24px;
  text-decoration: none;
  text-align: center;
}

/* 選擇 class 為 dropdown 的元素 */
.dropdown {
  position: relative;
  display: inline-block;
}

/* 選擇 class 為 dropdown-content 的元素 */
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #ccc;
  color: #000;
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

/* 選擇 class 為 dropdown-content 的元素下的 a 元素 */
.dropdown-content a {
  color: #000;
  padding: 5px 5px;
  text-decoration: none;
  display: block;
}

/* 滑鼠懸停在 dropdown 項目上時 */
.dropdown:hover .dropdown-content {
  display: block;
  border-radius: 15px;
}

.line {
  background-color: #cccccc;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 20px auto;
  height: 2.5px;
  width: 60%;
}

/* 商品容器樣式 */
#product-list { /* 使用 id 選擇器 */
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 80%;
  max-width: 700px;
  margin: 30px auto;

}

/* 商品項目樣式 */
.product-item {
  background-color: #444;
  color: white;
  border-radius: 10px;
  display: grid;
  /* 使用 grid 佈局 */
  grid-template-rows: auto auto;
  /* 設定兩列 */
  align-items: center;
  /* 垂直置中 */
  text-align: center;
}

/* 商品圖片樣式 */
.product-item img {
  width: 100%;
  height: auto;
  object-fit: contain;
  /* 保持圖片比例 */
  border-radius: 10px;
}

/* 商品資訊樣式 */
.product-item .item-content {
  font-size: 110%;
}

/* 分頁樣式 */
.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

/* 分頁按鈕樣式 */
.page-button {
  background-color: #cccccc;
  color: black;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  margin: 0 10px;
  cursor: pointer;
}

.page-button:hover {
  background-color: #999;
}

/* 選擇 footer 元素 */
footer {
  background-color: #222; /* 設定背景顏色為 #222 */
  text-align: center; /* 設定文字水平居中 */
  padding: 10px; /* 設定內邊距為 10px */
  position: fixed; /* 使用固定定位 */
  bottom: 0; /* 距離底部 0px */
  width: 100%; /* 設定寬度為 100% */
}

.loader {
  text-align: center; 
  font-size: 18px; 
  margin-top: 20px; 
}

@media (max-width: 1000px) {
  nav ul {
    display: block;
    position: fixed;
    top: 40px;
    right: 1px;
    width: 16.666%; /* 設定 width 為 100% */
    background-color: #ccc;
    padding: 15px 20px; /* 設定內邊距為上下 12px、左右 16px */

  }
  
  nav li {
      margin-top: 15px; /* 將項目之間的間距調整為 5px */
    }
  
  .dropdown-content {
    position: static;
    display: none;
    background-color: #ccc;
    color: #fff;
  }

  .burger {
    display: block;
  }
}