/* ===== Hero Slider ===== */
.hero-slider {
  max-width: 1200px;
  margin: 28px auto 60px;
  padding: 0 20px;
  /* 兩側留白像你截圖那樣 */
  position: relative;
}

.hero-viewport {
  border-radius: 8px;
  overflow: hidden;
  /* 讓圖片圓角裁切 */
  background: #f5f5f5;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
}

.hero-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 100%;
  transition: transform .5s ease;
}

.hero-slide {
  width: 100%;
  height: clamp(260px, 52vw, 520px);
  /* RWD 高度：手機較矮、桌機約 520px */
  position: relative;
}

.hero-slide img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 保持裁切充滿 */
}

/* 箭頭 */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(255, 255, 255, .85);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
  transition: background .2s ease, transform .2s ease;
}

.hero-nav:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.05);
}

.hero-nav.prev {
  left: 28px;
}

.hero-nav.next {
  right: 28px;
}

.hero-nav i {
  font-size: 18px;
}

/* 小圓點 */
.hero-dots {
  display: flex;
  gap: 10px;
  justify-content: center;
  align-items: center;
  margin-top: 14px;
}

.hero-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, .25);
  opacity: .6;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, background .2s ease;
}

.hero-dots button[aria-selected="true"] {
  background: rgba(0, 0, 0, .8);
  opacity: 1;
  transform: scale(1.15);
}

/* 小螢幕把箭頭縮小、點距離縮小 */
@media (max-width: 768px) {
  .hero-slider {
    padding: 0 14px;
  }

  /* 手機版首頁輪播：完整顯示圖片 */
  .hero-slide {
    height: auto;
    aspect-ratio: 1200 / 520;
  }

  .hero-slide a {
    display: block;
    width: 100%;
    height: 100%;
  }

  .hero-slide img {
    position: static;
    inset: auto;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
  }

  /* 手機版隱藏左右箭頭 */
  .hero-nav {
    display: none;
  }

  .hero-dots {
    gap: 8px;
    margin-top: 10px;
  }
}


/* ===== IG Section ===== */
.ig-section {
  padding: 40px 0 30px;
  background: #fff;
}

.ig-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
  text-align: center;
}

/* 專門給 IG 標題用的樣式 */
.section-title.ig-title {
  font-size: 30px;
  /* 比一般大標小一點 */
  font-weight: 500;
  /* 中等粗細，像截圖那樣 */
  letter-spacing: 0.06em;
  /* 稍微拉開字距 */
  text-transform: none;
  /* 取消如果有設定全大寫的話 */
  margin-bottom: 16px;
}


.ig-subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #666;
}

.ig-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  /* 3 等分 */
  gap: 10px;
}

.ig-item {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  /*border-radius: 4px;*/
  background: #f5f5f5;
}

.ig-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.4s ease;
}

/* hover 放大一點點 */
.ig-item:hover img {
  transform: scale(1.03);
}

/* ===== Service Support Section ===== */
.about-links-section {
  padding: 40px 0 30px;
  background: #fff;
}

.about-links-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 12px;
}

/* 標題置中 */
.about-title {
  text-align: center;
  margin-bottom: 24px;
}

/* 桌機 4 欄 */
.about-links-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 30px;
  margin: 30px 0 0;
  padding: 0 36px;
}

/* 單一卡片 */
.about-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #d8d8d8;
  overflow: hidden;

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

/* 上方 icon 區 */
.about-card-icon {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
}

.about-card-icon img {
  display: block;
  width: auto;
  height: auto;
  max-width: 78px;
  max-height: 78px;
  object-fit: contain;
}

/* 下方文字區 */
.about-card-body {
  min-height: 65px;
  padding: 18px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: #fff;
}

.about-card-body h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.4;
  font-weight: 400;
  color: #333;
}

/* Hover */
.about-card:hover {
  transform: translateY(-3px);
  border-color: #c8c8c8;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

/* 平板：2 欄 */
@media (max-width: 991.98px) {
  .about-links-inner {
    max-width: 760px;
    padding: 0 12px;
  }

  .about-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
}

/* 手機：2 欄，保持參考圖的直式卡片 */
@media (max-width: 575.98px) {
  .about-links-section {
    padding: 30px 0 20px;
  }

  .about-links-inner {
    max-width: 100%;
    padding: 0 14px;
  }

  .about-links-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .about-card-icon {
    height: 95px;
  }

  .about-card-icon img {
    max-width: 60px;
    max-height: 60px;
  }

  .about-card-body {
    min-height: 68px;
    padding: 12px 6px;
  }

  .about-card-body h3 {
    font-size: 16px;
  }
}


/* ===== Footer ===== */
.site-footer {
  background: #fff;
  /*border-top: 1px solid #000;*/
  margin-top: 25px;
}

/* 把寬度縮到中間（跟你右邊圖一樣） */
.footer-inner {
  max-width: 1050px;
  /* 原本 1200 改成 1050，看起來比較中間 */
  margin: 0 auto;
  padding: 35px 20px 25px;
}

/* 上面那條線也要跟內容對齊，不要全螢幕 */
.footer-top-line {
  height: 1px;
  background: #000;
  width: 80%;
  max-width: 1050px;
  margin: 0 auto 28px;
  /* 置中 + 底下空隙 */
}

/* 三欄內容 */
.footer-columns {
  display: flex;
  gap: 150px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-col h4 {
  font-size: 18px;
  margin-bottom: 14px;
  font-weight: 600;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 6px;
  font-size: 14px;
}

.footer-col ul li a {
  text-decoration: none;
  color: #000;
}

.footer-col ul li a:hover {
  color: var(--green);
}

/* 聯絡我們那欄 */
.contact-list li {
  display: flex;
  gap: 6px;
  align-items: flex-start;
}

.contact-list i {
  font-size: 14px;
  margin-top: 2px;
}

.contact-social {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  font-size: 18px;
}

.contact-social i {
  font-size: 1.5rem;
  /* 自訂大小：可改 1.2rem、1.8rem 等 */
  transition: color 0.3s ease;
}

.contact-social a {
  margin-right: 8px;
  /* 間距 */
  display: inline-flex;
  transition: transform 0.25s ease;
  /* 縮放動畫 */
}

.contact-social a:hover {
  transform: scale(1.2);
  /* 滑過放大 20% */
}

/* LINE */
.contact-social .bi-line {
  color: #06C755;
}

/* YouTube */
.contact-social .bi-youtube {
  color: #FF0000;
}

/* Facebook */
.contact-social .bi-facebook {
  color: #1877F2;
}

/* Instagram（漸層） */
.contact-social .bi-instagram {
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* hover 效果讓漸層變亮 */
.contact-social a:hover .bi-instagram {
  filter: brightness(1.2);
}


/* 付款方式也跟中間對齊 */
.footer-payments {
  margin-top: 38px;
  display: flex;
  justify-content: center;
  /* 置中 */
  align-items: center;
  gap: 0px;
  flex-wrap: wrap;
}

/* 新增圖片樣式 */
.footer-payments .pay-icon {
  height: 60px;
  /* 控制高度即可，自動等比例縮放 */
  width: auto;
  object-fit: contain;
  margin: 0 -10px;
  transition: filter 0.2s ease;
}

.footer-payments .pay-icon:hover {
  transform: scale(1.05);
}


/* 綠色版權列維持滿版 */
.footer-bottom {
  background: var(--green);
  color: #fff;
  text-align: center;
  padding: 12px 10px;
  font-size: 12px;
  border: 1px solid #000;
  border-top: none;
}

/* RWD */
@media (max-width: 900px) {

  .footer-inner,
  .footer-top-line {
    max-width: 100%;
  }

  .footer-columns {
    gap: 80px;
  }
}

@media (max-width: 720px) {
  .footer-columns {
    flex-direction: column;
    padding-left: 50px;
    gap: 20px;
  }

  .footer-inner {
    padding: 28px 16px 20px;
  }

  .footer-payments {
    gap: 8px;
  }
}

/* === 首頁會員優惠彈窗 === */
.welcome-modal {
  position: fixed;
  inset: 0;
  /* top:0 right:0 bottom:0 left:0 */
  display: none;
  /* 預設不顯示 */
  align-items: center;
  justify-content: center;
  z-index: 4000;
  /* 要比 header、cart drawer 高 */
  font-family: inherit;
}

.welcome-modal.show {
  display: flex;
  /* 打開時顯示，並置中 */
}

.wm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.wm-dialog {
  position: relative;
  background: var(--welcome-modal-bg, #fff5dc);
  max-width: 480px;
  width: 90%;
  border-radius: 18px;
  padding: 32px 28px 28px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  text-align: center;
  z-index: 1;
}

.wm-close {
  position: absolute;
  top: 12px;
  right: 16px;
  border: none;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  color: #555;
}

.wm-illust {
  max-width: 360px;
  width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 16px;
}

/* ===== 會員優惠彈窗：倒數計時 ===== */
.wm-countdown {
  width: 100%;
  margin: 6px auto 16px;
  text-align: center;
}

.wm-countdown-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin: 0 auto 12px;
  padding: 5px 14px;

  border-radius: 999px;

  background: rgba(177, 82, 48, 0.08);
  border: 1px solid rgba(177, 82, 48, 0.16);

  color: #a84f31;

  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.08em;
}

.wm-countdown-time {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.wm-countdown-item {
  width: 58px;
  height: 58px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);

  border: 1px solid rgba(177, 82, 48, 0.14);

  box-shadow:
    0 3px 8px rgba(0, 0, 0, 0.04);

  line-height: 1;
}

.wm-countdown-item strong {
  display: block;

  font-size: 21px;
  font-weight: 700;
  line-height: 1;

  color: #b15230;
}

.wm-countdown-item span {
  display: block;

  margin-top: 5px;

  font-size: 11px;
  font-weight: 500;

  color: #8c776a;
}

.wm-countdown-expired {
  display: inline-block;

  padding: 8px 18px;

  border-radius: 999px;

  background: rgba(255, 255, 255, 0.7);

  color: #b15230;

  font-size: 15px;
  font-weight: 700;
}

.wm-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #8b4513;
}

.wm-main {
  font-size: 1.4rem;
  font-weight: 700;
  color: #b15230;
  margin-bottom: 10px;
}

.wm-note {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.5;
  margin-bottom: 18px;
}

.wm-btn {
  display: inline-block;
  padding: 12px 40px;
  border-radius: 999px;
  background: var(--welcome-modal-btn, #ff7a7a);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.wm-btn:hover {
  filter: brightness(0.95);
  color: #fff;
}

/* ===== 會員優惠彈窗：手機版倒數 ===== */
@media (max-width: 575.98px) {

  .wm-dialog {
    padding: 28px 18px 24px;
  }

  .wm-countdown {
    margin: 4px auto 14px;
  }

  .wm-countdown-title {
    margin-bottom: 10px;
    padding: 4px 12px;
    font-size: 12px;
  }

  .wm-countdown-time {
    gap: 6px;
  }

  .wm-countdown-item {
    width: 52px;
    height: 54px;
    border-radius: 8px;
  }

  .wm-countdown-item strong {
    font-size: 18px;
  }

  .wm-countdown-item span {
    margin-top: 4px;
    font-size: 10px;
  }
}

/* ===== Cookie 通知條 ===== */
.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1100;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  font-size: 0.85rem;
  padding: 10px 14px;
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.cookie-banner.is-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.cookie-inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cookie-text {
  margin: 0;
  line-height: 1.5;
}

.cookie-link {
  color: #ffd966;
  text-decoration: underline;
}

.cookie-link:hover {
  color: #ffe699;
}

/* 按鈕區 */
.cookie-actions {
  display: flex;
  justify-content: flex-start;
}

.cookie-btn {
  border-radius: 999px;
  border: 1px solid #ffffff;
  background: transparent;
  color: #ffffff;
  padding: 4px 16px;
  font-size: 0.85rem;
  line-height: 1.2;
}

.cookie-btn:hover {
  background: #ffffff;
  color: #333333;
}

/* 大螢幕排成左右 */
@media (min-width: 768px) {
  .cookie-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}


/* === 浮動按鈕外層 === */
.floating-buttons {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 999;
}

/* === LINE 圖標 === */
.float-line {
  position: relative;
  width: 48px;
  height: 48px;
  background: #00c300;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition: 0.2s;
}

.float-line i {
  font-size: 28px;
  color: #fff;
}

.float-line:hover {
  transform: scale(1.08);
}

/* === 回到最上方按鈕 === */
.float-top {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #8d8d8d;
  color: #fff;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease-in-out;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

/* 顯示狀態 */
.float-top.show {
  opacity: 1;
  pointer-events: auto;
}

/* hover 效果 */
.float-top:hover {
  background: #6f6f6f;
}

/* === Tooltip === */
.line-tooltip {
  position: absolute;
  right: 70px;
  /* 顯示在左邊 */
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
  white-space: nowrap;

  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease-in-out;
}

/* 右側的小三角形 */
.line-tooltip::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 100%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent rgba(0, 0, 0, 0.85);
}

/* 滑過變可見 */
.float-line:hover .line-tooltip {
  opacity: 1;
  pointer-events: auto;
}

/* === LINE QR Code === */
.line-qrcode {
  position: absolute;
  right: 70px;
  bottom: 45px;
  width: 150px;
  padding: 10px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 9999;
}

.line-qrcode::after {
  content: "";
  position: absolute;
  right: -8px;
  bottom: 28px;
  border-width: 8px 0 8px 8px;
  border-style: solid;
  border-color: transparent transparent transparent #fff;
}

.line-qrcode img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* 滑過 LINE icon 顯示 QR Code */
.float-line:hover .line-qrcode {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* ===== Products Section ===== */
/* Section 標題 */
.section-title {
  text-align: center;
  /* 標題置中 */
  font-family: inherit;
  color: var(--text);
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.25;
  font-size: 30px;
  margin: 0 auto 18px;
}

/* Tabs */
.products-tabs {
  display: flex;
  justify-content: center;
  /* 水平置中 */
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
  /* 分頁間距，原本24改大一點 */
  margin-bottom: 24px;
}

.products-tabs .tab {
  font-family: inherit;
  font-size: 14px;
  letter-spacing: 1px;
  color: #000;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  padding: 8px 0;
  transition: color .2s ease, border-color .2s ease;
}

.products-tabs .tab:hover {
  color: var(--green);
}

.products-tabs .tab.is-active {
  color: var(--green);
  /* 也可改成 #000 */
  border-color: var(--green);
  /* 與站內風格一致 */
}


/* 原有 products-section 的 grid 設定可沿用 */

.products-section {
  max-width: 1100px;
  margin: 40px auto 60px;
  padding: 0 24px;
}

/* Products grid：每行3個、兩行最多6個 */
.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* 商品卡片結構 */
.product-card {
  text-align: center;
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-card:hover {
  transform: translateY(-4px);
}

/* 圖片 */
.product-media {
  position: relative;
  display: block;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  display: block;
  transition: transform .4s ease;
}

.product-media:hover img {
  transform: scale(1.05);
}

/* ===== Products Section 圖片 hover 交替===== */
.product-media {
  position: relative;
  display: block;
  overflow: hidden;
}

.product-media img {
  width: 100%;
  display: block;
}

.product-media .img-main {
  transition: transform .4s ease;
}

.product-media .img-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.02);
  /* 輕微縮放，讓切換更有層次 */
  transition: opacity .35s ease, transform .35s ease;
  pointer-events: none;
}

.product-card:hover .product-media .img-main {
  transform: scale(1.05);
}

.product-card:hover .product-media .img-hover {
  opacity: 1;
  transform: scale(1.0);
}

/* --- 快速檢視的滑入（你原本就有 quick-view，這裡讓它更像模板） --- */
.quick-view {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, .88);
  color: #000;
  font-size: 13px;
  text-align: center;
  padding: 10px 0;
  opacity: 0;
  transform: translateY(100%);
  transition: opacity .35s ease, transform .35s ease;
  will-change: opacity, transform;
  z-index: 5;
}

.product-card:hover .quick-view {
  opacity: 1;
  transform: translateY(0);
}

/* --- 分頁面板切換淡入上移（簡潔好用） --- */
.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: grid;
  animation: fadeUp .35s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Store Overview 每個分頁底下的查看更多按鈕 */
.products-cta {
  grid-column: 1 / -1;
  /* 在 grid 裡佔滿一整列 */
  margin-top: 12px;
  display: flex;
  justify-content: center;
}

.products-cta .btn-ghost {
  padding: 9px 40px;
  border: 1px solid #a7b8b0;
  color: #1e2b24;
  text-decoration: none;
  font-size: 14px;
  letter-spacing: .3px;
  background: #fff;
  transition: all .2s ease;
}

.products-cta .btn-ghost:hover {
  background: var(--green);
  color: #fff;
  border-color: #648d7a;
}

/* ===== Homepage Products：固定卡片大小 ===== */

/* 卡片改成等高排列 */
.products-grid .product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* 固定圖片區比例（正方形），像你截圖左邊兩張 */
.products-grid .product-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  /* 1:1 正方形，可改 4 / 5 或 3 / 4 */
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f7f7f7;
  overflow: hidden;
}

.products-grid .product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* 填滿裁切 */
}

/* 標題固定 2 行高度，避免有的 1 行有的 3 行把卡片撐高 */
.products-grid .product-title {
  margin: 12px 0 6px;
  min-height: calc(1.4em * 2);
  /* 保留兩行的高度 */
}

.products-grid .product-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  /* 限制最多 2 行 */
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 按鈕永遠貼在卡片底部，讓高度看起來一致 */
.products-grid .btn-outline {
  margin-top: auto;
  width: 100%;
  max-width: 240px;
}

/*==== 只鎖商店概覽（tab 區）====*/
.store-overview .tab-panel {
  display: none;
}

.store-overview .tab-panel.is-active {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* RWD */
@media (max-width: 1024px) {
  .store-overview .tab-panel.is-active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {

  /* ===== 首頁商品總覽：手機版比照商品頁 ===== */
  .products-section.store-overview {
    padding-left: 16px;
    padding-right: 16px;
  }

  .store-overview .tab-panel.is-active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px 24px;
    padding-left: 0;
    padding-right: 0;
  }

  /* 商品卡必須可以正常縮小 */
  .store-overview .product-card {
    min-width: 0;
  }

  /* 價格排列比照商品頁 */
  .store-overview .product-card .product-price {
    width: 100%;
    min-width: 0;
    min-height: 24px;

    display: flex;
    align-items: baseline;
    justify-content: center;

    gap: 8px;

    margin-bottom: 8px;

    font-size: 14px;
    line-height: 1.2;

    white-space: nowrap;
  }

  .store-overview .product-card .product-price .price-old,
  .store-overview .product-card .product-price .price-new {
    flex: 0 0 auto;
    font-size: 14px;
    line-height: 1.2;
  }
}

/* 卡片統一尺寸（不靠 .products-grid，避免某頁漏包就爆） */
.store-overview .product-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.store-overview .product-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f7f7f7;
  overflow: hidden;
}

.store-overview .product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 標題固定 2 行高度 */
.store-overview .product-title {
  margin: 12px 0 8px;
  min-height: calc(1.5em * 2);
  line-height: 1.5;
  font-size: 16px;
}

.store-overview .product-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* 按鈕貼底 */
.store-overview .btn-outline {
  margin-top: auto;
  width: 100%;
  max-width: 240px;
}

/*======== Quick View ========*/
.quick-view {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.85);
  color: #000;
  font-size: 13px;
  text-align: center;
  padding: 10px 0;
  opacity: 0;
  transform: translateY(100%);
  transition: all .35s ease;
}

.product-media:hover .quick-view {
  opacity: 1;
  transform: translateY(0);
}

/* 商品名稱 / 價格 / 按鈕 */
.product-title {
  margin: 14px 0 6px;
  /* 圖片與名稱、名稱與價格距離 */
  min-height: 2.4em;
}

.product-title,
.product-title a {
  font-family: inherit;
  /* 跟 body 一樣 */
  font-size: 13px;
  /* 與主選單字級一致 */
  font-weight: 400;
  /* 一般粗細 */
  letter-spacing: 1px;
  /* 與站內文字一致 */
  color: #000;
  text-decoration: none;
  /* 去底線 */
}

.product-price {
  margin-bottom: 14px;
  /* 與 Add to Cart 的距離 */
  color: var(--text);
}

.btn-outline {
  display: block;
  width: 100%;
  max-width: 240px;
  margin: 0 auto 0;
  /* 保持在中央 */
  border: 1px solid var(--green);
  background: #fff;
  padding: 10px 0;
  color: var(--green);
  cursor: pointer;
  transition: all .2s ease;
}

.btn-outline:hover {
  background: var(--green);
  color: #fff;
}

/* 底部「Shop All」 */
.cta-row {
  display: flex;
  justify-content: center;
  margin-top: 28px;
}

.btn-ghost {
  padding: 10px 28px;
  border: 1px solid #a7b8b0;
  text-decoration: none;
  color: #1e2b24;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}

.btn-ghost:hover {
  background: var(--green);
  color: #fff;
  border-color: var(--green);
}

/* RWD */
@media (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: 1fr 1fr;
  }

  .btn-outline {
    max-width: 360px;
  }

  .product-title {
    /* 圖片與名稱、名稱與價格距離 */
    min-height: 3.6em;
  }
}

/* ===== Quick Cart Modal ===== */
.qc-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.qc-modal.open {
  display: block;
}

/* Quick Cart Modal 內的活動訊息條 */
/* Quick Cart Modal：縮小版 promo badge（不影響商品內頁） */
.qc-modal .pd-promo-row {
  padding: 3px 0;
}

.qc-modal .pd-promo-badge {
  font-size: 11px;
  padding: 6px 8px;
  border-radius: 12px;
  font-weight: 600;
}

.qc-modal .pd-promo-text {
  font-size: 13px;
  line-height: 2.0;
}

.qc-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.qc-dialog {
  position: absolute;
  inset: 50% auto auto 50%;
  transform: translate(-50%, -50%);
  width: min(920px, 92vw);
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  padding: 26px 26px;
}

.qc-close {
  position: absolute;
  right: 18px;
  top: 14px;
  background: none;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  color: #333
}

.qc-body {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 34px
}

.qc-image-wrap img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border: 1px solid #eee;
}

.qc-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px
}

.qc-dots .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cfcfcf
}

.qc-dots .dot.is-active {
  background: #777
}

.qc-media {
  position: relative;
}

.qc-image-wrap {
  position: relative;
  width: 100%;
}

.qc-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  border: 0;
  background: rgba(255, 255, 255, .9);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  line-height: 32px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
}

.qc-nav.prev {
  left: 8px;
}

.qc-nav.next {
  right: 8px;
}

.qc-nav:hover {
  filter: brightness(1.03);
}

.qc-title {
  font-size: 24px;
  margin: 15px 0 15px
}

/* ===== Quick Cart 強制售完時間提示 ===== */
.qc-sale-period {
  display: flex;
  align-items: center;
  gap: 9px;

  width: 100%;

  /* 上方留空間給分隔線 */
  margin: 30px 0 10px;

  padding: 11px 13px;

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

  color: #666;
  font-size: 13px;
  line-height: 1.6;

  position: relative;
}

/* ===== Quick Cart 強制售完提示上方分隔線 ===== */
.qc-sale-period::before {
  content: "";

  position: absolute;

  top: -20px;
  left: 0;
  right: 0;

  height: 1px;

  background: #dddddd;
}

.qc-sale-period i {
  flex: 0 0 auto;
  color: #aaa;
  font-size: 16px;
}

@media (max-width: 820px) {
  .qc-sale-period {
    padding: 10px 12px;
    font-size: 12px;
  }
}

.qc-price {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-size: 18px;
  margin-bottom: 6px
}

.qc-price .old {
  color: #777;
  text-decoration: line-through;
}

.qc-price .new {
  color: #111;
  font-weight: 600;
}

.qc-price:has(.old) .new {
  color: #e03131;
}

.qc-sku {
  font-size: 12px;
  color: #666;
  margin-bottom: 16px
}

.qc-field {
  margin: 20px 0
}

.qc-label {
  display: block;
  font-size: 14px;
  margin-bottom: 12px
}

.qc-swatches {
  display: flex;
  gap: 10px;
  align-items: center;
}

.qc-swatch {
  --c: #ccc;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c);
  border: 2px solid #d7d7d7;
  cursor: pointer;
  display: inline-block;
}

.qc-swatch.is-active {
  border-color: var(--green);
  box-shadow: inset 0 0 0 1px var(--green);
}

/* 取消原本的自訂外觀（若有） */
.qc-qty {
  display: inline-flex;
  max-width: 120px;
}

/* 讓 input-group 不被其他規則影響 */
.qc-qty .form-control {
  height: 34px;
}

/* 與右圖高度接近 */
.qc-qty .btn {
  height: 34px;
  min-width: 38px;
}

/* 移除 number input 的小箭頭 */
.qc-qty input[type=number]::-webkit-outer-spin-button,
.qc-qty input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.qc-qty input[type=number] {
  -moz-appearance: textfield;
}

/* 最小值時的減號樣式（淡灰，不可按） */
.qc-qty .btn:disabled {
  background: #fff;
  color: #adb5bd;
  /* Bootstrap 次要文字色 */
  opacity: 1;
  /* 保持清晰 */
}


.qc-add {
  display: block;
  width: 100%;
  margin: 20px 0 15px;
  padding: 12px 10px;
  background: var(--green);
  color: #fff;
  border: 1px solid var(--green);
  cursor: pointer;
}

.qc-add:hover {
  filter: brightness(.95)
}

/* ===== Quick Cart 售完 ===== */
#qcSoldOutText {
  display: none;
  width: 100%;
  margin: 16px 0 10px;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #666;
}

/* ===== 組合商品內頁：售完 ===== */
.product-detail #comboSoldOutText {
  display: none;
  width: 100%;
  justify-content: center;
  align-items: center;
  text-align: center;

  margin: 14px 0 10px;

  font-size: 20px;
  font-weight: 600;
  color: #666;
}


/* 有售完時顯示 */
.product-detail #comboSoldOutText.is-visible {
  display: flex;
}


/* ===== Quick Cart 貨到通知 ===== */
.qc-restock-notify {
  display: block;
  width: 100%;
  margin: 20px 0 15px;
  padding: 12px 10px;

  background: var(--green);
  color: #fff;

  border: 1px solid var(--green);
  cursor: pointer;
}

.qc-restock-notify:hover {
  filter: brightness(.95);
}


/* 已設定貨到通知 */
.qc-restock-notify.is-subscribed,
.qc-restock-notify:disabled {
  background: #adb5bd;
  border-color: #adb5bd;
  color: #fff;

  cursor: not-allowed;
  opacity: 1;
}

.qc-more {
  font-size: 13px;
  color: #0d3d5a;
  text-decoration: underline
}

/* 查看更多 + 加入最愛 排版 */
.qc-more-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

/* 加入最愛膠囊按鈕 */
.qc-fav-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #c6b89a;
  /* 淺咖啡色邊線，可依品牌調整 */
  background-color: transparent;
  font-size: 0.85rem;
  color: #c6b89a;
  line-height: 1;
}

.qc-fav-btn i {
  font-size: 1rem;
}

.qc-fav-btn:hover {
  border-color: #b29f7f;
  color: #b29f7f;
}

/* 收藏後樣式（依喜好，可改成實心色） */
.qc-fav-btn.is-fav {
  border-color: #d9534f;
  color: #d9534f;
}


@media (max-width: 820px) {
  .qc-dialog {
    width: min(720px, 94vw);
    padding: 20px
  }

  .qc-body {
    grid-template-columns: 1fr
  }
}

/* ===== Quick Cart Type 按鈕 ===== */
.qc-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 6px;
}

.qc-type-btn {
  min-height: 34px;
  padding: 6px 16px;

  background: #fff;
  border: 1px solid #ddd;

  color: #222;
  font-size: 14px;
  line-height: 1.4;

  cursor: pointer;

  transition:
    border-color .2s ease,
    color .2s ease,
    background-color .2s ease;
}

.qc-type-btn:hover {
  border-color: #1ABC9C;
  color: #1ABC9C;
}

.qc-type-btn.is-active {
  border-color: #1ABC9C;
  color: #1ABC9C;
  background: #f7fcff;
}

#qcTypeNote {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}

#qcType {
  display: none;
  /* 預設隱藏 */
}


/* ======== Cart Drawer ======== */
.cart-drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  opacity: 0;
  visibility: hidden;
  transition: .2s ease;
  z-index: 9980;
}

.cart-drawer-mask.show {
  opacity: 1;
  visibility: visible;
}

.cart-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 92vw);
  background: #fff;
  box-shadow: none;
  transform: translateX(100%);
  transition: transform .28s ease;
  z-index: 9990;
  display: grid;
  grid-template-rows: auto 1fr auto;
}

.cart-drawer.open {
  transform: translateX(0);
}

.cd-panel {
  display: contents;
}

.cd-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid #e9e9e9;
}

.cd-addon-row {
  margin-bottom: 4px;
}

.cd-title {
  font-weight: 500;
  line-height: 1.3;
}

.cd-badge-addon {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 4px;
  background: #111;
  color: #fff;
  vertical-align: middle;
}

.cd-count {
  font-size: 14px;
  font-weight: 400;
  color: #666;
  margin-left: 6px;
}

.cd-close {
  background: none;
  border: 0;
  font-size: 18px;
  cursor: pointer;
  color: #333
}

.cd-body {
  overflow: auto;
  padding: 16px 12px 10px;
}

.cd-item {
  display: grid;
  grid-template-columns: 72px 1fr auto auto;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  border-bottom: 1px solid #efefef;
}

.cd-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border: 1px solid #eee
}

.cd-meta .cd-name {
  font-size: 14px;
  color: #111;
  margin-bottom: 4px;
}

.cd-meta .cd-variant {
  font-size: 12px;
  color: #666;
  margin: 2px 0 6px;
}

.cd-meta .cd-price {
  font-size: 13px;
  margin-bottom: 8px;
}


/* Cart Drawer 單品價格樣式：舊價 + 新價 */
.cd-price {
  font-size: 13px;
  margin-bottom: 8px;
}

/* 舊價：刪除線、灰色 */
.cd-price-old {
  color: #999;
  text-decoration: line-through;
  margin-right: 6px;
}

/* 新價：加粗，可改成綠色 */
.cd-price-new {
  color: #111;
  font-weight: 600;
}

/* 如果想左右對齊更整齊，可以加這段（選用） */
.cd-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.cd-qty-btn {
  cursor: pointer
}

.cd-qty-input {
  text-align: center
}

.cd-remove {
  background: none;
  border: 0;
  color: #666;
  cursor: pointer;
  margin-left: 8px;
  align-self: flex-start;
  justify-self: flex-end;
}

.cd-line-total {
  font-size: 16px;
  color: #111;
  white-space: nowrap;
  align-self: flex-end;
  margin-left: 6px;
}

.cd-footer {
  border-top: 1px solid #e9e9e9;
  padding: 14px 18px;
}

.cd-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px
}

.cd-note {
  font-size: 12px;
  color: #666;
  margin: 0 0 12px
}

.cd-checkout {
  width: 100%;
  padding: 11px 10px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  cursor: pointer;
  margin-bottom: 10px;
}

.cd-viewcart {
  display: block;
  width: 100%;
  text-align: center;
  padding: 10px 10px;
  border: 1px solid var(--green);
  background: var(--green);
  color: #fff;
  text-decoration: none;
  margin-bottom: 8px;
}

.cd-secure {
  font-size: 12px;
  color: #666;
  text-align: center
}

.cd-secure i {
  margin-right: 6px
}

/* ===== 隱藏數字框上下箭頭（Chrome / Edge / Safari） ===== */
.cd-qty-input::-webkit-inner-spin-button,
.cd-qty-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ===== 隱藏 Firefox 數字框箭頭 ===== */
.cd-qty-input {
  -moz-appearance: textfield;
}


/*===============Coupon Row=============*/
/* Coupon toggle / form */
/* 無 Bootstrap 時的後援樣式 */
.form-control.is-invalid {
  border-color: #dc3545;
}

.form-control.is-valid {
  border-color: #198754;
}

.invalid-feedback,
.valid-feedback {
  font-size: .875rem;
  margin-top: .25rem;
  display: none;
}

.invalid-feedback.show {
  display: block;
  color: #dc3545;
}

.valid-feedback.show {
  display: block;
  color: #198754;
}

.cd-coupon {
  margin: 14px 0 8px;
}

.cd-coupon-toggle {
  background: none;
  border: 0;
  color: #2b5d4a;
  cursor: pointer;
  padding: 0;
}

.cd-coupon-toggle:hover {
  text-decoration: underline;
}

.cd-coupon-toggle.open {
  color: #2f7a48;
}

.cd-coupon-form {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.cd-coupon-form[hidden] {
  display: none;
}

.cd-coupon-input {
  flex: 1;
  height: 38px;
  padding: 0 10px;
  border: 1px solid #dcdcdc;
}

.cd-coupon-apply,
.cd-coupon-remove {
  height: 38px;
  padding: 0 14px;
  border: 1px solid #dcdcdc;
  background: #f7f7f7;
  cursor: pointer;
}

.cd-coupon-remove {
  background: #fff;
}

.cd-coupon-msg {
  margin-top: 6px;
  font-size: 12px;
  color: #666;
}

.cd-coupon-msg.ok {
  color: #2f7a48;
}

.cd-coupon-msg.err {
  color: #c33;
}

/* 折扣行（插在 total 上方） */
.cd-discount-row {
  display: flex;
  justify-content: space-between;
  margin: 6px 0 4px;
  font-size: 14px;
  color: #2f7a48;
}

.cd-discount-row .label {
  opacity: .9;
}

/*==========圖片貼紙/打折線============*/

.product-card .product-media {
  position: relative;
}

/* ===== 商品圖片左上角標籤群組 ===== */
.product-card .product-badge-group {
  position: absolute;
  top: 12px;
  left: 12px;

  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;

  z-index: 6;
  pointer-events: none;
}

/* 預購標籤 */
.product-card .badge-preorder {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 24px;
  padding: 4px 8px;

  background: #557c68;
  color: #fff;

  border-radius: 0;

  font-size: 12px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: .06em;

  white-space: nowrap;
}

/* HOT / 新品 / 其他後台標籤 */
.product-card .badge-tag {
  position: static;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 24px;
  padding: 4px 8px;

  background: #616650;
  color: #fff;

  border-radius: 0;

  font-size: 12px;
  line-height: 1;
  letter-spacing: .06em;
  text-transform: uppercase;

  pointer-events: none;
}

/* SALE 貼紙 */
.product-card .badge-sale {
  position: absolute;
  top: 12px;
  left: 12px;
  background: #c85a00;
  color: #fff;
  font-size: 12px;
  letter-spacing: .06em;
  padding: 4px 8px;
  border-radius: 3px;
  z-index: 5;
  pointer-events: none;
}

/* 價格列：舊價刪除線 + 新價加粗 */
.product-card .product-price {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  line-height: 1.2;
}

.product-card .price-old {
  color: #777;
  text-decoration: line-through;
}

/* 沒有特價時，正常黑色 */
.product-card .price-new {
  color: #111;
  font-weight: 600;
}

/* 有特價（price-old 存在）時，price-new 才變紅 */
.product-card .product-price:has(.price-old) .price-new {
  color: #e53935;
}


/* === All Products Page Layout(全部商品頁 start) === */

.all-products {
  max-width: 1200px;
  margin: 24px auto 80px;
  padding: 0 16px;
}

.ap-wrap {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  column-gap: 40px;
}

/* 左側側欄 */
.ap-sidebar {
  border-right: 1px solid #e5e5e5;
  padding-right: 24px;
}

.ap-title {
  font-size: 20px;
  margin-bottom: 20px;
}

.ap-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 32px;
}

.ap-nav a {
  display: block;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  transition: color 0.25s ease, transform 0.25s ease;
}

/* 滑鼠移上去時：變黑、微放大 */
.ap-nav a:hover {
  color: var(--green);
  transform: translateX(3px);
  /* 可選：讓文字微微往右滑 */
}

.ap-nav a.is-active {
  color: var(--green);
  font-weight: 600;
}

/* 最新優惠區塊調整 */
.ap-sidebar .ap-promo-nav {
  margin-bottom: 20px;
}

.ap-sidebar .ap-promo-nav a {
  font-weight: 500;
}

/* 桌機版清除篩選按鈕 */
.ap-clear-filter {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  margin-top: 18px;
  padding: 10px 16px;
  border: 1px solid #222;
  background: #fff;
  color: #222;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.ap-clear-filter:hover {
  background: #222;
  border-color: #222;
  color: #fff;
  text-decoration: none;
}

.ap-filter-group {
  border-top: 1px solid #e5e5e5;
  padding: 8px 0;
}

.ap-filter-btn {
  width: 100%;
  padding: 14px 0;
  border: 0;
  background: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  cursor: pointer;
}

.ap-filter-btn span {
  font-size: 18px;
  line-height: 1;
}

.ap-toggle-icon {
  font-size: 18px;
  line-height: 1;
}

/* 折疊內容 */
.ap-filter-body {
  margin-top: 6px;
  padding-left: 0;
}

/* 品牌按鈕 */
.ap-brand {
  display: inline-block;
  position: relative;
  width: 100%;
  padding: 4px 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 13px;
  color: #333;
  cursor: pointer;
  text-decoration: none;
  /* 取消預設底線 */
  transition: all 0.2s ease;
}

/* 底線動畫 */
.ap-brand::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 1px;
  background-color: var(--green);
  /* 你的品牌綠 */
  transition: width 0.3s ease;
}

.ap-brand:hover {
  color: var(--green);
  /* 品牌綠 */
  padding-left: 4px;
}

.ap-brand:hover::after {
  width: 50%;
}

.ap-brand.is-active {
  font-weight: 600;
  color: var(--green);
}

.ap-brand.is-active::after {
  width: 100%;
  background-color: var(--green);
}

/* 商品類別（像品牌 link 一樣） */
/* 商品類別（像品牌 link 一樣） */
.ap-cat {
  display: block;
  width: 100%;
  padding: 6px 0;
  border: 0;
  background: transparent;
  text-align: left;
  font-size: 14px;
  color: #555;
  cursor: pointer;
  position: relative;

  /* 拿掉 a 標籤固定底線 */
  text-decoration: none !important;

  transition: color .2s ease, padding-left .2s ease;
}

/* 所有狀態都不要瀏覽器固定底線 */
.ap-cat:link,
.ap-cat:visited,
.ap-cat:hover,
.ap-cat:focus,
.ap-cat:active {
  text-decoration: none !important;
}

/* Hover：文字變綠、微微往右 */
.ap-cat:hover {
  color: #00a68b;
  padding-left: 4px;
}

/* 動畫底線 */
.ap-cat::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #00a68b;
  transition: width .25s ease;
}

/* Hover 才跑出動畫底線 */
.ap-cat:hover::after {
  width: 50%;
}

/* 已選取分類 */
.ap-cat.is-active {
  font-weight: 600;
  color: #00a68b;
}

/* === Category Filter === */
.category-filter {
  padding-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-check {
  display: flex;
  align-items: center;
  font-size: 14px;
  color: #333;
  cursor: pointer;
}

/* 自訂 checkbox 外觀 */
.form-check-input {
  width: 16px;
  height: 16px;
  margin-right: 8px;
  accent-color: #222;
  /* Chrome/Edge 支援，讓勾選框變深灰或你的主色 */
  cursor: pointer;
}

/* hover 效果 */
.form-check-label {
  transition: color 0.25s ease;
}

.form-check-label:hover {
  color: #000;
}

/* 右側主區 */
.ap-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.ap-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.ap-breadcrumb {
  font-size: 14px;
  color: #666;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.ap-breadcrumb a {
  color: #0d3d5a;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ap-breadcrumb a:hover {
  text-decoration: underline;
}

.ap-breadcrumb a.is-active {
  color: #000;
  font-weight: 600;
  pointer-events: none;
  text-decoration: none;
}

.ap-breadcrumb .sep {
  color: #aaa;
  font-size: 12px;
  line-height: 1;
}

/* All Products 標題樣式 */
.ap-heading {
  font-size: 28px;
  font-weight: 400;
  margin: 0;
  letter-spacing: 0.3px;
}

.ap-sort {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.ap-sort label {
  margin: 0;
  white-space: nowrap;
  /* 關鍵：避免 "Sort by:" 自動斷行 */
}

/* 手機專用的 meta 列：預設隱藏 */
.ap-header-meta {
  display: none;
}

/* 商品 3 欄 Grid */
.ap-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px 24px;
}

.ap-grid .product-card {
  text-align: left;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ap-grid .product-media {
  display: block;
  border: 1px solid #eee;
  background: #fff;
}

.ap-grid .product-media img {
  width: 100%;
  display: block;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  /* 固定比例好看 */
}

.ap-grid .product-title {
  font-size: 16px;
  min-height: calc(1.5em * 2);
  line-height: 1.5;
  margin: 10px 0 8px;
}

.ap-grid .product-price {
  font-size: 14px;
  min-height: 24px;
  margin-bottom: 8px;
}

.ap-grid .btn-outline {
  width: 100%;
  padding: 8px 0;
  margin-top: auto;
}

/* 分頁 */
.ap-pagination {
  margin-top: 32px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.ap-pagination .ap-page-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border: 1px solid #ccc;
  background: #fff;

  color: #222;
  font-size: 13px;
  line-height: 1;

  text-decoration: none;
  cursor: pointer;
}

/* 滑鼠移過去效果 */
.ap-pagination a.ap-page-btn:hover {
  background-color: #111;
  color: #fff;
  border-color: #111;
}

/* 目前頁 */
.ap-pagination .ap-page-btn.is-active {
  background: #333;
  color: #fff;
  border-color: #333;
  cursor: default;
}


/* RWD */
@media (max-width: 991.98px) {

  /* 手機不顯示左側 Sidebar，改用 Filter & Sort 面板 */
  .ap-wrap {
    grid-template-columns: 1fr;
  }

  .ap-sidebar {
    display: none;
  }

  /* All Products 置中 */
  .ap-header {
    flex-direction: column;
    align-items: center;
    gap: 4px;
    margin-bottom: 14px;
  }

  .ap-heading {
    font-size: 24px;
    text-align: center;
  }

  /* 手機隱藏桌機版 Sort 下拉，改用 Filter & Sort */
  .ap-sort {
    display: none;
  }

  /* 顯示：左 products 數量 + 右 Filter & Sort 連結 */
  .ap-header-meta {
    display: flex;
    width: 100%;
    max-width: 720px;
    justify-content: flex-end;
    align-items: center;
    font-size: 12px;
    margin-top: 4px;
  }

  .ap-filter-toggle {
    background: none;
    border: 0;
    padding: 0;
    font-size: 12px;
    text-decoration: underline;
    cursor: pointer;
  }
}

@media (max-width: 575.98px) {
  .ap-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ap-pagination .ap-page-btn {
    min-width: 42px;
    height: 42px;
  }
}

@media (max-width: 575.98px) {
  .ap-grid .product-title {
    min-height: calc(1.5em * 3);
  }

  .ap-grid .product-price {
    min-height: 24px;
  }

  .ap-grid .btn-outline {
    margin-top: auto;
  }
}

/*---類別篩選---*/
.category-tree .cat-group {
  margin: 6px 0 10px;
}

.category-tree .cat-group-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  padding: 6px 0;
  font-weight: 700;
  color: #222;
  cursor: pointer;
}

/* ===== 商品分類群組：維持原本版型 ===== */

/* 群組名稱 */
.category-tree .cat-group-link {
  flex: 1;
  display: block;

  color: #222;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;

  text-decoration: none;
  background: transparent;
}

/* 不要瀏覽器預設藍色 / 底線 */
.category-tree .cat-group-link:visited {
  color: #222;
  text-decoration: none;
}

.category-tree .cat-group-link:hover,
.category-tree .cat-group-link:focus {
  color: #222;
  text-decoration: none;
}

/* 右邊展開箭頭：取消 button 預設外框 */
.category-tree .cat-group-toggle {
  flex: 0 0 auto;

  display: flex;
  align-items: center;
  justify-content: center;

  width: 20px;
  height: 20px;
  padding: 0;
  margin: 0;

  border: 0;
  outline: 0;
  background: transparent;

  color: #222;
  cursor: pointer;
  box-shadow: none;

  font: inherit;
}

/* 避免 Bootstrap / 瀏覽器 focus 產生方框 */
.category-tree .cat-group-toggle:hover,
.category-tree .cat-group-toggle:focus,
.category-tree .cat-group-toggle:active {
  border: 0;
  outline: 0;
  background: transparent;
  box-shadow: none;
}

/* 箭頭恢復原本大小 */
.category-tree .cat-group-toggle .cat-caret {
  display: inline-block;
  font-size: 14px;
  line-height: 1;
  color: #222;
}

.category-tree .cat-caret {
  font-size: 14px;
  transition: transform .2s ease;
}

.category-tree .cat-group-body {
  padding-left: 10px;
  margin-top: 6px;
  display: grid;
  gap: 8px;
}

/* 手機篩選面板：確保 hidden 真的隱藏 */
#apFilter [hidden] {
  display: none !important;
}

#apFilter .cat-group-btn {
  width: 100%;
  border: 0;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}

.category-tree .cat-group.is-collapsed .cat-group-body {
  display: none;
}

.category-tree .cat-group.is-collapsed .cat-caret {
  transform: rotate(-90deg);
}

/* === Mobile Filter & Sort Overlay === */
/* Filter & Sort overlay 基本 */
.ap-filter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .25);
  opacity: 0;
  visibility: hidden;
  transition: all .25s ease;
  z-index: 3100;
}

.ap-filter-overlay.open {
  opacity: 1;
  visibility: visible;
}

.ap-filter-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 320px;
  max-width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 12px rgba(0, 0, 0, .08);
  padding: 20px 24px 16px;
}

.ap-filter-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

/* 新增：中間內容捲動區 */
.ap-filter-scroll {
  flex: 1;
  overflow-y: auto;
  padding-top: 8px;
}

.ap-filter-title {
  font-size: 20px;
  font-weight: 500;
}

.ap-filter-close {
  border: none;
  background: none;
  font-size: 24px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

/* group 通用（可同時讓 desktop sidebar 好看） */
.ap-filter-group {
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.ap-filter-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0;
  background: none;
  border: none;
  font-size: 15px;
  cursor: pointer;
}

.ap-filter-btn span:first-child {
  font-weight: 400;
}

.ap-toggle-icon {
  font-size: 18px;
  line-height: 1;
}

.ap-filter-body {
  padding-top: 10px;
  font-size: 14px;
}

/* Mobile Filter 最新優惠連結 */
.ap-filter-body .ap-filter-link {
  display: block;
  padding: 6px 0;
  font-size: 0.95rem;
  text-decoration: none;
  color: #333;
}


/* 連結 & checkbox 風格 */
.ap-filter-link,
.ap-brand {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: #555;
  text-decoration: none;
}

.ap-filter-link:hover,
.ap-brand:hover {
  color: #000;
}

/* checkbox 行距 */
.ap-filter-body .form-check {
  margin-bottom: 6px;
}

/* 底部按鈕 */
.ap-filter-actions {
  display: flex;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #eee;
  margin-top: 4px;
}


/* ===== Brand Tree (Sidebar) ===== */
.brand-tree {
  display: grid;
  gap: 10px;
}

.brand-item {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
}

.brand-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  text-align: left;

  position: relative;
  text-decoration: none;
  transition: padding-left .2s ease;
}

.brand-name {
  font-size: 14px;
  color: #222;
  font-weight: 600;
  transition: color .2s ease;
}

/* 滑鼠移入：文字往右滑 */
.brand-row:hover {
  padding-left: 4px;
}

/* 滑鼠移入：文字變綠 */
.brand-row:hover .brand-name {
  color: #00a68b;
}

/* 底線動畫 */
.brand-row::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #00a68b;
  transition: width .25s ease;
}

.brand-row:hover::after {
  width: 50%;
}

/* 已選取品牌 */
.brand-row.is-active .brand-name {
  color: #00a68b;
}

.brand-row.is-active::after {
  width: 100%;
}

.brand-caret {
  font-size: 18px;
  line-height: 1;
  color: #888;
  transform: rotate(0deg);
  transition: transform .2s ease;
}

.brand-sub {
  display: none;
  margin: 8px 0 6px;
  padding-left: 12px;
  border-left: 2px solid #e7f3ef;
}

.brand-item.open .brand-sub {
  display: grid;
  gap: 8px;
}

.brand-item.open .brand-caret {
  transform: rotate(90deg);
}

.brand-link {
  display: block;
  text-decoration: none;
  font-size: 13px;
  color: #444;
  padding: 2px 0;
}

.brand-link:hover {
  color: #00a68b;
}

.brand-link.is-active {
  color: #00a68b;
  font-weight: 700;
}

/* ===== Mobile Brand Tree ===== */
.m-brand-tree {
  display: grid;
  gap: 10px;
}

.m-brand-item {
  border-bottom: 1px solid #f0f0f0;
  padding-bottom: 10px;
}

.m-brand-row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: transparent;
  border: 0;
  padding: 6px 0;
  cursor: pointer;
  text-align: left;
}

.m-brand-name {
  font-size: 14px;
  color: #222;
  font-weight: 600;
}

.m-brand-caret {
  font-size: 18px;
  color: #888;
  transform: rotate(0deg);
  transition: transform .2s ease;
}

.m-brand-sub {
  display: none;
  margin: 8px 0 6px;
  padding-left: 12px;
  border-left: 2px solid #e7f3ef;
}

.m-brand-item.open .m-brand-sub {
  display: grid;
  gap: 8px;
}

.m-brand-item.open .m-brand-caret {
  transform: rotate(90deg);
}


/* === All Products Page Layout(全部商品頁 end) === */


/*======優惠活動 01 專用樣式=========== */
/* 優惠活動 01 專用樣式（去掉灰背景、整個內容置中鋪滿） */
.all-products.promo-event {
  background: #fff;
  /* 取消灰色，改成白色或直接寫 transparent 也可 */
  padding: 0px 0 20px;
  margin: 20px auto 10px;
}

/* 不要沿用 products 頁面的左右兩欄排版，改成單欄置中 */
.promo-event .ap-wrap {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 12px;
  display: block;
  /* 把原本的 flex 拿掉，變成單欄 */
}

.promo-event .ap-main {
  width: 100%;
  /* 佔滿整個 ap-wrap */
}

/* 上方大框：活動說明區 */
.promo-hero-box.promo-hero-01 {
  background: #FFF8D7 !important;
  border-radius: 12px;
  padding: 32px 24px;
  margin-bottom: 10px;
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

/* 優惠活動 02：一定取消背景色 */
.promo-hero-box.promo-hero-02 {
  background: transparent !important;
  padding: 0 !important;
  box-shadow: none !important;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.promo-hero-02.promo-hero-img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  /* 要不要圓角看你 */
  object-fit: cover;
}

.promo-hero-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.promo-hero-text {
  margin: 0;
  color: #555;
  line-height: 1.6;
}

/* 商品 3×3 間距微調（可依照你喜歡再調） */
.promo-event .ap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

/* 平板：2 欄 */
@media (max-width: 992px) {
  .promo-event .ap-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* 手機：2 欄 */
@media (max-width: 576px) {
  .promo-event .ap-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* 卡片本身的大小 & 結構，只作用在活動頁 */
.promo-event .product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 12px;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 商品圖片區：維持你原本的正方形設定 */
.promo-event .product-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f7f7f7;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

/* 圖片填滿卡片 */
.promo-event .product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

/* hover 放大：加上 .promo-event，避免影響其他頁面 */
.promo-event .product-media:hover img {
  transform: scale(1.05);
}

/* 標題、價格、按鈕的間距微調 */
.promo-event .product-title {
  font-size: 0.95rem;
  margin-top: 10px;
  flex-grow: 1;
  /* 讓標題撐開，按鈕黏底部 */
}

.promo-event .product-price {
  margin-top: 6px;
}

.promo-event .btn-outline {
  margin-top: 8px;
}

/*======優惠活動 01 專用樣式=========== */

/*=======只針對活動頁的圖片區塊調整排版======*/

/* 讓活動內容寬度置中 */
.promo-event .ap-main {
  max-width: 1200px;
  margin: 0 auto;
}

/* 讓圖片「直立」往下排，不要橫排 */
.promo-event .promo-hero-box {
  display: flex;
  /* 就算原本是別的 display，一律改成 flex */
  flex-direction: column;
  /* 改成垂直排列 */
  align-items: center;
  /* 水平置中 */
  gap: 24px;
  /* 每張圖的間距 */
  padding: 40px 24px 64px;
  background: transparent;
  /* 確保沒有灰色背景 */
}

/* 每一張活動圖片 */
.promo-event .promo-hero-img {
  width: 100%;
  max-width: 1200px;
  /* 看你要多寬，可以再縮小 */
  height: auto;
  display: block;
}

.legal-divider {
  max-width: 720px;
  margin: 32px auto;
}


/* ===== Promotion：區塊式活動版型 ===== */
.promo-block {
  margin: 36px 0 56px;
}

/* 區塊橫幅 */
.promo-block-banner {
  display: block;
  width: 100%;
  border-radius: 0px;
  overflow: visible;
  background: #f3f3f3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.promo-block-banner img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

/* 區塊標題 */
.promo-block-head {
  text-align: center;
  margin: 28px 0 24px;
}

.promo-block-title {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: 0.06em;
  margin: 0;
  color: #222;
}

.promo-block-sub {
  margin: 10px 0 0;
  font-size: 15px;
  color: #666;
  letter-spacing: 0.04em;
}

/* 活動商品區塊 */
.promo-block-grid.ap-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 22px;
}

/* 活動商品卡片 */
.promo-block-grid .product-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  padding: 12px;
  height: 100%;
  text-align: center;
  overflow: hidden;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.promo-block-grid .product-card:hover {
  transform: translateY(-4px);
  border-color: #e1e1e1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

/* 商品圖片固定比例 */
.promo-block-grid .product-media {
  width: 100%;
  aspect-ratio: 1 / 1;
  border: 0;
  border-radius: 10px;
  background: #f7f7f7;
  overflow: hidden;
}

.promo-block-grid .product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* 商品標題最多兩行 */
.promo-block-grid .product-title {
  margin: 12px 0 10px;
  min-height: calc(1.5em * 2);
  font-size: 16px;
  line-height: 1.5;
  text-align: center;
}

.promo-block-grid .product-title a {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #222;
  text-decoration: none;
}

/* 價格 */
.promo-block-grid .product-price {
  justify-content: center;
  margin: 8px 0 12px;
  font-size: 15px;
}

/* 按鈕 */
.promo-block-grid .btn-outline {
  width: 100%;
  max-width: none;
  border-radius: 0px;
  padding: 9px 0;
}

/* 平板 */
@media (max-width: 992px) {
  .promo-block {
    margin: 30px 0 48px;
  }

  .promo-block-grid.ap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px 18px;
  }
}

/* 手機 */
@media (max-width: 576px) {
  .promo-block {
    margin: 24px 0 40px;
  }

  .promo-block-head {
    margin: 20px 0 18px;
  }

  .promo-block-title {
    font-size: 22px;
  }

  .promo-block-sub {
    font-size: 13px;
  }

  .promo-block-grid.ap-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
  }

  .promo-block-grid .product-card {
    padding: 8px;
    border-radius: 10px;
  }

  .promo-block-grid .product-title {
    font-size: 13px;
    min-height: calc(1.5em * 2);
  }

  .promo-block-grid .btn-outline {
    font-size: 13px;
    padding: 8px 0;
  }
}

/* ===== 新活動頁 CMS：維持舊活動頁寬度 ===== */
.promotion-show-page {
  max-width: 1200px;
  margin: 24px auto 80px;
  padding: 0 16px;
}

.promotion-show-page .promo-main-banner {
  max-width: 1160px;
  margin: 0 auto 20px;
  border-radius: 16px;
  overflow: hidden;
  background: #f3f3f3;
}

.promotion-show-page .promo-main-banner img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
  display: block;
}

.promotion-show-page .container {
  max-width: 1160px;
  padding-left: 0;
  padding-right: 0;
}

/* ===== 活動頁資訊區塊 ===== */
.promotion-show-page .promo-info-box {
  background: #f9f9f9;
  border: 1px solid #e8e8e8;
  border-radius: 12px;
  padding: 24px 28px;
  margin-bottom: 36px;
}

.promotion-show-page .promo-info-inner {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}

.promotion-show-page .promo-info-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 200px;
  padding-right: 32px;
  border-right: 1px solid #e0e0e0;
}

.promotion-show-page .promo-info-icon {
  width: 40px;
  height: 40px;
  background: #f0f0f0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #aaa;
  font-size: 16px;
  flex-shrink: 0;
}

.promotion-show-page .promo-info-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promotion-show-page .promo-meta-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.9rem;
  line-height: 1.6;
}

.promotion-show-page .promo-meta-label {
  color: #888;
  white-space: nowrap;
  flex-shrink: 0;
}

.promotion-show-page .promo-meta-value {
  color: #333;
  font-weight: 500;
}

.promotion-show-page .promo-terms-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 4px;
  padding: 5px 14px;
  border: 1px solid #bbb;
  border-radius: 999px;
  background: transparent;
  font-size: 0.82rem;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
  width: fit-content;
}

.promotion-show-page .promo-terms-btn:hover {
  border-color: var(--green);
  color: var(--green);
}

/* 手機版改直排 */
@media (max-width: 640px) {
  .promotion-show-page .promo-info-inner {
    flex-direction: column;
    gap: 16px;
  }

  .promotion-show-page .promo-info-left {
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
    padding-right: 0;
    padding-bottom: 16px;
    width: 100%;
  }
}

.promotion-show-page .promo-block-banner img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin-left: auto;
  margin-right: auto;
  object-fit: contain;
}

@media (max-width: 576px) {
  .promotion-show-page {
    margin: 16px auto 60px;
    padding: 0 12px;
  }

  .promotion-show-page .promo-info-box {
    padding: 24px 16px;
  }
}

/* ===== 活動頁 CMS：贈禮圖卡區塊修正 ===== */
.promotion-show-page .gift-block {
  max-width: 1160px;
  margin: 24px auto 40px;
}

.promotion-show-page .gift-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 18px;
  width: 100%;
  margin-top: 18px;
}

.promotion-show-page .gift-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: #eee;
  text-decoration: none;
}

.promotion-show-page .gift-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 左上角標籤 */
.promotion-show-page .gift-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: rgba(255, 255, 255, .92);
  color: #333;
  font-size: 12px;
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 999px;
}

/* 底部白字標題 */
.promotion-show-page .gift-title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}

/* 贈禮圖卡 hover 放大效果 */
.promotion-show-page .gift-card img {
  transition: transform .28s ease;
}

.promotion-show-page .gift-card:hover img {
  transform: scale(1.04);
}

/* 平板 */
@media (max-width: 992px) {
  .promotion-show-page .gift-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* 手機 */
@media (max-width: 576px) {
  .promotion-show-page .gift-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px;
  }

  .promotion-show-page .gift-title {
    font-size: 14px;
  }
}

/* ===== 搜尋結果頁 ===== */
.store-search-page {
  padding-top: 40px;
  padding-bottom: 60px;
}

.store-search-page .container {
  max-width: 1160px;
}

.store-search-page h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 18px;
}

.store-search-page form .input-group {
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
}

.store-search-page form .form-control {
  border: 0;
  box-shadow: none;
  height: 38px;
}

.store-search-page form .btn {
  border-radius: 0;
  padding-left: 18px;
  padding-right: 18px;
}

.search-product-card {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 14px;
  border: 1px solid #f1f1f1;
  border-radius: 10px;
  background: #fff;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.search-product-card:hover {
  color: #111827;
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
}

.search-product-img-wrap {
  width: 88px;
  height: 88px;
  flex: 0 0 88px;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f7f7;
}

.search-product-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.search-product-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #999;
  background: #f7f7f7;
}

.search-product-info {
  min-width: 0;
  flex: 1;
}

.search-product-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
  color: #111827;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.search-product-price {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.search-product-price-old {
  font-size: 13px;
  color: #999;
  text-decoration: line-through;
}

.search-product-price-new {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}

/* 搜尋結果：有特價（price-old 存在）時，price-new 才變紅 */
.search-product-price.has-sale .search-product-price-new {
  color: #e53935;
}

/* 搜尋結果：活動 / 頁面 */
.search-page-list .list-group-item {
  border-color: #eee;
  border-radius: 8px;
  margin-bottom: 10px;
  padding: 14px 16px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.search-page-list .list-group-item:hover {
  background-color: #f7fbfa;
  color: var(--green);
}

/* 搜尋關鍵字高亮 */
.search-highlight {
  background: transparent;
  color: var(--green);
  font-weight: 700;
  padding: 0;
}

/* ===== 搜尋推薦關鍵字 ===== */
.search-keyword-panel {
  margin-top: 8px;
}

.search-keyword-title {
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
}

.search-keyword-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.search-keyword-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 34px;
  padding: 7px 14px;

  border: 1px solid #d9d9d9;
  border-radius: 999px;

  background: #fff;
  color: #333;

  font-size: 14px;
  line-height: 1.2;

  text-decoration: none;

  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background-color 0.2s ease;
}

.search-keyword-btn:hover {
  border-color: var(--green);
  background: #f7fbfa;
  color: var(--green);
  text-decoration: none;
}

/* 搜尋無結果 */
.search-empty-state {
  padding: 48px 0;
  text-align: center;
}

.search-empty-state .search-keyword-list {
  justify-content: center;
}

/* 手機版 */
@media (max-width: 575.98px) {
  .store-search-page {
    padding-top: 28px;
    padding-bottom: 48px;
  }

  .store-search-page h1 {
    font-size: 28px;
  }

  .search-product-card {
    padding: 12px;
    gap: 12px;
  }

  .search-product-img-wrap {
    width: 76px;
    height: 76px;
    flex-basis: 76px;
  }

  .search-product-title {
    font-size: 14px;
  }

  .search-product-price-new {
    font-size: 14px;
  }
}

/* ===== 最新優惠列表頁 ===== */
.promotion-list-page {
  min-height: 60vh;
}

.promo-card {
  display: block;
  text-decoration: none;
  color: var(--text);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #e8e8e8;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  height: 100%;
}

.promo-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
  color: var(--text);
}

.promo-card-img {
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  background: #f0f0f0;
}

.promo-card-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.promo-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e8f7f3;
  color: var(--green);
  font-size: 1.1rem;
  font-weight: 600;
}

.promo-card-body {
  padding: 16px 18px 20px;
}

.promo-card-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

/* 最新優惠：活動名稱樣式，與「會員有禮」卡片名稱一致 */
.promotion-list-page .promo-card-title {
  display: block;
  margin: 0;
  color: #555;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: normal;
}

.promo-card-body p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 10px;
}

.promo-date {
  font-size: 0.82rem;
  color: #999;
}

/* ===== 最新優惠：額外存取限制標示 ===== */
.promo-access-badge {
  display: inline-block;
  margin: 0 6px 8px 0;
  padding: 3px 8px;
  border-radius: 999px;

  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

/* 指定會員限定 */
.promo-access-badge-member {
  background: #fff3e8;
  color: #c56a1a;
}

/* 邀請碼限定 */
.promo-access-badge-password {
  background: #f2edff;
  color: #7651b5;
}

@media (max-width: 767.98px) {
  .promotion-list-page .container {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ===== 圖文區塊（html type）排版修正 ===== */
.promo-html-section {
  max-width: 1160px;
  margin: 0 auto 48px;
  padding: 0 16px;
}

.promo-html-section h2:not(.promo-block-title) {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  font-weight: 700;
  margin-bottom: 20px;
  letter-spacing: 0.05em;
}

/* Trix RichEditor 內容排版 */
.promo-html-content {
  font-size: 0.95rem;
  line-height: 1.9;
  color: #444;
}

.promo-html-content h1,
.promo-html-content h2,
.promo-html-content h3 {
  font-weight: 700;
  margin: 28px 0 12px;
  line-height: 1.4;
}

.promo-html-content h1 { font-size: 1.6rem; }
.promo-html-content h2 { font-size: 1.3rem; }
.promo-html-content h3 { font-size: 1.1rem; }

.promo-html-content p {
  margin-bottom: 12px;
}

.promo-html-content ul,
.promo-html-content ol {
  padding-left: 1.5rem;
  margin-bottom: 16px;
}

.promo-html-content li {
  margin-bottom: 6px;
}

.promo-html-content strong {
  font-weight: 700;
  color: #222;
}

.promo-html-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 16px auto;
  border-radius: 6px;
}

/* ===== 隱藏 Trix 附件資訊（檔名 / 大小連結）===== */
.promo-html-content .attachment__caption,
.promo-html-content .attachment__name,
.promo-html-content .attachment__size,
.promo-html-content figcaption {
  display: none !important;
}

/* 圖片置中、撐滿 */
.promo-html-content figure,
.promo-html-content .attachment {
  margin: 20px 0;
  text-align: center;
}

.promo-html-content figure img,
.promo-html-content .attachment img {
  max-width: 100%;
  height: auto;
  border-radius: 0px;
  display: block;
  margin: 0 auto;
}

/* 區塊橫幅圖（section->image）*/
.promo-html-img {
  width: 100%;
  max-width: 1160px;
  height: auto;
  border-radius: 0px;
  display: block;
  margin: 0 auto 24px;
}

/* ===== 活動頁：組合商品區塊 ===== */
.combo-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.combo-item-tag {
  font-size: 0.75rem;
  background: #f0f0f0;
  color: #666;
  border-radius: 4px;
  padding: 2px 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.combo-item-more {
    background: #e8f7f3;
    color: var(--green);
}
/* ===== 活動頁：組合商品區塊 END ===== */


