/*------------------------------------------------
  1. Header 全域重置
------------------------------------------------*/
* {
    box-sizing: border-box;
  }
  
  body {
    margin: 0;
    font-family: 'Noto Sans TC', sans-serif;
    background-color: #fafafa;
    color: #333;
    
  }
  
  a {
    text-decoration: none;
    color: inherit;
  }
  
  .wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
  }
  
  /*------------------------------------------------
    2. Header 样式
  ------------------------------------------------*/
  header {
    background-color: #28887A;         /* 深灰色底 */
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  
  /* 將 header 裡面的內容用 flex 排版，左右對齊 */
  header .wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
  }
  
  /* 2.1 Logo */
  .logo a {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.05em;
  }
  
  /* 2.2 漢堡選單（手機版） */
  .nav-toggle {
    display: none;
  }
  
  .nav-toggle-label {
    display: none; /* 預設不顯示，視響應尺寸改顯示 */
    cursor: pointer;
    width: 24px;
    height: 24px;
    position: relative;
  }
  
  .nav-toggle-label span,
  .nav-toggle-label span::before,
  .nav-toggle-label span::after {
    display: block;
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: #fff;
    transition: all 0.3s ease;
  }
  
  .nav-toggle-label span {
    top: 50%;
    transform: translateY(-50%);
  }
  
  .nav-toggle-label span::before {
    content: '';
    top: -8px;
  }
  
  .nav-toggle-label span::after {
    content: '';
    top: 8px;
  }
  
  .nav-toggle:checked + .nav-toggle-label span {
    background-color: transparent;
  }
  
  .nav-toggle:checked + .nav-toggle-label span::before {
    top: 0;
    transform: rotate(45deg);
  }
  
  .nav-toggle:checked + .nav-toggle-label span::after {
    top: 0;
    transform: rotate(-45deg);
  }
  
  /* 2.3 Nav 選單 */
  .nav-menu {
    display: flex;
    align-items: center;
  }
  
  .nav-list {
    list-style: none;
    display: flex;
    gap: 40px;               /* 選單之間間距 */
    margin: 0;
    padding: 0;
  }
  
  .nav-list li a {
    position: relative;
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    letter-spacing: 0.05em;
    transition: color 0.2s;
  }
  
  .nav-list li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 0%;
    height: 2px;
    background-color: #ffcc00;  /* 底部滑過時下劃線顏色 */
    transition: width 0.3s ease;
  }
  
  .nav-list li a:hover {
    color: #ffcc00;
  }
  
  .nav-list li a:hover::after {
    width: 100%;
  }
  
  /* 2.4 購物車按鈕 */
  .cart-btn a {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 12px;
    border-radius: 30px;
    font-size: 0.95rem;
    transition: background 0.3s;
  }
  
  .cart-btn a:hover {
    background: rgba(255, 255, 255, 0.2);
  }
  
  .cart-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #ffcc00; /* 購物袋底色 */
    color: #222;             /* 圖示顏色 */
    font-size: 1rem;
    transition: background 0.3s;
  }
  
  .cart-btn a:hover .cart-icon {
    background-color: #e6b800;
  }
  
  .cart-count {
    font-weight: 600;
  }
  
  /*------------------------------------------------
    3. 響應式：手機尺寸下的調整
  ------------------------------------------------*/
  @media screen and (max-width: 768px) {
    header .wrapper {
      flex-wrap: wrap;
      height: auto;
      padding: 10px 0;
    }
  
    /* Logo 靠左 */
    .logo {
      flex: 1 1 100%;
    }
  
    /* 顯示「漢堡選單按鈕」 */
    .nav-toggle-label {
      display: block;
      position: absolute;
      top: 50%;
      right: 60px;    /* 與購物車按鈕保留空間 */
      transform: translateY(-50%);
    }
  
    /* Nav-menu 預設隱藏 */
    .nav-menu {
      flex: 1 1 100%;
      order: 3;
      width: 100%;
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease;
    }
  
    /* 若漢堡按鈕被勾選，展開選單 */
    .nav-toggle:checked ~ .nav-menu {
      max-height: 300px; /* 視選單長度調整 */
    }
  
    .nav-list {
      flex-direction: column;
      gap: 16px;
      padding: 10px 0;
    }
  
    .nav-list li a {
      font-size: 1.1rem;
      padding-left: 10px;
    }
  
    /* 購物車按鈕靠右顯示 */
    .cart-btn {
      order: 2;
      margin-left: auto;
    }
    .h2title{
        margin-left: 10px;
   }
  }
  

.banner{
    width: 100%;
    height: 300px;
    position: relative;
    overflow: hidden; /* 確保偽元素不會跑到外面 */
}
.banner img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    object-position: top;
    display: block;
}

/* 利用 ::after 在 .banner 容器上面鋪一層遮色片 */
.banner::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 300px;        /* 和 img 一樣高 */
    background-color: rgba(0, 0, 0, 0.5); /* 黑色 50% 透明 */
    pointer-events: none; /* 不影響滑鼠事件 */
    z-index: 1;           /* 確保在 img 之上 */
}

/* 把圖片層放在 z-index: 0 */
.banner img {
    position: relative;
    z-index: 0;
}
.banner a {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;            
    color: #fff;
    font-size: 3rem;
    text-decoration: none;
    white-space: nowrap;

    /* 換字體並拉大字距 */
    font-family: "Noto Serif TC", serif;
    letter-spacing: 0.2em; /* 根據需求調整間距 */
    font-weight: bold;
}
.logo {
    font-size: 26px;
    color: #333;
    font-weight: bold;
    text-decoration: none;
}
.categories{
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 50px;
}
/* 分類 */
.categories h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    
}
.h2title{
    margin-left: 80px;
}
.cat-list {
    list-style: none;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.cat-list li {
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 10px 15px;
    border-radius: 4px;
}
.cat-list a {
    color: #333;
    text-decoration: none;
}
.featured-products{
    max-width: 1200px;
    margin: 0 auto;
}

/* 商品區塊 (Grid) */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 50px auto;
}
.product-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.product-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.product-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}
.product-card h3 {
    font-size: 1rem;
    margin: 10px;
}
.product-card p {
    margin: 0 10px 15px 10px;
    color: #007bff;
    font-weight: bold;
}

/* 商品詳細 */
.product-detail {
    display: flex;
    gap: 40px;
    margin-bottom: 60px;
    max-width: 1200px;
    margin: 0 auto;
}
.image-gallery {
    flex: 1;
}
.image-gallery img {
    width: 100%;
    border: 1px solid #ddd;
    margin-bottom: 10px;
}
.info {
    flex: 1;
}
.info p {
    margin: 10px 0;
}
.info .description {
    border: 1px solid #eee;
    padding: 15px;
    background-color: #fff;
    max-height: 300px;
    overflow-y: auto;
}
.info input[type="number"] {
    width: 60px;
    padding: 5px;
}
.btn-add-cart {
    background-color: #007bff;
    color: #fff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.btn-add-cart:hover {
    background-color: #0056b3;
}
.sold-out {
    color: #c00;
    font-weight: bold;
}

/* 購物車表格 */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}
.cart-table th, .cart-table td {
    border: 1px solid #ddd;
    padding: 10px;
    text-align: center;
}
.cart-table input[type="number"] {
    width: 50px;
    padding: 5px;
}
.cart-summary {
    text-align: right;
    margin-bottom: 50px;
}
.btn-checkout {
    background-color: #28a745;
    color: #fff;
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 4px;
}
.btn-checkout:hover {
    background-color: #218838;
}

/* 結帳表單 */
.checkout-form {
    max-width: 600px;
    margin-bottom: 60px;
}
.checkout-form fieldset {
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
}
.checkout-form legend {
    padding: 0 10px;
    font-weight: 500;
}
.checkout-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.checkout-form input[type="text"],
.checkout-form input[type="email"],
.checkout-form input[type="tel"],
.checkout-form textarea,
.checkout-form select {
    width: 100%;
    padding: 8px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
}
.order-summary {
    background-color: #f8f9fa;
    padding: 15px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}
.btn-confirm {
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}
.btn-confirm:hover {
    background-color: #0056b3;
}

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid #e0e0e0;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #666;
}
.content{
    max-width: 1200px;
    margin: 0 auto;
}
.content1{
    width: 100%;
   display: flex;
   justify-content: center;
   align-items: center;
   flex-direction: column;
}
/* 只供參考：請依照專案風格自行調整 */
.admin-container {
    max-width: 800px;
    margin: 30px auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  }
  
  .admin-container h2 {
    margin-bottom: 20px;
    font-family: 'Playfair Display', serif;
    color: #333;
  }
  
  .form-group {
    margin-bottom: 15px;
  }
  .form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
  }
  .form-group input[type="text"],
  .form-group input[type="number"],
  .form-group select,
  .form-group textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
  }
  .form-group .hint {
    font-size: 0.9rem;
    color: #666;
    margin-top: 4px;
  }
  
  .btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    margin-right: 10px;
  }
  .btn-primary {
    background-color: #007bff;
    color: #fff;
  }
  .btn-primary:hover {
    background-color: #0056b3;
  }
  .btn-secondary {
    background-color: #6c757d;
    color: #fff;
  }
  .btn-secondary:hover {
    background-color: #5a6268;
  }
  
  .alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
  }
  .alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
  }
  .alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
  }
  .modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 2rem;
  border-radius: 8px;
  width: 90%;
  max-width: 700px;
  line-height: 1.8;
  color: #333;
  position: relative;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  max-height: 80vh;
  overflow-y: auto;
}

.modal-content h2 {
  margin-top: 0;
  font-size: 1.8rem;
  border-bottom: 2px solid #ccc;
  padding-bottom: 0.5rem;
}

.modal-content h3 {
  margin-top: 1.5rem;
  font-size: 1.3rem;
  color: #444;
}

.modal-content ul, .modal-content ol {
  padding-left: 1.5rem;
}

.modal .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  font-weight: bold;
  cursor: pointer;
}

  