/*
Theme Name: BABE FAKA (VI Architecture)
Description: 採用 VI 主站高效電競架構打造的 BABE FAKA 專屬主題（動態 WooCommerce、零 Mixed Content、高對比深色會員/結帳、獨立輔助狀態看板）。
Author: VI Architecture Team
Version: 1.0.4
Text Domain: babefaka-vi
Requires PHP: 8.0
*/

:root {
  --bf-bg: #090d14;
  --bf-bg-elev: #111826;
  --bf-bg-card: #141d2e;
  --bf-bg-hover: #1b273d;
  --bf-border: #25334d;
  --bf-border-strong: #364b70;
  --bf-text: #f0f5ff;
  --bf-text-muted: #9eb0cc;
  --bf-brand: #2dfc85;
  --bf-brand-2: #58a6ff;
  --bf-accent-grad: linear-gradient(135deg, #2dfc85 0%, #38bdf8 55%, #818cf8 100%);
  --bf-danger: #ff5d73;
  --bf-warn: #fbbf24;
  --bf-radius: 14px;
  --bf-max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.bf-body {
  margin: 0;
  min-width: 320px;
  background: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(56, 189, 248, 0.10), transparent 65%),
              radial-gradient(ellipse 60% 40% at 90% 10%, rgba(45, 252, 133, 0.07), transparent 60%),
              var(--bf-bg);
  color: var(--bf-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--bf-brand); text-decoration: none; transition: color .15s, border-color .15s, background .15s, transform .15s; }
a:hover { color: #7dffb3; }
img { max-width: 100%; height: auto; }
svg { display: inline-block; vertical-align: middle; }

.bf-container {
  width: min(var(--bf-max), calc(100% - 32px));
  margin-inline: auto;
}

/* Header */
.bf-header {
  position: sticky;
  top: 0;
  z-index: 9990;
  background: rgba(9, 13, 20, 0.90);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--bf-border);
}
.bf-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  position: relative;
}
.bf-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  color: #fff;
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .04em;
}
.bf-logo img {
  height: 40px;
  width: auto;
  max-width: 185px;
  object-fit: contain;
  display: block;
}
.bf-nav {
  display: flex;
  align-items: stretch;
  gap: 4px;
  align-self: stretch;
}
.bf-nav-list {
  display: flex;
  align-items: stretch;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.bf-nav-list > li {
  position: relative;
  display: flex;
  align-items: center;
}
.bf-nav-list > li > a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 12px;
  border-radius: 9px;
  color: #dce7f8;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}
.bf-nav-list > li > a:hover,
.bf-nav-list > li.is-current > a,
.bf-nav-list > li.is-open > a {
  color: #fff;
  background: rgba(45, 252, 133, 0.14);
}

/* Mega Menu — Zero-gap seamless hover bridge + full 4-column layout */
.bf-has-mega { position: static !important; }
.bf-mega {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 0);
  width: min(1140px, calc(100vw - 32px));
  background: #0f1726;
  border: 1px solid var(--bf-border-strong);
  border-top: 2px solid var(--bf-brand);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 28px 60px rgba(0, 0, 0, .72);
  padding: 20px 22px 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, visibility .15s ease;
  max-height: 72vh;
  overflow-y: auto;
  z-index: 9999;
}
/* Invisible hover bridge covering any vertical gap between nav link and mega panel */
.bf-mega::before {
  content: "";
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 24px;
  background: transparent;
}
.bf-has-mega:hover > .bf-mega,
.bf-has-mega.is-open > .bf-mega {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.bf-mega-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--bf-border);
}
.bf-mega-head h4 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 800;
  color: var(--bf-brand);
}
.bf-mega-head a {
  font-size: 12.5px;
  font-weight: 700;
  color: #9eb0cc;
}
.bf-mega-head a:hover { color: var(--bf-brand); }
.bf-mega-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.bf-mega-links a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: rgba(22, 32, 51, 0.55);
  color: #e4eefc;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}
.bf-mega-links a:hover {
  border-color: var(--bf-brand);
  background: var(--bf-bg-hover);
  color: #fff;
}
.bf-cat-mini-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 7px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #1b2840;
  border: 1px solid var(--bf-border);
  color: var(--bf-brand);
  font-size: 11px;
  font-weight: 800;
}
.bf-cat-mini-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Header Search & Actions */
.bf-header-search {
  display: flex;
  align-items: center;
  flex: 1 1 200px;
  max-width: 280px;
  background: #121b2b;
  border: 1px solid var(--bf-border);
  border-radius: 10px;
  padding: 2px 4px 2px 10px;
}
.bf-header-search:focus-within { border-color: var(--bf-brand); }
.bf-header-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 13px;
  padding: 7px 6px;
  outline: none;
}
.bf-header-search input::placeholder { color: #7f94b5; }
.bf-header-search button {
  border: 0;
  background: transparent;
  color: var(--bf-brand);
  padding: 6px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
}

.bf-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.bf-icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--bf-border);
  background: #121b2b;
  color: #e8f1ff;
  font-size: 13px;
  font-weight: 700;
}
.bf-icon-btn:hover {
  border-color: var(--bf-brand);
  background: #18253a;
  color: #fff;
}
.bf-cart-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--bf-brand);
  color: #07130d;
  font-size: 11px;
  font-weight: 900;
}
.bf-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--bf-brand);
  background: #121d2d;
  color: var(--bf-brand);
  cursor: pointer;
}

/* Hero */
.bf-hero {
  padding: 56px 0 42px;
}
.bf-hero-box {
  position: relative;
  overflow: hidden;
  padding: 48px 44px;
  border-radius: 22px;
  border: 1px solid var(--bf-border-strong);
  background:
    radial-gradient(ellipse 55% 80% at 95% 15%, rgba(45, 252, 133, 0.14), transparent 65%),
    radial-gradient(ellipse 55% 80% at 5% 95%, rgba(99, 102, 241, 0.16), transparent 65%),
    linear-gradient(145deg, #101829 0%, #0c121e 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .42);
}
.bf-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(45, 252, 133, 0.11);
  border: 1px solid rgba(45, 252, 133, 0.35);
  color: var(--bf-brand);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.bf-hero h1 {
  margin: 18px 0 14px;
  font-size: clamp(28px, 4.2vw, 46px);
  line-height: 1.22;
  font-weight: 900;
  color: #fff;
}
.bf-hero h1 span {
  background: var(--bf-accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.bf-hero-desc {
  max-width: 680px;
  margin: 0 0 28px;
  color: #b7c6de;
  font-size: 16px;
}
.bf-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.bf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 11px;
  font-size: 14.5px;
  font-weight: 800;
  border: 1px solid transparent;
  cursor: pointer;
}
.bf-btn-primary {
  background: var(--bf-brand);
  color: #07140d !important;
}
.bf-btn-primary:hover {
  background: #61ffa3;
  transform: translateY(-1px);
}
.bf-btn-secondary {
  background: #172338;
  border-color: var(--bf-border-strong);
  color: #edf4ff !important;
}
.bf-btn-secondary:hover {
  border-color: var(--bf-brand);
  background: #1e2e49;
}
.bf-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, .09);
}
.bf-stat-card {
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(15, 23, 38, 0.72);
  border: 1px solid var(--bf-border);
}
.bf-stat-card strong {
  display: block;
  font-size: 16px;
  color: #fff;
  margin-bottom: 3px;
}
.bf-stat-card span {
  font-size: 12.5px;
  color: var(--bf-text-muted);
}

/* Sections */
.bf-section {
  padding: 26px 0 40px;
}
.bf-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.bf-section-head h2 {
  margin: 4px 0 0;
  font-size: 25px;
  font-weight: 850;
  color: #fff;
}
.bf-section-head p {
  margin: 4px 0 0;
  color: var(--bf-text-muted);
  font-size: 14px;
}
.bf-more-link {
  flex: none;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--bf-brand);
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(45, 252, 133, 0.35);
}
.bf-more-link:hover { background: rgba(45, 252, 133, 0.12); }

/* Category Browser */
.bf-cat-panel {
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(145deg, #131b2b, #0f1623);
  border: 1px solid var(--bf-border);
}
.bf-cat-group {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--bf-border);
}
.bf-cat-group:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.bf-cat-group > summary,
.bf-cat-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 15px;
  font-weight: 800;
  color: var(--bf-brand);
  cursor: pointer;
  list-style: none;
  margin: 0 0 12px;
}
.bf-cat-group > summary::-webkit-details-marker { display: none; }
.bf-cat-group > summary span { color: var(--bf-text-muted); font-size: 12px; font-weight: 600; }
.bf-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.bf-cat-card {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  background: #162033;
  border: 1px solid var(--bf-border);
  color: #edf4ff !important;
}
.bf-cat-card:hover {
  border-color: var(--bf-brand);
  background: #1c2940;
  transform: translateY(-1px);
}
.bf-cat-thumb {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #1a2942, #10192b);
  border: 1px solid var(--bf-border-strong);
  color: var(--bf-brand);
  font-weight: 900;
  font-size: 15px;
}
.bf-cat-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bf-cat-name {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bf-cat-count {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--bf-text-muted);
}

/* Product Grid */
.bf-product-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.bf-product-card {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bf-bg-card);
  border: 1px solid var(--bf-border);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.bf-product-card:hover {
  transform: translateY(-3px);
  border-color: var(--bf-brand);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .45);
}
.bf-product-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: #0d1320;
  overflow: hidden;
}
.bf-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .25s ease;
}
.bf-product-card:hover .bf-product-media img { transform: scale(1.04); }
.bf-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 800;
  background: rgba(9, 13, 20, 0.85);
  border: 1px solid rgba(45, 252, 133, 0.45);
  color: var(--bf-brand);
}
.bf-badge.is-out {
  border-color: rgba(255, 93, 115, 0.55);
  color: #ff99a7;
}
.bf-product-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 14px 15px 16px;
  gap: 10px;
}
.bf-product-title {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 700;
  color: #f3f7ff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.9em;
}
.bf-product-title a { color: inherit; }
.bf-product-title a:hover { color: var(--bf-brand); }
.bf-product-meta {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.bf-price {
  color: var(--bf-brand);
  font-size: 15.5px;
  font-weight: 850;
}
.bf-price del { color: #7b8da8; font-size: 12.5px; font-weight: 500; margin-right: 4px; }
.bf-price ins { text-decoration: none; }
.bf-card-btn {
  padding: 6px 11px;
  border-radius: 8px;
  background: rgba(45, 252, 133, 0.14);
  color: var(--bf-brand);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.bf-card-btn:hover { background: var(--bf-brand); color: #07140d; }

/* Posts Grid */
.bf-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.bf-post-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border-radius: 15px;
  background: var(--bf-bg-card);
  border: 1px solid var(--bf-border);
}
.bf-post-card:hover { border-color: var(--bf-brand-2); }
.bf-post-date { font-size: 12px; color: var(--bf-brand); font-weight: 700; margin-bottom: 6px; }
.bf-post-card h3 { margin: 0 0 10px; font-size: 16.5px; line-height: 1.45; color: #fff; }
.bf-post-card h3 a { color: inherit; }
.bf-post-card p { margin: 0 0 14px; font-size: 13.5px; color: var(--bf-text-muted); flex: 1; }

/* Breadcrumb & Catalog Toolbar */
.bf-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 18px 0 8px;
  font-size: 13px;
  color: var(--bf-text-muted);
}
.bf-breadcrumb a { color: #c7d5ec; }
.bf-breadcrumb a:hover { color: var(--bf-brand); }
.bf-catalog-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 8px 0 20px;
}
.bf-catalog-head h1 { margin: 0; font-size: 28px; color: #fff; }
.bf-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: var(--bf-bg-elev);
  border: 1px solid var(--bf-border);
}
.bf-toolbar form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }
.bf-toolbar input[type="search"],
.bf-toolbar select {
  background: #182336;
  color: #fff;
  border: 1px solid var(--bf-border-strong);
  border-radius: 9px;
  padding: 9px 12px;
  font-size: 13.5px;
}
.bf-toolbar label.bf-check-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #dce7f8;
  cursor: pointer;
}
.bf-pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 34px 0 46px;
}
.bf-pagination .page-numbers {
  padding: 8px 14px;
  border-radius: 9px;
  border: 1px solid var(--bf-border);
  background: var(--bf-bg-elev);
  color: #dce7f8;
  font-size: 13.5px;
  font-weight: 700;
}
.bf-pagination .current {
  background: var(--bf-brand);
  border-color: var(--bf-brand);
  color: #07140d;
}

/* Single Product */
.bf-single-product { padding: 14px 0 56px; }
.bf-product-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 36px;
  align-items: start;
}
.bf-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.bf-gallery-item {
  display: block;
  border-radius: 13px;
  overflow: hidden;
  border: 1px solid var(--bf-border);
  background: #101725;
}
.bf-gallery-item.is-main { grid-column: 1 / -1; }
.bf-gallery-item img { width: 100%; display: block; object-fit: contain; }
.bf-summary {
  padding: 26px;
  border-radius: 18px;
  background: var(--bf-bg-card);
  border: 1px solid var(--bf-border);
}
.bf-summary h1 { margin: 0 0 12px; font-size: 26px; line-height: 1.4; color: #fff; }
.bf-summary .price { font-size: 24px; font-weight: 900; color: var(--bf-brand); margin: 0 0 18px; }
.bf-summary .woocommerce-product-details__short-description {
  color: #d6e2f5;
  font-size: 14.5px;
  margin-bottom: 20px;
}
.bf-summary .variations { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.bf-summary .variations th,
.bf-summary .variations td {
  padding: 8px 6px 8px 0;
  border: 0;
  background: transparent;
  color: #e6eefc;
  text-align: left;
  vertical-align: middle;
}
.bf-summary .variations select {
  width: 100%;
  max-width: 100%;
  background: #192438;
  color: #fff;
  border: 1px solid var(--bf-border-strong);
  border-radius: 9px;
  padding: 10px 12px;
}
.bf-summary .product_meta {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--bf-border);
  font-size: 13px;
  color: var(--bf-text-muted);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.bf-product-desc {
  margin-top: 32px;
  padding: 28px;
  border-radius: 18px;
  background: var(--bf-bg-card);
  border: 1px solid var(--bf-border);
  color: #dce6f7;
}
.bf-product-desc h2 { margin: 0 0 18px; font-size: 21px; color: #fff; }

/* Standard Page & High-Contrast WooCommerce (Fixes MyAccount Black-on-Black Bug!) */
.bf-page-wrap { padding: 18px 0 64px; }
.bf-page-card {
  padding: 32px;
  border-radius: 18px;
  background: var(--bf-bg-card);
  border: 1px solid var(--bf-border);
  color: #e6eefc;
  overflow-wrap: anywhere;
}
.bf-page-card h1 { margin: 0 0 22px; font-size: 28px; color: #fff; }

body.bf-body .woocommerce,
body.bf-body .woocommerce-account,
body.bf-body .woocommerce-MyAccount-content,
body.bf-body .woocommerce-form,
body.bf-body .woocommerce-checkout,
body.bf-body .woocommerce-cart-form,
body.bf-body .cart_totals {
  color: #edf3ff !important;
}
body.bf-body .woocommerce h1,
body.bf-body .woocommerce h2,
body.bf-body .woocommerce h3,
body.bf-body .woocommerce label,
body.bf-body .woocommerce legend,
body.bf-body .woocommerce th,
body.bf-body .woocommerce td,
body.bf-body .woocommerce p,
body.bf-body .woocommerce span.description {
  color: #edf3ff !important;
}
body.bf-body .woocommerce form.login,
body.bf-body .woocommerce form.register,
body.bf-body .woocommerce form.checkout_coupon,
body.bf-body .woocommerce .woocommerce-order-details,
body.bf-body .woocommerce #payment,
body.bf-body .woocommerce-checkout #payment div.payment_box {
  background: #101725 !important;
  border: 1px solid var(--bf-border-strong) !important;
  border-radius: 14px !important;
  color: #edf3ff !important;
}
body.bf-body .woocommerce input.input-text,
body.bf-body .woocommerce textarea,
body.bf-body .woocommerce select,
body.bf-body .select2-container--default .select2-selection--single {
  background: #1a2539 !important;
  color: #ffffff !important;
  border: 1px solid var(--bf-border-strong) !important;
  border-radius: 9px !important;
  padding: 10px 12px !important;
}
body.bf-body .select2-container--default .select2-selection--single .select2-selection__rendered {
  color: #ffffff !important;
  line-height: 22px !important;
}
body.bf-body .select2-dropdown {
  background: #152033 !important;
  color: #ffffff !important;
  border-color: var(--bf-border-strong) !important;
}
body.bf-body .woocommerce a.button,
body.bf-body .woocommerce button.button,
body.bf-body .woocommerce input.button,
body.bf-body .woocommerce #respond input#submit,
body.bf-body .woocommerce button.button.alt,
body.bf-body .woocommerce a.button.alt {
  background: var(--bf-brand) !important;
  color: #07140d !important;
  border: 0 !important;
  border-radius: 10px !important;
  padding: 12px 22px !important;
  font-weight: 800 !important;
  text-shadow: none !important;
}
body.bf-body .woocommerce a.button:hover,
body.bf-body .woocommerce button.button:hover,
body.bf-body .woocommerce button.button.alt:hover,
body.bf-body .woocommerce a.button.alt:hover {
  background: #61ffa3 !important;
  color: #07140d !important;
}
/* Social / Discord Login Buttons High Contrast */
body.bf-body .mo-openid-app-icons a,
body.bf-body .mo-openid-app-icons .btn-social,
body.bf-body a[href*="discord"],
body.bf-body .discord-login-button {
  color: #ffffff !important;
}
body.bf-body .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
body.bf-body .woocommerce-MyAccount-navigation li a {
  display: block;
  padding: 10px 14px;
  border-radius: 10px;
  background: #101725;
  border: 1px solid var(--bf-border);
  color: #e6eefc !important;
  font-weight: 700;
}
body.bf-body .woocommerce-MyAccount-navigation li.is-active a,
body.bf-body .woocommerce-MyAccount-navigation li a:hover {
  background: rgba(45, 252, 133, 0.14);
  border-color: var(--bf-brand);
  color: var(--bf-brand) !important;
}
body.bf-body .woocommerce table.shop_table {
  border: 1px solid var(--bf-border) !important;
  border-radius: 12px;
  overflow: hidden;
}
body.bf-body .woocommerce table.shop_table th,
body.bf-body .woocommerce table.shop_table td {
  background: #111927 !important;
  border-color: var(--bf-border) !important;
  padding: 12px 14px !important;
}
body.bf-body .woocommerce-info,
body.bf-body .woocommerce-message,
body.bf-body .woocommerce-error {
  background: #152236 !important;
  color: #f3f7ff !important;
  border-top-color: var(--bf-brand) !important;
  border-radius: 10px !important;
}

/* Status Board Shortcode */
.bf-status-board { display: flex; flex-direction: column; gap: 16px; }
.bf-status-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.bf-status-filter input {
  flex: 1 1 220px;
  background: #182336;
  color: #fff;
  border: 1px solid var(--bf-border-strong);
  border-radius: 10px;
  padding: 10px 14px;
}
.bf-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.bf-status-item {
  padding: 16px;
  border-radius: 14px;
  background: #101827;
  border: 1px solid var(--bf-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bf-status-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.bf-status-pill {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 800;
}
.bf-status-pill.is-online { background: rgba(45, 252, 133, 0.16); color: #2dfc85; border: 1px solid rgba(45, 252, 133, 0.45); }
.bf-status-pill.is-updating { background: rgba(251, 191, 36, 0.16); color: #fbbf24; border: 1px solid rgba(251, 191, 36, 0.45); }
.bf-status-pill.is-offline { background: rgba(255, 93, 115, 0.16); color: #ff7b8d; border: 1px solid rgba(255, 93, 115, 0.45); }

/* Footer */
.bf-footer {
  margin-top: 40px;
  padding: 46px 0 84px; /* extra bottom padding so floating Chaty never blocks footer links */
  border-top: 1px solid var(--bf-border);
  background: linear-gradient(180deg, #0c121e 0%, #070b12 100%);
}
.bf-footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 32px;
}
.bf-footer h4 {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.bf-footer p { margin: 10px 0 0; font-size: 13.5px; color: var(--bf-text-muted); }
.bf-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bf-footer-links a { color: #b9c8e0; font-size: 13.5px; }
.bf-footer-links a:hover { color: var(--bf-brand); }
.bf-footer-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
  padding-right: 72px; /* safe clearance for right-bottom Chaty widget */
}
.bf-footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .07);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 12.5px;
  color: #7d90ad;
}

/* Responsive */
@media (max-width: 1024px) {
  .bf-product-grid, .bf-cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bf-hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bf-mega-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bf-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .bf-mobile-toggle { display: inline-flex; }
  .bf-header-search { display: none; }
  .bf-nav {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #101827;
    border: 1px solid var(--bf-border-strong);
    border-radius: 14px;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
    box-shadow: 0 24px 50px rgba(0, 0, 0, .7);
  }
  .bf-nav.is-open { display: flex; }
  .bf-nav-list { flex-direction: column; align-items: stretch; width: 100%; }
  .bf-nav-list > li > a { width: 100%; justify-content: space-between; padding: 11px 12px; }
  .bf-mega {
    position: static;
    transform: none;
    width: 100%;
    max-height: 45vh;
    display: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    box-shadow: none;
    border-radius: 10px;
    margin-top: 6px;
  }
  .bf-has-mega.is-open > .bf-mega { display: block; }
  .bf-mega-grid { grid-template-columns: 1fr; }
  .bf-product-top { grid-template-columns: 1fr; }
  .bf-post-grid, .bf-footer-grid { grid-template-columns: 1fr; }
  .bf-hero-box { padding: 32px 22px; }
}
@media (max-width: 600px) {
  .bf-product-grid, .bf-cat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .bf-status-grid { grid-template-columns: 1fr; }
  .bf-page-card, .bf-summary, .bf-product-desc { padding: 18px; }
  .bf-icon-btn span.bf-btn-label { display: none; }
}

/* Built-in fixes: dark bg lock, single product form polish, admin bar offset */
html, body.bf-body, body.bf-body main, body.bf-body .bf-section { background-color: #090d14 !important; color: #f0f5ff !important; }
body.bf-body .bf-section-head h2 { color: #ffffff !important; }
body.bf-body .bf-summary .variations select { background-image: none !important; appearance: auto !important; -webkit-appearance: menulist !important; }
body.bf-body .bf-summary .variations .reset_variations { color: #9eb0cc !important; font-size: 13px !important; margin-left: 8px !important; text-decoration: underline !important; }
body.bf-body .bf-summary .variations .reset_variations:hover { color: #2dfc85 !important; }
body.bf-body .quantity .qty { background: #1a2539 !important; color: #ffffff !important; border: 1px solid #364b70 !important; border-radius: 9px !important; padding: 8px 10px !important; }
body.bf-body.admin-bar .bf-header { top: 32px; }
@media (max-width: 1024px) {
  .bf-mega-links { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .bf-mega-links { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Per-Product Status Board (v1.0.2) */
.bf-status-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.bf-status-kpi {
  padding: 14px 16px;
  border-radius: 13px;
  background: #101827;
  border: 1px solid var(--bf-border);
}
.bf-status-kpi span { display: block; font-size: 12px; color: #9eb0cc; margin-bottom: 4px; }
.bf-status-kpi strong { font-size: 22px; color: #fff; font-weight: 900; }
.bf-status-kpi.is-online strong { color: #2dfc85; }
.bf-status-kpi.is-updating strong { color: #fbbf24; }
.bf-status-kpi.is-offline strong { color: #ff7b8d; }

.bf-status-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #101827;
  border: 1px solid var(--bf-border);
  margin-bottom: 16px;
}
.bf-status-controls input[type="search"] {
  width: 100%;
  background: #182336;
  color: #fff;
  border: 1px solid var(--bf-border-strong);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 14px;
}
.bf-status-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.bf-stab {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--bf-border);
  background: #162033;
  color: #cdd9ec;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.bf-stab:hover { border-color: var(--bf-brand); color: #fff; }
.bf-stab.is-active { background: var(--bf-brand); border-color: var(--bf-brand); color: #07140d; }

.bf-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.bf-status-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #101827;
  border: 1px solid var(--bf-border);
  color: #f0f5ff !important;
}
.bf-status-row:hover {
  border-color: var(--bf-brand);
  background: #162236;
  transform: translateY(-1px);
}
.bf-status-thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background: #1a263b;
  border: 1px solid var(--bf-border);
  color: var(--bf-brand);
  font-weight: 900;
}
.bf-status-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bf-status-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bf-status-meta-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.bf-status-zone-tag {
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgba(56, 189, 248, 0.14);
  color: #7dd3fc;
}
.bf-status-game-tag { font-size: 11.5px; color: #9eb0cc; font-weight: 600; }
.bf-status-prod-name {
  font-size: 14px;
  color: #fff;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bf-status-note { font-size: 12px; color: #9eb0cc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bf-status-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.bf-status-date { font-size: 11px; color: #7f94b5; }

.bf-single-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #0f1726;
  border: 1px solid var(--bf-border);
}
.bf-single-status-note { font-size: 13px; color: #b8c7de; }

@media (max-width: 900px) {
  .bf-status-list { grid-template-columns: 1fr; }
  .bf-status-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 3-level Mega Menu Sections (v1.0.4) */
.bf-mega-sections { display: flex; flex-direction: column; gap: 18px; }
.bf-mega-sec-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  color: #7dd3fc;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(54, 75, 112, 0.7);
}
.bf-mega-sec-title span { font-size: 11.5px; color: #9eb0cc; font-weight: 600; }
