/* =============================================
   Desguaces BCN Latorre — Modern Menu Redesign
   ============================================= */

/* --- Sticky Header --- */
.bhfb-header {
  position: sticky !important;
  top: 0;
  z-index: 999;
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

.bhfb-header.scrolled {
  background: rgba(255, 255, 255, 0.98) !important;
  box-shadow: 0 2px 24px rgba(0, 0, 0, 0.08);
}

/* Remove site title (duplicate of logo) */
.site-title { display: none !important; }

/* --- Restructure header layout --- */
.bhfb-main_header_row .bhfb-row {
  display: flex !important;
  align-items: center !important;
}

.bhfb-main_header_row .bhfb-column-2 {
  order: 1;
  flex: 0 0 auto;
  padding-right: 32px;
}

.bhfb-main_header_row .bhfb-column-1 {
  order: 2;
  flex: 1 1 auto;
}

.bhfb-main_header_row .bhfb-column-3 {
  order: 3;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

/* --- Logo --- */
.custom-logo {
  max-height: 42px;
  width: auto;
  transition: max-height 0.3s ease;
}

.scrolled .custom-logo {
  max-height: 36px;
}

/* --- Menu Items --- */
#primary-menu {
  display: flex;
  align-items: center;
  gap: 2px;
}

#primary-menu > li {
  margin: 0;
}

#primary-menu > li > a {
  position: relative;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 18px !important;
  color: #212121 !important;
  border-radius: 6px;
  transition: color 0.2s ease, background 0.2s ease;
}

#primary-menu > li > a:hover {
  color: #D4521E !important;
  background: rgba(212, 82, 30, 0.06);
}

#primary-menu > li.current-menu-item > a,
#primary-menu > li.current_page_item > a {
  color: #212121 !important;
  background: rgba(212, 82, 30, 0.08);
}

#primary-menu > li.current-menu-item > a::after,
#primary-menu > li.current_page_item > a::after {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 4px;
  height: 2.5px;
  background: #D4521E;
  border-radius: 2px;
}

/* --- Icons (search, account, cart) --- */
.bhfb-component-search a,
.bhfb-component-woo_icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #666 !important;
  transition: all 0.2s ease;
}

.bhfb-component-search a:hover,
.bhfb-component-woo_icons a:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #212121 !important;
}

.bhfb-component-search svg,
.bhfb-component-woo_icons svg {
  width: 19px;
  height: 19px;
}

/* --- Cart Badge --- */
.site-header-cart .cart-count .count-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #D4521E;
  color: #FFFFFF;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  padding: 0 5px;
  line-height: 1;
  margin-left: 1px;
}

/* --- Phone Pill --- */
.header-phone-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #FFFFFF;
  background: #D4521E;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-right: 6px;
  white-space: nowrap;
}

.header-phone-pill:hover {
  background: #B8451A;
  color: #FFFFFF;
}

.header-phone-pill svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  flex-shrink: 0;
}

/* --- Search form (when open) --- */
.header-search-form-row {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-search-form-row .search-field {
  background: rgba(0, 0, 0, 0.04);
  border: 1px solid rgba(0, 0, 0, 0.1);
  color: #212121;
  border-radius: 100px;
  padding: 10px 18px;
}

.header-search-form-row .search-field::placeholder {
  color: rgba(0, 0, 0, 0.3);
}

.header-search-form-row .search-submit {
  color: #D4521E;
}

/* --- Mobile --- */
@media (max-width: 767px) {
  .bhfb-header.bhfb-mobile .bhfb-main_header_row .bhfb-row {
    min-height: 52px;
    padding: 0 4px;
  }

  .custom-logo {
    max-height: 30px;
  }

  #primary-menu {
    flex-direction: column;
    gap: 0;
  }

  #primary-menu > li > a {
    padding: 14px 20px !important;
    border-radius: 8px;
    font-size: 1rem;
  }

  .header-phone-pill {
    display: none !important;
  }

  .bhfb-component-search a,
  .bhfb-component-woo_icons a {
    width: 34px;
    height: 34px;
    color: #666 !important;
  }

  .bhfb-component-search svg,
  .bhfb-component-woo_icons svg {
    width: 17px;
    height: 17px;
  }

  .botiga-mobile-toggle {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: #666;
    cursor: pointer;
    transition: background 0.2s;
  }

  .botiga-mobile-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
  }

  .botiga-mobile-toggle svg {
    width: 22px;
    height: 22px;
  }

  .main-navigation.toggled #primary-menu {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 8px;
    margin-top: 8px;
  }
}
