/* hkf-ui.css (clean restart) */
/* =========================================================
   HKF UI - Clean Base (v1)
   Rules:
   - One definition per class (no duplicates)
   - Sections grouped and documented
   - Keep only what we actually use now
   ========================================================= */

/* ============ TOKENS ============ */
:root{
  --hkf-bg:#f6f5f2;
  --hkf-text:#1f2937;
  --hkf-muted:rgba(31,41,55,.68);

  --hkf-surface:#ffffff;
  --hkf-surface2:#fbfaf7;
  --hkf-border:rgba(31,41,55,.12);

  --hkf-primary:#1f7a4a;
  --hkf-primary2:#17613b;

  --hkf-radius:14px;
  --hkf-shadow:0 10px 28px rgba(0,0,0,.08);
}

/* ============ BASE ============ */
html,body{ margin:0; padding:0; }
body{
  color:var(--hkf-text);
  background:var(--hkf-bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans TC","PingFang TC","Microsoft JhengHei",Arial,sans-serif;
  line-height:1.65;
}

a{ color:var(--hkf-primary); text-decoration:none; }
a:hover{ text-decoration:underline; }
strong{ font-weight:700; }

/* common container */
.content-container{
  max-width:980px;
  margin:0 auto;
  padding:0 12px;
}

/* if you have bottom nav, this prevents it covering content */
.hkf-page{
  padding-bottom:calc(72px + env(safe-area-inset-bottom));
}

/* ============ TYPO ============ */
.hkf-h2{
  margin:0 0 10px;
  font-size:1.08rem;
  line-height:1.25;
  font-weight:800;
  display:flex;
  align-items:center;
  gap:8px;
}
.hkf-h2__hint{
  font-size:.85em;
  font-weight:500;
  color:var(--hkf-muted);
}

/* ============ CARD ============ */
/* ============ SECTION LAYOUT ============ */
.hkf-section{
  margin: 18px 0 22px;
}

.hkf-shell{
  background: var(--hkf-surface);
  border: 1px solid var(--hkf-border);
  border-radius: var(--hkf-radius);
  box-shadow: var(--hkf-shadow);
  padding: 16px;
}

@media (max-width: 420px){
  .hkf-shell{ padding: 12px; }
}

.hkf-card{
  background:var(--hkf-surface);
  border:1px solid var(--hkf-border);
  border-radius:var(--hkf-radius);
  box-shadow:var(--hkf-shadow);
  padding:14px 16px;
  margin:14px 0;
}
.hkf-card--muted{
  background:var(--hkf-surface2);
  box-shadow:none;
}

/* ============ HERO ============ */
.hkf-hero{ margin:10px 0 14px; }
.hkf-hero__title{
  margin:6px 0 10px;
  font-size:1.45rem;
  line-height:1.25;
  letter-spacing:.2px;
  font-weight:900;
}
.hkf-hero__lead{
  margin:0 0 10px;
  color:rgba(31,41,55,.88);
}

/* optional hero image */
.hkf-hero__imgwrap{
  width:100%;
  border-radius:14px;
  overflow:hidden;
  background:#f2f2f2;
  margin:10px 0 0;
}
.hkf-hero__img{
  width:100%;
  height:auto;
  display:block;
}

/* ============ CTA ============ */
.hkf-cta-row{
  display:grid;
  grid-template-columns:1fr;
  gap:10px;
  margin-top:12px;
}

.hkf-cta{
  position:relative;
  display:flex;
  align-items:center;
  gap:10px;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid var(--hkf-border);
  background:var(--hkf-surface);
  transition:transform .06s ease, box-shadow .12s ease;
}
.hkf-cta:hover{
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(0,0,0,.10);
}

.hkf-cta__title{
  font-weight:900;
  letter-spacing:.2px;
  display:block;
  line-height:1.2;
  color:var(--hkf-primary2);
}
.hkf-cta__meta{
  display:block;
  margin-top:2px;
  font-size:.92em;
  color:var(--hkf-muted);
  line-height:1.2;
}
.hkf-cta__icon{
  margin-left:auto;
  width:36px;
  height:36px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  border:1px solid rgba(31,122,74,.28);
  background:rgba(31,122,74,.08);
  color:var(--hkf-primary);
}

/* ============ LIST ============ */
.hkf-list{ margin:8px 0 12px; padding-left:18px; }
.hkf-list li{ margin:6px 0; }

.hkf-list--check{ list-style:none; padding-left:0; margin:10px 0 0; }
.hkf-list--check li{
  position:relative;
  padding-left:28px;
  margin-bottom:8px;
}
.hkf-list--check li::before{
  content:'\f00c';
  font-family:"Font Awesome 6 Free";
  font-weight:900;
  position:absolute;
  left:0;
  top:3px;
  color:var(--hkf-primary);
  font-size:.9em;
}

/* ============ NOTE ============ */
.hkf-note{
  display:flex;
  gap:12px;
  align-items:flex-start;
  border-radius:12px;
  padding:12px 12px;
  border:1px solid var(--hkf-border);
  background:var(--hkf-surface2);
}
.hkf-note--light{ background:rgba(255,255,255,.70); }
.hkf-note__icon{
  flex:0 0 20px;
  margin-top:2px;
  opacity:.92;
  display:flex;
  justify-content:center;
}
.hkf-note__body p{ margin:0 0 8px; }
.hkf-note__body p:last-child{ margin-bottom:0; }

/* ============ CATEGORY GRID (6 categories) ============ */
.hkf-catsec{ margin:16px 0; padding:0; }
.hkf-catsec__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 10px;
}
.hkf-catsec__title{ font-weight:900; font-size:1.05rem; }
.hkf-catsec__more{
  font-size:.9rem;
  text-decoration:none;
  opacity:.85;
  white-space:nowrap;
}
.hkf-catsec__more:hover{ opacity:1; text-decoration:none; }

.hkf-catgrid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr)); /* mobile 3 per row */
  gap:10px;
}
.hkf-catcard{
  display:block;
  text-decoration:none;
  color:inherit;
  background:#fff;
  border-radius:12px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.06);
  box-shadow:0 6px 16px rgba(0,0,0,.10);
  transition:transform .06s ease, box-shadow .12s ease;
}
.hkf-catcard:hover{
  text-decoration:none;
  transform:translateY(-1px);
  box-shadow:0 14px 30px rgba(0,0,0,.10);
}
.hkf-catcard__img{
  width:100%;
  aspect-ratio:1/1;
  background:#f4f4f4;
}
.hkf-catcard__img img{
  width:100%;
  height:100%;
  object-fit:cover; /* 想全圖顯示就改 contain */
  display:block;
}
.hkf-catcard__t{
  padding:8px 8px 9px;
  font-size:.88rem;
  font-weight:900;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.hkf-catcard:active{ transform:scale(.98); }

@media (min-width: 601px){
  .hkf-catgrid{ gap:12px; }
  .hkf-catcard__t{ font-size:.95rem; }
}

/* ============ HEADER (optional) ============ */
.hkf-header{
  position:sticky;
  top:0;
  z-index:2000;
  background:#fff;
  border-bottom:1px solid rgba(31,41,55,.10);
  will-change:transform;
  transition:transform .18s ease;
}
@media (max-width: 900px){
  .hkf-header.is-hidden{ transform:translateY(-110%); }
}

/* ============ DRAWER (optional) ============ */
.hkf-drawer{
  position:fixed;
  inset:0;
  z-index:9999;
  display:none;
}
.hkf-drawer.is-open{ display:block; }

/* backdrop */
.hkf-drawer__backdrop{
  position:absolute;
  inset:0;
background:rgba(0,0,0,.38);

  opacity:0;
  transition:opacity .18s ease;

  /* optional: iOS feel (OK if unsupported) */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.hkf-drawer.is-ready .hkf-drawer__backdrop{ opacity:1; }

/* panel */
.hkf-drawer__panel{
  position:absolute;
  top:0; left:0;
  width:86vw;
  max-width:360px;
  height:100vh;
  background:#fff;
  box-shadow:0 20px 40px rgba(0,0,0,.20);
  display:flex;
  flex-direction:column;

  transform:translate3d(-102%,0,0);
  transition:transform .22s ease;
  will-change:transform;
}
.hkf-drawer.is-ready .hkf-drawer__panel{
  transform:translate3d(0,0,0);
}

.hkf-drawer__nav{
  flex:1 1 auto;
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
  padding:10px 10px 14px;
}

/* keep your existing nav styles */
.hkf-navgroup{ padding:8px 0 6px; }
.hkf-navgroup__title{
  font-size:.82rem;
  font-weight:900;
  color:rgba(31,41,55,.55);
  padding:8px 10px 6px;
  letter-spacing:.2px;
}
.hkf-navitem{
  display:flex;
  align-items:center;
  width:100%;
  padding:10px 10px;
  border-radius:10px;
  color:rgba(31,41,55,.92);
  text-decoration:none;
  line-height:1.25;
  font-weight:700;
}
.hkf-navitem:hover{ text-decoration:none; background:rgba(31,41,55,.04); }
.hkf-navitem.is-active{ background:rgba(31,122,74,.10); color:var(--hkf-primary2); }

.hkf-navsep{
  height:1px;
  background:rgba(31,41,55,.10);
  margin:10px 0;
}

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  .hkf-drawer__backdrop,
  .hkf-drawer__panel{
    transition:none !important;
  }
  .hkf-drawer__panel{ transform:none !important; }
}


/* ============ BOTTOM NAV (optional) ============ */
.hkf-bottomnav{
  position:fixed;
  left:0; right:0; bottom:0;
  z-index:1200;
  background:transparent;
}
.hkf-bottomnav__bar{
  display:flex;
  align-items:stretch;
  justify-content:space-between;
  padding:6px 6px calc(6px + env(safe-area-inset-bottom));
  background:rgba(255,255,255,.98);
  border-top:1px solid rgba(31,41,55,.12);
  box-shadow:0 -8px 18px rgba(0,0,0,.06);
  backdrop-filter:blur(10px);
}
.hkf-bottomnav__item{
  flex:1 1 25%;
  min-width:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:6px 0 4px;
  border-radius:10px;
  text-decoration:none;
  color:#6b7280;
  -webkit-tap-highlight-color:transparent;
}
.hkf-bottomnav__icon{ font-size:18px; line-height:1; }
.hkf-bottomnav__txt{
  margin-top:3px;
  font-size:12px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.hkf-bottomnav__item.is-active{
  background:rgba(31,122,74,.10);
  color:var(--hkf-primary2);
}

/* ============ MOBILE TWEAKS ============ */
@media (max-width: 420px){
  .hkf-hero__title{ font-size:1.28rem; }
  .hkf-card{ padding:12px 12px; }
  .hkf-cta{ padding:10px 12px; }
}
.hkf-lang{
  display:flex;
  gap:6px;
  font-weight:700;
  font-size:.9rem;
}
.hkf-lang a{
  color:#6b7280;
  text-decoration:none;
}
.hkf-lang a.is-active{
  color:var(--hkf-primary);
}
/* ===============================
   HKF Font System
   =============================== */

/* Default (en) */
html {
  font-family:
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
}

/* Traditional Chinese (zh-hk) */
html[lang="zh-hk"] {
  font-family:
    "PingFang TC",
    "Heiti TC",
    "Noto Sans TC",
    "Microsoft JhengHei",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

/* Simplified Chinese (zh-cn) */
html[lang="zh-cn"] {
  font-family:
    "PingFang SC",
    "Noto Sans SC",
    "Source Han Sans SC",
    "Microsoft YaHei",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}
/* ===== HERO SHELL (card container) ===== */
.hkf-hero__shell{
  border-radius: 18px;
  border: 1px solid rgba(0,0,0,.08);
  background: #fff;
  box-shadow: 0 14px 40px rgba(0,0,0,.10);
  padding: 14px;
}

.hkf-hero__grid{
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 14px;
  align-items: stretch;
}

.hkf-hero__left{ min-width: 0; }
.hkf-hero__right{ min-width: 0; display: grid; gap: 10px; }

/* photo: rounded + thin border (NO heavy shadow) */
.hkf-hero__photo{
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.08);
  background: #f3f4f6;
}
.hkf-hero__photo img{
  width: 100%;
  height: auto;
  display: block;
}

/* make the existing card inside less “card-in-card” heavy */
.hkf-hero__card{
  border-radius: 16px;
  border: 1px solid rgba(0,0,0,.10);
  background: #fff;
}

@media (max-width: 900px){
  .hkf-hero__grid{ grid-template-columns: 1fr; }
  .hkf-hero__shell{ padding: 12px; }
}
/* hero right-bottom text padding fix */
.hkf-hero__cardlist{
  padding: 10px 12px 14px; /* bottom 多少少 */
}
/* ===== FEATURE PRODUCTS (B: desktop rail) ===== */
.hkf-feat{ padding: 10px 0 18px; }

/* HEAD: not a card, but looks “designed” */
.hkf-feat__head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin: 8px 0 12px;
}
.hkf-feat__title{
  font-weight: 950;
  font-size: 1.08rem;
  letter-spacing: .2px;
  position: relative;
  padding-left: 10px;
}
.hkf-feat__title::before{
  content:'';
  position:absolute;
  left:0;
  top:.25em;
  width:4px;
  height:1.05em;
  border-radius:999px;
  background: rgba(31,122,74,.85);
}
.hkf-feat__more{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-weight: 900;
  font-size: .9rem;
  text-decoration:none;
  color: var(--hkf-primary2);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(31,122,74,.22);
  background: rgba(31,122,74,.06);
  -webkit-tap-highlight-color: transparent;
}
.hkf-feat__more:hover{ text-decoration:none; background: rgba(31,122,74,.10); }
.hkf-feat__more::after{
  content:'›';
  font-weight: 900;
  opacity:.8;
}

/* RAIL: desktop also scroll; hide scrollbar */
.hkf-feat__rail{
  display:flex;
  gap: 12px;
  overflow-x: auto;
  padding: 6px 2px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;

  /* hide scrollbar */
  scrollbar-width: none;
}
.hkf-feat__rail::-webkit-scrollbar{ display:none; }

/* CARD: keep ONE shadow level only */
.hkf-feat__card{
  flex: 0 0 190px;
  display:block;
  color: inherit;
  text-decoration:none;
  background:#fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,.10);
  overflow:hidden;
  scroll-snap-align: start;
  transition: transform .06s ease, box-shadow .12s ease;
}
.hkf-feat__card:hover{
  text-decoration:none;
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(0,0,0,.12);
}
.hkf-feat__card:active{ transform: scale(.99); }

.hkf-feat__img{
  width:100%;
  aspect-ratio: 16 / 11; /* less tall = looks more premium */
  background: #f3f4f6;
}
.hkf-feat__img img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* consistent layout */
.hkf-feat__body{
  padding: 10px 12px 12px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.hkf-feat__name{
  font-weight: 900;
  line-height: 1.2;
  font-size: .95rem;
  margin: 0;
  min-height: 2.4em;
  display:-webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow:hidden;
}
.hkf-feat__rating{
  display:flex;
  gap:4px;
  font-size: 12px;
  opacity: .95;
  line-height: 1.1;
}
.hkf-feat__rating i{ color: rgba(31,122,74,.9); }

.hkf-feat__price{
  margin-top:auto;
  display:flex;
  gap:10px;
  align-items:baseline;
  flex-wrap: wrap;
  line-height: 1.1;
}
.hkf-feat__was{
  opacity:.55;
  text-decoration: line-through;
  font-weight: 800;
  font-size: .88rem;
}
.hkf-feat__now{
  font-weight: 950;
  font-size: .98rem;
  color: var(--hkf-primary2);
}

@media (max-width: 420px){
  .hkf-feat__card{ flex-basis: 170px; }
}

/* feature head: give it breathing room without making a big card */
.hkf-feat__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;

  padding: 10px 12px;
  margin: 10px 0 12px;

  border-radius: 14px;
  border: 1px solid rgba(0,0,0,.06);
  background: rgba(255,255,255,.60);
  backdrop-filter: blur(8px);
}
.hkf-feat__title{
  margin: 0;
  display:flex;
  align-items:center;
}
/* hkf trust cards START */
.hkf-trust-cards{ margin:18px 0; }
.hkf-trust-row{ margin-bottom:0; }

.hkf-trust-card{
  border-radius:10px;
  overflow:hidden;
}

.hkf-trust-card .card-content{
  padding:16px 16px 14px 16px;
}

.hkf-trust-top{
  display:flex;
  align-items:center;
  gap:10px;
  margin-bottom:10px;
}

.hkf-trust-ic{
  font-size:22px;
  opacity:.85;
}

.hkf-trust-title{
  font-size:16px;
  font-weight:700;
  line-height:1.2;
}

.hkf-trust-main{ margin:8px 0 10px 0; }

.hkf-trust-big{
  display:flex;
  align-items:baseline;
  gap:6px;
  margin-bottom:6px;
}

.hkf-trust-num{
  font-size:34px;
  font-weight:800;
  letter-spacing:.5px;
}

.hkf-trust-unit{
  font-size:14px;
  opacity:.85;
}

.hkf-trust-desc{
  font-size:13px;
  opacity:.9;
  line-height:1.35;
}

.hkf-trust-meta{
  font-size:12px;
  opacity:.85;
  line-height:1.5;
}

.hkf-trust-meta-strong{ margin-top:6px; }

.hkf-trust-actions{ margin-top:12px; }

.hkf-trust-btn{
  width:100%;
  border-radius:8px;
}

.hkf-trust-steps{ margin-top:6px; }
.hkf-step{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin:8px 0;
}
.hkf-step-no{
  width:22px;
  height:22px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:12px;
  font-weight:700;
  background:#f2f2f2;
}
.hkf-step-txt{
  font-size:12.5px;
  line-height:1.35;
  opacity:.92;
}

.hkf-trust-note{
  margin-top:10px;
  font-size:12px;
  padding:10px 10px;
  border-radius:8px;
  background:#fafafa;
  opacity:.95;
}

.hkf-trust-tags{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.hkf-tag{
  display:inline-block;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  background:#f2f2f2;
  line-height:1;
}

.hkf-trust-link{
  padding:0 10px;
  border-radius:8px;
  font-weight:700;
}
/* hkf trust cards END */
/* === Trust cards grid (desktop evenly spread) === */
.hkf-trust-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;              /* 控制卡與卡之間距離 */
  align-items: stretch;
}



.hkf-trust-card{ height:100%; }
@media only screen and (max-width: 992px){
  .hkf-trust-cell{ width: calc(50% - 8px); }
}
@media only screen and (max-width: 600px){
  .hkf-trust-cell{ width: 100%; }
}
/* <!-- hkf trust section START --> */
.hkf-trust-section{
  margin-top: 18px;
  margin-bottom: 18px;
  padding: 18px 0;
  background: #ffffff;
  border-top: 1px solid rgba(0,0,0,.06);
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.hkf-trust-section-inner{
  max-width: 1200px;   /* 🔴 拉開關鍵 */
  margin: 0 auto;
  padding: 0 20px;
}


/* <!-- hkf trust grid START --> */
.hkf-trust-grid{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  align-items:stretch;
}

.hkf-trust-cell{
  width: calc(33.333% - 10px);
  min-width: 260px;
}

@media only screen and (max-width: 992px){
  .hkf-trust-cell{ width: calc(50% - 8px); }
}
@media only screen and (max-width: 600px){
  .hkf-trust-cell{ width: 100%; }
}
/* <!-- hkf trust grid END --> */

/* <!-- hkf trust card START --> */
.hkf-trust-card{
  height: 100%;
  background: #fff;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 16px;
  box-shadow: 0 6px 18px rgba(0,0,0,.06);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.hkf-trust-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.10);
  border-color: rgba(0,0,0,.12);
}

/* top accent line (subtle) */
.hkf-trust-card .card-content{
  position: relative;
  padding: 18px 18px 16px 18px;
}

.hkf-trust-card .card-content:before{
  content:"";
  position:absolute;
  left:0; top:0; right:0;
  height:4px;
  background: rgba(0,0,0,.08);
}
/* <!-- hkf trust card END --> */
/* === Trust card vertical rhythm tuning === */
.hkf-trust-card .card-content{
  display:flex;
  flex-direction:column;
  height:100%;
  padding:20px 20px 18px;
  gap:14px; /* 全卡統一節奏 */
}
.hkf-trust-desc,
.hkf-trust-meta div,
.hkf-step-txt{
  line-height:1.6;
}

.hkf-trust-big{
  margin-top:4px;
}
.hkf-trust-top em,
.hkf-trust-top .en{
  opacity:.55;
  font-style:normal;
  letter-spacing:.04em;
}
@media (max-width: 992px){
  .hkf-trust-grid{
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
}

@media (max-width: 600px){
  .hkf-trust-grid{
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

