
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-main);
  color: var(--text-color);
  background: var(--secondary-color);
}
/* 既有的桌面版 CSS 省略，只附加手機版調整 */

@media screen and (max-width: 375px) {
    
  .PD-top{
   padding-top: 3%; /* 手機版不需要額外頂部間距 */

  }
  /* header 固定但內容垂直排列 */
  header {
    padding: 10px 15px;
  }

  nav ul {
    flex-direction: column;
    font-size: 12px;
    margin-top: 10px;
  }

  nav ul li a {
    padding: 8px 12px;
  }

  nav ul li ul {
    position: static;
    box-shadow: none;
  }

  nav ul li:hover ul {
    display: block;
  }


  /* main 區塊調整 padding */
  main {
    padding-top: 60px; /* 預留 header 高度 */
  }

  /* section */
  .section {
    padding: 40px 15px;
  }

  .section h2 {
    font-size: 24px;
  }

  /* products-header */
  .products-header {
    flex-direction: column;
    align-items: flex-start;
    font-size: 12px;
  }

  .products-header .sort {
    margin-top: 10px;
    width: 100%;
  }

  .products-header .sort select {
    width: 100%;
    box-sizing: border-box;
  }


}

@media (max-width: 768px) {
    .main-nav{
      display: flex;
    }
    .main-nav ul {
      align-items: center;
       gap: 1px !important;
    }
.pagination-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 10vh;
}

.pagination {
  margin-top: 10px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.pagination button {
  font-size: 20px;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.pagination button:disabled {
  background: #ccc;
  cursor: default;
}

.breadcrumb {

  padding: 15px;
  font-size: 14px;
  margin: 0;
}

.title-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 10px 10px;
  margin: 0 auto;
}

.title-section h1 {
  font-size: 18px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.marquee {
  background: #ffeb3b;
  overflow: hidden;
  white-space: nowrap;
}

.marquee p {
  display: inline-block;
  animation: marquee 15s linear infinite;
  font-weight: bold;
  color: #d32f2f;
  padding: 10px 0;
}

}

@keyframes marquee {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

.sidebar {
  width: 250px;
  padding: 20px;
  background: #f9f9f9;
  border-right: 1px solid #ddd;
}

.sidebar input {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
}

.sidebar h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar ul li {
  margin-bottom: 10px;
}

.sidebar ul li button {
  background: none;
  border: none;
  color: #333;
  font-size: 16px;
  cursor: pointer;
}

.sidebar ul li button:hover {
  color: var(--primary-color);
}

.content {
  flex: 1;
  padding: 20px;
}

.cart_content {
  padding: 40px;
  text-align: center;
}



.cart_td {
  border: 1px solid #ccc;
  padding: 3px;
  text-align: center;
}


.cart_button {
  margin-top: 20px;
  padding: 10px 20px;
  font-size: 16px;
}

#searchButton {
  padding: 8px 15px;
  margin-left: 10px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#searchButton:hover {
  background: #388e3c;
}

.product-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}

.product-images {
  flex: 1;
  max-width: 500px;
  text-align: center;
  margin: 0;
}

.product-images img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.product-images #mainImage {
  width: 300px;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
}

.thumbs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  transition: 0.3s;
}

.thumbs img.active,
.thumbs img:hover {
  opacity: 1;
  border: 2px solid #ff6ec7;
}

.product-info {
    max-width: 100%;   /* 限制最大寬度不超過手機螢幕 */
    padding: 12px;     /* 可選，手機上可稍微多一點空間 */
    margin: 0 auto;    /* 可選，置中顯示 */
  background-color: #fce4ec;
}

.product-info h2 {
  margin-top: 0;
}

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

#lightbox img {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 12px;
}

/* --- 手機版調整 --- */
@media (max-width: 768px) {
  .logo{
    margin-top: 3px;
    margin-left: 3px;
  }
  .logo img{
    padding:5px;
  }

  .logo h1 {
    font-size: 16px;
  }

  .logo p {
    font-size: 10px;
  }

  .logo h2 {
    font-size: 12px;
  }

  .nav-container {
    flex-wrap: wrap;
    padding: 0px;
    margin-bottom: 0px;
  }
  .menu nav ul{
    margin: 0px;
  }
  .main-nav a{
    font-size: 14px;
  }


  nav ul {
    font-size: 12px;
  }

  .hero p {
    font-size: 12px;
  }

  .hero button {
    padding: 10px 20px;
    font-size: 12px;
  }

  .products-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 20px;
  }

  .product-container {
    flex-direction: column;
    align-items: center;
  }

  .product-images {
    max-width: 100%;
    margin-bottom: 15px;
  }

  .product-images #mainImage {
    width: 100%;
    height: auto;
  }

  .thumbs {
    justify-content: flex-start;
    overflow-x: auto;
    gap: 6px;
  }

  .thumbs img {
    width: 50px;
    height: 50px;
  }

  .product-info {
    max-width: 100%;
    padding: 10px 5px;
  }

  .cart_content {
    padding: 20px 10px;
  }

  .pagination {
    flex-wrap: wrap;
    gap: 10px;
  }

.search-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: nowrap;
  width: 60%;            /* ✅ 滿版 */
  padding: 0 10px;
  box-sizing: border-box; /* ✅ 確保 padding 不會讓它爆框 */
  gap: 6px;
  margin-top: 5px;
}

.search-container input {
  flex: 1;                 /* ✅ 自動填滿剩餘空間 */
  min-width: 0;
  padding: 4px 6px;
  font-size: 12px;
}

.search-container button {
  flex-shrink: 0;          /* ✅ 防止縮到太小 */
  padding: 8px 12px;
  font-size: 12px;
  white-space: nowrap;
}



}

.pagination button {
  font-size: 20px; /* 字體變大 */
  padding: 12px 24px; /* 增加按鈕大小 */
  border: none;
  /* background: var(--primary-color); */
  /* color: #fff; */
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.pagination button:disabled {
  background: #ccc;
  cursor: default;
}


.marquee {
  background: #ffeb3b;
  overflow: hidden;
  white-space: nowrap;
}
.marquee p {
  display: inline-block;
  animation: marquee 15s linear infinite;
  font-weight: bold;
  color: #d32f2f;
  padding: 10px 0;
}
@keyframes marquee {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

.main-section {
  display: flex;
  margin-top: 20px;
  flex-direction: column;
}

.sidebar {
  width: 250px;
  padding: 20px;
  background: #f9f9f9;
  border-right: 1px solid #ddd;
}
.sidebar input {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
}
.sidebar h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
}
.sidebar ul {
  list-style: none;
  padding: 0;
}
.sidebar ul li {
  margin-bottom: 10px;
}
.sidebar ul li button {
  background: none;
  border: none;
  color: #333;
  font-size: 16px;
  cursor: pointer;
}
.sidebar ul li button:hover {
  color: var(--primary-color);
}

.content {
  flex: 1;
  padding: 20px;
}

.cart_content { 
  padding: 40px; 
  text-align: center; 
}

.cart_button { 
  margin-top: 20px; 
  padding: 10px 20px; 
  font-size: 16px; 
}

#searchButton {
  padding: 8px 15px;
  margin-left: 10px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}
#searchButton:hover {
  background: #388e3c; /* 深一點的綠色 */
}

.product-container {
  display: flex;
  gap: 30px;
  align-items: flex-start;
  flex-wrap: wrap; /* 手機版會自動換行 */
  max-width: 1200px;
  margin: 0 auto;
}

.product-images {
  flex: 1;
  max-width: 500px;
  text-align: center;
  margin: 0;
  /* outline: 2px dashed red;*/
}

.product-images img {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
  cursor: pointer;
  border-radius: 10px;
  transition: transform 0.3s ease; /* 平滑動畫 */
}

.product-images #mainImage {
  width: 300px;
  height: auto;
  cursor: pointer;
  border-radius: 8px;
}

.thumbs {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 10px;
}

.thumbs img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.7;
  transition: 0.3s;
}

.thumbs img.active,
.thumbs img:hover {
  opacity: 1;
  border: 2px solid #ff6ec7; /* 幻彩框線色可改 */
}

.product-info {
  flex: 2;
  max-width: 550px;
  padding: 10px;
  background-color: #fce4ec;
}

.product-info h2 {
  margin-top: 0;
}

@media (max-width: 768px) {
  .product-detail-container {
    flex-direction: column;
    align-items: center;
  }

  .product-images,
  .product-info {
    max-width: 100%;
  }
}

#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

#lightbox-img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

.PD-top {

  height: 50px;
}

  .PD-middle {
    flex-direction: column;
    align-items: center;  /* 置中上下排列內容 */
  }

.PD-bottom {
  height:80px;
  /*background-color: #ede7f6;  */
}

.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  text-align: center;
  background-color: #f8f8f8;
  padding: 10px 0;
  box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  color: #555;
  min-height: 40px; /* 比 height 靈活，內容多時也不會撐壞 */
  height: auto;     /* 明確指定自適應高度 */
}

.QTY-input {
  height: 30px;     /* 增加高度 */
  width: 60px;      /* 控制寬度（較短） */
  font-size: 16px;  /* 字體也要相對調整 */
  padding: 5px;     /* 內邊距可微調舒適度 */
  border-radius: 6px; /* 圓角讓它更美觀 */
  border: 1px solid #ccc;
}

.BasketBtn {
  background-color: #ffeb3b;   /* 明亮黃色 */
  color: #000000;              /* 黑色文字 */
  padding: 12px 15px;          /* 上下高，左右寬 */
  border: none;
  border-radius: 999px;        /* 橢圓形關鍵 */
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.BasketBtn:hover {
  background-color: #fdd835;   /* 滑過時稍微暗一點的黃 */
}

.media-video {
  max-width: 100%;
  width: 300px;
  height: 400px;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.DeleteBtn {
  background-color: #FF0000;   /* 紅色 */
  color: #000000;              /* 黑色文字 */
  padding: 8px 10px;          /* 上下高，左右寬 */
  border: none;
  border-radius: 999px;        /* 橢圓形關鍵 */
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}

#Checkout-div {
  text-align: center;
  margin-top: 1em;
}

.basket-thumb {
  width: 70px;
  height: auto;
  object-fit: cover; 
}

form {
  background: #fff;
  padding: 2em;
  max-width: 600px;
  margin: 0 auto;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}


.submit-btn {
  margin-top: 1.5em;
  background-color: #ff9800;
  color: white;
  font-weight: bold;
  border: none;
  padding: 1em;
  border-radius: 8px;
  cursor: pointer;
  width: 100%;
}

.submit-btn:hover {
  background-color: #e68900;
}

.cart-modal {
  position: fixed;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
  width: 90%;
  max-width: 600px;
  z-index: 1000;
  display: none;
}


.cart-modal-body img {
  width: 100px;
  height: auto;
  border-radius: 6px;
}

  .cart-modal-actions {
    gap: 16px; /* 手機版加大間距 */
    flex-direction: column; /* 若要按鈕直排可加這行 */
    align-items: stretch;
  }

.cart-modal-actions .btn {
  padding: 0.4em 0.8em;
  font-size: 0.8em;
  margin-right: 0.4em;
  border: none;
  text-decoration: none;
  border-radius: 4px;
}

  #cart-continue-btn {
    display: inline-block; /* 確保能有 margin 效果 */
    margin-top: 55px;      /* 向下平移的距離，可以調整 */
    margin-right: 30px;
    padding: 0.4em 0.8em;
    font-size: 14px;
    margin-right: 0.4em;
    border: none;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #ccc;
  }

.cart-modal-actions .btn-checkout {
  background-color: orange;
}

@media screen and (max-width: 600px) {

.cart-modal-body {
    margin-top: 45px;
    display: flex;
    align-items: flex-start;
    max-width: 100%;
    box-sizing: border-box;
}
  .cart-modal-body > div {
    flex: 1; /* 🔸 讓文字區撐滿剩餘空間 */
    min-width: 0; /* ✅ 搭配 ellipsis 必加 */
  }

  .cart-modal-content {
  padding: 15px;
  }

  /* 商品名稱與價格加粗 */
  .product-name,
  .product-info {
    display: block;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 2px 0;
    white-space: normal;    /* ✅ 允許換行 */
    overflow-wrap: break-word; /* ✅ 長單字也能斷行 */
  }
  .cart-modal-actions {
    margin-top: 10px;
  }

  .checkout-container {
    flex-direction: column; /* 改成直列 */
    padding: 1rem;
  }

  #checkout-form {
    width: 100% !important; /* 寬度撐滿手機寬度 */
  }

  #checkout-form select,
  #checkout-form textarea,
  .form-group,
  .inputForm,
  .inputFormPhone {
    width: 100% !important; /* 表單元素全寬 */
    box-sizing: border-box;
    min-width: auto;
  }

  .summary-section {
    width: 100%;
    padding: 1rem;
    margin-top: 1rem;
    border-radius: 6px;
  }

  .discount-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .discount-row input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    font-size: 16px;
    height: 35px;
  }


  .DiscountCodeBtn {
    width: 100%;
    height: 45px;
    font-size: 16px;
  }

  .radio-row {
    flex-direction: column;
    gap: 0.4rem;
  }

  .radio-item {
    white-space: normal; /* 允許換行 */
  }

  #checkout-form label {
    font-size: 14px;
    margin-top: 8px;
    margin-bottom: 4px;
  }

  #checkout-form button {
    width: 100%;
    font-size: 18px;
  }

  /* 調整錯誤訊息字體大小 */
  .error-message {
    font-size: 0.85em;
  }

  /* 調整價格文字大小適合手機 */
  .original-price {
    font-size: 18px;
  }

  .sale-price {
    font-size: 22px;
  }

}

/* 現有樣式保持不變，以下為手機優化補充 */

/* 手機常見螢幕寬度以下調整 */
@media (max-width: 600px) {
  /* 調整 #whatsapp-float 位置與大小，避免遮擋 */
  #whatsapp-float {
    width: 50px;
    height: 50px;
    bottom: 15px;
    right: 15px;
  }

  /* 讓 #cart 字體稍微縮小，避免擠壓 */
  #cart {
    font-size: 1em;
    margin-left: 2px;
  }

  /* 縮小 #cart-badge */
  #cart-badge {
    top: -6px;
    right: -8px;
    font-size: 12px;
    padding: 1px 5px;
  }

  /* filter 按鈕調整大小 */
  .filter {
    font-size: 12px;
    height: 25px;
  }

  /* Cbtn 按鈕縮小 */
  .Cbtn {
  font-size: 11px;
  height: 28px;
  width: auto;
  padding: 1px 1px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;  
  }

  /* terms-container 內距縮小 */
  .terms-container {
    padding: 1rem;
    line-height: 1.2;
  }

  /* terms-section 標題字體縮小 */
  .terms-section {
      margin-bottom: 2rem;
      border-left: 5px solid #f39c12;
      padding-left: 0.5rem;
      padding-right: 0.5rem;  /* 加右邊間距 */
      word-break: break-word;
  white-space: normal;
}

.terms-item {
  padding-left: 0.5rem;   /* 內文左側留空 */
  padding-right: 0.5rem;  /* 內文右側留空 */
}

  .terms-section h2,
  .terms-item h3,
  .terms-item p {
    font-size: 10px;
  }

    /* product-list 單欄排列 */
  #product-list {
      display: grid;
      grid-template-columns: repeat(2, 1fr); /* 每行兩個 */
      gap: 5px;
      padding: 5px;
      justify-items: center;
  }

  /* product-item 最大寬度改為 100% */
  .product-item {
    width: 100%;
    max-width: 180px; /* 控制單一商品最大寬度，避免太大 */
    padding: 8px;
    box-sizing: border-box;
  }
.product-item img,
.product-item a,
.product-item p {
  max-width: 100%;      /* 最大寬度不超過容器 */
  box-sizing: border-box;
  word-wrap: break-word; /* 避免文字超出 */
  margin: 0 auto;        /* 置中對齊 */
  display: block;        /* 讓a和p也能設定寬度並換行 */
  transition: transform 0.3s ease;
}
.product-item a {
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: normal;
  font-size: 12px;
}


/* 商品描述不加粗 */
.product-desc {
  font-size: 12px;
  margin: 4px 0;
  line-height: 1.4;
  color: #444;
}

/* 商品描述中的連結不加粗 */
.product-desc a {
  font-size: 12px;
  color: var(--primary-color);
  text-decoration: underline;
  font-weight: normal;
}
}

#locationbar {
  height: 1px;
}

@media (max-width: 480px) {
    /* slider-wrapper 寬度改為 100% */


  .slider-container {
      width: 80%;
      height: 60vw;
      display: flex;
      justify-content: center;   /* 置中圖片 */
      align-items: center;
      padding: 10px 0;
      overflow: hidden;
  }
   .slider-container img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        display: block;
  }

  /* slider-arrow 縮小並位置微調 */
  .slider-arrow {
    font-size: 20px;
    padding: 8px;
  }
  .slider-arrow.left {
    left: 5px;
  }
  .slider-arrow.right {
    right: 5px;
  }

  /* products 容器調整欄數 */
  .products {
    grid-template-columns: 1fr !important;
  }
}

/* CSS控制 */
@media screen and (max-width: 600px) {
  #submitOrderDesktop {
    display: none !important;
  }
  #submitOrderMobile {
    display: inline-block !important;
  }
}

@media screen and (min-width: 601px) {
  #submitOrderDesktop {
    display: inline-block !important;
  }
  #submitOrderMobile {
    display: none !important;
  }
}

#invoice-preview{
  display: flex;
  justify-content: center;
}




/* ✅ 手機版優化 */
@media (max-width: 768px) {

.footer-top {
  background-color: #f8f9fa;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid #ddd;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background-color: #f0f2f5;
  padding: 5px 10px;
  font-size: 10px;
  line-height: 1.6;
  gap: 20px;
}

.footer-links > div {
  flex: 1 1 80px;   /* 最小寬180px，自動換行 */
  max-width: 220px;
  text-align: center;
}

.footer-links h4 {
  margin-bottom: 6px;
  font-size: 10px;
  color: #333;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin: 3px 0;
}

.footer-links li a {
  color: #333;
  text-decoration: none;
  font-size: 10px;
}

.footer-links li a:hover {
  text-decoration: underline;
}


}

  .payment-icon{
    max-width: 80px;
    height: auto;
  }

    .product-image-item {
    width: 100%;
  }

    .product-image-item {         
      width: 60%;           /* 更小寬度以適應手機螢幕 */
      object-fit: cover;    /* 確保圖片不變形 */
      border-radius: 6px;
      box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  }

/* 手機版 3D Carousel */
@media screen and (max-width: 480px) {
  .carousel-wrapper {
    max-width: 100%;
    height: 180px;  /* 高度縮小 */
    perspective: 600px;  /* 較小視角 */
  }

  .carousel-track {
    height: 180px;
    gap: 5px; /* 少許間距 */
  }

  .carousel-track a {
    margin: 0 5px; /* 縮小間距 */
    transition: transform 1.2s ease, opacity 1.2s ease;
  }

  .carousel-track a img {
    max-width: 120px; /* 縮小圖片 */
    max-height: 180px;
  }

  .carousel-track a.center {
    transform: scale(1.4);
    opacity: 1;
    z-index: 5;
    margin: 0 15px;
  }

  .carousel-track a.center img {
    max-width: 160px !important;
    max-height: 220px !important;
  }

  .carousel-track a.left-1,
  .carousel-track a.right-1 {
    transform: scale(1.1) translateY(-6px);
    opacity: 0.85;
    z-index: 4;
    margin: 0 10px;
  }

  .carousel-track a.left-1 img,
  .carousel-track a.right-1 img {
    max-width: 110px;
    max-height: 130px;
  }

  .carousel-track a.left-2,
  .carousel-track a.right-2 {
    transform: scale(1) translateY(-12px);
    opacity: 0.7;
    z-index: 3;
    margin: 0 6px;
  }

  .carousel-track a.left-3,
  .carousel-track a.right-3 {
    transform: scale(0.85) translateY(-30px);
    opacity: 0.5;
    z-index: 2;
    margin: 0 3px;
  }

  .carousel-track a.left-4,
  .carousel-track a.right-4 {
    transform: scale(0.7) translateY(-50px);
    opacity: 0.3;
    z-index: 1;
    margin: 0 2px;
  }

  .carousel-track a.left-5,
  .carousel-track a.right-5 {
    transform: scale(0.5) translateY(-80px);
    opacity: 0.2;
    z-index: 0;
    margin: 0 1px;
  }

  .carousel-btn {
    font-size: 1.5rem;
    padding: 6px 10px;
    background: rgba(177, 246, 249, 0.4);
  }

  .carousel-btn.left {
    left: 5px;
  }

  .carousel-btn.right {
    right: 5px;
  }
}

/* 統一 menu-trigger 外觀 */
.menu-trigger {
  font-weight: bold;
  padding: 10px 15px;
  border-radius: 6px;
  display: inline-block;
}

/* submenu 初始為隱藏 */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  z-index: 9999;
  min-width: 140px;
  box-shadow: 0 2px 6px rgba(181, 180, 180, 0.1);
}

/* 手機調整：position fixed 避免被 header 擋住 */
@media (max-width: 768px) {
    .submenu {
      max-height: 0;
      overflow: hidden;
      transition: max-height 0.3s ease;
      background: #f9f9f9;
      padding-left: 10px;
    }

    .submenu.open {
      max-height: 500px; /* 足夠放下所有項目 */
    }

    .menu-trigger {
      width: 100%;
      text-align: left;
      border: none;
      font-size: 14px;
      padding: 5px 5px;
      cursor: pointer;
    }
}

    @media (max-width: 800px) {
      .maintenance {
        margin-top: 20%;
        min-height: 80px;
      }
      /* product table div of figure/handmade */
      .content {
        padding: 5px;
      }
      .products-header {
        margin-bottom: 5px;
      }

      .product-images #mainImage {
        width: 150px;
        height: auto;
        cursor: pointer;
        border-radius: 8px;
      }
      .product-info p,h2 {
        padding: 3px;
        margin: 3px;
      }
      .product-description-box h2{
        font-size: 20px;
      }
      .product-description h3{
        padding: 5px;
      }
      .info-row {
        font-size: 14px;
      }

      .product-image-list {  
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 每行兩個 */  
      }    
      .product-image-list img {  
        width: auto;
      } 
      .PD-bottom {
        height: 5px;
      }
      .terms-section h2{
        font-size: 14px;
      }
      .terms-item p {
        font-size: 12px;
      }
      #messageLabel{
        margin-top:  50px;;
      }

      #leave-button{
        margin-top: 30px;
      }
    }

       @media (max-width: 800px) {
        /*cart table*/

        .cart-container img{
          max-width: 60px;
        }
        .cart_td p{
          font-size: 12px;
          margin: 0px;
          word-wrap: break-word;   /* 可選，處理長單字或連結 */
          overflow-wrap: break-word;  /* 現代瀏覽器建議使用 */
          white-space: normal;     /* 確保不是 nowrap */

        }

         .cart_td a {
          display: inline-block;
           width: 60px;
            text-align: center;
         }

        #basket_item_name{
          width: 60px;
          font-size: 10px;

        }
        .cart_td span {
          font-size: 12px;
        }
        .QTY-input{
          width: 35px;
        }
        .cart_table {
          width: 95%;
          margin: 5px;
          border-collapse: collapse;
          background: #ffffff;
        }
        .cart_td label {
          padding: 2px;
          margin:2px;
        }
        #dp-label p{
          margin: 2px;
          font-size: 12px;
        }
        .cart_th{
          font-size: 14px;
        }

       }

       @media (max-width: 800px) {

        .about-section {
          line-height:1.2;
          margin: 10px;
        }
        .about-section p {
          font-size: 14px;
        }
       }

       @media (max-width: 800px) {
        /*swal*/
        .swal2-icon{
            transform: scale(0.8); /* 比例縮小 80% */
            transform-origin: center center; /* 以中心點縮放 */
        }
        .swal2-title{
          font-size: 16px;
        }
       }
