/* Beauty Pro shared header: nav, mega menu, mobile drawer, mini-cart (v5)
   Uses the page-level CSS variables (--primary, --tint, --heading …). */
.bp-header { position: sticky; top: 0; z-index: 1000; background: #FFFFFF; border-bottom: 1px solid #ECECEC; box-shadow: 0 2px 16px rgba(0, 0, 0, 0.04); }
.bp-header ul { list-style: none; margin: 0; padding: 0; }
.bp-header button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
.bp-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; height: 88px; }
.bp-left { display: flex; align-items: center; gap: 6px; min-width: 0; }
.bp-right { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.bp-logo { display: inline-flex; align-items: center; line-height: 0; }
.bp-logo img { height: 64px; width: auto; display: block; } /* brand spec: 56–65px desktop */

/* Nav items — 療程項目 trigger and 皇牌項目 share one shape */
.bp-nav-item {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border-radius: 999px; font-size: 16px; font-weight: 700; color: var(--heading); white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.bp-nav-item:hover, .bp-nav-item:focus-visible, .bp-nav-item[aria-expanded="true"] { background: var(--tint); color: var(--primary-dark); }
.bp-nav-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.bp-nav-item .bp-chev { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.2; transition: transform 0.25s; }
.bp-nav-item[aria-expanded="true"] .bp-chev { transform: rotate(180deg); }
.bp-burger { display: inline-flex; flex-direction: column; gap: 4px; width: 18px; }
.bp-burger span { display: block; height: 2px; border-radius: 2px; background: var(--primary); }
.bp-nav-item.is-featured { background: var(--tint); color: var(--primary-dark); }
.bp-nav-item.is-featured::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 3px rgba(43, 182, 115, 0.2); }
.bp-nav-item.is-featured:hover { background: var(--primary); color: #FFFFFF; }
.bp-nav-item.is-featured:hover::before { background: #FFFFFF; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3); }

/* Right-side actions: everything is 48px tall */
.bp-icon {
  position: relative; width: 48px; height: 48px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; color: var(--heading);
  transition: background 0.2s, color 0.2s;
}
.bp-icon:hover, .bp-icon:focus-visible, .bp-icon[aria-expanded="true"] { background: var(--tint); color: var(--primary-dark); }
.bp-icon:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.bp-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.bp-badge {
  position: absolute; top: 3px; right: 1px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--primary); color: #FFFFFF; border: 2px solid #FFFFFF;
  font-family: var(--font-en); font-size: 11px; font-weight: 800; line-height: 16px; text-align: center;
}
.bp-badge[hidden] { display: none; }
.bp-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 24px;
  border-radius: 999px; background: var(--primary); color: #FFFFFF; font-size: 16px; font-weight: 700; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(43, 182, 115, 0.26); transition: background 0.2s, box-shadow 0.2s;
}
.bp-cta:hover { background: var(--primary-dark); box-shadow: 0 8px 20px rgba(31, 135, 83, 0.3); }
.bp-cta svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; }
.bp-wa {
  width: 48px; height: 48px; border-radius: 50%; flex-shrink: 0; background: var(--primary); color: #FFFFFF;
  display: inline-flex; align-items: center; justify-content: center; transition: background 0.2s;
  box-shadow: 0 6px 16px rgba(43, 182, 115, 0.26);
}
.bp-wa:hover { background: var(--primary-dark); }
.bp-wa svg { width: 24px; height: 24px; fill: #FFFFFF; }

/* ——— Mega menu (desktop) ——— */
.bp-scrim { position: fixed; inset: 0; z-index: -1; background: rgba(20, 30, 25, 0.28); opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.bp-header.mega-open .bp-scrim { opacity: 1; visibility: visible; }
.bp-mega {
  position: absolute; left: 0; right: 0; top: 100%; background: #FFFFFF;
  border-top: 1px solid #EFEFEF; border-radius: 0 0 28px 28px; box-shadow: 0 28px 60px rgba(22, 101, 62, 0.16);
  max-height: calc(100vh - 88px); overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.bp-header.mega-open .bp-mega { opacity: 1; visibility: visible; transform: none; }
.bp-drawer-head, .bp-drawer-extra { display: none; }
.bp-mega-inner { display: grid; grid-template-columns: 1fr 300px; gap: 36px; padding: 32px 0 36px; }
.bp-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 26px; }
.bp-col-title {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: default;
  font-size: 18px; font-weight: 800; color: var(--heading) !important; padding: 0 0 10px; margin-bottom: 8px;
  border-bottom: 2px solid var(--tint) !important;
}
.bp-col-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--primary); flex-shrink: 0; }
.bp-col-title .bp-col-en { margin-left: auto; font-family: var(--font-en); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--primary); }
.bp-link {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 7px 10px; margin: 0 -10px; border-radius: 10px;
  font-size: 15px; font-weight: 500; line-height: 1.45; color: #444444; transition: background 0.15s, color 0.15s;
}
.bp-link:hover, .bp-link:focus-visible { background: var(--bg-alt); color: var(--primary-dark); outline: none; }
.bp-link:focus-visible { box-shadow: inset 0 0 0 2px var(--primary); }
.bp-price { flex-shrink: 0; font-family: var(--font-en); font-size: 13px; font-weight: 700; color: var(--primary); }
.bp-all { display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--primary-dark); }
.bp-all:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.bp-offer-tile {
  display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: 22px; border-radius: 20px;
  background: linear-gradient(135deg, var(--tint), var(--bg-alt)); border: 1px solid rgba(43, 182, 115, 0.18);
}
.bp-offer-tile strong { font-size: 19px; font-weight: 800; color: var(--heading); }
.bp-offer-tile p { font-size: 14px; color: var(--text); line-height: 1.6; margin: 0; }
.bp-offer-tile a { align-self: flex-start; margin-top: 4px; display: inline-flex; align-items: center; height: 40px; padding: 0 18px; border-radius: 999px; border: 2px solid var(--primary); color: var(--primary-dark); font-size: 14px; font-weight: 700; transition: background 0.2s, color 0.2s; }
.bp-offer-tile a:hover { background: var(--primary); color: #FFFFFF; }
.bp-promo { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: #FFFFFF; border: 1px solid #EEEEEE; box-shadow: 0 12px 32px rgba(22, 101, 62, 0.10); }
.bp-promo-img { position: relative; aspect-ratio: 1; background: var(--tint); }
.bp-promo-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bp-promo-tag { position: absolute; top: 14px; left: 14px; padding: 5px 12px; border-radius: 999px; background: var(--primary); color: #FFFFFF; font-size: 13px; font-weight: 700; }
.bp-promo-body { padding: 18px 20px 20px; }
.bp-promo-body h3 { font-size: 20px; font-weight: 800; color: var(--heading); line-height: 1.3; margin: 0 0 6px; }
.bp-promo-price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 14px; }
.bp-promo-price strong { font-family: var(--font-en); font-size: 28px; font-weight: 800; color: var(--primary); }
.bp-promo-price s { font-family: var(--font-en); font-size: 15px; font-weight: 500; color: var(--text-soft); }
.bp-pill { display: inline-flex; align-items: center; justify-content: center; width: 100%; height: 46px; border-radius: 999px; background: var(--primary); color: #FFFFFF; font-size: 16px; font-weight: 700; transition: background 0.2s; }
.bp-pill:hover { background: var(--primary-dark); }

/* ——— Mini-cart ——— */
.bp-cart { position: relative; }
.bp-cart-panel {
  position: absolute; right: -10px; top: calc(100% + 14px); width: 370px; z-index: 5;
  background: #FFFFFF; border: 1px solid #ECECEC; border-radius: 20px; box-shadow: 0 22px 50px rgba(0, 0, 0, 0.14);
  padding: 18px 18px 20px; opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s; text-align: left;
}
.bp-cart-panel::before { content: ""; position: absolute; top: -8px; right: 27px; width: 14px; height: 14px; background: #FFFFFF; border-left: 1px solid #ECECEC; border-top: 1px solid #ECECEC; transform: rotate(45deg); }
.bp-cart.is-open .bp-cart-panel { opacity: 1; visibility: visible; transform: none; }
.bp-cart-head { display: flex; align-items: baseline; justify-content: space-between; padding-bottom: 12px; border-bottom: 1px solid #F0F0F0; }
.bp-cart-head strong { font-size: 17px; font-weight: 800; color: var(--heading); }
.bp-cart-head span { font-size: 13px; color: var(--text-soft); }
.bp-cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid #F3F3F3; }
.bp-cart-item img { width: 64px; height: 64px; object-fit: contain; border-radius: 12px; border: 1px solid #EEEEEE; background: #FFFFFF; }
.bp-cart-name { font-size: 14px; font-weight: 700; color: var(--heading); line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.bp-cart-meta { display: flex; justify-content: space-between; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--text-soft); }
.bp-cart-meta b { font-family: var(--font-en); font-size: 15px; font-weight: 800; color: var(--primary); }
.bp-remove { align-self: start; width: 28px; height: 28px; border-radius: 50%; color: #999999 !important; font-size: 18px; line-height: 28px; text-align: center; transition: background 0.2s, color 0.2s; }
.bp-remove:hover, .bp-remove:focus-visible { background: #F2F2F2 !important; color: var(--heading) !important; }
.bp-cart-empty { padding: 26px 0; text-align: center; font-size: 15px; color: var(--text-soft); }
.bp-cart-sub { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 16px; }
.bp-cart-sub span { font-size: 15px; font-weight: 700; color: var(--heading); }
.bp-cart-sub strong { font-family: var(--font-en); font-size: 22px; font-weight: 800; color: var(--heading); }
.bp-cart-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bp-btn-outline, .bp-btn-solid { display: inline-flex; align-items: center; justify-content: center; height: 46px; border-radius: 999px; font-size: 15px; font-weight: 700; transition: background 0.2s, color 0.2s; }
.bp-btn-outline { border: 2px solid var(--primary); color: var(--primary-dark); }
.bp-btn-outline:hover { background: var(--tint); }
.bp-btn-solid { background: var(--primary); color: #FFFFFF; }
.bp-btn-solid:hover { background: var(--primary-dark); }

html.bp-lock, html.bp-lock body { overflow: hidden; }

@media (max-width: 1180px) { .bp-nav-item.is-wide { display: none; } }
@media (max-width: 1100px) { .bp-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); } .bp-offer-tile { display: none; } }

/* ——— Tablet / mobile: drawer + accordion ——— */
@media (max-width: 1024px) {
  .bp-bar { grid-template-columns: auto 1fr auto; height: 64px; gap: 8px; }
  .bp-logo { justify-self: center; }
  .bp-logo img { height: 40px; }
  .bp-left .bp-nav-item:not(#bpMegaTrigger) { display: none; }
  #bpMegaTrigger { width: 48px; padding: 0; justify-content: center; font-size: 0; gap: 0; }
  #bpMegaTrigger .bp-chev { display: none; }
  .bp-right { gap: 4px; }
  .bp-right .bp-search, .bp-cta { display: none; }
  .bp-scrim { z-index: 1090; }
  .bp-mega {
    position: fixed; top: 0; left: 0; right: auto; bottom: 0; width: min(88vw, 390px); max-height: none; z-index: 1100;
    border-radius: 0 24px 24px 0; border-top: none; transform: translateX(-104%); opacity: 1;
    transition: transform 0.3s ease, visibility 0.3s; box-shadow: 12px 0 40px rgba(0, 0, 0, 0.18);
  }
  .bp-header.mega-open .bp-mega { transform: none; }
  .bp-drawer-head { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 2; background: #FFFFFF; height: 64px; padding: 0 12px 0 20px; border-bottom: 1px solid #EFEFEF; }
  .bp-drawer-head img { height: 34px; width: auto; }
  .bp-close { width: 44px; height: 44px; border-radius: 50%; font-size: 26px; line-height: 44px; color: var(--heading) !important; }
  .bp-close:hover { background: var(--tint) !important; }
  .bp-mega-inner { display: block; width: auto; padding: 8px 20px 28px; }
  .bp-cols { display: block; }
  .bp-col { border-bottom: 1px solid #F0F0F0; }
  .bp-col-title { cursor: pointer; padding: 16px 0; margin: 0; border-bottom: none !important; font-size: 17px; }
  .bp-col-title .bp-col-en { display: none; }
  .bp-col-title::after { content: ""; margin-left: auto; width: 9px; height: 9px; border-right: 2px solid var(--primary); border-bottom: 2px solid var(--primary); transform: rotate(45deg); transition: transform 0.2s; margin-right: 4px; }
  .bp-col.is-open .bp-col-title::after { transform: rotate(-135deg); }
  .bp-col-list { display: none; padding: 0 0 14px 14px; }
  .bp-col.is-open .bp-col-list { display: block; }
  .bp-link { font-size: 15px; padding: 9px 10px; }
  .bp-promo { flex-direction: row; margin-top: 20px; border-radius: 18px; }
  .bp-promo-img { width: 112px; flex-shrink: 0; aspect-ratio: auto; }
  .bp-promo-tag { display: none; }
  .bp-promo-body { padding: 12px 14px; }
  .bp-promo-body h3 { font-size: 16px; }
  .bp-promo-price { margin-bottom: 8px; }
  .bp-promo-price strong { font-size: 22px; }
  .bp-pill { height: 38px; font-size: 14px; }
  .bp-drawer-extra { display: grid; gap: 10px; margin-top: 20px; }
  .bp-drawer-extra .bp-x-link { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 16px; border-radius: 14px; background: var(--bg-alt); font-size: 16px; font-weight: 700; color: var(--heading); }
  .bp-drawer-extra .bp-x-link:hover { color: var(--primary-dark); }
  .bp-drawer-extra .bp-cta { display: inline-flex; margin-top: 6px; }
  .bp-cart-panel { position: fixed; top: 72px; left: 12px; right: 12px; width: auto; }
  .bp-cart-panel::before { display: none; }
}
@media (max-width: 600px) { .bp-logo img { height: 30px; } /* brand spec: 28–32px mobile */ }
@media (prefers-reduced-motion: reduce) { .bp-mega, .bp-cart-panel, .bp-scrim { transition: none !important; } }
.bp-barwrap { position: relative; z-index: 2; background: #FFFFFF; }
.bp-mega { z-index: 1; }
@media (max-width: 1024px) { .bp-mega { z-index: 1100; } }

/* anchor offset under sticky header */
html { scroll-padding-top: 100px; }
@media (max-width:1024px){ html { scroll-padding-top: 76px; } }
