/* App Bar：更像手機商店頁的高度與觸控感 */
.appbar {
  height: var(--appbar-h);
}
.appbar .btn-icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
}
.appbar .logo {
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Appbar 內層排版：讓中間可以放水平選單 */
.appbar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 桌機/平板橫向選單（預設先隱藏，交給 JS 決定） */
.appbar-nav {
  list-style: none;
  display: none; /* JS 開啟時才顯示 */
  align-items: center;
  gap: 14px;
  padding: 0;
  margin: 0;

  /* 讓中間吃到可用空間 */
  flex: 1 1 auto;
  justify-content: center;

  /* 不要換行，避免擠爆高度 */
  white-space: nowrap;
  overflow: hidden;
}

.appbar-link {
  text-decoration: none;
  color: #212529;
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 10px;
}
.appbar-link:hover {
  background: rgba(0, 0, 0, 0.06);
}

/* 右側固定不縮 */
.appbar-actions {
  flex: 0 0 auto;
}

/* 模式切換：wide = 顯示橫向選單；burger = 顯示漢堡 */
.appbar.mode-wide #appbarNav {
  display: flex;
}
.appbar.mode-wide #menuToggle {
  display: none;
}

.appbar.mode-burger #appbarNav {
  display: none;
}
.appbar.mode-burger #menuToggle {
  display: inline-flex;
}

/* ===== Fallback：就算 JS 沒跑，也要符合基本行為 ===== */

/* 桌機（>=992）：強制顯示橫向選單、隱藏漢堡 */
@media (min-width: 992px) {
  .appbar #appbarNav {
    display: flex !important;
  }
  .appbar #menuToggle {
    display: none !important;
  }
}

/* 手機（<768）：強制顯示漢堡、隱藏橫向選單 */
@media (max-width: 767.98px) {
  .appbar #appbarNav {
    display: none !important;
  }
  .appbar #menuToggle {
    display: inline-flex !important;
  }
}

/* =====cart badge===== */
/* icon 包一層：成為 badge 的定位基準 */
.cart-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* badge：鎖在 icon 的右上角 */
.cart-icon-wrap .cart-badge {
  position: absolute;
  top: 0 !important;
  right: 0 !important;
  transform: translate(55%, -35%) !important;

  font-size: 11px;
  padding: 4px 6px;
  line-height: 1;
  box-shadow: 0 0 0 2px #fff; /* 白邊：避免壓到 icon */
}

.badge-cart {
  background-color: #dc3545; /* 購物車圓圈顏色 */
  color: #fff;
}

/* ===== Fix: 桌機 dropdown 點了沒出現（多半是被裁切或被蓋住） ===== */

/* 讓下拉可以長出來，不被任何容器裁切 */
header,
.appbar,
.appbar-inner,
.appbar-nav {
  overflow: visible !important;
}

/* dropdown 定位基準 */
.appbar-nav .dropdown {
  position: relative;
}

/* 下拉層級拉高，避免被 hero / 其他區塊蓋住 */
.appbar-nav .dropdown-menu {
  z-index: 2000;
}

/* ===== Footer ===== */
.site-footer {
  background: #0f172a; /* 深藍黑 */
  color: rgba(255, 255, 255, 0.86);
}

.footer-brand {
  text-decoration: none;
  color: #fff;
}

.footer-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
  display: inline-block;
}

.footer-brand-name {
  font-weight: 900;
  letter-spacing: 0.5px;
  font-size: 18px;
}

.footer-desc {
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  margin: 0;
}

.footer-title {
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.3px;
  margin-bottom: 12px;
}

.footer-links a {
  display: inline-block;
  padding: 6px 0;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

.footer-links a:hover {
  color: #fff;
  transform: translateX(2px);
}

.footer-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    transform 0.15s ease,
    background-color 0.15s ease;
}

.footer-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.footer-contact li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 6px 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-contact i {
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.footer-hr {
  border-color: rgba(255, 255, 255, 0.12);
}

.footer-mini-title {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 700;
  letter-spacing: 0.2px;
}

.footer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
}

.footer-legal a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.72);
}

.footer-legal a:hover {
  color: #fff;
}

.footer-logo-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
