/* ===========================================================
   賢滙會計 — Site-wide UI components
   Breadcrumb, back-to-top, cookie banner, WhatsApp floater
   Match brand tokens (red #B3262E, wood #7D4530, cream #FBFAF7)
   =========================================================== */

/* ============ BREADCRUMB ============ */
.breadcrumb {
  background: #FBFAF7;
  border-bottom: 1px solid #E8E0D2;
  padding: 14px 0;
  font-size: 13px;
}
.breadcrumb-list {
  list-style: none;
  margin: 0 auto;
  padding: 0 24px;
  max-width: 1180px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.breadcrumb-item { color: #6B5D54; }
.breadcrumb-item a {
  color: #6B5D54;
  text-decoration: none;
  transition: color .2s ease;
}
.breadcrumb-item a:hover { color: #B3262E; }
.breadcrumb-current {
  color: #3A2F26;
  font-weight: 500;
}
.breadcrumb-sep {
  color: #C9985A;
  opacity: .6;
  user-select: none;
}
@media (max-width: 560px) {
  .breadcrumb { padding: 10px 0; font-size: 12px; }
  .breadcrumb-list { padding: 0 18px; gap: 6px; }
}

/* ============ BACK-TO-TOP BUTTON ============ */
.btt-btn {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  color: #7D4530;
  border: 1px solid #E8E0D2;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .3s ease, transform .3s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
  box-shadow: 0 4px 14px rgba(125,69,48,.10);
  z-index: 80;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.btt-btn.btt-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.btt-btn:hover {
  color: #B3262E;
  background: #FFFFFF;
  box-shadow: 0 6px 20px rgba(179,38,46,.18);
  transform: translateY(-2px);
}
@media (max-width: 560px) {
  .btt-btn { right: 16px; bottom: 16px; width: 40px; height: 40px; }
}

/* ============ WHATSAPP FLOATER ============ */
.wa-floater {
  position: fixed;
  right: 24px;
  bottom: 80px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-700,#B3262E);
  color: #FFFFFF;
  display: grid;
  place-items: center;
  text-decoration: none;
  box-shadow: 0 6px 22px rgba(179,38,46, .35), 0 2px 6px rgba(0,0,0,.08);
  transition: transform .25s ease, box-shadow .25s ease;
  z-index: 90;
  -webkit-tap-highlight-color: transparent;
}
.wa-floater:hover {
  transform: scale(1.06);
  background: var(--brand-900,#8E1B23);
  box-shadow: 0 10px 30px rgba(179,38,46, .45), 0 3px 8px rgba(0,0,0,.10);
}
.wa-floater svg {
  position: relative;
  z-index: 2;
}
.wa-floater-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(179,38,46, .55);
  animation: waPulse 2.4s ease-out infinite;
  z-index: 1;
}
@keyframes waPulse {
  0%   { transform: scale(1);   opacity: .55; }
  70%  { transform: scale(1.6); opacity: 0;   }
  100% { transform: scale(1.6); opacity: 0;   }
}
@media (max-width: 560px) {
  .wa-floater { right: 16px; bottom: 68px; width: 50px; height: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .wa-floater-pulse { animation: none; opacity: 0; }
}

/* ============ COOKIE BANNER ============ */
.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #FFFFFF;
  border-top: 1px solid #E8E0D2;
  box-shadow: 0 -8px 24px rgba(125,69,48,.10);
  padding: 18px 0;
  z-index: 100;
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(.2,.7,.25,1);
}
.cookie-banner.cookie-shown { transform: translateY(0); }
.cookie-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: space-between;
}
.cookie-text {
  flex: 1 1 320px;
  font-size: 13px;
  color: #3A2F26;
  line-height: 1.65;
}
.cookie-text strong {
  display: block;
  font-family: "Noto Serif HK", "Noto Serif TC", serif;
  font-size: 15px;
  font-weight: 600;
  color: #1A1A1A;
  margin-bottom: 4px;
}
.cookie-actions {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}
.cookie-btn {
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.cookie-decline {
  background: transparent;
  color: #6B5D54;
  border: 1px solid #E8E0D2;
}
.cookie-decline:hover {
  color: #1A1A1A;
  border-color: #C9985A;
}
.cookie-accept {
  background: #B3262E;
  color: #FFFFFF;
  border: 1px solid #B3262E;
  box-shadow: 0 3px 10px rgba(179,38,46,.20);
}
.cookie-accept:hover {
  background: #8E1B23;
  border-color: #8E1B23;
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .cookie-banner { padding: 14px 0; }
  .cookie-inner { padding: 0 16px; gap: 14px; }
  .cookie-actions { width: 100%; justify-content: stretch; }
  .cookie-btn { flex: 1; padding: 10px 12px; }
}
