﻿/* =====================================================================
 * Vehuan Mall — retail.css（零售端專屬樣式，疊加在 base.css 設計系統之上）
 * 設計語言：白底 + 科技藍 + 愉快金 + 深空 hero；圓角/陰影/過渡沿用 base 變量。
 * 移動端優先，漸進增強。
 * ===================================================================== */

/* ---------- 首屏輪播 ---------- */
.banner-carousel {
  position: relative;
  border-radius: var(--r-lg);
  box-shadow: var(--sh-md);
  background: var(--c-line);
}
.banner-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .5s ease;
  display: block;
}
.banner-slide.active { opacity: 1; }
.banner-caption {
  position: absolute;
  left: 24px; bottom: 24px;
  color: #fff; font-size: 20px; font-weight: 700;
  text-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.banner-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 38px; height: 38px; border-radius: var(--r-full);
  background: rgba(255,255,255,.85); color: var(--c-ink);
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; box-shadow: var(--sh-sm);
  transition: background .2s;
}
.banner-nav:hover { background: #fff; }
.banner-nav.prev { left: 12px; }
.banner-nav.next { right: 12px; }
.banner-dots {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 6px;
}
.banner-dots span {
  width: 8px; height: 8px; border-radius: 999px;
  background: rgba(255,255,255,.55); cursor: pointer; transition: all .2s;
}
.banner-dots span.on { background: #fff; width: 20px; }

/* ---------- 分類入口 ---------- */
.cat-entry { padding: 14px; }
.cat-entry h4 { color: var(--c-ink); }

/* ---------- 推薦位佔位（M5 JS 填充後渲染商品卡） ---------- */
.rec-zone { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rec-zone:empty { min-height: 120px; }
.rec-zone:empty::after {
  content: ""; display: block; height: 120px;
  background: linear-gradient(90deg, var(--c-line) 25%, #EEF2F8 50%, var(--c-line) 75%);
  background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--r-sm);
}

/* ---------- 登入 / 註冊 ---------- */
.auth-wrap { max-width: 440px; margin: 24px auto; }
.auth-card { padding: 32px; }

/* ---------- 麵包屑 ---------- */
.breadcrumb { font-size: 13px; color: var(--c-muted); margin-bottom: 12px; }
.breadcrumb a { color: var(--c-body); }
.breadcrumb .sep { margin: 0 6px; }

/* ---------- 分類頁佈局 ---------- */
.catalog-layout { display: grid; grid-template-columns: 1fr; gap: 20px; }
.catalog-filter { padding: 18px; }
.catalog-main .grid { margin-bottom: 8px; }

/* ---------- 商品詳情 ---------- */
.product-layout { display: grid; grid-template-columns: 1fr; gap: 24px; }
.product-gallery .main-image {
  border-radius: var(--r-lg); background: var(--c-bg);
  box-shadow: var(--sh-sm);
}
.thumb-strip { padding-bottom: 4px; }
.thumb-ratio {
  width: 64px; flex: 0 0 64px; cursor: pointer; border: 2px solid transparent;
  border-radius: var(--r-sm); background: var(--c-bg);
}
.thumb-ratio.active { border-color: var(--c-primary); }
.product-buy .price { color: var(--c-danger); font-size: 30px; font-weight: 800; }
.wholesale-entry {
  padding: 14px 16px; margin-top: 16px;
  border: 1px dashed var(--c-accent); background: var(--c-accent-soft);
}
.product-desc { color: var(--c-body); line-height: 1.8; font-size: 15px; }
.product-desc img { max-width: 100%; height: auto; border-radius: var(--r-sm); }
.stars { color: var(--c-accent); letter-spacing: 2px; }
.review-list .review-item { padding: 14px 0; border-bottom: 1px solid var(--c-line); }
.review-list .review-item:last-child { border-bottom: none; }

/* ---------- 數量選擇器 ---------- */
.qty-box {
  display: inline-flex; align-items: center; border: 1px solid var(--c-line);
  border-radius: var(--r-md); overflow: hidden;
}
.qty-box button {
  width: 36px; height: 36px; border: none; background: var(--c-bg);
  font-size: 18px; cursor: pointer; color: var(--c-ink);
}
.qty-box button:hover { background: var(--c-primary-soft); }
.qty-box input {
  width: 56px; height: 36px; border: none; text-align: center;
  font-size: 15px; font-weight: 600;
}
.qty-box input:focus { outline: none; }

/* 收藏按鈕態 */
.fav-btn { gap: 6px; }
.fav-btn.faved { color: var(--c-danger); border-color: var(--c-danger); }

/* ---------- 購物車 ---------- */
.cart-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.cart-row {
  display: flex; align-items: center; gap: 14px; padding: 14px;
  margin-bottom: 10px; background: #fff; border-radius: var(--r-md);
  box-shadow: var(--sh-sm);
}
.cart-thumb { width: 72px; flex: 0 0 72px; border-radius: var(--r-sm); }
.cart-info { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cart-name { color: var(--c-ink); font-weight: 600; font-size: 14px; }
.cart-line { font-weight: 700; color: var(--c-ink); white-space: nowrap; }
.cart-remove { border: none; background: transparent; color: var(--c-muted); cursor: pointer; padding: 6px; }
.cart-remove:hover { color: var(--c-danger); }
.cart-summary, .checkout-summary, .order-aside {
  padding: 20px; position: sticky; top: 16px;
}
.sum-row {
  display: flex; justify-content: space-between; padding: 8px 0;
  font-size: 14px; color: var(--c-body);
}
.sum-row.total { border-top: 1px solid var(--c-line); margin-top: 8px; padding-top: 12px; font-size: 16px; font-weight: 700; color: var(--c-ink); }
.sum-row.total span:last-child { color: var(--c-danger); font-size: 20px; }
.empty-icon { color: var(--c-line); }

/* ---------- 結算步驟條 ---------- */
.checkout-steps { display: flex; gap: 8px; margin-bottom: 20px; }
.checkout-steps .step {
  flex: 1; text-align: center; padding: 10px; border-radius: var(--r-md);
  background: var(--c-bg); color: var(--c-muted); font-size: 13px; font-weight: 600;
}
.checkout-steps .step span {
  display: inline-flex; width: 22px; height: 22px; border-radius: 999px;
  background: var(--c-line); color: var(--c-body); align-items: center; justify-content: center;
  margin-right: 6px; font-size: 12px;
}
.checkout-steps .step.active { background: var(--c-primary-soft); color: var(--c-primary-deep); }
.checkout-steps .step.active span { background: var(--c-primary); color: #fff; }
.checkout-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.addr-item { padding: 12px; border: 1px solid var(--c-line); border-radius: var(--r-md); margin-bottom: 8px; cursor: pointer; }
.addr-item:has(input:checked) { border-color: var(--c-primary); background: var(--c-primary-soft); }

/* ---------- 訂單時間線 / 物流軌跡 ---------- */
.track-list { list-style: none; padding: 0; margin: 0; }
.track-item { position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--c-line); margin-left: 6px; }
.track-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.track-dot {
  position: absolute; left: -7px; top: 2px; width: 12px; height: 12px;
  border-radius: 999px; background: var(--c-line); border: 2px solid #fff;
}
.track-item:first-child .track-dot { background: var(--c-primary); }
.order-detail-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.order-card { padding: 16px; }
.review-form { padding: 12px 0; border-bottom: 1px dashed var(--c-line); }
.review-form:last-child { border-bottom: none; }

/* ---------- 會員中心 ---------- */
.account-layout { display: grid; grid-template-columns: 1fr; gap: 20px; align-items: start; }
.account-menu { padding: 16px; display: flex; flex-direction: column; gap: 2px; }
.account-menu a {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  border-radius: var(--r-sm); color: var(--c-body); font-size: 14px; font-weight: 500;
}
.account-menu a:hover { background: var(--c-primary-soft); color: var(--c-primary-deep); }
.account-menu a.active { background: var(--c-primary); color: #fff; }
.stat-card { background: #fff; border-radius: var(--r-md); padding: 18px; box-shadow: var(--sh-sm); }
.stat-card .num { font-size: 26px; font-weight: 800; color: var(--c-ink); }

/* ---------- 優惠券卡片 ---------- */
.coupon-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.coupon-card { padding: 16px; border-left: 4px solid var(--c-accent); background: linear-gradient(135deg, var(--c-accent-soft), #fff); }
.coupon-card.used { opacity: .55; border-left-color: var(--c-line); filter: grayscale(.4); }
.coupon-value { color: var(--c-warn); font-size: 24px; font-weight: 800; }

/* ---------- 響應式（≥768 平板 / ≥992 桌面） ---------- */
@media (min-width: 768px) {
  .rec-zone { grid-template-columns: repeat(3, 1fr); }
  .catalog-layout { grid-template-columns: 220px 1fr; }
  .product-layout { grid-template-columns: 1.1fr 1fr; }
  .cart-layout { grid-template-columns: 1fr 320px; }
  .checkout-layout { grid-template-columns: 1fr 320px; }
  .order-detail-layout { grid-template-columns: 1fr 320px; }
  .account-layout { grid-template-columns: 220px 1fr; }
  .coupon-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 992px) {
  .rec-zone { grid-template-columns: repeat(4, 1fr); }
}

/* =====================================================================
 * Vehuan 原創零售首頁 / 頂欄（疊加層，不改 base.css 設計變量）
 * 自創版式：深空品牌條 + 分屏 hero + 膠囊 chips + 右上浮標折扣
 * ===================================================================== */

/* ---------- 深空品牌口號細條（非警示條形態） ---------- */
.brand-strip {
  background: var(--c-night); color: rgba(255,255,255,.78);
  font-size: 13px; letter-spacing: .4px;
}
.brand-strip-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 6px; padding-bottom: 6px;
}
.brand-strip-slogan { color: var(--c-accent); font-weight: 600; }
.brand-strip-meta { color: rgba(255,255,255,.5); }
@media (max-width: 575px) { .brand-strip-meta { display: none; } }

/* ---------- 頂欄 ---------- */
.site-header {
  background: #fff; border-bottom: 1px solid var(--c-line);
  position: relative; z-index: 50;
  transition: box-shadow var(--t);
}
.site-header.is-stuck { position: sticky; top: 0; box-shadow: var(--sh-md); }
.header-main { display: flex; align-items: center; gap: 28px; padding: 16px 0; }
.header-main .brand { flex: 0 0 auto; display: flex; align-items: center; }
.header-main .brand img { height: 92px; width: auto; }

/* 大搜索框（白盒軟陰影 + 右側實心藍按鈕，非 YOHO 灰邊白丸） */
.header-search { flex: 1; min-width: 0; }
.header-search-box {
  display: flex; align-items: stretch; height: 46px;
  background: #fff; border: 1px solid var(--c-line);
  border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--sh-sm); transition: box-shadow var(--t), border-color var(--t);
}
.header-search-box:focus-within { border-color: var(--c-primary); box-shadow: 0 0 0 4px var(--c-primary-soft); }
.header-search-cat {
  border: none; background: var(--c-bg); color: var(--c-primary-deep);
  padding: 0 14px; font-size: 14px; font-weight: 600; cursor: pointer;
  max-width: 150px; appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23083E6E' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center; padding-right: 24px;
  border-right: 1px solid var(--c-line);
}
.header-search-cat:focus { outline: none; }
.header-search-input { flex: 1; min-width: 0; border: none; padding: 0 16px; font-size: 16px; color: var(--c-ink); }
.header-search-input:focus { outline: none; }
.header-search-btn {
  flex: 0 0 auto; width: 56px; border: none; cursor: pointer;
  background: var(--c-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; transition: background var(--t);
}
.header-search-btn:hover { background: var(--c-primary-deep); }

/* 搜索框下熱搜詞行 */
.header-hotwords { display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 13.5px; flex-wrap: wrap; }
.header-hotwords-label { color: var(--c-muted); }
.header-hotwords a { color: var(--c-body); }
.header-hotwords a:hover { color: var(--c-primary); }
.header-hotwords a:not(:last-child)::after { content: '·'; margin-left: 10px; color: var(--c-line); }

/* 右側操作 */
.header-actions { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; }
.header-action {
  position: relative; display: flex; align-items: center; gap: 6px;
  color: var(--c-ink); padding: 8px 12px; border-radius: var(--r-sm); font-size: 15px;
}
.header-action:hover { background: var(--c-bg); color: var(--c-primary-deep); }
.header-cart-badge {
  position: absolute; top: 0; right: 2px; min-width: 18px; height: 18px;
  padding: 0 5px; display: none; align-items: center; justify-content: center;
  font-size: 11px; line-height: 1;
}
.header-dropdown { position: relative; }
.header-dropdown .dropdown-menu { right: 0; top: calc(100% + 6px); }

/* 導航行 */
.header-nav { border-top: 1px solid var(--c-line); }
.header-nav-inner { display: flex; align-items: center; gap: 14px; min-height: 46px; flex-wrap: wrap; }
.header-nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 16px; font-size: 16px; font-weight: 600; color: var(--c-ink);
}
.header-nav-link:hover { color: var(--c-primary); background: var(--c-primary-soft); }
.header-nav-wholesale { color: var(--c-accent); }
.header-nav-wholesale:hover { color: #9A6B00; background: var(--c-accent-soft); }

/* 星空部落：品牌化导航，多色星空渐变 + 流光 + 发光呼吸 + 浮动 */
.header-nav .nav-tribe {
  background: linear-gradient(90deg, #7B5BFF 0%, #3EA6FF 30%, #FF5BA8 55%, #3EA6FF 80%, #7B5BFF 100%);
  background-size: 250% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
  letter-spacing: .4px;
  animation:
    navTribeFlow 1.8s linear infinite,
    navTribeGlow 1.5s ease-in-out infinite,
    navTribeFloat 2.6s ease-in-out infinite;
}
@keyframes navTribeFlow {
  0%   { background-position: 0% 50%; }
  100% { background-position: 250% 50%; }
}
@keyframes navTribeGlow {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(123, 91, 255, .55)); }
  50%      { filter: drop-shadow(0 0 14px rgba(62, 166, 255, .95)); }
}
@keyframes navTribeFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2px); }
}

/* Mega 下拉 */
.mega-dropdown { position: relative; }
.mega-menu { left: 0; right: auto; top: calc(100% + 8px); min-width: 520px; padding: 18px; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.mega-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; color: var(--c-ink); }
.mega-item:hover { background: var(--c-primary-soft); color: var(--c-primary-deep); }
.mega-item-icon { width: 36px; height: 36px; border-radius: var(--r-sm); object-fit: cover; background: var(--c-bg); flex: 0 0 36px; }
.mega-item-icon-fallback { display: flex; align-items: center; justify-content: center; color: var(--c-primary); }

/* ---------- 區塊標題 ---------- */
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.sec-title {
  position: relative; padding-left: 14px; margin: 0;
  font-size: 22px; font-weight: 800; color: var(--c-ink); line-height: 1.3;
}
.sec-title::before {
  content: ''; position: absolute; left: 0; top: 4px; bottom: 4px;
  width: 5px; border-radius: var(--r-full);
  background: linear-gradient(180deg, var(--c-primary), var(--c-accent));
}
.sec-sub { font-size: 13px; color: var(--c-muted); }
.sec-more { font-size: 13px; color: var(--c-body); margin-left: auto; }
.sec-more:hover { color: var(--c-primary); }

/* ---------- 商品網格（5/4/3/2） ---------- */
.product-grid { display: grid; gap: 20px; grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1199px) { .product-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 991px)  { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .product-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

/* ---------- 分類入口 ---------- */
.cat-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 991px) { .cat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 575px) { .cat-grid { grid-template-columns: repeat(2, 1fr); } }
.cat-entry {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md);
  padding: 18px 12px; text-align: center; box-shadow: var(--sh-sm);
  transition: box-shadow var(--t), transform var(--t), border-color var(--t);
}
.cat-entry:hover { box-shadow: var(--sh-md); transform: translateY(-4px); border-color: var(--c-primary); }
.cat-entry-img { width: 72px; height: 72px; margin: 0 auto 10px; border-radius: var(--r-md); background: var(--c-bg); overflow: hidden; }
.cat-entry-img img { width: 100%; height: 100%; object-fit: cover; }
.cat-entry h4 { margin: 0; font-size: 14px; color: var(--c-ink); font-weight: 600; }

/* ---------- Hero 分屏（左品牌面板 + 右輪播） ---------- */
.hero-split { display: grid; grid-template-columns: 5fr 7fr; gap: 20px; align-items: stretch; }
.hero-panel {
  position: relative; overflow: hidden; border-radius: var(--r-lg);
  background: linear-gradient(135deg, var(--c-night) 0%, #123A66 60%, var(--c-primary) 100%);
  color: #fff; padding: 40px 36px; display: flex; flex-direction: column; justify-content: center;
}
.hero-panel::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 75%);
}
.hero-panel > * { position: relative; }
.hero-panel-kicker { font-size: 13px; color: var(--c-accent); font-weight: 600; letter-spacing: 1px; margin-bottom: 10px; }
.hero-panel-title { color: #fff; font-size: clamp(24px, 2.6vw, 36px); font-weight: 800; margin: 0 0 22px; line-height: 1.25; }
.hero-panel-cta {
  align-self: flex-start; background: var(--c-accent); color: var(--c-ink);
  font-weight: 700; padding: 12px 24px; border-radius: var(--r-full);
}
.hero-panel-cta:hover { background: #FFC24A; color: var(--c-ink); }

.hero-carousel {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden;
  border-radius: var(--r-lg); box-shadow: var(--sh-md); background: var(--c-night);
}
.hero-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .6s ease; display: block; }
.hero-slide.active { opacity: 1; }
.hero-slide-caption {
  position: absolute; left: 20px; bottom: 18px; max-width: 70%;
  background: rgba(11,27,51,.62); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.14);
  padding: 12px 18px; border-radius: var(--r-md);
}
.hero-slide-title { color: #fff; font-size: clamp(15px, 1.6vw, 20px); font-weight: 800; margin: 0; line-height: 1.3; }
.hero-slide-sub { color: rgba(255,255,255,.85); font-size: 12.5px; margin: 4px 0 0; line-height: 1.5; }
@media (max-width: 991px) { .hero-split { grid-template-columns: 1fr; } .hero-panel { padding: 28px 24px; } }
@media (max-width: 767px) { .hero-carousel { aspect-ratio: 4 / 3; } .hero-slide-caption { left: 14px; bottom: 14px; max-width: 84%; padding: 10px 14px; } }

/* ---------- 商品卡增強（右上浮標折扣，原創層級） ---------- */
.discount-pill {
  position: absolute; top: 10px; right: 10px;
  background: var(--c-night); color: var(--c-accent);
  font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: var(--r-sm);
  box-shadow: 0 2px 8px rgba(11,27,51,.35);
}
.product-card .badge-wrap { top: 10px; left: 10px; }
.card-rating { display: flex; align-items: center; gap: 5px; margin: 4px 0 6px; font-size: 12px; }
.card-stars { display: inline-flex; gap: 1px; }
.card-star { color: var(--c-line); display: inline-flex; }
.card-star.on { color: var(--c-accent); }
.card-star svg { width: 11px; height: 11px; fill: currentColor; stroke: currentColor; }
.card-rating-count { color: var(--c-muted); }
.price-group { display: inline-flex; align-items: baseline; gap: 6px; }
.price-original { font-size: 12.5px; color: var(--c-muted); text-decoration: line-through; }
.price-meta { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }
.card-sold { font-size: 12px; color: var(--c-muted); }
.moq { font-size: 12px; color: var(--c-muted); }

/* ---------- 成套商品（自創卡片） ---------- */
.badge-badge {
  display: inline-block; padding: 3px 8px; border-radius: var(--r-sm);
  font-size: 12px; font-weight: 800; line-height: 1.4;
}
.badge-discount { background: var(--c-danger); color: #fff; }
.bundle-grid { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1199px) { .bundle-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 767px)  { .bundle-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
.bundle-card {
  background: #fff; border: 1px solid var(--c-line); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--sh-sm);
  transition: box-shadow var(--t), transform var(--t);
  display: flex; flex-direction: column;
}
.bundle-card:hover { box-shadow: var(--sh-md); transform: translateY(-3px); }
.bundle-thumb { position: relative; }
.bundle-thumb .badge-badge { position: absolute; top: 10px; left: 10px; }
.bundle-body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.bundle-name { font-size: 15px; font-weight: 700; color: var(--c-ink); margin: 0 0 10px; }
.bundle-items { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 4px; max-height: 96px; overflow: hidden; }
.bundle-items li { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--c-body); }
.bundle-items li span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bundle-items li em { font-style: normal; color: var(--c-muted); flex: 0 0 auto; }
.bundle-price-row { display: flex; align-items: baseline; gap: 8px; margin-top: auto; }
.bundle-price { color: var(--c-danger); font-size: 22px; font-weight: 800; }
.bundle-original { font-size: 13px; color: var(--c-muted); text-decoration: line-through; }
.bundle-save { display: inline-block; margin: 8px 0 12px; align-self: flex-start; background: var(--c-accent-soft); color: #9A6B00; font-size: 12.5px; font-weight: 700; padding: 3px 10px; border-radius: var(--r-full); }
.bundle-order-btn { margin-top: 4px; }
.bundle-desc { font-size: 12.5px; color: var(--c-body); margin: 0 0 10px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bundle-actions { display: flex; gap: 8px; margin-top: 10px; }
.bundle-actions .btn { flex: 1; }

/* 組合詳情彈窗 */
.bundle-detail-modal { position: fixed; inset: 0; z-index: 2000; display: none; }
.bundle-detail-modal.open { display: block; }
.bdm-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.bdm-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%);
  width: min(640px, 92vw); max-height: 86vh; overflow: auto;
  background: #fff; border-radius: var(--r-lg); padding: 24px; box-shadow: var(--sh-lg);
}
.bdm-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: none; background: var(--c-line); border-radius: var(--r-full); font-size: 20px; line-height: 1; cursor: pointer; color: var(--c-body); z-index: 1; }
.bdm-head { display: flex; gap: 16px; margin-bottom: 14px; }
.bdm-img { width: 150px; flex: 0 0 150px; }
.bdm-titlebox { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.bdm-titlebox h3 { margin: 0 0 10px; font-size: 18px; }
.bdm-price-row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.bdm-price-row .bundle-price { font-size: 24px; }
.bdm-desc { font-size: 14px; color: var(--c-body); line-height: 1.7; margin-bottom: 14px; white-space: normal; }
.bdm-items-title { font-size: 13px; font-weight: 700; color: var(--c-muted); margin-bottom: 8px; }
.bdm-item { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; background: var(--c-bg, #f6f7f9); border-radius: var(--r-sm); margin-bottom: 6px; font-size: 14px; }
.bdm-item em { font-style: normal; color: var(--c-primary); font-weight: 700; }
#bdm-order { margin-top: 12px; }
body.modal-open { overflow: hidden; }
@media (max-width: 575px) {
  .bdm-head { flex-direction: column; }
  .bdm-img { width: 100%; flex: none; }
}

/* ---------- 搜尋頁分類膠囊 chips（自創形態） ---------- */
.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-chip {
  display: inline-block; padding: 8px 16px; border-radius: var(--r-full);
  background: #fff; border: 1px solid var(--c-line); color: var(--c-body);
  font-size: 13px; font-weight: 600; transition: all var(--t);
}
.cat-chip:hover { border-color: var(--c-primary); color: var(--c-primary); }
.cat-chip.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; box-shadow: var(--sh-sm); }

/* ---------- 響應式：平板 / 手機頂欄 ---------- */
@media (max-width: 991px) {
  .header-main { flex-wrap: wrap; gap: 14px; }
  .header-search { order: 3; flex-basis: 100%; }
  .header-search-cat { max-width: 120px; font-size: 12.5px; }
  .header-action-text { display: none; }
}
@media (max-width: 575px) {
  .header-main { padding: 10px 0; }
  .header-search-box { height: 42px; }
  .header-search-btn { width: 46px; }
  .sec-title { font-size: 19px; }
  .bundle-price { font-size: 19px; }
}

/* M3 商品规格表 */
.product-spec-table{width:100%;border-collapse:collapse;margin-top:8px;font-size:14px;background:#fff}
.product-spec-table th,.product-spec-table td{border:1px solid #eee;padding:9px 11px;text-align:left;vertical-align:top}
.product-spec-table th{width:34%;background:#f8f9fa;color:#333;font-weight:600;white-space:nowrap}
.product-spec-table td{color:#555}

/* 商品详情页「使用場景」横幅轮播（商品独立，最多 5 张） */
.usage-carousel{position:relative;aspect-ratio:21/9;border-radius:var(--r-md);overflow:hidden;background:var(--c-night);}
.usage-carousel .banner-slide img{width:100%;height:100%;object-fit:cover;}
@media (max-width:767px){.usage-carousel{aspect-ratio:4/3;}}


/* ---------- 商品評價（卡片芯片 / 詳情頁匯總 / 實拍圖） ---------- */
.card-rating-score { color: #ff8f00; font-weight: 800; font-size: 12.5px; }
.card-rating-empty .card-stars .card-star { color: #dcdfe6; }
.review-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.review-mine { font-size: 12.5px; color: #8a93a6; background: #f4f6fa; border-radius: 999px; padding: 4px 10px; }
.review-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; padding: 12px 14px; background: #fafbfd; border-radius: 10px; margin-bottom: 6px; }
.review-score { text-align: center; min-width: 96px; }
.review-score-num { font-size: 30px; font-weight: 800; color: #ff8f00; line-height: 1.1; }
.review-score-stars { display: inline-flex; gap: 2px; margin-top: 2px; }
.review-score-stars span { color: #dcdfe6; display: inline-flex; }
.review-score-stars span.on { color: #ffb400; }
.review-score-stars svg { width: 14px; height: 14px; fill: currentColor; stroke: currentColor; }
.review-score-cnt { font-size: 12px; color: #8a93a6; margin-top: 2px; }
.review-dist { flex: 1 1 220px; min-width: 200px; }
.review-dist-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #5b6478; line-height: 2; }
.review-dist-label { width: 36px; flex: none; }
.review-dist-bar { flex: 1; height: 7px; background: #eceff5; border-radius: 99px; overflow: hidden; display: block; }
.review-dist-bar > span { display: block; height: 100%; background: #ffb400; }
.review-dist-cnt { width: 26px; text-align: right; flex: none; }
.review-imgs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.review-imgs img { width: 68px; height: 68px; object-fit: cover; border-radius: 6px; border: 1px solid var(--c-line); }
@media (max-width: 575px) {
  .review-summary { gap: 12px; }
  .review-imgs img { width: 56px; height: 56px; }
}