/* =========================================================
   BUSH BAGS - HEADER STYLESHEET
   File: css/header.css (or your existing header stylesheet)
   ========================================================= */

/* ---------------------------------------------------------
   1. HEADER BASE AND CONTAINER
   --------------------------------------------------------- */

.bb-site-header {
  position: relative;
  z-index: 100;
  background: var(--bb-white, #fff);
}

.bb-header-container {
  width: min(var(--bb-container, 1200px), calc(100% - 48px));
  margin-inline: auto;
}

/* ---------------------------------------------------------
   2. TOP INFORMATION BAR
   --------------------------------------------------------- */

.bb-topbar {
  background: var(--bb-black, #000);
  color: var(--bb-white, #fff);
}

.bb-topbar-inner {
  min-height: 62px;
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  align-items: center;
  gap: 20px;
}

.bb-topbar-phones,
.bb-topbar-emails {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.bb-topbar-phones a,
.bb-topbar-emails a {
  color: #999;
  text-decoration: none;
}

.bb-topbar-emails {
  text-align: right;
}

.bb-delivery-message {
  margin: 0;
  text-align: center;
}

/* ---------------------------------------------------------
   3. MAIN HEADER LAYOUT
   --------------------------------------------------------- */

.bb-main-header {
  background: var(--bb-white, #fff);
}

.bb-main-inner {
  min-height: 148px;
  display: grid;
  grid-template-columns: 165px minmax(0, 1fr);
  align-items: center;
  gap: 35px;
  padding-block: 16px;
}

.bb-brand {
  display: flex;
  align-items: center;
}

.bb-brand .custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.bb-brand .custom-logo {
   display: block;
    width: auto;
    max-width: 165px;
    max-height: 100px;
    height: auto;
    object-fit: contain;
}

.bb-site-title {
  color: var(--bb-orange, #b84f26);
  font-size: 28px;
  font-weight: 800;
  text-decoration: none;
}

.bb-header-content {
  min-width: 0;
}

.bb-header-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 22px;
  margin-bottom: 15px;
}

/* ---------------------------------------------------------
   4. PRODUCT SEARCH
   --------------------------------------------------------- */

.bb-search {
  position: relative;
  display: flex;
  align-items: center;
  width: 210px;
  height: 36px;
  border: 1px solid var(--bb-black, #000);
  border-radius: 9px;
  overflow: hidden;
}

.bb-search input[type="search"] {
  width: 100%;
  min-width: 0;
  height: 100%;
  padding: 0 40px 0 18px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 12px;
}

.bb-search button {
  position: absolute;
  top: 50%;
  right: 7px;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  padding: 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.bb-search button svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: var(--bb-orange, #b84f26);
  stroke-width: 2;
}

/* ---------------------------------------------------------
   5. HEADER ACTION ICONS
   Shared styling for chat, WhatsApp and wishlist buttons
   --------------------------------------------------------- */

.bb-header-tools .bb-tool,
.bb-header-tools .bb-wishlist {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 9px;
  border: 0;
  border-radius: 50%;
  background: var(--bb-orange, #b84f26);
  color: var(--bb-white, #fff);
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.bb-header-tools .bb-tool:hover,
.bb-header-tools .bb-wishlist:hover {
  background: var(--bb-olive, #62624b);
  color: var(--bb-white, #fff);
}

.bb-header-tools .bb-tool:focus-visible,
.bb-header-tools .bb-wishlist:focus-visible {
  outline: 2px solid var(--bb-black, #000);
  outline-offset: 3px;
}

/* Placeholder chat icon, if still used in the header */
.bb-chat {
  color: var(--bb-white, #fff);
  background: var(--bb-orange, #b84f26);
}

.bb-chat span {
  font-size: 16px;
  line-height: 1;
}

/* WhatsApp link and icon */
.bb-header-tools .bb-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.bb-header-tools .bb-whatsapp svg,
.bb-header-tools .bb-wishlist svg {
  display: block;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Account link */
.bb-account {
  white-space: nowrap;
  color: var(--bb-orange, #b84f26);
  text-decoration: none;
}

.bb-account:hover {
  color: var(--bb-olive, #62624b);
}

.bb-account span {
  padding-left: 3px;
}

/* Cart */
.bb-cart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--bb-black, #000);
  text-decoration: none;
}

.bb-cart:hover {
  color: var(--bb-orange, #b84f26);
}

.bb-cart svg {
  display: block;
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bb-cart-total {
  min-width: 56px;
  padding: 2px 8px;
  border-radius: 12px;
  background: var(--bb-orange, #b84f26);
  color: var(--bb-white, #fff);
  text-align: center;
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

/* ---------------------------------------------------------
   6. PRIMARY NAVIGATION
   --------------------------------------------------------- */

.bb-navigation {
  display: block;
}

.bb-menu {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 30px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bb-menu > li {
  position: relative;
}

.bb-menu a {
  display: block;
  padding: 5px 0;
  color: var(--bb-black, #000);
  font-weight: 600;
  text-decoration: none;
    font-size:18px;
}

.bb-menu a:hover,
.bb-menu .current-menu-item > a {
  color: var(--bb-orange, #b84f26);
}

/* Dropdown menus */
.bb-menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 20;
  display: none;
  min-width: 200px;
  margin: 0;
  padding: 10px 16px;
  background: var(--bb-white, #fff);
  box-shadow: 0 5px 18px rgb(0 0 0 / 12%);
  list-style: none;
}

.bb-menu li:hover > .sub-menu,
.bb-menu li:focus-within > .sub-menu {
  display: block;
}

.bb-menu .sub-menu a {
  padding: 9px 0;
}

/* Mobile menu toggle is hidden until the mobile breakpoint */
.bb-mobile-toggle {
  display: none;
}

/* ---------------------------------------------------------
   7. ACCESSIBILITY
   --------------------------------------------------------- */

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------
   8. TABLET LAYOUT
   --------------------------------------------------------- */

@media (max-width: 1050px) {
  .bb-header-container {
    width: calc(100% - 32px);
  }

  .bb-main-inner {
    grid-template-columns: 125px minmax(0, 1fr);
    gap: 20px;
  }

  .bb-brand .custom-logo {
    max-width: 125px;
  }

  .bb-header-tools {
    gap: 13px;
  }

  .bb-menu {
    gap: 12px;
  }

  .bb-search {
    width: 175px;
  }
}

/* ---------------------------------------------------------
   9. MOBILE LAYOUT
   --------------------------------------------------------- */

@media (max-width: 767px) {
  .bb-header-container {
    width: calc(100% - 28px);
  }

  /* Top bar */
  .bb-topbar-inner {
    min-height: 46px;
    display: flex;
    justify-content: center;
  }

  .bb-topbar-phones,
  .bb-topbar-emails {
    display: none;
  }

  /* Main header */
  .bb-main-inner {
    min-height: 85px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding-block: 12px;
  }

  .bb-brand .custom-logo {
    max-width: 115px;
      height: auto;
  }

  .bb-header-content {
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  .bb-header-tools {
    gap: 12px;
    margin: 0;
  }

  /* Search is hidden on mobile */
  .bb-search {
    display: none;
  }

  /* Keep these desktop-only items hidden on mobile */
  .bb-chat,
  .bb-account {
    display: none;
  }

  /* Consistent compact WhatsApp and wishlist buttons */
  .bb-header-tools .bb-tool,
  .bb-header-tools .bb-wishlist {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    padding: 7px;
  }

  .bb-header-tools .bb-whatsapp svg,
  .bb-header-tools .bb-wishlist svg {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
  }

  .bb-cart svg {
    width: 29px;
    height: 29px;
  }

  /* Mobile menu toggle */
  .bb-mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    padding: 5px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .bb-mobile-toggle > span:not(.screen-reader-text) {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--bb-black, #000);
  }

  /* Mobile navigation panel */
  .bb-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    padding: 12px 20px 20px;
    background: var(--bb-white, #fff);
    box-shadow: 0 8px 15px rgb(0 0 0 / 10%);
  }

  .bb-navigation.is-open {
    display: block;
  }

  .bb-menu {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  .bb-menu > li {
    border-bottom: 1px solid #eee;
  }

  .bb-menu a {
    padding: 13px 0;
  }

  .bb-menu .sub-menu {
    position: static;
    display: block;
    padding: 0 0 8px 16px;
    box-shadow: none;
  }
}

/* MOBILE HEADER HEIGHT FIX */
@media (max-width: 767px) {

    .bb-main-header {
        padding: 0 !important;
        margin: 0 !important;
        min-height: 0 !important;
    }

    .bb-main-inner {
        min-height: 85px !important;
        height: auto !important;
        padding: 12px 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        align-items: center !important;
    }

    .bb-brand {
        margin: 0 !important;
        padding: 0 !important;
    }

    .bb-brand .custom-logo-link {
        display: flex;
        align-items: center;
    }

    .bb-header-content {
        margin: 0 !important;
        padding: 0 !important;
    }

}