﻿/* ==================== Reset & Base ==================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  font-family: 'Inter', 'Noto Sans JP', 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0 !important; /* 20251219 */
  padding: 0 !important; /* 20251219 */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  cursor: pointer;
}

/* ==================== Header ==================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  height: auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ffffff;
  padding: 10px;
  z-index: 100;
}

.site-logo img {
  width: 50px;
}

.nav-desktop {
  display: flex;
  gap: 30px;
  align-items: center;
  position: absolute;
  width: auto;
  height: 24px;
  right: 30px;
  top: 20px;
  opacity: 0;
  visibility: hidden;
}

@media (min-width: 768px) {
  .nav-desktop {
    opacity: 1;
    visibility: visible;
  }

  .site-logo img {
    width: 64px;
  }
}

/* ==================== Main Content ==================== */
.main-content {
  position: relative;
  width: 100%;
  padding: 70px 0 0 0;
}

  .main-content .center-view {
    max-width: 1280px;
    width: 100%; /* 20251219 */
    margin: 0 auto;
  }

@media (min-width: 1024px) {
  .main-content .center-view {
    padding: 0 70px;
  }
}

/* ==================== Hero Banner ==================== */
.banner-container {
  width: 100%;
  margin: 0 auto;
}

.banner-link {
  display: block;
  font-size: 0;
  line-height: 0;
}

  .banner-link img {
    width: 100%;
    height: auto;
    display: block;
  }

/* ==================== Product Section ==================== */
.product-section {
  margin: 0 auto 30px auto;
}

  .product-section h2 {
    text-align: center;
    font-size: 1.65rem;
    margin: 1rem auto;
  }

.product-title {
  width: 100%;
  text-align: center;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
}

/* ==================== 代客操作Bar Impersonation Banner ==================== */
.impersonation-bar {
  background-color: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
  padding: 4px 0;
  font-size: 0.82rem;
  position: absolute;
  z-index: 999;
}

.impersonation-bar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.impersonation-bar__text {
  color: #555;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.impersonation-bar__form {
  margin: 0;
}

.impersonation-bar__button {
  border: 1px solid #ccc;
  background: #ffffff;
  color: #555;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

  .impersonation-bar__button:hover {
    background-color: #f3f4f6;
    border-color: #bdbdbd;
  }

/* ==================== product catalog ==================== */
.collection {
  display: flex;
  flex-direction: column;
  padding: 0 10px 10px 0;
}

.collection-menu {
  width: 240px;
  height: auto;
  display: none;
  padding-bottom: 40px;
}

.product-catalog {
  width: 100%;
  padding: 10px;
}

@media (min-width: 992px) {
  .collection {
    display: grid;
    grid-template-columns: 240px 1fr;
    align-items: start;
    gap: 20px;
    padding: 0 20px;
  }

  .collection-menu {
    display: block;
    width: 100%;
  }

  .product-catalog {
    width: 100%;
    padding: 0;
  }
}

.toolbar {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  gap: 12px;
  font-size: 14px;
}

.summary {
  width: 100%;
  flex: 1;
}

  .summary .val {
    color: #F28F8F;
    padding: 0 5px;
    ;
  }

.grid-view {
  width: 24px;
  height: 24px;
  background-image: url('../icons/grid-view.svg');
}

  .grid-view.active {
    background-image: url('../icons/grid-view-active.svg');
  }

.list-view {
  width: 24px;
  height: 24px;
  background-image: url('../icons/list-view.svg');
}

  .list-view.active {
    background-image: url('../icons/list-view-active.svg');
  }



/* ==================== Card Slider ==================== */
.product-slider {
  padding: 0 20px;
  overflow: hidden
}

/* 透過卡片預設大小的設定即可改變顯示的張數"*/
.swiper-slide {
  /* 【手機版】假設手機寬 375px，顯示 2.16 張 (大概 45% 寬度) */
  width: 45%;
  min-width: 150px;
}

/* 【平板版】顯示 4.16 張 (大概 23% 寬度) */
@media (min-width: 768px) {
  .swiper-slide {
    width: 23%;
    min-width: 180px;
  }
}

/* 【桌機版】設定一個固定寬度 */
@media (min-width: 1024px) {
  .swiper-slide {
    width: 300px;
  }
}

/* 預設 (手機/平板) 隱藏按鈕和分頁器 */
.swiper-button-prev,
.swiper-button-next,
.swiper-pagination {
  display: none;
}

/* 桌機版才顯示 */
@media (min-width: 1024px) {

  .swiper-button-prev,
  .swiper-button-next,
  .swiper-pagination {
    display: block;
  }

  .swiper-button-prev,
  .swiper-button-next {
    color: #000;
  }

  .swiper-pagination .swiper-pagination-bullet-active {
    background: #000;
  }
}

/* ==================== Card Grid Mode ==================== */
.product-grid {
  display: grid;
  /* grid-template-columns: repeat(2, 1fr); */
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  align-items: stretch;
  padding: 0 10px;
}

  .product-grid.show {
    display: grid;
    /* grid-template-columns: repeat(2, 1fr); */
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 15px;
    align-items: stretch;
    padding: 0 10px;
  }


@media (min-width: 768px) {

  .product-grid {
    /* grid-template-columns: repeat(3, 1fr); */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr))
  }

    .product-grid.show {
      /* grid-template-columns: repeat(3, 1fr); */
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (min-width: 1024px) {

  .product-grid {
    /* grid-template-columns: repeat(4, 1fr); */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

    .product-grid.show {
      /* grid-template-columns: repeat(3, 1fr); */
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (min-width: 1440px) {

  .product-grid {
    /* grid-template-columns: repeat(5, 1fr); */
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  }

    .product-grid.show {
      /* grid-template-columns: repeat(4, 1fr); */
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

/* ==================== Card List Mode ==================== */
.product-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.product-list--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  padding: 10px;
  align-items: center;
  justify-items: center;
}

.product-list--list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 10px;
}

.hide {
  display: none !important;
}

.show {
  display: block;
}

/* ==================== Card ==================== */
.card {
  display: flex;
  flex-direction: column;
  background-color: #fff;
  justify-content: space-between;
  padding-bottom: 15px;
  height: 100%;
}

.card-list {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background-color: #fff;
  padding: 10px 0;
  width: 100%;
  /*border-bottom:1px solid #eee;*/
}

.card-header {
  /* 這個 div 只做為容器 */
}

.card-header-list {
  position: relative;
  width: 150px;
  height: 150px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f8f8f8;
}

.card-image-wrapper {
  position: relative;
  line-height: 0;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

  .card-image-wrapper img {
    width: 100%;
    /* height: auto; */
    height: 100%;
    object-fit: cover;
    display: block;
  }

.card-header h3 {
  /* font-size: 1.25rem; */
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0.8rem 0;
  padding: 0;
  text-align: center;
}

.card-actions-list h3 {
  /* font-size: 1.25rem; */
  font-size: 14px;
  font-weight: 600;
  color: #333;
  margin: 0.4rem 0;
  padding: 0;
}

  .card-header h3 a,
  .card-actions-list h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
  }

    .card-header h3 a:hover,
    .card-actions-list h3 a:hover {
      color: #ccc;
    }

.card-actions {
  padding: 0;
}

.card-actions-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  width: 100%;
  gap: 5px;
}

.card-actions .price {
  margin-top: 0px;
  margin-bottom: 10px; /* 20251218 */
}

.price {
  /* font-size: 1.5rem; */
  font-size: 15px;
  text-align: center;
  /* margin: 0.8rem auto 1.25rem; */
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  align-items: center;
}

.sale-price {
  font-weight: bold;
  color: #C3965E;
}

.original-price {
  text-decoration: line-through;
  color: #AEB1B4;
  padding: 0 5px;
}

.card-actions-list .price {
  text-align: left;
  flex-wrap: wrap;
  font-size: 1rem;
  margin: 0 0 0.8rem 0;
  display: flex;
  gap: 5px;
}

/* ==================== 搜尋頁 ==================== */
.serach-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: space-evenly;
}

  .serach-btn button {
    flex: 1
  }

@media (min-width: 768px) {
  .serach-btn {
    display: flex;
    width: 500px;
    justify-content: space-evenly;
  }
}

.product-no-match {
  text-align: center;
  color: #ccc;
}

  .product-no-match p {
    font-size: 1.4rem;
  }

/* Buttons */
.btn-add-to-cart {
  display: block;
  width: 100%;
  padding: 15px 0;
  border: none;
  background-color: #000;
  color: #fff;
  /* font-size: 1.25rem; */
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  border-radius: 8px;
  text-decoration: none; /* 20251219 */
  margin-top: 10px; /* 20251219 */
}

  .btn-add-to-cart:hover {
    background-color: #666;
  }

  .btn-add-to-cart:disabled {
    background-color: #ccc;
  }

.card-actions-list .btn-add-to-cart {
  align-items: flex-start;
  display: block;
  width: 100%;
  max-width: 120px;
  padding: 10px 0;
  border: none;
  background-color: #333;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  border-radius: 8px;
}

  .card-actions-list .btn-add-to-cart:disabled {
    background-color: #ccc;
  }


.btn {
  display: block;
  width: auto;
  padding: 10px 20px;
  color: #fff;
  /* font-size: 1.25rem; */
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 8px;
}

.btn--solid {
  border: none;
  background-color: #000;
  color: #fff;
}

.btn--outline {
  border: 1px solid #000;
  background-color: #fff;
  color: #000;
}

.btn--ghost {
  text-decoration: none;
  padding: 10px;
  color: #666;
}

  .btn--ghost:hover {
    color: #444;
  }

.card-hover-overlay {
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  background-color: rgba(0, 0, 0, 0.4);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

@media(max-width:1024px) {
  .card-hover-overlay {
    display: none;
  }
}

.card-hover-btn {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  border: 2px solid #000;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  pointer-events: auto !important;
}

  .card-hover-btn:first-child {
    background-color: #fff;
  }

  .card-hover-btn:last-child {
    background-color: #000;
  }

  .card-hover-btn::after {
    content: attr(aria-label);
    position: absolute;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-5px);
    color: #fff;
    font-size: 18px;
    font-weight: bold;
    white-space: nowrap;
    margin-top: 30px;
  }

  .card-hover-btn:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }

@media (min-width: 1024px) {
  .btn-add-to-cart {
    display: none;
    /*display: block;*/
  }

  .product-recommend .btn-add-to-cart {
    display: block;
  }

  .card:hover .card-hover-overlay {
    display: flex;
    opacity: 1;
    pointer-events: none;
  }
}

/* ==================== View More ==================== */
.view-more-wrapper {
  display: flex;
  justify-content: center;
  padding: 10px 0;
}

.view-more-button {
  background-color: #fff;
  border: 2px solid #eeeeee;
  border-radius: 100px;
  width: 60%;
  padding: 15px 0;
  /* font-size: 18px; */
  font-size: 16px;
  font-weight: 500;
  color: #000;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

  .view-more-button:hover {
    background-color: #f9f9f9;
    border-color: #ddd;
  }

/* ==================== Footer ==================== */
.site-footer {
  background-color: #000;
  color: #fff;
  padding: 1rem;
  margin-bottom: 40px;
  width: 100%;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

  .footer-links a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0 0 5px;
    border-bottom: 1px solid #000;
  }

    .footer-links a:hover {
      text-decoration: none;
      border-bottom: 1px solid #fff;
    }

.contact-info {
  margin-bottom: 20px;
}

.contact-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 5px;
}


.contact-info p {
  font-size: 14px;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.social-links {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

  .social-links a {
    display: block;
    width: 32px;
    height: 32px;
    cursor: pointer;
  }


.copyright {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 1px;
}

/* ==================== Bottom Navigation ==================== */
.bottom-navigation {
  position: fixed;
  z-index: 99;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #fff;
  padding: 10px 0;
  gap: 20px;
}

.nav-item {
  width: 100%;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
}

  .nav-item span {
    display: block;
    width: 24px;
    height: 24px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
  }

.product-detail-navigation {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 60px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #fff;
  padding: 0 20px;
  gap: 15px;
}

@media (min-width: 768px) {

  .bottom-navigation,
  .product-detail-navigation {
    display: none;
  }

  .site-footer {
    margin-bottom: 0;
  }
}

.product-detail-navigation .nav-item {
  flex: 1;
  /* 每個 a 佔 1 等分 */
  display: flex;
  justify-content: center;
  align-items: center;
}

.product-detail-navigation button {
  flex: 3;
  /* 每個 button 佔 2 等分 */

  text-align: center;
}

/*-- 手機下方導覽列 按鈕圖示 with active effect --*/
.ic-home {
  background-image: url('../icons/home.svg');
}

.ic-favorite {
  background-image: url('../icons/favorite.svg');
}

.ic-cart {
  background-image: url('../icons/cart.svg');
}

.ic-account {
  background-image: url('../icons/account.svg');
}

.nav-item.active .ic-home {
  background-image: url('../icons/home-active.svg');
}

.nav-item.active .ic-favorite {
  background-image: url('../icons/favorite-active.svg');
}

.nav-item.active .ic-cart {
  background-image: url('../icons/cart-active.svg');
}

.nav-item.active .ic-account {
  background-image: url('../icons/account-active.svg');
}

/*-- 電腦上方導覽列 按鈕圖示 --*/
.nav-ic-btn {
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  padding: 0;
  text-decoration: none;
  display: inline-block;
  position: relative;
}

.ic-btn-menu {
  background-image: url('../icons/nav_ic_menu.svg');
}

  .ic-btn-menu:hover {
    background-image: url('../icons/nav_ic_menu_hover.svg');
  }

.ic-btn-search {
  transform: scale(1.2);
  background-image: url('../icons/nav_ic_search.svg');
}

  .ic-btn-search:hover {
    background-image: url('../icons/nav_ic_search_hover.svg');
  }

  .ic-btn-search.active {
    background-image: url('../icons/nav_ic_search_active.svg');
  }

.ic-btn-cart {
  transform: scale(1.2);
  background-image: url('../icons/nav_ic_cart.svg');
}

  .ic-btn-cart:hover {
    background-image: url('../icons/nav_ic_cart_hover.svg');
  }

  .ic-btn-cart.active {
    background-image: url('../icons/nav_ic_cart_active.svg');
  }

.ic-btn-account {
  transform: scale(1.2);
  background-image: url('../icons/nav_ic_account.svg');
}

  .ic-btn-account:hover {
    background-image: url('../icons/nav_ic_account_hover.svg');
  }

  .ic-btn-account.active {
    background-image: url('../icons/nav_ic_account_active.svg');
  }

.cart-badge {
  position: absolute;
  top: 50%;
  right: 50%;
  transform: translate(24px, -24px);
  background-color: #000;
  color: white;
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 12px;
  min-width: 16px;
  max-width: 32px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==================== Floating Buttons ==================== */
.floating-btn {
  position: fixed;
  right: 30px;
  z-index: 98;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #fff;
}

  .floating-btn img {
    width: 24px;
    height: 24px;
  }

.btn-gotop {
  bottom: 80px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

  .btn-gotop.show {
    opacity: 0.8;
    visibility: visible;
    transform: translateY(0);
  }

.btn-show-qr {
  opacity: 0.8;
  bottom: 150px;
}

  .btn-gotop:hover,
  .btn-show-qr:hover {
    opacity: 1;
    transform: scale(1.2);
  }

/* ==================== PopUp Modal ==================== */
.qr-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 100;
}

.modal-popup {
  position: relative;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 101;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-close-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

  .modal-close-btn img {
    width: 40px;
    height: 40px;
  }

.qr-modal.is-visible {
  opacity: 1;
  visibility: visible;
}

  .qr-modal.is-visible .modal-popup {
    transform: translateY(0);
  }

.qr-popup {
  width: 90%;
  max-width: 320px;
  padding: 30px;
  text-align: center;
}

  .qr-popup h4 {
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 15px;
  }

  .qr-popup .qr-code-image {
    width: 100%;
    height: auto;
    max-width: 260px;
  }


/* ==================== 搜尋 帳戶 購物車 Panel ==================== */
input::placeholder {
  color: #ccc;
}

.nav-search-panel {
  width: 100%;
  display: flex;
  padding: 10px;
  align-items: center;
  gap: 10px;
  align-self: stretch;
  border-top: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  background-color: #fcfcfc;
  z-index: 97;
  position: absolute;
  top: 70px;
}

  .nav-search-panel input {
    display: flex;
    height: 36px;
    padding: 0 10px;
    align-items: center;
    flex: 1 0 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    color: #aaa;
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    margin-right: 10px; /* 20251222 */
  }

  .nav-search-panel button {
    display: flex;
    height: 36px;
    padding: 10px 20px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    background: #000;
    color: #fff;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
  }

@media (max-width: 767px) {

  .nav-account-panel,
  .nav-cart-panel {
    display: none !important;
  }
}

@media (min-width: 768px) {
  .nav-search-panel {
    width: 320px;
    display: flex;
    padding: 10px;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
    z-index: 197;
    position: fixed;
    top: 55px;
    right: 10px
  }

  .nav-cart-panel {
    width: 260px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
    z-index: 197;
    position: fixed;
    top: 55px;
    right: 50px;
  }

  .cart-list {
    max-height: 360px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
  }

  .cart-list-item {
    text-decoration: none;
    display: flex;
    align-self: stretch;
    align-items: center;
    gap: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
    color: #000;
    font-size: 14px;
  }

    .cart-list-item:last-child {
      border-bottom: 0;
    }

  .cart-list-image {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
  }

  .cart-list-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex-grow: 1;
    align-items: flex-start;
  }

    .cart-list-info div {
      width: 150px;
      color: #888;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

      .cart-list-info div:first-child {
        color: #000;
        font-weight: bold;
      }

  .nav-cart-panel button {
    display: flex;
    width: 100%;
    height: 36px;
    padding: 10px 20px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 6px;
    background: #000;
    color: #FFF;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
  }

  .nav-account-panel {
    width: 260px;
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px;
    align-items: center;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #fff;
    z-index: 197;
    position: fixed;
    top: 55px;
    right: 105px;
  }

  .desktop_member-new {
    width: 100%;
    display: flex;
    gap: 10px;
    justify-content: center;
  }

    .desktop_member-new button {
      flex: 1;
      padding: 10px 0;
    }

  .desktop_member-login {
    width: 100%;
    display: flex;
    flex-direction: column;
  }

  .desktop_member-menu {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 15px 0;
    border-top: 1px solid #ddd;
  }

    .desktop_member-menu button {
      width: 100%;
      background: transparent;
      border: 0;
      text-align: left;
      padding: 10px 0;
      border-radius: 8px;
    }

      .desktop_member-menu button:hover {
        background: #f0f2f5;
      }
}

/* ==================== 麵包屑 ==================== */

.breadcrumb {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-weight: 700;
  line-height: 14px;
  padding: 10px;
  gap: 10px;
  overflow: hidden; /* 20251219 */
  white-space: nowrap; /* 20251219 */
  text-overflow: ellipsis; /* 20251219 */
}

  .breadcrumb a,
  .breadcrumb span {
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

.btn-ghost {
  color: #888;
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

  .btn-ghost.active {
    color: #666;
    font-size: 14px;
    text-decoration: none;
    white-space: nowrap;
  }

.breadcrumb-arrow {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  background-image: url("../icons/breadcrumb.svg");
  background-size: contain;
}

/* ==================== 產品詳細頁 ==================== */
.product-header {
  width: 100%;
  display: flex;
  flex-direction: column;
  padding: 10px 0;
}

.product-content {
  max-width: 100%; /* 20251219 */
  height: auto;
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
  overflow: hidden; /* 20251219 */
}

.product-gallery {
  width: 100%;
  height: fit-content;
  display: grid;
  grid-template-rows: auto auto;
  gap: 10px;
}

.product-setting {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden; /* 20251219 */
  white-space: nowrap; /* 20251219 */
  text-overflow: ellipsis; /* 20251219 */
}

/* ==================== swiper ==================== */
/*.product-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  border-radius: 0px;
  display: block;
  position: relative;
}

  .product-image .swiper-wrapper {
    align-items: stretch;
  }

  .product-image .swiper-slide {
    cursor: zoom-in;
    width: 100%;
  }

  .product-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
  }*/

/* 202051219 */
.main-swiper {
  width: 100%;
  height: 100%;
  margin-bottom: 10px;
}

.thumb-swiper {
  height: 100%;
  width: 100%;
  box-sizing: border-box;
}

  .thumb-swiper .swiper-slide {
    width: min(80px, 18vw);
    height: min(80px, 18vw);
    /* opacity: 0.4; */
    cursor: grab;
    min-width: 0px !important;
    aspect-ratio: 1/1;
  }

    .thumb-swiper .swiper-slide img {
      width: 100%;
      height: 100%;
      /* object-fit: contain; */
      aspect-ratio: 1/1; /* 202051222 */
      object-fit: cover; /* 202051222 */
    }

  .thumb-swiper .swiper-slide-thumb-active {
    opacity: 1;
  }

.spec-options {
  margin-top: 20px;
}

  .spec-options button {
    margin-right: 10px;
    padding: 6px 12px;
    cursor: pointer;
  }

/* ==================== 圖片縮圖區 ==================== */
.product-preview {
  width: 100%;
  height: fit-content;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 10px;
}

.product-thumb {
  aspect-ratio: 1 / 1;
  border: 2px solid #fff;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease, border-color 0.3s ease;
  background: #eee;
}

  .product-thumb:hover {
    opacity: 1;
  }

  .product-thumb.is-active {
    opacity: 1;
    border-color: #aaa;
  }

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

/*-- 手機不顯示 --*/
@media (max-width: 479px) {
  .product-preview {
    display: none;
  }

  /* (手機版) 左右箭頭隱藏 */
  .product-image .swiper-button-next,
  .product-image .swiper-button-prev {
    display: none;
  }

  /* 數字分頁 (1/10) */
  .swiper-pagination-fraction {
    display: block;
    position: absolute;
    bottom: 15px;
    left: 80%;
    width: auto;
    background-color: rgba(255, 255, 255, 0.8);
    color: #666;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 14px;
    z-index: 10;
  }
}

/* [平板/桌機：大於 480px] */
@media (min-width: 479px) {

  .product-image .swiper-button-next,
  .product-image .swiper-button-prev {
    display: block;
    color: #333;
    /* --swiper-navigation-size: 30px; */
  }

  .swiper-pagination-fraction {
    display: none;
  }
}

/* -- < 640 保持直排 -- */
@media (min-width: 480px) and (max-width: 639px) {
  .product-image {
    max-width: 480px;
    margin: 0 auto;
    border-radius: 15px;
  }

    .product-image img {
      border-radius: 15px;
      margin: 0 auto; /* 20251219 */
      aspect-ratio: 1; /* 20251222 */
      object-fit: cover; /* 20251222 */
    }
}

/* -- < 768 保持直排 置中 -- */
@media (min-width: 640px) and (max-width: 767px) {
  .product-content {
    grid-template-columns: 1fr auto;
    grid-template-rows: none;
  }

  .product-gallery {
    display: grid;
    grid-template-rows: auto auto;
    grid-column: 1;
  }

  .product-image {
    border-radius: 8px;
  }

    .product-image img {
      border-radius: 8px;
    }

  .product-setting {
    width: 340px;
    grid-column: 2;
  }
}

/* -- 768~991 左右排列 固定400 -- */
@media (min-width: 768px) and (max-width: 991px) {
  .product-content {
    grid-template-columns: 1fr auto;
    grid-template-rows: none;
  }

  .product-gallery {
    display: grid;
    grid-template-rows: auto auto;
    grid-column: 1;
  }

  .product-image {
    border-radius: 8px;
  }

    .product-image img {
      border-radius: 8px;
    }

  .product-setting {
    width: 420px;
    grid-column: 2;
  }
}

/* -- >=992 左右排列 固定 -- */
@media (min-width: 992px) {
  .product-content {
    width: 100%; /* 20260107修正圖片抖動 */
    max-width: 1280px;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
    margin: 0 auto;
  }

  .product-gallery {
    display: grid;
    grid-template-rows: auto auto;
    grid-column: 1;
  }

  .product-image {
    border-radius: 8px;
  }

    .product-image img {
      border-radius: 8px;
    }

  .product-setting {
    grid-column: 2;
  }
}

/* ==================== 顯示文字與設定 ==================== */

.product-title {
  color: #000;
  font-family: Inter;
  /* font-size: 26px; */
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  text-align: left;
  padding: 0 10px;
  overflow: hidden; /* 20251219 */
  white-space: nowrap; /* 20251219 */
  text-overflow: ellipsis; /* 20251219 */
}

.product-brief {
  white-space: break-spaces;
  color: #AAA;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  padding: 0 10px;
}

.product-slogan {
  color: #666;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  padding: 0 10px;
}

.product-price {
  color: #C3965E;
  font-family: Inter;
  font-size: 26px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  padding: 0 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

  .product-price .val {
    color: #AEB1B4;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    text-decoration-line: line-through;
  }

.product-number {
  color: #888;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  padding: 0 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

  .product-number .val {
    color: #666;
  }

.product-status {
  color: #888;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  padding: 0 10px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.product-preorder-notice {
  color: #f04e4e;
  font-size: 15px;
  font-weight: 500;
  padding: 0 10px;
  gap: 10px;
  align-items: center;
}

.product-status .val {
  color: #666;
}

.product-option {
  color: #666;
  font-family: Inter;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  padding: 0 10px;
}



.option-buttons {
  display: flex;
  align-items: center;
  align-content: center;
  gap: 10px;
  align-self: stretch;
  flex-wrap: wrap;
  padding: 10px 0;
}

  .option-buttons button {
    padding: 6px 12px;
    border-radius: 5px;
    border: 1px solid #444;
    color: #444;
    background-color: #fff;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    /* (選用) 平滑過渡 */
  }

    .option-buttons button[aria-pressed="true"] {
      color: #fff;
      background-color: #333;
      border-color: #333;
    }

    /* (選用) Hover 效果 (非啟用狀態) */
    .option-buttons button:not([aria-pressed="true"]):hover {
      background-color: #eee;
    }

.product-quantity {
  width: 100%;
  display: flex;
  padding: 10px;
  box-sizing: border-box;
}


.quantity-control {
  width: 100%;
  display: flex;
  height: 40px;
  justify-content: center;
  align-items: center;
  border-radius: 5px;
  border: 1px solid #000;
  padding: 0 10px;
  gap: 10px
}

  .quantity-control button {
    width: 40px;
    height: 40px;
    background-color: transparent;
    cursor: pointer;
    border: 0;
    outline: none;
  }

  .quantity-control input {
    width: 100%;
    border: 0;
    text-align: center;
  }

.product-purchase {
  display: flex;
  width: 100%;
  padding: 10px;
  align-items: flex-start;
  align-content: flex-start;
  gap: 15px;
}

  .product-purchase button {
    flex: 1;
  }






.product_bonus {
  display: flex;
  width: 100%;
  height: auto;
  padding: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: #888;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  gap: 10px;
}

  .product_bonus .val {
    color: #F28F8F;
  }

.add-to-favorite {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 15px;
  border: 1px solid #ccc;
  border-radius: 30px;
  color: #444;
  text-decoration: none;
}







/* Lightbox Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.8);
  /* 滿版遮罩 */
  padding: 20px;
  /* 讓圖片不會貼邊 */
  box-sizing: border-box;
  /* padding 不會撐開 modal */

  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

  .modal.is-visible {
    opacity: 1;
    visibility: visible;
  }

.lightbox-popup {
  position: relative;
  /* 為了關閉按鈕 */
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.lightbox-swiper {
  width: 100%;
  height: 100%;
}

  .lightbox-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
  }

    .lightbox-swiper .swiper-slide img {
      max-width: 100%;
      max-height: 100%;
      width: auto;
      height: auto;
      box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
    }

.modal__close-btn {
  position: absolute;
  top: 0;
  /* 改到右上角 */
  right: 0;
  width: 44px;
  height: 44px;
  background-color: rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  color: #000;
  border: none;
  cursor: pointer;
  z-index: 1001;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

  .modal__close-btn svg {
    /* 關閉按鈕內的 SVG */
    width: 24px;
    height: 24px;
    fill: currentColor;
  }








.product-info {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 10px;
}

/*--滑動tab--*/
.info-tab {
  width: 100%;
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid #ccc;
  border-radius: 10px;
  overflow: hidden;
}

.info-tab-item {
  flex: 1;
  text-align: center;
  padding: 12px 16px;
  cursor: pointer;
  background-color: #fff;
  font-size: 16px;
  border-radius: 10px;
  transition: background-color 0.2s ease;
  color: #888;
  font-family: Inter;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

  .info-tab-item:first-child {
    border-right: 1px solid #ccc;
    border-radius: 10px 0 0 10px;
  }

  .info-tab-item:last-child {
    border-left: none;
    border-radius: 0 10px 10px 0;
  }

  .info-tab-item:hover {
    color: #444;
    background-color: #f5f5f5;
    font-weight: 600;
  }

  .info-tab-item.active {
    background-color: #f5f5f5;
    color: #444;
    font-weight: 600;
  }

.text-title {
  /* font-size: 22px; */
  font-size: 20px;
  font-weight: bold;
  padding: 6px 10px;
  border-left: 2px solid #000;
  margin: 15px auto;
  text-align: left;
}


/* ==================== 推薦商品區塊 ==================== */
.product-recommend {
  padding: 0 10px;
}

.product-recommend-slider {
  /*padding: 0 60px;*/
  overflow: hidden;
  position: relative;
  /*margin: 0 60px;*/
}

  .product-recommend-slider .swiper-button-prev,
  .product-recommend-slider .swiper-button-next {
    display: block;
  }

  .product-recommend-slider .swiper-slide {
    height: auto;
  }

  .product-recommend-slider .swiper-button-prev,
  .product-recommend-slider .swiper-button-next {
    color: #000;
    width: 20px;
    height: 20px;
    top: 50%;
    transform: translateY(-50%);
    position: absolute;
  }

  .product-recommend-slider .swiper-button-prev {
    left: 10px;
  }

  .product-recommend-slider .swiper-button-next {
    right: 10px;
  }

    .product-recommend-slider .swiper-button-prev::after,
    .product-recommend-slider .swiper-button-next::after {
      font-size: 20px;
      font-weight: bold;
    }


/*--font size--*/
.font-xs {
}

.font-s {
}

.font-m {
}

.font-l {
  font-size: 22px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.font-xl {
  font-size: 26px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

/* ==================== 篩選下拉選單 ==================== */
.dropdown-container {
  position: relative;
  display: inline-block;
}

.drop-down-menu {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 5px 15px;
  border: 1px solid #ccc;
  border-radius: 30px;
  color: #666;
  font-family: Inter;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  background-color: #fff;
  user-select: none;
}

.dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 10;
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  min-width: 100%;
  list-style: none;
  padding: 5px 0;
  margin: 5px 0 0 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.dropdown-container.is-active .dropdown-list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-list li a {
  display: block;
  padding: 8px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
}

  .dropdown-list li a:hover {
    background-color: #f5f5f5;
  }

/* ==================== 分頁 ==================== */
.pagination {
  display: flex;
  justify-content: center;
  /* 整體置中 */
  align-items: center;
  flex-wrap: wrap;
  /* 換行以適應小螢幕 */
  gap: 20px;
  /* 列表和下拉選單的間距 */
  margin-top: 30px;
  /* 和商品網格的間距 */
  padding: 10px;
}

/* 頁碼列表 (ul) */
.pagination-list {
  display: flex;
  align-items: center;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 5px;
  /* 頁碼按鈕間距 */
}

/* 頁碼項目 (li) */
.pagination-item {
}

/* 頁碼連結 (a) 或 當前頁面 (span) */
.pagination-link {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-size: 14px;
  background-color: #fff;
  transition: background-color 0.2s ease, color 0.2s ease;
}

  /* 滑鼠移上去的效果 */
  .pagination-link:hover {
    background-color: #eee;
  }

/* 當前頁面 (Active) */
.pagination-item.is-active .pagination-link {
  background-color: #eee;
  /* 範例：藍色底 */
  color: #444;
  border-color: #ccc;
  font-weight: bold;
  pointer-events: none;
  /* 靜態範例中可選 */
}

/* 省略符號 (...) */
.pagination-ellipsis {
  padding: 0 5px;
  color: #888;
}

/* 上一頁/下一頁 按鈕 */
.pagination-item--prev a,
.pagination-item--next a {
  font-weight: bold;
}

/* 禁用 (Disabled) 的 上一頁/下一頁 */
.pagination-item.disabled .pagination-link {
  color: #ccc;
  border-color: #eee;
  background-color: #f9f9f9;
  pointer-events: none;
  cursor: not-allowed;
}

.select-wrapper {
  position: relative;
  min-width: 100px;
}

/* 自建下拉選單 (select) */
.pagination-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  display: block;
  width: 100%;
  padding: 8px 30px 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
  background-color: #fff;
  cursor: pointer;
}

  .pagination-select::-ms-expand {
    display: none;
  }

.select-wrapper::after {
  content: '';
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  width: 12px;
  height: 12px;
  /* 使用背景圖片載入您的箭頭 */
  background-image: url('../icons/dropdown.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  pointer-events: none;
}


/* ==================== menu ==================== */
.side-menu {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  height: 100vh;
  border-right: 1px solid #ddd;
}

.menu-header {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 10px;
  /*border-bottom:1px solid #ccc ;*/
  padding-bottom: 10px;
}

.menu-logo {
  width: 30px;
  flex-shrink: 0;
}

.close-button {
  background-color: transparent;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

  .close-button svg {
    width: 20px;
    height: 20px;
  }

.menu-content {
  flex-grow: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

  .menu-content ul,
  .menu-content li {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  .menu-content button {
    width: 100%;
    padding: 12px 10px;
    border: none;
    background-color: transparent;
    text-align: left;
    color: #333;
    /* font-size: 16px; */
    font-size: 14px;
    cursor: pointer;
    display: flex;
    height: 50px;
    align-items: center;
    gap: 10px;
    align-self: stretch;
    color: #000;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    border-bottom: 1px dashed #ddd
  }

  .menu-content a {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    color: #333;
    text-decoration: none;
    /* font-size: 16px; */
    font-size: 14px;
  }

.menu-link img {
  width: 24px;
  height: 24px;
  margin-left: auto;
}


.menu-footer {
  flex-shrink: 0;
  border-top: 1px solid #ddd;
}

.member-title {
  color: #aaa;
}

.member-buttons {
  display: flex;
  justify-content: space-around;
  gap: 10px;
}

  .member-buttons a {
    display: inline-block;
    width: auto;
    padding: 10px 20px;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    text-decoration: none;
    flex: 1;
    text-align: center;
  }

    .member-buttons a.btn--solid {
      border: none;
      background-color: #000;
      color: #fff;
    }

    .member-buttons a.btn--outline {
      border: 1px solid #000;
      background-color: #fff;
      color: #000;
    }

  .member-buttons.hide {
    display: none;
  }

.submenu .menu-link {
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  text-indent: 20px;
}



.submenu--level-3-menu-text {
  padding-left: 14px;
}


.submenu--level-4 li a.menu-link span {
  font-size: 14px;
  font-style: normal;
  font-weight: 300;
  text-indent: 20px;
  padding: 10px 20px;
}

.menu-item.menu-item--level-3 button {
  border-bottom: 0px;
}

.menu-item.menu-item--level-4 span {
  border-left: 1px solid #666;
}



/* ==================== login & register ==================== */
.auth-panel {
  background-color: #fff;
  padding: 10px;
  width: 100%;
  display: block;
  margin: 10px auto;
}

/* Form Layout */
.form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 3. Reusable Component: Form Field */
.form-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* Spacing between label, input, and message */
}

.form-field__label {
  font-size: 0.875rem;
  color: #666;
  font-weight: 500;
}

/* Input Styling (Pill/Border) */
.form-field__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
  box-sizing: border-box;
  color: #333;
  outline: none;
  transition: border-color 0.2s;
}

  .form-field__input::placeholder {
    color: #aaa;
  }

  .form-field__input:focus {
    border-color: #000;
  }

  .form-field__input.singleline {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .form-field__input.multiline {
    height: 80px;
    resize: none;
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
  }

/* Messages (Error/Hint/Note) */
.form-field__message {
  font-size: 0.75rem;
  margin: 0;
  min-height: 10px;
  /* Reserve space for messages */
}

.form-field__message--error {
  color: #f28f8f;
  /* Red for errors */
}

.form-field__message--hint {
  color: #aaa;
  /* Grey for general hints */
}

.form-field__message--note {
  color: #2e6fa7;
  /* Blue for special notes (e.g., birthday warning) */
}

/* Radio/Checkbox Group (For Gender/Keep Logged In) */
.option-group {
  display: flex;
  align-items: center;
  gap: 20px;
}

  /* Custom Radio/Checkbox Styling - simplified */
  .option-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.875rem;
    color: #333;
  }

  .option-group input[type="radio"],
  .option-group input[type="checkbox"] {
    margin-right: 5px;
  }

/* 4. Reusable Component: Button*/
.btn-send {
  background-color: #000;
  color: #fff;
  padding: 12px 15px;
  border: none;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s;
  width: 100%;
}

.btn-send--outline {
  background-color: #fff;
  color: #000;
  border: 1px solid #000;
}

.btn-send:hover {
  background-color: #333;
}

.btn-send--outline:hover {
  background-color: #fff;
  color: #666;
  border: 1px solid #666;
}

/* Login Options (Forgot, Register, Divider) */
.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  gap: 10px;
}

.login-options__links {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 5px;
  px;
}

  .login-options__links a {
    color: #3794f1;
    text-decoration: none;
  }

  .login-options__links span {
    color: #aaa;
    padding: 0 5px;
  }

/* Legal Text at bottom of registration form */
.legal-text {
  margin-top: 10px;
  font-size: 0.75rem;
  color: #666;
  line-height: 1.5;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.legal-text__link {
  color: #3794f1;
  text-decoration: none;
  margin: 0 2px;
}

.forgot-password-shell {
  padding: 24px 10px 40px;
}

.forgot-password-panel {
  max-width: 920px;
  margin: 0 auto;
  padding: 48px 24px 56px;
  border: 1px solid #ddd;
  border-radius: 20px;
  background-color: #fff;
}

  .forgot-password-panel .text-title {
    text-align: center;
    margin-bottom: 20px;
    border: none;
    font-size: 18pt;
  }

.forgot-password-panel__description {
  max-width: 560px;
  margin: 0 auto 28px;
  color: #555;
  font-size: 13pt;
  line-height: 1.7;
  text-align: center;
}

/*.forgot-password-panel__description--narrow {
  max-width: 520px;
}*/

.forgot-password-form {
  max-width: 610px;
  margin: 0 auto;
  gap: 28px;
}

.forgot-password-panel--message {
  text-align: center;
}

.forgot-password-panel__status {
  max-width: 520px;
  margin: 0 auto 28px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid #ddd;
  background-color: #fafafa;
  color: #555;
  line-height: 1.7;
  text-align: center;
}

.forgot-password-panel__status--invalid {
  border-color: #f0c9c9;
  background-color: #fff7f7;
  color: #9f4b4b;
}

.forgot-password-panel__action {
  display: block;
  max-width: 610px;
  margin: 0 auto;
  text-decoration: none;
}

/* Mobile Responsiveness */
@media (max-width: 850px) {
  .auth-container {
    flex-direction: column;
    align-items: stretch;
    padding: 10px;
    gap: 10px;
  }

  .auth-card {
    width: auto;
    padding: 20px;
  }

  .auth-card--registration {
    border-left: none;
    border-bottom: 5px solid #ccc;
    /* Use border-bottom for mobile separation */
  }

  .forgot-password-panel {
    padding: 32px 18px 36px;
    border-radius: 14px;
  }

  .forgot-password-panel__description {
    font-size: 1rem;
    margin-bottom: 24px;
  }

  .forgot-password-panel__status {
    padding: 14px 16px;
  }
}

/* ==================== account ==================== */
.account-panel {
  padding: 0 10px;
}

.account-side-menu {
  width: 300px;
  height: auto;
  display: none;
  padding-bottom: 40px;
}


.account-content,
.order-content {
  width: 100%;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 10px;
  color: #444;
  font-size: 1rem;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

  .account-content a {
    color: #3794F1;
    text-decoration: none;
  }

.account-info,
.account-summary {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.account-summary {
  border-top: 1px solid #ddd;
}

  .account-summary span {
    color: #F28F8F;
    padding: 0 5px;
  }

@media (min-width: 640px) {
  .auth-panel {
    padding: 10px;
    width: 480px;
    display: block;
    margin: 10px auto;
  }

  .account-content {
    flex-direction: row;
  }

    .account-content button {
      max-width: 200px;
    }

  .account-info {
    flex: 1;
  }

  .account-summary {
    border-top: 0;
    border-left: 1px solid #ddd;
    padding: 0 20px;
    flex: 2;
  }
}

/* ==================== 結帳頁面 ==================== */
/* Shipping Toast */
.shipping-toast {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 0 15px 15px 15px;
  max-width: 640px;
  margin: 20px auto;
  box-shadow: 0 2px 4px rgba(170, 170, 170, 0.25);
}

.progress-bar {
  height: 8px;
  background: #f1f0f0;
  border-radius: 10px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background: black;
  border-radius: 10px;
  transition: width 0.3s ease;
}

.checkout-step {
  border-top: 1px solid #ddd;
  margin-top: 20px;
}

  .checkout-step .step-title {
    /* font-size: 22px; */
    font-size: 17px;
    font-weight: bold;
    padding: 6px 10px;
    margin: 15px auto;
    text-align: left;
  }

  .checkout-step span.step-number {
    display: inline-flex;
    width: 24px;
    height: 24px;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    background: #444;
    color: #fff;
    text-align: center;
    font-family: Inter;
    font-size: 16px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    align-self: stretch;
  }

.products-section {
  width: 100%;
}

.section-subtitle {
  color: #AAA;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  padding: 0 10px;
}

.section-subtitle--gift {
  background: #fef6e3;
  padding: 10px 15px;
  color: #000;
  font-size: 15px;
  font-weight: bold;
}
/* 20251223 */

.section-subtitle--buymore {
  background: #d5f2f8;
  padding: 10px 15px;
  color: #000;
  font-size: 15px;
  font-weight: bold;
}
/* 20260105 */
.product-item {
  padding: 10px;
  border-bottom: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.product-item-header, .product-item-footer {
  display: flex;
  gap: 10px;
}

.product-item-image {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  aspect-ratio: 1/1;
  border-radius: 15px;
  ;
}

.product-item-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  flex: 1 0 0;
  color: #000;
  font-family: Inter;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.product-item-price {
  color: #888;
  font-family: Inter;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.remove-button {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  padding: 0;
  margin: 0;
}

  .remove-button img {
    width: 100%;
  }

.product-item-set {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 20251218fix start */
/* 促銷標籤區塊 
.product-item-promo {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  font-size: 12px;
  align-items: center;
}

.promo-tag {
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
}

.promo-tag.achieved {
  background-color: #28a745;
}

.promo-tag.pending {
  background-color: #dc3545;
}

.promo-link {
  font-size: 12px;
  color: #007bff;
  text-decoration: underline;
  cursor: pointer;
}
20251218fix end */

.item-quantity-control {
  width: 160px;
  height: 40px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  border-radius: 5px;
  border: 1px solid #CCC;
  padding: 0 5px;
  gap: 10px
}

  .item-quantity-control button {
    width: 40px;
    height: 40px;
    background-color: transparent;
    cursor: pointer;
    border: 0;
    outline: none;
    flex-shrink: 0;
  }

  .item-quantity-control input {
    width: 100%;
    border: 0;
    text-align: center;
    flex: 1;
    color: #444;
    font-size: 20px;
  }

.item-subtotal {
  color: #444;
  font-family: Inter;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin-left: auto;
}

.cart-summary {
  color: #AAA;
  text-align: right;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  padding: 0 10px;
}

.member-section,
.payment-shipping-form {
  padding: 0 10px;
  gap: 15px;
}

.login-prompt {
  color: #2E6FA7;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.verified-field,
.card-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 10px;
}

  .form-section-title,
  .verified-field label,
  .card-field label {
    color: #666;
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
  }

.input-group {
  display: flex;
  gap: 10px;
}

  .input-group input {
    display: flex;
    height: 36px;
    padding: 0 10px;
    align-items: center;
    flex: 1 0 0;
    border-radius: 5px;
    border: 1px solid #CCC;
  }

  .input-group button {
    display: flex;
    height: 36px;
    padding: 6px 12px;
    justify-content: center;
    align-items: center;
    gap: 10px;
    border-radius: 5px;
    border: 1px solid #444;
    background: #FFF;
  }

.form-hint {
  color: #2E6FA7;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.coupon-section {
  padding: 10px 0;
}

.verified-input {
  color: #666;
  font-size: 14px;
  font-style: normal;
  font-weight: 600;
  line-height: normal;
  display: flex;
  width: 100%;
  height: 50px;
  padding: 0 10px;
  align-items: center;
  border-radius: 5px;
  background: #F4F4F4;
  gap: 10px;
}

  .verified-input img {
    margin-left: auto;
  }

.shipping-section {
  display: flex;
  flex-direction: column;
  padding: 0 10px;
  gap: 15px;
}

.option-field {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  padding-bottom: 15px;
  margin-bottom: 15px;
  gap: 16px;
}

.radio-option {
  background: #fff;
  border: 2px solid #ddd;
  border-radius: 8px;
  display: flex;
  width: 100%;
  height: 60px;
  padding: 0 15px;
  align-items: center;
  gap: 15px;
}

  .radio-option input[type="radio"] {
    appearance: none;
    /* 移除預設樣式 */
    width: 20px;
    height: 20px;
    border: 2px solid #aaa;
    border-radius: 50%;
    display: inline-block;
    position: relative;
    cursor: pointer;
  }

    .radio-option input[type="radio"]:checked {
      width: 24px;
      height: 24px;
      border: none;
      background: url(/icons/radio_button_check_circle.svg);
    }

  /*      .radio-option input[type="radio"]:checked::after {
        width: 24px;
        height: 24px;
        background: url(/icons/radio_button_check_circle.svg);
      }*/

  .radio-option.field-lg {
    height: 80px;
  }

  .radio-option.active {
    border-radius: 5px;
    border: 2px solid #000;
    background: #FFF;
  }

.radio-icon {
  width: 24px;
  height: 24px;
  background: url(../icons/radio_button_unchecked.svg);
}

  .radio-icon.active {
    width: 24px;
    height: 24px;
    background: url(../icons/radio_button_check_circle.svg);
  }

.radio-label {
  color: #444;
  font-family: Inter;
  font-size: 15px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.option-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.option-title {
  color: #444;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.option-subtitle {
  color: #666;
  font-family: Inter;
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
}

.option-price {
  color: #888;
  font-family: Inter;
  font-size: 14px;
  font-style: normal;
  font-weight: 500;
  line-height: normal;
  margin-left: auto;
}

.card-field-section {
  display: flex;
  width: 100%;
  height: 44px;
  align-items: center;
  background: #FFF;
}

.card-field-icon {
  display: flex;
  width: 60px;
  padding: 4px 2px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  align-self: stretch;
  border-radius: 5px 0 0 5px;
  border: 1px solid #ddd;
  background: #E9ECEF;
}

.card-field-wrapper {
  display: flex;
  padding: 0 10px 0 0;
  align-items: center;
  gap: 10px;
  flex: 1 0 0;
  align-self: stretch;
  border-radius: 0 5px 5px 0;
  border-top: 1px solid #ddd;
  border-right: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
}

  .card-field-wrapper input {
    width: 100%;
    padding: 7px 20px;
    border: 0;
    color: #888;
    font-family: Inter;
    font-size: 20px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
  }

.wrap-end {
  border-bottom: 1px dashed #ddd;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

/* Progress Tabs */
.progress-tabs {
  width: 100%;
  max-width: 600px;
  margin: 10px auto 0 auto;
  z-index: 20;
  padding: 0;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  padding: 0 10px;
}

.tab-button {
  border: 1px solid #aaa;
  border-radius: 30px;
  padding: 8px 10px;
  background: #fff;
  color: #aaa;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
}

.tab-button--active {
  border-color: #666;
  background: #666;
  color: #fff;
}

.tab-number {
  width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #aaa;
  color: #fff;
  font-size: 11px;
  text-align: center;
  line-height: 20px;
  display: block;
}

.tab-button--active .tab-number {
  background: #fff;
  color: #666;
}

.tab-space {
  display: flex;
  flex-grow: 1;
  background: #aaa;
  height: 1px;
}

@media (max-width:480px) {
  .shipping-toast {
    margin: 20px 10px;
  }

  .tab-button {
    border: 1px solid #aaa;
    border-radius: 30px;
    padding: 8px;
    background: #fff;
    color: #aaa;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
  }

  .tab-button--active {
    border-color: #666;
    background: #666;
    color: #fff;
  }

  .tab-number {
    display: none;
  }
}

/*-- radio group --*/
.radio-group {
  margin: 10px 0;
}

.option-label {
  display: inline-block;
  margin-right: 20px;
  cursor: pointer;
}

  .option-label span.icon {
    margin-right: 5px;
  }

.radio-group-content {
  display: none;
  padding: 10px 0;
}

input[type="radio"]:checked + label .icon::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url(../icons/radio_button_check_circle.svg);
  background-size: contain;
  position: relative;
  top: 6px;
}

input[type="radio"]:not(:checked) + label .icon::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: url(../icons/radio_button_unchecked.svg);
  background-size: contain;
  position: relative;
  top: 6px;
}

#group1-optionA:checked ~ .group1-contentA,
#group1-optionB:checked ~ .group1-contentB,
#group2-optionA:checked ~ .group2-contentA,
#group2-optionB:checked ~ .group2-contentB {
  display: block;
}

.radio-group input[type="radio"] {
  display: none;
}

.input-field {
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #eee;
  border-radius: 15px;
}

/* input[type="checkbox"] {
  display: inline-block;
  width: 18px;
  height: 18px;
background: url(../icons/check_box_outline.svg);
  background-size: contain;
  position: relative;
  top: 3px;
  margin-right: 5px;
}
input[type="checkbox"]:checked {
  display: inline-block;
  width: 18px;
  height: 18px;
background: url(../icons/check_box.svg);
  background-size: contain;
  position: relative;
  top: 3px;
  margin-right: 5px;
} */
.checkbox-item {
  display: flex;
  gap: 10px;
}

.terms-section {
  border-top: 1px solid #ddd;
  padding: 15px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 10px;
}

.checkbox-text {
  font-size: 0.9rem;
  line-height: 1.4;
  color: #666;
  flex: 1;
}

  .checkbox-text a {
    color: #3794f1;
    text-decoration: none;
  }

    .checkbox-text a:hover {
      text-decoration: underline;
    }

.total-summary {
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 15px;
  padding: 15px;
}

.cart-box {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(170, 170, 170, 0.15);
}

.cart-box {
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  box-shadow: 0 2px 4px rgba(170, 170, 170, 0.15);
}

.cart-header {
  font-size: 0.9rem;
  color: #aaa;
  margin-bottom: 10px;
}

/* ==============================
       Order Summary
    =============================== */
.cart-summary-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #ddd;
  font-size: 0.9rem;
}

  .cart-summary-item:last-child {
    border-bottom: none;
  }

.cart-total {
  font-weight: 700;
  font-size: 1.125rem;
  color: #444;
}

.cart-total-label {
  font-weight: 500;
  color: #444;
}

.cart-summary-item span {
  color: #aaa;
}

/*消除InputType = number的上下箭頭*/
/* Chrome, Edge, Safari */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
input[type=number] {
  -moz-appearance: textfield;
}


/* ==============================
       Cart Details
    =============================== */
.cart-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
  margin-bottom: 8px;
  font-weight: 500;
  color: #444;
}

.cart-item {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
}

  .cart-item:last-child {
    border-bottom: none;
  }

.cart-item-name {
  font-size: 0.8rem;
  color: #000;
  margin-bottom: 4px;
}

.cart-item-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  color: #444;
}

  .cart-item-info .price {
    color: #888;
    flex: 1;
    text-align: left;
  }

.cart-item-summary {
  font-size: 0.75rem;
  color: #444;
  padding-top: 10px;
}

/* ==============================
       Bonus Points
    =============================== */
.cart-bonus {
  padding-top: 10px;
  font-size: 0.85rem;
}

.bonus-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  color: #444;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.bonus-total {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-weight: 700;
  font-size: 14px;
  margin-top: 10px;
}

.bonus-note {
  font-size: 0.75rem;
  color: #2e6fa7;
  margin-top: 15px;
}

/* ==============================
       Button
    =============================== */
.cart-btn {
  background: #000;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
  margin: 15px 10px;
}

  .cart-btn:hover {
    background: #333;
  }

.container {
  display: grid;
  grid-template-columns: 1fr;
}

.side-container {
  padding: 5px 0 0 0;
}

.mobile-checkout-button {
  display: block;
}

.desktop-checkout-button {
  display: none;
}

@media (min-width: 768px) {
  .container {
    grid-template-columns: 1fr 260px;
  }

  .checkout-step {
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-left: 10px;
  }

  .cart-btn {
    margin: 15px 10px 15px 20px;
  }

  .mobile-checkout-button {
    display: none;
  }

  .desktop-checkout-button {
    display: block;
  }
}

@media (min-width: 992px) {
  .container {
    grid-template-columns: 1fr 300px;
  }
}

@media (min-width: 1280px) {
  .container {
    grid-template-columns: 1fr 360px;
  }
}

/* ==================== 加入購物車 Modal ==================== */
.cart-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  /* 20251222 opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0.3s ease; */
}

  .cart-preview.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

body.has-modal {
  overflow: hidden;
}

button:disabled {
  /* Fallback for browsers that do NOT support light-dark */
  background-color: rgba(239, 239, 239, 0.3);
  color: rgba(16, 16, 16, 0.3);
  border-color: rgba(118, 118, 118, 0.3);
  /* Browsers that support light-dark() will override the fallback */
  background-color: light-dark(rgba(239, 239, 239, 0.3), rgba(19, 1, 1, 0.3));
  color: light-dark(rgba(16, 16, 16, 0.3), rgba(255, 255, 255, 0.3));
  border-color: light-dark(rgba(118, 118, 118, 0.3), rgba(195, 195, 195, 0.3));
}


/* 基礎樣式（遮罩 + 面板通用設定） */
/* .modal-mask {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 100;
} */

/* 半透明遮罩 */
.overlay {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  z-index: 900;
  display: none;
}

  .overlay.active {
    display: block;
  }

/* 通用面板 */
.extra-panel {
  position: fixed;
  width: 100%;
  height: auto;
  padding: 40px 20px;
  background: #fff;
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  z-index: 910;
  overflow: hidden;
  transition: all .25s ease;
  /* transition: transform 0.25s ease-out, opacity 0.25s ease-out, visibility 0s linear 0.25s; */
  /* 動畫跑完再設為 hidden */
}

  /* 通用關閉按鈕 */
  .extra-panel .close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    p border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: #888;
    transition: color 0.2s;
  }

  /* 右側商品 Panel 載入中樣式 */
  .extra-panel .panel-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 1.5rem;
    color: #6c757d;
    font-size: 0.95rem;
    text-align: center;
  }

    /* 如果你有用 Bootstrap，可以直接用 spinner-border */
    .extra-panel .panel-loading .spinner-border {
      width: 1.75rem;
      height: 1.75rem;
    }

  .extra-panel .close-btn:hover {
    color: #000;
  }

  /* 1.type-bottom（從下往上滑出的面板） */ /* 20251222Mobile bottom */
  .extra-panel.type-bottom {
    width: 100%;
    height: auto;
    bottom: 0;
    left: 0;
    border-radius: 16px 16px 0 0;
    transform: translateY(100%);
    animation: slideUp 0.3s forwards;
    max-height: 90vh;
  }

    /* 擴展版：高度為可視範圍的 90% */
    .extra-panel.type-bottom.expand {
      height: 90vh;
    }

      .extra-panel.type-bottom.expand .content {
        max-height: calc(90vh - 60px);
        overflow-y: auto;
      }

/* 動畫 */
@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

/* 2.type-float（浮動選單） */
.extra-panel.type-float {
  display: flex;
  justify-content: center;
  position: absolute;
  left: 20px;
  top: 20px;
  width: auto;
  padding: 15px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  animation: fadeIn 0.15s ease;
}

  .extra-panel.type-float .content {
    width: 240px;
    background: #fff;
  }

  /* 沒有 X 按鈕 */
  .extra-panel.type-float .close-btn {
    display: none;
  }

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }

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

/* 3.type-center（固定寬高的對話框） */
.extra-panel.type-center {
  width: 400px;
  height: auto;
  padding: 40px 20px 20px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

  /* 內容排版 */
  .extra-panel.type-center .content {
    flex: 1;
    text-align: left;
    display: flex;
  }

  /* 下方按鈕區 */
  .extra-panel.type-center .actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
  }

  .extra-panel.type-center .btn {
    flex: 1;
    padding: 8px 0;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid #000;
    color: #000;
    font-size: 1rem;
    background: #fff;
    margin: 0 5px;
    transition: 0.2s;
  }

    .extra-panel.type-center .btn.confirm {
      background: #000;
      color: #fff;
    }

    .extra-panel.type-center .btn:hover {
      opacity: 0.5;
    }

/* 4.type-wide（寬度為版面 90% 的面板） */ /* 20251222 Desktop wide */
.extra-panel.type-wide {
  width: 90%;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  border-radius: 12px;
  padding: 40px 20px 60px;
  background: #fff;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

  /* 優惠券專用：僅作為容器，視覺由 _CouponPanel.cshtml 控制 */
  .extra-panel.type-wide.coupon-panel {
    max-width: none;
    padding: 0;
    background: transparent;
    box-shadow: none;
    align-items: center;
    justify-content: center;
  }

    .extra-panel.type-wide.coupon-panel .content {
      flex: 0;
      max-height: none;
      overflow: visible;
    }

  /* 內容區統一設定 */
  .extra-panel.type-wide .content {
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 60px);
  }

  /* 固定高度模式 */
  .extra-panel.type-wide.fixed-height {
    height: 300px;
  }

    .extra-panel.type-wide.fixed-height .content {
      max-height: calc(300px - 60px);
    }

  /* 自適應高度 */
  .extra-panel.type-wide.auto-height {
    height: auto;
  }

    .extra-panel.type-wide.auto-height .content {
      overflow: visible;
      max-height: none;
    }

  /* 滿高模式 */
  .extra-panel.type-wide.expand {
    height: 90vh;
  }

    .extra-panel.type-wide.expand .content {
      max-height: calc(90vh - 60px);
      overflow-y: auto;
    }

@media (max-width:767px) {
  /*   body.has-modal {
    overflow: hidden;
  } */

  .extra-panel.type-wide.expand {
    display: none;
  }

  .extra-panel.type-bottom {
    display: block;
  }
}

@media (min-width:768px) {
  /*   body.has-modal {
    overflow: hidden;
  } */

  .extra-panel.type-wide.expand {
    display: block;
  }

  .extra-panel.type-bottom {
    display: none;
  }
}

/* ==================== 桌機版選單 ==================== */

/* --- 1. 整個導覽列的容器 --- */
.mega-nav-container {
  /* position: absolute; 
  top: 60px;
  left: 0; */
  position: relative;
  width: 100%;
  background-color: #fff;
  z-index: 96;
}

/* --- 2. 主按鈕列 (UL) --- */
.mega-nav-buttons {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  justify-content: center;
  border-bottom: 1px solid #ddd;
}

/* --- 3. 主按鈕 (LI) --- */
.mega-nav-item {
  flex: 0 0 auto;
  text-align: center;
}

  .mega-nav-item > a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #000;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.2s;
    border-bottom: 2px solid transparent;
    color: #000;
    font-family: Inter;
    /* font-size: 16px; */
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
  }

    .mega-nav-item > a:hover {
      border-bottom: 2px solid #000;
    }

/* --- 4. 大型面板 (Mega Panel) --- */
.mega-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background-color: #F7F7F7; /* 20251218 */
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15);
  padding: 15px;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.s;
  border-top: 1px dashed #ddd;
}

/* --- 5. 面板內部內容 (Grid) --- */
.mega-panel-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
  padding-left: 100px;
  max-width: 1200px;
  margin: 0 auto;
}

/* --- 6. 垂直群組 --- */
.menu-group {
  display: flex;
  flex-direction: column;
  text-align: left;
  gap: 10px;
}

  .menu-group h4 {
    margin: 0 0 10px 0;
    /* border-bottom: 1px solid #eeeeee; */
    color: #333;
    display: flex;
    align-items: center;
  }

    /* --- H4 標題的連結繼承樣式 --- */
    .menu-group h4 a {
      text-decoration: none;
      color: inherit;
      /* 繼承 h4 的顏色 (#333) */
    }

      .menu-group h4 a:hover {
        color: #000;
        /* 可選：hover 時變色 */
      }


  .menu-group > a,
  .menu-item-with-sub > a {
    text-decoration: none;
    color: #555;
    padding: 5px 0;
    border-radius: 4px;
    display: block;
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

    .menu-group > a:hover,
    .menu-item-with-sub > a:hover {
      background-color: #f0f2f5;
      color: #444;
    }

    .menu-group > a::before,
    .menu-item-with-sub > a::before {
      content: "";
      display: inline-block;
      width: 16px;
      height: 16px;
      background-image: url('../icons/ic_menu_dot.svg');
      background-size: contain;
      background-repeat: no-repeat;
      margin-right: 6px;
      vertical-align: middle;
    }

/* 包含子選單的項目容器 */
.menu-item-with-sub {
  position: relative;
}

/* 子選單 */
.sub-menu-layer {
  margin-left: 5px;
  padding: 10px;
  border-left: 1px solid #ddd;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

  /* 第二層連結的樣式 */
  .sub-menu-layer a {
    text-decoration: none;
    color: #666;
    font-size: 0.9em;
    padding: 3px 5px;
    border-radius: 4px;
    display: block;
    word-break: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    font-family: Inter;
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    line-height: normal;
  }

    .sub-menu-layer a:hover {
      background-color: #f0f2f5;
      color: #000;
    }

.ic_menu_close {
  display: block;
  width: 32px;
  height: 32px;
  background: url("../icons/closepanel.svg");
  background-size: contain;
  margin-left: auto;
  border: 0px;
  outline: none;
  transform: translateX(5px);
}

@media (max-width:767px) {
  .mega-nav-container {
    display: none;
  }

  .menu-container {
    display: block;
  }
}

@media (min-width:768px) {
  .site-header .ic-btn-menu {
    opacity: 0;
    visibility: hidden;
  }

  .mega-nav-container {
    display: block;
  }

  .menu-container {
    display: none;
  }

    .menu-container.open {
      transform: translateX(0);
      display: none;
    }

  .menu-overlay {
    display: none !important;
  }

  body {
    overflow: auto !important;
  }
}


/* ==================== 手機版選單 ==================== */
.menu-container {
  width: 100%;
  max-width: 400px;
  height: 100vh;
  background: #fff;
  overflow-x: hidden;
  /* overflow-y: auto; */
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2000;
  /* 新增動畫效果，讓它從左側滑入/滑出 */
  transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  display: flex;
  flex-direction: column;
}

  /* 當選單開啟時的類別 */
  .menu-container.open {
    transform: translateX(0);
    /* 滑入 */
  }

.collapsible-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  /* 新增：讓它佔據所有剩餘空間並允許滾動 */
  flex-grow: 1;
  /* 佔滿剩餘空間 */
  overflow-y: auto;
  /* 讓這個區域可以獨立滾動 */
  -webkit-overflow-scrolling: touch;
  /* 增強 iOS 滾動體驗 */
  /* margin-bottom: 110px; */
}

  .collapsible-menu li {
    padding: 0;
    /* border-bottom: 1px solid #ddd; */
  }

  /* 隱藏子選單 */
  .collapsible-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    background-color: #fff;
    /* 子選單背景稍微不同 */
    transition: all 0.3s ease-out;
    /* 增加過渡效果 */
  }

  /* 連結樣式 (同時作為點擊區域) */
  .collapsible-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    /* font-size: 16px; */
    font-size: 14px;
    font-style: normal;
    font-weight: 500;
    color: #000;
    background-color: #fff;
    position: relative;
    transition: background-color 0.2s;
    gap: 0;
  }

    .collapsible-menu a:hover {
      background-color: #f9f9f9;
    }

/* 移除純導頁連結的指示符號 */
li:not(.has-submenu) > a::after {
  content: '';
  width: 0;
}

/* ==================================== */
/* 層級展開/收合指示符樣式 (::after)        */
/* ==================================== */

/* 預設的展開/收合指示符容器 */
.has-submenu > a::after {
  margin-left: auto;
  /* 將指示符推到最右邊 */
  display: inline-flex;
  /* 使用 flex 居中圖示 */
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  transition: background-color 0.3s, transform 0.3s;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100%;
  border-radius: 4px;
  content: '';
  /* 預設使用背景圖示，清除文字內容 */
}

/* L1 展開/收合圖示 */
.collapsible-menu > li.has-submenu > a::after {
  background-image: url('../icons/menu-link-show.svg');
}

.collapsible-menu > li.has-submenu.open > a::after {
  background-image: url('../icons/menu-link-hide.svg');
}

/* L2 展開/收合圖示 */
.collapsible-menu ul > li.has-submenu > a::after {
  border-radius: 50%;
  background-image: url('../icons/btn-plus.svg');
}

.collapsible-menu ul > li.has-submenu.open > a::after {
  border-radius: 50%;
  background-image: url('../icons/btn-minus.svg');
}

/* L3 展開/收合圖示 (未使用圖片，保持 CSS 佔位) */
.collapsible-menu ul ul > li.has-submenu > a::after {
  /* 保持 L3 空白，如有需要請在此處添加 background-image */
}

.collapsible-menu ul ul > li.has-submenu.open > a::after {
  /* 保持 L3 空白 */
}


/* ==================================== */
/* 每一層選單的文字與前置圖示 (::before)  */
/* ==================================== */

/* --- 第 1 層 (L1): 主選單 --- */
.collapsible-menu > li > a {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  background-color: #fff;
  padding-left: 20px;
  border-bottom: 1px dashed #ddd;
  /* 增加 L1 分隔線 */
}

/* --- 第 2 層 (L2): 群組標題或子選單 --- */
.collapsible-menu ul > li > a {
  font-size: 15px;
  font-weight: 500;
  color: #000;
  padding-left: 20px;
  /* L2 縮排 */
  /* border-bottom: 1px solid #ddd; */
  /* L2 分隔線 */
}

/* --- 第 3 層 (L3): 實際分組項目 (圓點圖示) --- */
.collapsible-menu ul ul > li > a {
  font-size: 14px;
  font-weight: 500;
  color: #444;
  padding-left: 15px;
  /* L3 縮排 */
}

  .collapsible-menu ul ul > li > a::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    margin-right: 0;
    background-image: url('../icons/ic_menu_dot.svg');
    background-size: contain;
    background-repeat: no-repeat;
    flex-shrink: 0;
  }

/* --- 第 4 層 (L4): 最終導頁連結 (線條圖示) --- */
.collapsible-menu ul ul ul > li > a {
  font-size: 14px;
  font-weight: normal;
  color: #666;
  height: 36px;
  padding: 0px 20px 0px 25px;
  /* L4 縮排 */
  background-color: #fff;
  border-bottom: 0;
}

  .collapsible-menu ul ul ul > li > a::before {
    content: "";
    display: inline-block;
    width: 24px;
    /* 增加寬度以容納圖示和線條 */
    height: 36px;
    margin-right: 0;
    background-image: url('../icons/ic_menu_line.svg');
    background-repeat: repeat-y;
    background-position: center;
    /* 線條居中 */
    background-size: auto 100%;
    flex-shrink: 0;
    /* 確保線條寬度不變 */
  }

/* 手機版額外的介面 */
.mobile_menu-header {
  padding: 0 20px;
  display: flex;
  flex-shrink: 0;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

.mobile_menu-member {
  width: 100%;
  margin: 20px auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  flex-shrink: 0;
  /* position: fixed;
  bottom: 0;
  z-index: 2001; */
  background: #fff;
}

.mobile_menu-title {
  font-size: 0.9rem;
  color: #aaa;
  font-weight: 500;
}

.mobile_menu-new,
.mobile_menu-login {
  display: flex;
  gap: 10px;
  justify-content: space-around;
}

  .mobile_menu-new button,
  .mobile_menu-login button {
    flex: 1 1 auto;
    padding: 10px;
    /* font-size: 1rem; */
    font-size: 16px;
  }

/* ==================== 選單遮罩層 (menu-overlay) ==================== */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  /* 半透明黑色遮罩 */
  z-index: 1998;
  /* 層級要比選單低，但要高於背景內容 */
  display: none;
  /* 預設隱藏 */
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

  .menu-overlay.open {
    display: block;
    opacity: 1;
  }

.product-sku {
  font-size: 13px;
  color: grey;
}


/*禁止加入購物車link*/
.do-add-to-cart.disabled {
  pointer-events: none;
  opacity: 0.4;
  cursor: not-allowed;
  position: relative;
}

  .do-add-to-cart.disabled::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.55);
  }
