/* ===========================================================
   PetMall — Shopee-style Pet Mall Template (13-petmall-shopee)
   =========================================================== */

:root {
  /* 毛孩風配色 — 桃粉 + 鼠尾草綠 + 暖奶油，柔和不刺眼 */
  --primary: #ff9b71;            /* 桃粉珊瑚（暖、柔，不像賣場吼叫色） */
  --primary-dark: #ee7e52;
  --primary-light: #fff2ec;      /* 奶油桃 */
  --primary-hover: #f88c63;
  --secondary: #ffd0a4;          /* 暖杏色 */
  --accent: #7ec8b8;             /* 鼠尾草綠（毛孩平靜感） */
  --accent-light: #e8f3ef;
  --accent-dark: #5da591;
  --discount: #ff8b8b;           /* 軟珊瑚紅（折扣標） */
  --rating: #ffc857;             /* 暖琥珀 */
  --bg: #fffaf3;                 /* 奶油底色 */
  --bg-soft: #fff5ea;
  --card: #ffffff;
  --text: #4a3a2c;               /* 暖棕黑（不用冷灰） */
  --text-secondary: #7a6856;
  --text-muted: #ad9d90;
  --text-light: #d4c8be;
  --border: #f5e8d8;             /* 奶油邊框 */
  --border-light: #fbf3e8;
  --green-mall: #7ec8b8;         /* 跟 accent 一致 */
  --gradient: linear-gradient(135deg, #ff9b71 0%, #ffd0a4 100%);
  --gradient-yellow: linear-gradient(135deg, #ffd0a4 0%, #ffe4b8 100%);
  --gradient-teal: linear-gradient(135deg, #7ec8b8 0%, #b6e3d4 100%);
  --gradient-pet: linear-gradient(135deg, #ff9b71 0%, #ffd0a4 50%, #b6e3d4 100%);
  --shadow-sm: 0 1px 2px rgba(74,58,44,.04);
  --shadow: 0 2px 10px rgba(74,58,44,.06);
  --shadow-md: 0 6px 18px rgba(74,58,44,.07);
  --shadow-hover: 0 10px 28px rgba(255,155,113,.20);
  --radius-sm: 8px;              /* 整體更圓潤 */
  --radius: 14px;
  --radius-lg: 20px;
  --font: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang TC', 'Microsoft JhengHei', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ============ HEADER 切換：桌機 >880 顯示 .header-desktop，手機 ≤880 顯示 .header-mobile ============
   ⚠️ 用 display: contents 而非 block — 讓內部的 sticky wrapper 直接以 body 為 containing block，
   否則 .header-desktop 容器只在頁首高度內，sticky 會跟著它滑走、無法釘住 viewport */
.header-mobile { display: none; }
.header-desktop { display: contents; }
@media (max-width: 880px) {
  .header-desktop { display: none; }
  .header-mobile { display: contents; }
}

/* ============ HEADER（極簡白底 - 三線 + Logo + 購物車 + 第二行搜尋欄） ============ */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 95;
  color: var(--text);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
}

/* 三線 hamburger */
.hamburger {
  background: transparent;
  border: none;
  cursor: pointer;
  width: 38px;
  height: 38px;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  border-radius: 8px;
  transition: background .15s;
  flex-shrink: 0;
}
.hamburger:hover { background: var(--bg-soft); }
.hamburger span {
  display: block;
  width: 22px;
  height: 1.6px;
  background: var(--text);
  border-radius: 2px;
  transition: width .25s;
}
.hamburger:hover span:nth-child(2) { width: 16px; }

/* Logo + 名稱 */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
}
.brand-mark {
  width: 38px;
  height: 38px;
  background: var(--gradient);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(255,155,113,.25);
}
.brand-name {
  font-family: 'Noto Serif TC', serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
}

/* 第二行搜尋欄區 */
.search-row {
  border-top: 1px solid var(--border-light);
  padding: 12px 0 14px;
  position: relative;
}

/* === Search suggestions dropdown — 錨在 .search-row 容器底部 === */
.search-suggest {
  position: absolute;
  top: 100%;
  left: 16px;
  right: 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(0,0,0,.18), 0 4px 12px rgba(0,0,0,.08);
  z-index: 100;
  max-height: 480px;
  overflow-y: auto;
  border: 1px solid var(--border-light);
  display: none;
  animation: ssIn .18s cubic-bezier(.4,0,.2,1);
}
@keyframes ssIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}
.search-suggest.is-open { display: block; }

.ss-section { padding: 4px 0; }
.ss-section + .ss-section { border-top: 1px solid var(--border-light); }
.ss-section-title {
  display: block;
  padding: 10px 18px 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.ss-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 18px;
  text-decoration: none;
  color: var(--text);
  font-size: 14px;
  transition: background .12s, color .12s;
  border: none;
  background: transparent;
  width: 100%;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}
.ss-row:hover { background: var(--primary-light); color: var(--primary); }

.ss-promo {
  background: linear-gradient(135deg, #fff5ee 0%, #fffaf2 100%);
  font-weight: 600;
}
.ss-promo:hover { background: linear-gradient(135deg, #ffe9da, #fff5ee); }

.ss-tag-free {
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 1.5px;
  flex-shrink: 0;
}

.ss-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.ss-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ss-price {
  color: var(--primary);
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}

.ss-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 18px 14px;
}
.ss-keywords a {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 12px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all .15s;
}
.ss-keywords a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}
/* 搜尋欄 — 第二行，整排寬 */
.search-bar {
  display: flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 4px 4px 4px 18px;
  align-items: center;
  gap: 10px;
  transition: border-color .2s, box-shadow .2s;
}
.search-bar:focus-within {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(255,155,113,.18);
}
.search-bar-icon { color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  font-family: inherit;
  padding: 8px 0;
  color: var(--text);
  background: transparent;
  min-width: 0;
}
.search-bar input::placeholder { color: var(--text-light); }
.search-btn {
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 100px;
  padding: 8px 22px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: transform .2s, box-shadow .2s;
  flex-shrink: 0;
}
.search-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 14px rgba(255,155,113,.4);
}

/* 購物車 icon-only */
.cart-link {
  position: relative;
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  border-radius: 8px;
  transition: background .15s;
  flex-shrink: 0;
  text-decoration: none;
}
.cart-link:hover { background: var(--bg-soft); }
.cart-badge-mini {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--primary);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 100px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  border: 2px solid #fff;
  line-height: 1.2;
}

/* Sticky header anchor offset */
#categories, #flash, #products, #brands, #contact { scroll-margin-top: 130px; }

/* ============ DESKTOP HEADER（topbar + 完整電商 header）— 用 .header-desktop 父層作用域確保覆蓋通用規則 ============ */
.header-desktop .topbar {
  background: var(--text);
  color: rgba(255,255,255,.85);
  font-size: 12px;
  letter-spacing: .5px;
}
.header-desktop .topbar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 16px;
}
.header-desktop .topbar-links {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.header-desktop .topbar-links a {
  color: rgba(255,255,255,.85);
  text-decoration: none;
  transition: color .15s;
}
.header-desktop .topbar-links a:hover { color: #fff; }
.header-desktop .topbar-links .dot { color: rgba(255,255,255,.35); font-size: 11px; }

.header-desktop .header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 36px;
  padding: 18px 0;
}
.header-desktop .brand { gap: 12px; }
.header-desktop .brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 14px;
}
.header-desktop .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.header-desktop .brand-text strong {
  font-family: 'Noto Serif TC', serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
}
.header-desktop .brand-text em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.header-desktop .search-zone {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
  max-width: 720px;
  justify-self: center;
  width: 100%;
}
.header-desktop .search-zone .search-bar { width: 100%; }
.header-desktop .hot-search {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.header-desktop .hot-label {
  font-weight: 600;
  color: var(--text-light);
}
.header-desktop .hot-search a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
.header-desktop .hot-search a:hover { color: var(--primary); }

.header-desktop .cart-link {
  width: auto;
  height: auto;
  padding: 8px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}
.header-desktop .cart-link:hover { background: var(--bg-soft); }
.header-desktop .cart-icon-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-desktop .cart-icon-wrap .cart-badge-mini {
  position: absolute;
  top: -6px;
  right: -8px;
}
.header-desktop .cart-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

/* === Sticky wrapper：scroll 時 header + nav 一起釘在頂端，topbar 滾走 === */
.header-desktop .header-sticky-wrap {
  position: sticky;
  top: 0;
  z-index: 95;
  background: #fff;
}
/* 包進 sticky wrapper 後，內部 .site-header 不需要自己 sticky（避免雙層 sticky 衝突） */
.header-desktop .site-header {
  position: relative;
  top: auto;
}

/* === 桌機精品 NAV — 三欄式：左 eyebrow 中 links 右 CTA === */
.header-desktop .site-nav {
  background: #fff;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border);
}
.header-desktop .site-nav-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 12px 16px;
}
.header-desktop .nav-eyebrow {
  font-family: 'Noto Serif TC', 'Playfair Display', serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--text-muted);
  text-transform: uppercase;
  white-space: nowrap;
}
.header-desktop .nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  justify-self: center;
}
.header-desktop .nav-sep {
  color: var(--text-light);
  font-size: 12px;
  user-select: none;
  pointer-events: none;
}
.header-desktop .site-nav-link {
  position: relative;
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 2.5px;
  padding: 4px 2px;
  transition: color .15s;
}
.header-desktop .site-nav-link::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -1px;
  width: 0;
  height: 1.5px;
  background: var(--primary);
  transform: translateX(-50%);
  transition: width .25s cubic-bezier(.4,0,.2,1);
}
.header-desktop .site-nav-link:hover { color: var(--primary); }
.header-desktop .site-nav-link:hover::after { width: 22px; }
.header-desktop .nav-cta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: var(--text);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  border-radius: 100px;
  text-decoration: none;
  transition: background .15s, transform .15s;
  white-space: nowrap;
}
.header-desktop .nav-cta:hover {
  background: var(--primary);
  transform: translateY(-1px);
}

/* ============ NAV DRAWER（三線開的側拉選單） ============ */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 200;
  visibility: hidden;
  transition: visibility 0s linear .35s;
}
.nav-drawer.is-open {
  visibility: visible;
  transition: visibility 0s;
}
.nav-drawer-bg {
  position: absolute;
  inset: 0;
  background: rgba(20,12,8,.45);
  opacity: 0;
  transition: opacity .35s;
  cursor: pointer;
}
.nav-drawer.is-open .nav-drawer-bg { opacity: 1; }
.nav-drawer-panel {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 320px;
  max-width: 86vw;
  background: #fff;
  transform: translateX(-100%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  box-shadow: 8px 0 30px rgba(0,0,0,.15);
}
.nav-drawer.is-open .nav-drawer-panel { transform: translateX(0); }

.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-light);
}
.drawer-brand {
  font-family: 'Noto Serif TC', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
}
.drawer-close {
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.drawer-close:hover { background: var(--bg-soft); color: var(--text); }

.drawer-nav {
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  flex: 1;
}
.drawer-nav a {
  display: block;
  padding: 14px 24px;
  color: var(--text);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: 1px;
  font-weight: 500;
  transition: background .15s, padding-left .2s;
  position: relative;
}
.drawer-nav a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 18px;
  background: var(--primary);
  transition: width .2s;
  border-radius: 0 2px 2px 0;
}
.drawer-nav a:hover {
  background: var(--bg-soft);
  padding-left: 32px;
}
.drawer-nav a:hover::before { width: 3px; }

.drawer-divider {
  height: 1px;
  background: var(--border-light);
  margin: 0 24px;
}

.drawer-utility {
  display: flex;
  flex-direction: column;
  padding: 14px 0 22px;
}
.drawer-utility a {
  display: block;
  padding: 8px 24px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: .8px;
  transition: color .15s;
}
.drawer-utility a:hover { color: var(--primary); }

/* ============ HERE（精品 boutique 風 — 左文右圖切半，拱形 + 圓形層疊照片） ============ */
/* 動態高度 — 跟 chrome 相加剛好 = viewport，讓 marquee 切齊螢幕底
   chrome 約 = topbar(32) + header(92) + site-nav(50) + marquee(56) ≈ 230px
   用 clamp 防止超大或超小視窗時失控 */
.hero {
  background: var(--bg-soft);
  padding: 32px 0;
  min-height: clamp(420px, calc(100vh - 230px), 720px);
  min-height: clamp(420px, calc(100dvh - 230px), 720px);  /* 支援 dvh 的瀏覽器更精準（手機網址列計入） */
  display: grid;
  align-items: center;
}
.hero > .container { width: 100%; }
/* 隱藏舊的 .hero-side（兩張小促銷卡是蝦皮風，不適合精品） */
.hero-side { display: none !important; }
/* Hero 改排版：主視覺整排寬，2 個側邊卡變成下方一條（不再蝦皮 7:3） */
.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-main {
  position: relative;
  min-height: 460px;
}

/* === Banner carousel — 精品左文右圖切半排版 === */
.hero-panels { position: relative; min-height: inherit; }
.hero-panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .7s cubic-bezier(.4,0,.2,1), visibility 0s linear .7s;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-panel.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity .7s cubic-bezier(.4,0,.2,1), visibility 0s;
}

.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 32px 8px;
  color: var(--text);
}

/* === 右側視覺：拱形主圖 + 圓形小圖 + 圓徽章（仿 Mireille） === */
.hero-visual {
  position: relative;
  height: 420px;
}
.hv-photo-main {
  position: absolute;
  top: 0;
  left: 8%;
  width: 78%;
  height: 100%;
  border-radius: 50% 50% 28px 28px / 36% 36% 8% 8%;  /* 拱形：上半圓、下方圓角 */
  background-size: cover;
  background-position: center;
  box-shadow: 0 18px 48px rgba(74,42,22,.18);
  filter: saturate(1.05);
}
.hv-photo-accent {
  position: absolute;
  bottom: 30px;
  right: 0;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  border: 6px solid #fff;
  box-shadow: 0 12px 32px rgba(74,42,22,.18);
  z-index: 2;
}
.hv-badge {
  position: absolute;
  bottom: -10px;
  left: -8px;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--text);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 3;
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}
.hv-badge span {
  font-family: 'Noto Serif TC', serif;
  font-size: 10px;
  letter-spacing: 1.5px;
  font-weight: 600;
  padding: 0 16px;
  line-height: 1.5;
}

/* ============ 4 種 panel 風格 ============ */

/* === Slide 2: 4 張小照片網格（mosaic 拼貼） === */
.hp-grid-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
  height: 420px;
  position: relative;
}
.hg-photo {
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 28px rgba(74,42,22,.10);
}
/* 不對稱圓角 — 每張照片大圓角不同位置 */
.hg-p1 { border-radius: 200px 18px 18px 18px; }   /* 左上 */
.hg-p2 { border-radius: 18px 200px 18px 18px; }   /* 右上 */
.hg-p3 { border-radius: 18px 18px 18px 200px; }   /* 左下 */
.hg-p4 { border-radius: 18px 18px 200px 18px; }   /* 右下 */
.hg-tag-float {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--gradient);
  color: #fff;
  padding: 14px 22px;
  border-radius: 100px;
  font-family: 'Noto Serif TC', serif;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 2px;
  box-shadow: 0 12px 32px rgba(255,155,113,.4);
  z-index: 2;
  white-space: nowrap;
}

/* === Slide 3: 滿版圖 + 暗罩 + 置中白字（magazine cover） === */
.hero-panel.hp-spread {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  height: 460px;
}
.hp-spread-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: saturate(1.05);
}
.hp-spread-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.15) 0%, rgba(0,0,0,.35) 50%, rgba(0,0,0,.65) 100%);
}
.hp-spread-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;       /* 置中 */
  justify-content: center;
  text-align: center;
  padding: 64px 32px 100px;
  color: #fff;
}
.hp-spread-content .hero-title {
  color: #fff;
  text-shadow: 0 4px 24px rgba(0,0,0,.35);
}
.hp-spread-content .hero-title em { color: var(--rating); }
.hp-spread-content .hero-sub {
  color: rgba(255,255,255,.92);
  text-align: center;
  max-width: 560px;
}
.hp-spread-content .hero-ctas { justify-content: center; }
.hp-spread-tag {
  color: #fff;
}
.hp-spread-tag::before { background: rgba(255,255,255,.7) !important; }
.hp-spread-cta-out {
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.hp-spread-cta-out:hover {
  background: #fff;
  color: var(--text);
  border-color: #fff;
}
/* 底部三欄統計（仿 SAVOR 12/48h/9.6） */
.hp-spread-stats {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  gap: 48px;
  color: #fff;
}
.hp-spread-stats > div {
  text-align: center;
}
.hp-spread-stats strong {
  display: block;
  font-family: 'Noto Serif TC', serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.hp-spread-stats small {
  display: block;
  font-size: 11px;
  letter-spacing: 2px;
  margin-top: 6px;
  opacity: .85;
}

/* === Slide 4: 左圖右文（reverse editorial） === */
.hp-reverse {
  grid-template-columns: 1.1fr 1fr;
}
.hp-rev-visual {
  position: relative;
  height: 420px;
}
.hp-rev-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  border-radius: 280px 22px 22px 22px;  /* 左上拱形 */
  box-shadow: 0 18px 48px rgba(74,42,22,.18);
}
.hp-rev-sticker {
  position: absolute;
  bottom: 36px;
  right: -28px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  box-shadow: 0 14px 36px rgba(255,155,113,.45);
  transform: rotate(-8deg);
}
.hp-rev-sticker strong {
  font-family: 'Noto Serif TC', serif;
  font-size: 22px;
  font-weight: 700;
}
.hp-rev-sticker strong em {
  font-style: italic;
  color: #fff;
}
.hp-rev-sticker small {
  font-size: 10px;
  letter-spacing: 2px;
  margin-top: 4px;
}
.hp-rev-line {
  position: absolute;
  top: 0;
  right: -40px;
  bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, var(--border), transparent);
}
.hp-rev-content {
  padding-left: 40px;
}

/* Prev/next arrows (only visible on hover) */
.hero-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  cursor: pointer;
  z-index: 4;
  opacity: 1;
  box-shadow: 0 4px 14px rgba(74,42,22,.10);
  transition: opacity .2s, background .2s, transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.hero-arrow svg {
  width: 22px;
  height: 22px;
  display: block;
}
.hero-arrow:hover { background: var(--text); color: #fff; transform: translateY(-50%) scale(1.05); }
.hero-prev { left: -8px; }
.hero-next { right: -8px; }
/* 精品 tag — 短線 + small-caps（仿 Mireille / SAVOR ROAST 風格） */
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--primary-dark);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  padding: 0;
  background: none;
  border: none;
  margin-bottom: 24px;
}
.hero-tag::before {
  content: '';
  width: 36px;
  height: 1px;
  background: var(--primary-dark);
  display: inline-block;
  flex-shrink: 0;
}
/* 襯線體大標題 — 仿 Mireille / SAVOR ROAST 精品風格 */
.hero-title {
  font-family: 'Noto Serif TC', 'Playfair Display', Georgia, serif;
  font-size: 60px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -.5px;
  margin-bottom: 24px;
  color: var(--text);
}
.hero-title em {
  color: var(--primary);
  font-style: italic;
  font-weight: 700;
  font-size: inherit;
}
.hero-sub {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 15px;
  letter-spacing: .3px;
  line-height: 1.85;
  margin-bottom: 32px;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 480px;
}

/* 雙 CTA — 主橘色按鈕 + 副線框按鈕 */
.hero-ctas {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.hero-cta-outline {
  display: inline-flex;
  align-items: center;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: 100px;
  border: 1.5px solid var(--text);
  text-decoration: none;
  letter-spacing: 1px;
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.hero-cta-outline:hover {
  background: var(--text);
  color: #fff;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--gradient);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 13px 28px;
  border-radius: 100px;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(255,155,113,.32);
  transition: transform .25s cubic-bezier(.4,0,.2,1), gap .25s, box-shadow .25s;
  letter-spacing: 1px;
  border: none;
}
.hero-cta:hover {
  transform: translateY(-2px);
  gap: 16px;
  box-shadow: 0 14px 32px rgba(255,155,113,.4);
}
.hero-cta .arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  color: #fff;
}

.hero-dots {
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}
.hero-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(74,58,44,.25);
  transition: width .25s cubic-bezier(.4,0,.2,1), background .25s;
  border: none;
  padding: 0;
  cursor: pointer;
  font: inherit;
}
.hero-dots .dot:hover { background: rgba(74,58,44,.55); }
.hero-dots .dot.active {
  width: 28px;
  border-radius: 4px;
  background: var(--primary);
}

/* Side cards 改成水平 2 欄，並變矮（從原本 vertical stack） */
.hero-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.side-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 120px;
  box-shadow: var(--shadow);
  transition: transform .2s;
}
.side-card:hover { transform: translateY(-2px); }
.side-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.side-overlay {
  position: absolute;
  inset: 0;
}
.sc-orange .side-overlay {
  background: linear-gradient(135deg, rgba(255,155,113,.88) 0%, rgba(255,208,164,.82) 100%);
}
.sc-yellow .side-overlay {
  background: linear-gradient(135deg, rgba(126,200,184,.88) 0%, rgba(182,227,212,.82) 100%);
}
.side-text {
  position: relative;
  z-index: 2;
  padding: 18px 22px;
  color: #fff;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.side-tag {
  display: inline-block;
  background: rgba(255,255,255,.95);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 100px;
  margin-bottom: 8px;
  align-self: flex-start;
  letter-spacing: 1px;
}
.sc-yellow .side-tag { color: var(--accent-dark); }
.side-text h3 {
  font-size: 17px;
  font-weight: 800;
  margin-bottom: 6px;
  letter-spacing: -.3px;
}
.side-discount {
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.side-discount em {
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  margin-left: 2px;
}

/* ============ MARQUEE 跑馬燈 — 主題桃色漸層 + 白色襯線字 + 琥珀星 ============ */
.marquee-bar {
  background: var(--gradient);
  color: #fff;
  padding: 14px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;             /* 確保不被 hero 蓋住 */
  clear: both;
}
.marquee-bar::before,
.marquee-bar::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.marquee-bar::before {
  left: 0;
  background: linear-gradient(to right, var(--primary), transparent);
}
.marquee-bar::after {
  right: 0;
  background: linear-gradient(to left, var(--secondary), transparent);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 56px;
  white-space: nowrap;
  width: max-content;
  animation: marquee 45s linear infinite;
  font-family: 'Noto Serif TC', 'Playfair Display', serif;
  font-style: italic;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 3px;
  color: #fff;
  text-shadow: 0 1px 6px rgba(74,42,22,.18);
}
.marquee-track .m-star {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--rating);
  flex-shrink: 0;
  filter: drop-shadow(0 1px 4px rgba(0,0,0,.15));
}
.marquee-track .m-star svg {
  width: 14px;
  height: 14px;
  display: block;
}
.marquee-bar:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ============ CATEGORIES ============ */
.categories {
  background: #fff;
  margin-top: 18px;
  padding: 28px 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.categories .container { padding: 0 28px; }
.cat-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}
.cat-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.3px;
}
.cat-sub {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}
/* 分類改成「滿版方格照片」— 整張 cat-item 是正方形照片 + 底部文字疊圖 */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.cat-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  text-decoration: none;
  background: var(--bg-soft);
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s;
  isolation: isolate;
}
.cat-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s cubic-bezier(.4,0,.2,1);
}
.cat-item::after {
  /* 下方暗漸層讓白字可讀 */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
              rgba(20,12,8,.65) 0%,
              rgba(20,12,8,.25) 38%,
              rgba(20,12,8,0) 65%);
  pointer-events: none;
  z-index: 1;
}
.cat-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.cat-item:hover img {
  transform: scale(1.08);
}
/* 隱藏 icon 容器（保留節點不破壞結構 — 既有的 ci-1..10 class 也保留作為 fallback） */
.cat-icon { display: none; }
.cat-item:hover .cat-icon { transform: scale(1.08); }

.ci-1 { background: linear-gradient(135deg, #ffe5e5 0%, #ffcccc 100%); }
.ci-2 { background: linear-gradient(135deg, #fff5d6 0%, #ffeaa7 100%); }
.ci-3 { background: linear-gradient(135deg, #ffe5cc 0%, #ffcc99 100%); }
.ci-4 { background: linear-gradient(135deg, #f5e6d3 0%, #e6c8a0 100%); }
.ci-5 { background: linear-gradient(135deg, #ffe0ec 0%, #ffc4d6 100%); }
.ci-6 { background: linear-gradient(135deg, #d6f0ff 0%, #b3e0ff 100%); }
.ci-7 { background: linear-gradient(135deg, #f0e6ff 0%, #d9c2ff 100%); }
.ci-8 { background: linear-gradient(135deg, #d6f5e0 0%, #a8e6c0 100%); }
.ci-9 { background: linear-gradient(135deg, #ffe5f0 0%, #ffc4dc 100%); }
.ci-10 { background: linear-gradient(135deg, #e0f5f5 0%, #b8e6e6 100%); }

.cat-label {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 2;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1.5px;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* ============ FLASH SALE ============ */
.flash-sale {
  background: #fff;
  margin-top: 18px;
  padding: 24px 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.flash-sale .container { padding: 0 28px; }
.flash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}
.flash-title {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.flash-icon {
  font-size: 28px;
  filter: drop-shadow(0 2px 6px rgba(255,155,113,.35));
}
.flash-title strong {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -.3px;
}
.flash-en {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.countdown {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-left: 12px;
}
.countdown > span:first-child { margin-right: 6px; }
.cd-box {
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 13px;
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  border: 1px solid rgba(255,155,113,.25);
}
.cd-sep {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: 14px;
}

.flash-more {
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .2s;
}
.flash-more:hover { gap: 8px; }
.flash-more span { font-size: 16px; }

.flash-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 14px;
}

/* 移除蝦皮 Flash Sale 那些「叫賣」元素 — 倒數方塊區、進度條、立即搶購鈕全都不顯示 */
.countdown { display: none; }
.flash-progress,
.flash-grab,
.flash-card .flash-badge { display: none !important; }

.flash-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.flash-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}
.flash-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
}
.flash-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.flash-card:hover .flash-img-wrap img { transform: scale(1.05); }
.flash-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: .5px;
}

.flash-card-body {
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.flash-name {
  font-size: 12.5px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
  min-height: 36px;
}
.flash-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.flash-price {
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.3px;
}
.flash-compare {
  color: var(--text-muted);
  font-size: 11px;
  text-decoration: line-through;
}
.flash-compare[data-has=""] { display: none; }
.flash-progress {
  position: relative;
  background: var(--accent-light);
  height: 18px;
  border-radius: 100px;
  overflow: hidden;
}
.flash-bar {
  background: var(--gradient);
  height: 100%;
  border-radius: 100px;
}
.flash-progress-text {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  letter-spacing: .5px;
}
.flash-grab {
  background: var(--gradient);
  color: #fff;
  border: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  letter-spacing: 1px;
  transition: opacity .2s;
}
.flash-grab:hover { opacity: .9; }

/* ============ PROMO STRIP ============ */
.promo-strip {
  background: #fff;
  margin-top: 18px;
  padding: 22px 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.promo-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.promo-item {
  display: flex;
  align-items: center;
  gap: 14px;
}
.promo-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-dark);
  flex-shrink: 0;
}
.promo-icon svg {
  width: 26px;
  height: 26px;
  display: block;
}
.promo-item strong {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.promo-item small {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ MAIN PRODUCT GRID ============ */
.daily-discover {
  margin-top: 18px;
  padding: 28px 0 40px;
}
.discover-header {
  text-align: center;
  margin-bottom: 28px;
  padding: 18px 0;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--primary);
  position: relative;
}
.discover-header::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--rating);
}
.discover-title {
  font-size: 22px;
  font-weight: 900;
  color: var(--primary);
  letter-spacing: -.3px;
  margin-bottom: 4px;
}
.discover-title span {
  color: var(--rating);
  margin: 0 6px;
}
.discover-sub {
  font-size: 13px;
  color: var(--text-muted);
}

/* 商品網格 5 欄→4 欄寬鬆排版（蝦皮是 5-6 欄超密集的） */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

/* 移除蝦皮商品卡那種 4-5 個 badge 同框的密集感 — 只保留「嚴選」單一 badge */
.product-card .product-tags { display: none; }

.product-card {
  background: #fff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.product-img-wrap {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg);
}
.product-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.product-card:hover .product-img-wrap img { transform: scale(1.06); }

/* 嚴選 badge — 鼠尾草綠（毛孩友善） */
.badge-mall {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(126,200,184,.95);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: 1px;
  box-shadow: 0 2px 8px rgba(126,200,184,.35);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.badge-discount {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--rating);
  color: #6b4f1c;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  letter-spacing: .5px;
  box-shadow: 0 2px 8px rgba(255,200,87,.35);
}
.badge-discount[data-has=""] { display: none; }

.product-body {
  padding: 10px 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-name {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 38px;
}
.product-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.product-price {
  color: var(--primary);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -.3px;
}
.product-compare {
  color: var(--text-muted);
  font-size: 12px;
  text-decoration: line-through;
}
.product-compare[data-has=""] { display: none; }

.product-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-muted);
}
/* Star ratings — SVG via background-image, hide ★ text via font-size:0
   (avoids OS-level emoji rendering on Win/Mac/iOS) */
.product-stars, .pdp-stars, .r-stars, .rs-stars {
  display: inline-block;
  font-size: 0 !important;
  letter-spacing: 0 !important;
  vertical-align: middle;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14' fill='%23ffc857'%3E%3Cpath d='M7 .8L8.8 5 13 5.6 9.9 8.4 10.7 12.7 7 10.6 3.3 12.7 4.1 8.4 1 5.6 5.2 5z'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: 0 center;
}
.product-stars { width: 60px; height: 12px; background-size: 12px 12px; }
.r-stars { width: 65px; height: 13px; background-size: 13px 13px; }

/* SVG icon sizing for inline use */
.thumb-svg, .heart-svg {
  width: 14px;
  height: 14px;
  display: inline-block;
  vertical-align: -2px;
}
/* Inline arrow / X icons (used in CTAs / breadcrumb / sort / clear filter) */
.inline-arrow, .inline-arrow-sm {
  display: inline-block;
  vertical-align: -3px;
}
.inline-arrow { width: 16px; height: 16px; }
.inline-arrow-sm { width: 13px; height: 13px; vertical-align: -2px; }
/* hero-cta arrow span — SVG inside replaces unicode → */
.hero-cta .arrow svg { width: 14px; height: 14px; display: block; }
.product-meta-sep { color: var(--border); }
.product-sold { color: var(--text-muted); }

.product-tags {
  display: flex;
  gap: 6px;
  margin-top: 4px;
  flex-wrap: wrap;
}
.ptag {
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
  letter-spacing: .5px;
}
.ptag-shipping {
  color: var(--accent-dark);
  background: var(--accent-light);
  border: 1px solid rgba(126,200,184,.3);
}
.ptag-mall {
  color: var(--primary-dark);
  background: var(--primary-light);
  border: 1px solid rgba(255,155,113,.28);
}

.load-more-wrap {
  text-align: center;
  margin-top: 28px;
}
.load-more-btn {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  border: 1.5px solid var(--primary);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 36px;
  border-radius: 100px;
  transition: all .2s;
}
.load-more-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-hover);
}

/* ============ BRAND ROW — 精品編輯風（無方塊、各品牌專屬排印） ============ */
.brand-row {
  background: #fff;
  margin-top: 24px;
  padding: 70px 0 64px;
}
.brand-row .container { padding: 0 28px; }

/* 中央眉題：兩條短線 + 大寫字距 */
.brand-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-bottom: 50px;
}
.brand-eyebrow .be-line {
  width: 64px;
  height: 1px;
  background: var(--border);
}
.brand-eyebrow .be-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text-muted);
  font-family: 'Noto Sans TC', sans-serif;
}

/* 品牌橫向列 — 統一 2 行結構（小字副標 + 大字主標），無分隔線 */
.brand-list {
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 24px 0;
}
.brand-list .brand-mark {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 8px;
  flex: 1 1 0;
  min-width: 130px;
  color: var(--text-muted);
  opacity: .58;
  cursor: pointer;
  transition: opacity .3s, color .3s, transform .3s;
  text-align: center;
  /* 不繼承 header logo 的尺寸/背景 */
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}
.brand-list .brand-mark:hover {
  color: var(--text);
  opacity: 1;
  transform: translateY(-2px);
}

/* 統一副標 — 全部品牌副標格式一致 */
.bm-sub {
  font-family: 'Noto Sans TC', sans-serif;
  font-size: 10px;
  letter-spacing: 3px;
  font-weight: 600;
  text-transform: uppercase;
  opacity: .75;
}

/* 主標 — 各品牌排印特色，但行高統一 */
.bm-main {
  font-family: 'Noto Serif TC', 'Playfair Display', serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  line-height: 1.1;
}

/* 各品牌個性化主標 */
.brand-canin .bm-main {
  font-style: italic;
  font-weight: 600;
  letter-spacing: .5px;
}
.brand-hills .bm-main {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 900;
  letter-spacing: 4px;
}
.brand-orijen .bm-main { letter-spacing: 7px; font-weight: 800; }
.brand-acana .bm-main { letter-spacing: 6px; font-weight: 600; }
.brand-wellness .bm-main {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 900;
  letter-spacing: 4px;
}
.brand-purina .bm-main {
  font-family: 'Noto Sans TC', sans-serif;
  font-weight: 800;
  letter-spacing: 4px;
}

/* ============ FOOTER ============ */
.site-footer {
  background: #fff;
  margin-top: 28px;
  border-top: 4px solid var(--primary);
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1.4fr;
  gap: 36px;
  padding: 40px 16px;
}
.footer-col h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-muted);
  padding: 5px 0;
  transition: color .2s;
}
.footer-col a:hover { color: var(--primary); }

.footer-app p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.footer-qr {
  width: 110px;
  height: 110px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px;
  margin-bottom: 12px;
}
.qr-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  gap: 1.5px;
  width: 100%;
  height: 100%;
}
.qr-grid span {
  background: var(--text);
  border-radius: 1px;
  display: block;
}
.qr-grid span:nth-child(odd) { background: transparent; }
.qr-grid span:nth-child(3n) { background: var(--text); }
.qr-grid span:nth-child(7n) { background: transparent; }

.footer-app-stores {
  display: flex;
  gap: 8px;
}
.app-store {
  background: #1a1a1a;
  color: #fff;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  cursor: pointer;
}

.footer-bottom {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-payments {
  font-weight: 500;
  letter-spacing: 1px;
  font-size: 11px;
}

/* ===========================================================
   Responsive
   =========================================================== */
@media (max-width: 1100px) {
  .cat-grid { grid-template-columns: repeat(5, 1fr); }
  .flash-grid { grid-template-columns: repeat(4, 1fr); }
  .product-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .brand-list { gap: 4px 0; }
  .brand-mark { padding: 8px 18px; }
  .bm-main { font-size: 18px !important; }
  .brand-canin .bm-main, .brand-orijen .bm-main, .brand-acana .bm-main { font-size: 19px !important; }
}

@media (max-width: 880px) {
  /* Header 在 ≤880 一樣 row1 三線+logo+cart, row2 搜尋欄 */
  .header-inner { padding: 12px 0; gap: 10px; }
  .brand-mark { width: 34px; height: 34px; border-radius: 8px; }
  .brand-mark svg { width: 20px; height: 20px; }
  .brand-name { font-size: 19px; }

  .hero-inner { gap: 12px; }
  .hero-side { gap: 10px; }
  .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
  .cat-icon { width: 64px; height: 64px; font-size: 32px; border-radius: 18px; }
  /* 平板 ≤880：hero 不再強制吃 viewport 高度，內容多高就多高，marquee 緊接在後
     ⚠️ 不要設 aspect-ratio 跟 overflow:hidden，否則會把堆疊的 banner 內容截掉 */
  .hero {
    padding: 28px 0;
    min-height: 0;
    display: block;
  }
  .hero-main {
    aspect-ratio: auto;          /* 蓋掉舊輪播設計留下的 5/3 比例 */
    overflow: visible;           /* 不截切堆疊內容 */
    /* 鎖定固定高度 → 4 種 slide 都吃這個容器，輪播切換時 marquee 不會上下漂 */
    min-height: 640px;
  }

  /* 平板：用 flex column 強制堆疊（比 grid 更穩、不會被 hp-XXX 子規則蓋掉） */
  .hero-panel {
    display: flex !important;
    flex-direction: column;
    gap: 28px;
    position: absolute !important;  /* 改回 absolute，所有 slide 共用同一塊高度 */
    inset: 0 !important;
    grid-template-columns: none !important;
    height: 100% !important;
    min-height: 100%;
    justify-content: center;        /* 內容垂直置中，矮 slide 不會擠在頂端 */
  }
  .hero-panel:not(.is-active) { display: none !important; }
  .hero-content { padding: 0 8px; align-items: flex-start; order: 1; flex-shrink: 0; }
  .hero-visual { order: 2; flex-shrink: 0; }
  .hero-title { font-size: 40px; }
  .hero-title em { font-size: 40px; }
  .hero-sub { max-width: none; }

  /* Slide 1 — hp-arch */
  .hp-arch-visual,
  .hero-visual { height: 360px; max-width: 520px; margin: 0 auto; width: 100%; }
  .hv-photo-main { left: 5%; width: 78%; }
  .hv-photo-accent { width: 140px; height: 140px; right: 6px; bottom: 24px; }
  .hv-badge { width: 92px; height: 92px; left: 0; bottom: 8px; }
  .hv-badge span { font-size: 9px; padding: 0 10px; letter-spacing: 1px; }

  /* Slide 2 — hp-grid */
  .hp-grid-visual { height: 340px; gap: 10px; max-width: 520px; margin: 0 auto; width: 100%; }
  .hg-tag-float { font-size: 15px; padding: 11px 18px; letter-spacing: 1.5px; }

  /* Slide 3 — hp-spread（保持滿版圖、不上下堆疊；高度跟其他 slide 一致 = 640px） */
  .hero-panel.hp-spread {
    display: block !important;
    flex-direction: unset !important;
    height: 100% !important;
    min-height: 100% !important;
    overflow: hidden;
  }
  .hp-spread-content { padding: 48px 20px 86px; }
  .hp-spread-content .hero-sub { text-align: center; max-width: 100%; }
  .hp-spread-stats { gap: 24px; bottom: 22px; }
  .hp-spread-stats strong { font-size: 20px; }
  .hp-spread-stats small { font-size: 9.5px; letter-spacing: 1.5px; }

  /* Slide 4 — hp-reverse */
  .hp-rev-visual { height: 340px; max-width: 520px; margin: 0 auto; width: 100%; }
  .hp-rev-content { padding-left: 0; }
  .hp-rev-photo { border-radius: 180px 22px 22px 22px; }
  .hp-rev-sticker { width: 110px; height: 110px; right: 12px; bottom: 18px; transform: rotate(-6deg); }
  .hp-rev-sticker strong { font-size: 18px; }
  .hp-rev-sticker small { font-size: 9.5px; letter-spacing: 1.5px; }
  .hp-rev-line { display: none; }
  /* 平板 ≤880：隱藏左 eyebrow，header 換行所以 sticky offset 拉高 */
  .site-nav { top: 144px; }
  .site-nav-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    grid-template-columns: none;
    gap: 12px;
    padding: 12px 16px;
  }
  .nav-eyebrow { display: none; }
  .nav-links {
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
    gap: 10px 18px;
    min-width: 0;
  }
  .site-nav-link { font-size: 12.5px; letter-spacing: 2px; }
  .nav-cta { padding: 8px 14px; font-size: 11px; letter-spacing: 1.5px; flex-shrink: 0; }

  /* 平板 marquee 中度縮小 */
  .marquee-bar { padding: 12px 0; }
  .marquee-track { font-size: 16px; gap: 38px; letter-spacing: 2px; }
  .marquee-track .m-star svg { width: 11px; height: 11px; }
  .hero-arrow { width: 38px; height: 38px; opacity: 1; background: rgba(0,0,0,.35); }
  .hero-arrow svg { width: 18px; height: 18px; }

  /* 平板：.hero 多留底部 padding 給豆子吊在外，避免壓到下面的 marquee */
  .hero { padding-bottom: 44px; }
  .hero-dots { bottom: -22px; }

  .product-grid { grid-template-columns: repeat(3, 1fr); }
  .flash-grid { grid-template-columns: repeat(3, 1fr); }
  .promo-inner { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 28px; padding: 28px 16px; }
  .brand-list { gap: 4px 0; }
  .brand-mark { padding: 8px 18px; }
  .bm-main { font-size: 18px !important; }
  .brand-canin .bm-main, .brand-orijen .bm-main, .brand-acana .bm-main { font-size: 19px !important; }
}

@media (max-width: 600px) {
  .brand { gap: 8px; }
  .brand-mark { width: 30px; height: 30px; border-radius: 7px; }
  .brand-mark svg { width: 18px; height: 18px; }
  .brand-name { font-size: 17px; }
  .hamburger { width: 34px; height: 34px; }
  .hamburger span { width: 20px; }
  .cart-link { width: 34px; height: 34px; }
  .cart-link svg { width: 20px; height: 20px; }
  .search-bar { padding: 3px 3px 3px 14px; }
  .search-btn { padding: 7px 16px; font-size: 12px; }

  .hero-side { grid-template-columns: 1fr; }
  /* ⚠️ aspect-ratio 已過時（舊輪播設計），強制蓋掉避免截切 */
  /* 手機鎖定 hero-main 高度 → 4 種 slide 統一吃這個容器，marquee 位置不漂 */
  .hero-main { aspect-ratio: auto; min-height: 560px; overflow: visible; }
  .cat-grid { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cat-item { padding: 16px 8px 14px; }
  .cat-icon { width: 54px; height: 54px; font-size: 26px; border-radius: 14px; }
  .cat-label { font-size: 12px; }
  /* 手機 ≤600：更緊湊；padding-bottom 多留 38px 給豆子吊在外不壓到 marquee */
  .hero {
    padding: 20px 0 38px;
    min-height: 0;
    display: block;        /* 不再 grid，避免額外 align 影響 */
  }

  /* 手機 marquee 縮小：字級減半、間距縮、星星變小 */
  .marquee-bar { padding: 10px 0; }
  .marquee-track { font-size: 13px; gap: 28px; letter-spacing: 1.5px; }
  .marquee-track .m-star svg { width: 9px; height: 9px; }
  .marquee-bar::before, .marquee-bar::after { width: 30px; }
  .hero-panel { gap: 24px !important; }
  .hero-content { padding: 0 4px; }
  .hero-title { font-size: 30px; line-height: 1.25; margin-bottom: 16px; }
  .hero-title em { font-size: 30px; }
  .hero-sub { font-size: 13.5px; margin-bottom: 22px; line-height: 1.7; }
  .hero-ctas { gap: 10px; flex-wrap: wrap; }
  .hero-cta, .hero-cta-outline { padding: 10px 20px; font-size: 13px; letter-spacing: .5px; }

  /* Slide 1 — hp-arch */
  .hp-arch-visual,
  .hero-visual { height: 300px; max-width: 100%; }
  .hv-photo-main { left: 4%; width: 78%; }
  .hv-photo-accent { width: 120px; height: 120px; right: 4px; bottom: 18px; border-width: 4px; }
  .hv-badge { width: 80px; height: 80px; left: 0; bottom: 0; }
  .hv-badge span { font-size: 8px; padding: 0 8px; letter-spacing: .8px; }

  /* Slide 2 — hp-grid（保持 2x2 但縮小） */
  .hp-grid-visual { height: 300px; gap: 6px; }
  .hg-p1 { border-radius: 80px 14px 14px 14px; }
  .hg-p2 { border-radius: 14px 80px 14px 14px; }
  .hg-p3 { border-radius: 14px 14px 14px 80px; }
  .hg-p4 { border-radius: 14px 14px 80px 14px; }
  .hg-tag-float { font-size: 13px; padding: 8px 12px; letter-spacing: 1px; }

  /* Slide 3 — hp-spread（手機保持滿版圖、高度跟其他 slide 一致 = 560px） */
  .hero-panel.hp-spread { height: 100% !important; min-height: 100% !important; }
  .hp-spread-content { padding: 32px 14px 76px; }
  .hp-spread-stats { gap: 16px; bottom: 16px; }
  .hp-spread-stats strong { font-size: 16px; }
  .hp-spread-stats small { font-size: 8.5px; letter-spacing: 1px; margin-top: 2px; }

  /* Slide 4 — hp-reverse */
  .hp-rev-visual { height: 280px; }
  .hp-rev-photo { border-radius: 140px 14px 14px 14px; }
  .hp-rev-sticker { width: 86px; height: 86px; right: 8px; bottom: 12px; }
  .hp-rev-sticker strong { font-size: 14px; }
  .hp-rev-sticker small { font-size: 8.5px; letter-spacing: 1px; }
  /* 手機 ≤600：nav 改用 flex（不用 grid），links 自動換行不橫向滾動 */
  .site-nav { top: 168px; }
  .site-nav-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    grid-template-columns: none;
    padding: 10px 12px;
    gap: 8px;
  }
  .nav-eyebrow { display: none; }
  .nav-links {
    flex-wrap: wrap;
    flex: 1;
    justify-content: center;
    gap: 6px 14px;
    overflow: visible;
    padding: 0;
    min-width: 0;
  }
  .nav-links::-webkit-scrollbar { display: none; }
  .nav-links li { flex-shrink: 0; }
  .site-nav-link { font-size: 12px; white-space: nowrap; letter-spacing: 1px; padding: 4px 0; }
  .site-nav-link::after { display: none; }
  .nav-sep { display: none; }
  .nav-cta {
    padding: 7px 10px;
    font-size: 0;
    gap: 0;
    flex-shrink: 0;
  }
  .nav-cta svg { width: 16px; height: 16px; }
  .hero-sub { font-size: 13px; }
  .hero-cta { padding: 11px 24px; font-size: 13px; }
  .hero-arrow { width: 32px; height: 32px; }
  .hero-arrow svg { width: 16px; height: 16px; }
  .hero-prev { left: 8px; }
  .hero-next { right: 8px; }
  /* 手機：.hero 留底部 padding，豆子吊在外但不壓到 marquee */
  .hero { padding-bottom: 38px; }
  .hero-dots { bottom: -20px; gap: 8px; }
  .hero-dots .dot { width: 7px; height: 7px; }
  .hero-dots .dot.active { width: 22px; }

  .categories .container,
  .flash-sale .container,
  .brand-row .container { padding: 0 16px; }

  .flash-grid { grid-template-columns: repeat(2, 1fr); }
  .flash-title strong { font-size: 18px; }
  .flash-en { display: none; }
  .countdown { margin-left: 0; flex-basis: 100%; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .product-name { font-size: 13px; min-height: 36px; }
  .product-price { font-size: 16px; }
  .product-tags .ptag { font-size: 9px; }

  .promo-inner { grid-template-columns: 1fr; gap: 12px; }
  .promo-item { gap: 10px; }
  .promo-icon { width: 44px; height: 44px; font-size: 22px; }

  .discover-title { font-size: 18px; }

  .footer-inner { grid-template-columns: 1fr 1fr; gap: 22px; }
  .footer-app { grid-column: 1 / -1; }
  .brand-list { justify-content: center; gap: 0; }
  .brand-mark { padding: 6px 14px; flex: 0 0 calc(50% - 4px); border-bottom: 1px solid var(--border-light); }
  .brand-mark + .brand-mark::before { display: none; }
  .brand-eyebrow { margin-bottom: 32px; }
  .brand-eyebrow .be-line { width: 32px; }
  .brand-eyebrow .be-text { font-size: 10px; letter-spacing: 2.5px; }
  .bm-main { font-size: 16px !important; }

  .footer-bottom-inner { font-size: 11px; }
}

/* ===========================================================
   Editor preview overrides — when this template is loaded
   into the GrapesJS admin editor, we want sections to appear
   stable (no animation, full opacity)
   =========================================================== */
.reveal, .fade-in, .slide-up, [data-aos] {
  opacity: 1 !important;
  transform: none !important;
  visibility: visible !important;
}
