/* ==========================================================================
   BidBuy Golf — Design System v1.0.0
   Core visual foundation: colors, typography, tokens, and global overrides.
   Lives in bidbuy-core → theme-independent.
   ========================================================================== */

/* ── Google Fonts (loaded via Assets.php, fallback import) ── */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ==========================================================================
   1. DESIGN TOKENS (CSS Custom Properties)
   ========================================================================== */
/* ── Override Astra global palette with BidBuy design system ── */
body, :root {
  --ast-global-color-0: #1B4332 !important;   /* Primary → Fairway Green */
  --ast-global-color-1: #143628 !important;   /* Primary hover → darker */
  --ast-global-color-2: #1A1A2E !important;   /* Heading text → Ink */
  --ast-global-color-3: #383834 !important;   /* Body text → Stone 700 */
  --ast-global-color-4: #FCFBF7 !important;   /* Background → Paper */
  --ast-global-color-5: #F6F3EC !important;   /* Surface → Paper 2 */
  --ast-global-color-6: #1A1A2E !important;   /* Alt text → Ink */
  --ast-global-color-7: #E2E2DD !important;   /* Border → Stone 200 */
  --ast-global-color-8: #1A1A2E !important;   /* Alt heading → Ink */
}

:root {
  /* ── Brand: Fairway Green ── */
  --bb-fairway-50:  #EEF4F0;
  --bb-fairway-100: #D7E4DB;
  --bb-fairway-200: #AFC9B7;
  --bb-fairway-300: #7FA38C;
  --bb-fairway-400: #4F7D63;
  --bb-fairway-500: #2D5A43;
  --bb-fairway-600: #1B4332;   /* PRIMARY */
  --bb-fairway-700: #143628;
  --bb-fairway-800: #0E261C;
  --bb-fairway-900: #081710;

  /* ── Brand: Brass / Champagne ── */
  --bb-brass-50:  #FBF7EE;
  --bb-brass-100: #F4EBD2;
  --bb-brass-200: #E7D5A5;
  --bb-brass-300: #D9BE7B;
  --bb-brass-400: #C9A96E;     /* SECONDARY */
  --bb-brass-500: #B08F4E;
  --bb-brass-600: #8E713B;
  --bb-brass-700: #6B5429;

  /* ── Neutrals ── */
  --bb-paper:     #FCFBF7;
  --bb-paper-2:   #F6F3EC;
  --bb-stone-100: #EFEFEC;
  --bb-stone-200: #E2E2DD;
  --bb-stone-300: #C9C9C2;
  --bb-stone-400: #A3A39A;
  --bb-stone-500: #767670;
  --bb-stone-600: #545450;
  --bb-stone-700: #383834;
  --bb-stone-800: #232321;
  --bb-ink:       #1A1A2E;

  /* ── Semantic ── */
  --bb-sale:      #1B4332;
  --bb-auction:   #1E4D7B;
  --bb-exchange:  #B5571F;
  --bb-success:   #2E7D4F;
  --bb-warn:      #B8860B;
  --bb-danger:    #B23B3B;

  /* ── Role tokens ── */
  --bb-fg1:       var(--bb-ink);
  --bb-fg2:       var(--bb-stone-700);
  --bb-fg3:       var(--bb-stone-500);
  --bb-fg-link:   var(--bb-fairway-600);
  --bb-fg-accent: var(--bb-brass-500);

  --bb-surface:       var(--bb-paper);
  --bb-surface-raised: #FFFFFF;
  --bb-surface-sunken: var(--bb-paper-2);

  --bb-border:        rgba(20, 23, 16, 0.08);
  --bb-border-soft:   rgba(20, 23, 16, 0.12);
  --bb-border-strong: rgba(20, 23, 16, 0.22);

  /* ── Typography ── */
  --bb-font-display: 'Fraunces', Georgia, serif;
  --bb-font-sans:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;

  /* ── Shadows ── */
  --bb-shadow-xs: 0 1px 2px rgba(20, 23, 16, 0.05);
  --bb-shadow-sm: 0 2px 6px rgba(20, 23, 16, 0.06), 0 1px 2px rgba(20, 23, 16, 0.04);
  --bb-shadow-md: 0 8px 20px rgba(20, 23, 16, 0.08), 0 2px 4px rgba(20, 23, 16, 0.04);
  --bb-shadow-lg: 0 18px 38px rgba(20, 23, 16, 0.10), 0 4px 8px rgba(20, 23, 16, 0.05);

  /* ── Radii ── */
  --bb-radius-sm: 6px;
  --bb-radius-md: 10px;
  --bb-radius-lg: 14px;
  --bb-radius-pill: 999px;

  /* ── Motion ── */
  --bb-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --bb-dur: 220ms;
}


/* ==========================================================================
   2. GLOBAL BASE — Override Astra / WP defaults
   ========================================================================== */

body,
body.flavor-flavor {
  font-family: var(--bb-font-sans) !important;
  color: var(--bb-fg1);
  background-color: var(--bb-surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Override Astra's heading stack */
h1, h2, h3, h4, h5, h6,
.entry-title,
.page-title,
.woocommerce-products-header__title,
.ast-archive-title {
  font-family: var(--bb-font-display) !important;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--bb-fg1);
}

h1, .entry-title { font-size: clamp(32px, 5vw, 48px); }
h2 { font-size: clamp(24px, 4vw, 38px); }
h3 { font-size: clamp(20px, 3vw, 28px); }

p { color: var(--bb-fg2); line-height: 1.6; }

a { color: var(--bb-fg-link); transition: color 140ms var(--bb-ease); }
a:hover { color: var(--bb-fairway-700); }


/* ==========================================================================
   3. ASTRA THEME OVERRIDES
   ========================================================================== */

/* ── Primary header / Nav ── */
.ast-primary-header,
.main-header-bar,
.ast-primary-header-bar {
  background: rgba(252, 251, 247, 0.85) !important;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--bb-border) !important;
  box-shadow: none !important;
}

.ast-site-title-wrap .site-title a,
.site-title a {
  font-family: var(--bb-font-display) !important;
  font-weight: 600 !important;
  font-size: 22px !important;
  color: var(--bb-fg1) !important;
  letter-spacing: -0.01em;
}

.main-header-menu > .menu-item > a,
.ast-header-navigation .menu-item > a {
  font-family: var(--bb-font-sans) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  color: var(--bb-fg2) !important;
  padding: 10px 14px !important;
  border-radius: 8px;
  transition: all 160ms var(--bb-ease);
}

.main-header-menu > .menu-item > a:hover,
.main-header-menu > .current-menu-item > a,
.main-header-menu > .current-menu-ancestor > a {
  color: var(--bb-fairway-700) !important;
  background: var(--bb-fairway-50) !important;
}

/* Astra CTA / buttons in header */
.ast-header-button-1 .ast-custom-button,
.ast-header-button-2 .ast-custom-button,
.menu-item.ast-cta-button > a {
  background: var(--bb-fairway-600) !important;
  color: #fff !important;
  border-radius: var(--bb-radius-md) !important;
  font-family: var(--bb-font-sans) !important;
  font-weight: 600 !important;
  border: none !important;
  transition: all 160ms var(--bb-ease);
}

.ast-header-button-1 .ast-custom-button:hover,
.ast-header-button-2 .ast-custom-button:hover {
  background: var(--bb-fairway-700) !important;
}

/* ── Astra Footer ── */
.ast-footer,
.site-footer,
.ast-footer-overlay {
  background: var(--bb-fairway-700) !important;
  color: var(--bb-stone-200) !important;
}

.site-footer a,
.ast-footer a {
  color: var(--bb-stone-300) !important;
}

.site-footer a:hover,
.ast-footer a:hover {
  color: var(--bb-brass-300) !important;
}

.site-footer h1, .site-footer h2, .site-footer h3,
.site-footer h4, .site-footer h5, .site-footer h6,
.ast-footer h1, .ast-footer h2, .ast-footer h3,
.ast-footer h4, .ast-footer h5, .ast-footer h6 {
  color: var(--bb-brass-300) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase !important;
}


/* ==========================================================================
   4. WOOCOMMERCE OVERRIDES
   ========================================================================== */

/* ── WC Buttons ── */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
  background-color: var(--bb-fairway-600) !important;
  color: #fff !important;
  border-radius: var(--bb-radius-md) !important;
  font-family: var(--bb-font-sans) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  padding: 12px 24px !important;
  border: none !important;
  box-shadow: none !important;
  transition: all 160ms var(--bb-ease);
  text-transform: none !important;
  letter-spacing: 0 !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
  background-color: var(--bb-fairway-700) !important;
  color: #fff !important;
}

/* Outline button */
.woocommerce a.button.checkout-button,
.woocommerce .wc-proceed-to-checkout a.checkout-button {
  background: var(--bb-brass-400) !important;
  color: var(--bb-fairway-700) !important;
  font-weight: 700 !important;
}
.woocommerce a.button.checkout-button:hover {
  background: var(--bb-brass-500) !important;
}

/* ── WC Product Loop ── */
.woocommerce ul.products li.product {
  background: var(--bb-surface-raised);
  border-radius: var(--bb-radius-lg) !important;
  overflow: hidden;
  box-shadow: var(--bb-shadow-sm);
  border: 1px solid var(--bb-border);
  transition: all 220ms var(--bb-ease);
  padding: 0 !important;
  margin-bottom: 24px !important;
}

.woocommerce ul.products li.product:hover {
  transform: translateY(-3px);
  box-shadow: var(--bb-shadow-md);
}

.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail {
  border-radius: 0 !important;
  margin: 0 !important;
  transition: transform 360ms ease-out;
}

.woocommerce ul.products li.product:hover a img {
  transform: scale(1.04);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--bb-font-sans) !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  color: var(--bb-fg1) !important;
  padding: 12px 16px 0 !important;
  line-height: 1.35;
}

.woocommerce ul.products li.product .price {
  font-family: var(--bb-font-display) !important;
  font-weight: 500 !important;
  font-size: 20px !important;
  color: var(--bb-fg1) !important;
  padding: 4px 16px 12px !important;
}

/* ── WC Product single ── */
.woocommerce div.product .product_title {
  font-family: var(--bb-font-display) !important;
  font-size: 36px !important;
  font-weight: 600 !important;
  line-height: 1.15 !important;
  letter-spacing: -0.02em !important;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
  font-family: var(--bb-font-display) !important;
  font-weight: 500 !important;
  font-size: 38px !important;
  color: var(--bb-fg1) !important;
}

.woocommerce div.product .woocommerce-product-gallery .flex-viewport {
  border-radius: var(--bb-radius-lg) !important;
  overflow: hidden !important;
  box-shadow: var(--bb-shadow-md) !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  font-family: var(--bb-font-sans) !important;
  font-weight: 600 !important;
  color: var(--bb-fg3) !important;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--bb-fg1) !important;
  border-bottom-color: var(--bb-fairway-600) !important;
}

/* ── WC Sale badge ── */
.woocommerce span.onsale {
  background: var(--bb-brass-400) !important;
  color: var(--bb-fairway-700) !important;
  font-weight: 700 !important;
  border-radius: var(--bb-radius-pill) !important;
  font-size: 11px !important;
  padding: 6px 12px !important;
  min-height: auto !important;
  min-width: auto !important;
  line-height: 1.3 !important;
}

/* ── WC Notices ── */
.woocommerce-message {
  border-top-color: var(--bb-fairway-600) !important;
}

.woocommerce-message::before {
  color: var(--bb-fairway-600) !important;
}

/* ── WC Inputs ── */
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select {
  border: 1px solid var(--bb-border-soft) !important;
  border-radius: var(--bb-radius-md) !important;
  padding: 10px 14px !important;
  font-family: var(--bb-font-sans) !important;
  font-size: 14px !important;
  transition: border-color 160ms var(--bb-ease);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus {
  border-color: var(--bb-fairway-600) !important;
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12) !important;
  outline: none !important;
}


/* ==========================================================================
   5. BIDBUY PLUGIN OVERRIDES
   ========================================================================== */

/* ── Buttons global ── */
.bidbuy-btn--primary,
.bidbuy-btn--primary:hover {
  background: var(--bb-fairway-600) !important;
}
.bidbuy-btn--primary:hover {
  background: var(--bb-fairway-700) !important;
}

/* ── Dashboard ── */
/* All dashboard styles live in bidbuy-user-dashboard/assets/css/dashboard.css */

/* ── Badges ── */
.bidbuy-badge--sale {
  background: var(--bb-fairway-50) !important;
  color: var(--bb-sale) !important;
}

.bidbuy-badge--auction {
  background: #E8EFF7 !important;
  color: var(--bb-auction) !important;
}

.bidbuy-badge--exchange {
  background: #FDF0E6 !important;
  color: var(--bb-exchange) !important;
}


/* ==========================================================================
   6. CATALOG (Browse) OVERRIDES
   ========================================================================== */

.bidbuy-catalog__title {
  font-family: var(--bb-font-display) !important;
  font-size: 38px !important;
  font-weight: 600 !important;
  letter-spacing: -0.02em !important;
}

.bidbuy-catalog__filters {
  background: var(--bb-paper-2) !important;
  border-radius: var(--bb-radius-lg) !important;
  border: 1px solid var(--bb-border);
}

.bidbuy-catalog__filter-item select:focus,
.bidbuy-catalog__filter-item input:focus {
  border-color: var(--bb-fairway-600) !important;
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12) !important;
}

/* Product Cards in catalog */
.bidbuy-catalog__card {
  border-radius: var(--bb-radius-lg) !important;
  box-shadow: var(--bb-shadow-sm) !important;
  border: 1px solid var(--bb-border) !important;
  transition: all 220ms var(--bb-ease) !important;
  overflow: hidden !important;
}

.bidbuy-catalog__card:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--bb-shadow-md) !important;
}

.bidbuy-catalog__card-title {
  font-family: var(--bb-font-sans) !important;
  font-weight: 600 !important;
  color: var(--bb-fg1) !important;
}

.bidbuy-catalog__card-price {
  font-family: var(--bb-font-display) !important;
  font-weight: 500 !important;
  color: var(--bb-fg1) !important;
}

/* Card type badges in catalog */
.bidbuy-catalog__card-badge--sale {
  background: var(--bb-fairway-600) !important;
  color: #fff !important;
}

.bidbuy-catalog__card-badge--auction {
  background: var(--bb-auction) !important;
  color: #fff !important;
}

.bidbuy-catalog__card-badge--exchange {
  background: var(--bb-exchange) !important;
  color: #fff !important;
}


/* ==========================================================================
   7. LISTINGS FORM OVERRIDES
   ========================================================================== */

.bidbuy-form__section {
  border-radius: var(--bb-radius-lg) !important;
  box-shadow: var(--bb-shadow-sm) !important;
  border: 1px solid var(--bb-border) !important;
}

.bidbuy-form__section-title {
  font-family: var(--bb-font-display) !important;
  border-bottom-color: var(--bb-fairway-600) !important;
}

.bidbuy-form__field input:focus,
.bidbuy-form__field textarea:focus,
.bidbuy-form__field select:focus {
  border-color: var(--bb-fairway-600) !important;
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12) !important;
}

.bidbuy-listing-type input:checked + .bidbuy-listing-type__card {
  border-color: var(--bb-fairway-600) !important;
  background: var(--bb-fairway-50) !important;
}

.bidbuy-listing-type__icon {
  color: var(--bb-fairway-600) !important;
}

.bidbuy-listing-type__card:hover {
  border-color: var(--bb-fairway-400) !important;
}


/* ==========================================================================
   8. PLANS PAGE OVERRIDES
   ========================================================================== */

/* Section eyebrow / small label */
.bidbuy-eyebrow,
.bb-eyebrow {
  font-family: var(--bb-font-sans);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--bb-fg-accent);
}

/* Plan cards — the featured/dark one */
.bidbuy-plan-card--featured {
  background: var(--bb-fairway-700) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: var(--bb-shadow-lg) !important;
  transform: translateY(-12px);
}

.bidbuy-plan-card--featured .bidbuy-plan-card__price {
  color: #fff !important;
}

.bidbuy-plan-card--featured .bidbuy-plan-card__name {
  color: var(--bb-brass-300) !important;
}


/* ==========================================================================
   9. GLOBAL UTILITY CLASSES
   ========================================================================== */

.bb-card {
  background: var(--bb-surface-raised);
  border-radius: var(--bb-radius-lg);
  border: 1px solid var(--bb-border);
  box-shadow: var(--bb-shadow-sm);
}

.bb-btn-primary {
  background: var(--bb-fairway-600);
  color: #fff;
  border: none;
  border-radius: var(--bb-radius-md);
  font-family: var(--bb-font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 160ms var(--bb-ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bb-btn-primary:hover {
  background: var(--bb-fairway-700);
  color: #fff;
}

.bb-btn-brass {
  background: var(--bb-brass-400);
  color: var(--bb-fairway-700);
  border: none;
  border-radius: var(--bb-radius-md);
  font-family: var(--bb-font-sans);
  font-weight: 700;
  font-size: 14px;
  padding: 12px 24px;
  cursor: pointer;
  transition: all 160ms var(--bb-ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bb-btn-brass:hover {
  background: var(--bb-brass-500);
  color: var(--bb-fairway-800);
}

.bb-btn-outline {
  background: transparent;
  color: var(--bb-fg1);
  border: 1px solid var(--bb-border-strong);
  border-radius: var(--bb-radius-md);
  font-family: var(--bb-font-sans);
  font-weight: 600;
  font-size: 14px;
  padding: 11px 24px;
  cursor: pointer;
  transition: all 160ms var(--bb-ease);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.bb-btn-outline:hover {
  border-color: var(--bb-fairway-600);
  color: var(--bb-fairway-600);
}

/* ── Section spacing ── */
.bb-section {
  padding: 64px 0;
}

.bb-section-title {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
}


/* ==========================================================================
   10. RESPONSIVE
   ========================================================================== */

@media (max-width: 768px) {
  /* Dashboard responsive rules live in dashboard.css */

  .bidbuy-catalog__grid--cols-3,
  .bidbuy-catalog__grid--cols-4 {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 480px) {
  .bidbuy-catalog__grid--cols-2,
  .bidbuy-catalog__grid--cols-3,
  .bidbuy-catalog__grid--cols-4 {
    grid-template-columns: 1fr !important;
  }
}


/* ==========================================================================
   11. ANIMATION UTILITIES
   ========================================================================== */

@keyframes bb-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bb-fade-in {
  animation: bb-fade-in 360ms var(--bb-ease) both;
}


/* ==========================================================================
   12. CUSTOM NAVBAR
   ========================================================================== */

/* Hide Astra's default header completely */
.ast-primary-header,
.ast-above-header,
.ast-below-header,
.main-header-bar-wrap,
#ast-desktop-header,
.ast-mobile-header-wrap,
header.site-header {
  display: none !important;
}

/* ── Navbar Container ── */
.bb-navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(252, 251, 247, 0.85);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--bb-border);
}

.bb-navbar__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

/* ── Logo ── */
.bb-navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none !important;
  flex-shrink: 0;
}

.bb-navbar__logo-img {
  height: 36px;
  width: auto;
}

.bb-navbar__logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.bb-navbar__logo-name {
  font-family: var(--bb-font-display) !important;
  font-weight: 600;
  font-size: 20px;
  color: var(--bb-fg1) !important;
  letter-spacing: -0.01em;
}

.bb-navbar__logo-sub {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--bb-fairway-600);
  margin-top: 2px;
}

/* ── Navigation Menu ── */
.bb-navbar__nav {
  margin-left: 8px;
}

.bb-navbar__menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 2px;
}

.bb-navbar__menu > .menu-item > a {
  font-family: var(--bb-font-sans) !important;
  font-weight: 500 !important;
  font-size: 14px !important;
  color: var(--bb-fg2) !important;
  padding: 10px 14px !important;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 160ms var(--bb-ease);
  text-decoration: none !important;
  white-space: nowrap;
}

.bb-navbar__menu > .menu-item > a:hover,
.bb-navbar__menu > .current-menu-item > a,
.bb-navbar__menu > .current-menu-ancestor > a {
  color: var(--bb-fairway-700) !important;
  background: var(--bb-fairway-50) !important;
}

/* Dropdown indicator */
.bb-navbar__menu > .menu-item-has-children > a::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23767670' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") center/contain no-repeat;
  margin-left: 2px;
}

/* Dropdown menu */
.bb-navbar__menu .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  min-width: 200px;
  padding: 8px;
  background: var(--bb-surface-raised);
  border-radius: var(--bb-radius-lg);
  box-shadow: var(--bb-shadow-lg);
  border: 1px solid var(--bb-border);
  list-style: none;
  z-index: 100;
}

.bb-navbar__menu .menu-item-has-children {
  position: relative;
}

.bb-navbar__menu .menu-item-has-children:hover > .sub-menu {
  display: block;
  animation: bb-fade-in 160ms var(--bb-ease) both;
}

.bb-navbar__menu .sub-menu .menu-item a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--bb-fg1) !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: background 140ms var(--bb-ease);
}

.bb-navbar__menu .sub-menu .menu-item a:hover {
  background: var(--bb-paper-2);
}

/* ── Search ── */
.bb-navbar__search {
  flex: 1;
  max-width: 380px;
  position: relative;
}

.bb-navbar__search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--bb-stone-400);
  pointer-events: none;
}

.bb-navbar__search-input {
  width: 100%;
  height: 42px;
  padding: 0 14px 0 40px !important;
  border: 1px solid var(--bb-border-soft) !important;
  border-radius: var(--bb-radius-pill) !important;
  font-family: var(--bb-font-sans) !important;
  font-size: 14px !important;
  color: var(--bb-fg1) !important;
  background: var(--bb-surface-raised) !important;
  transition: all 160ms var(--bb-ease);
  outline: none !important;
  box-shadow: none !important;
}

.bb-navbar__search-input:focus {
  border-color: var(--bb-fairway-600) !important;
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.12) !important;
}

.bb-navbar__search-input::placeholder {
  color: var(--bb-stone-400);
}

/* Search results dropdown */
.bb-navbar__search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--bb-surface-raised);
  border-radius: var(--bb-radius-lg);
  box-shadow: var(--bb-shadow-lg);
  border: 1px solid var(--bb-border);
  overflow: hidden;
  z-index: 100;
  max-height: 400px;
  overflow-y: auto;
}

.bb-search-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  text-decoration: none !important;
  color: var(--bb-fg1) !important;
  transition: background 140ms var(--bb-ease);
}

.bb-search-item:hover {
  background: var(--bb-paper-2);
}

.bb-search-item img {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.bb-search-item .bb-search-noimg {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--bb-paper-2);
  flex-shrink: 0;
}

.bb-search-item strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.bb-search-item span {
  font-size: 12px;
  color: var(--bb-fg3);
  font-family: var(--bb-font-display);
  font-weight: 500;
}

.bb-search-empty {
  padding: 20px;
  text-align: center;
  color: var(--bb-fg3);
  font-size: 13px;
}

/* ── Action Buttons ── */
.bb-navbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.bb-navbar__icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--bb-radius-pill);
  display: grid;
  place-items: center;
  color: var(--bb-fg2);
  text-decoration: none !important;
  transition: all 160ms var(--bb-ease);
  position: relative;
}

.bb-navbar__icon-btn:hover {
  background: var(--bb-paper-2);
  color: var(--bb-fg1);
}

/* Notification dot */
.bb-navbar__notif-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: var(--bb-danger);
  border-radius: 999px;
  border: 2px solid var(--bb-surface);
}

/* Publish button */
.bb-navbar__publish-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  background: var(--bb-fairway-600) !important;
  color: #fff !important;
  font-family: var(--bb-font-sans) !important;
  font-weight: 600 !important;
  font-size: 13px !important;
  border-radius: var(--bb-radius-pill) !important;
  text-decoration: none !important;
  transition: all 160ms var(--bb-ease);
  white-space: nowrap;
}

.bb-navbar__publish-btn:hover {
  background: var(--bb-fairway-700) !important;
  color: #fff !important;
}

.bb-navbar__publish-btn svg {
  stroke: #fff;
}

/* Avatar */
.bb-navbar__avatar {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--bb-fairway-600);
  color: #fff !important;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  font-family: var(--bb-font-sans);
  cursor: pointer;
  text-decoration: none !important;
  transition: all 160ms var(--bb-ease);
  flex-shrink: 0;
}

.bb-navbar__avatar:hover {
  background: var(--bb-fairway-700);
  box-shadow: 0 0 0 3px rgba(27, 67, 50, 0.18);
}

/* ── Admin bar offset ── */
.admin-bar .bb-navbar {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .bb-navbar {
    top: 46px;
  }
}

/* ── Mobile Navbar ── */
@media (max-width: 920px) {
  .bb-navbar__inner {
    gap: 12px;
    padding: 0 16px;
  }

  .bb-navbar__nav {
    display: none;
  }

  .bb-navbar__search {
    max-width: none;
  }

  .bb-navbar__logo-text {
    display: none;
  }
}

@media (max-width: 600px) {
  .bb-navbar__inner {
    height: 60px;
  }

  .bb-navbar__search {
    flex: 1;
  }

  .bb-navbar__icon-btn {
    width: 36px;
    height: 36px;
  }

  .bb-navbar__publish-btn span {
    display: none;
  }
}
