/* ============================================= */

/* COMPLETE HEADER STYLES - EXPANDED SEARCH VERSION */

/* ============================================= */

/* Base Header Container */

.site-header {
  background-color: white;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);

  position: sticky;

  padding-top: 0.7rem;

  top: 0;

  z-index: 1000;
}

.navbar {
  padding: 0.7rem 0;

  display: flex;

  align-items: center;

  flex-wrap: wrap;
}

/* Logo Styles with Right Spacing */

.navbar-brand {
  margin-right: 2.5rem; /* Increased gap after logo */

  min-width: 120px; /* Prevents logo from shrinking */

  display: flex;

  align-items: center;
}

.navbar-brand img {
  height: 52px;

  width: auto;

  transition: all 0.3s ease;
}

/* Expanded Search Bar - Center Stage */

.product-search-form {
  flex: 1 1 auto; /* Takes all available space */

  min-width: 200px; /* Minimum search width */

  max-width: 800px; /* Maximum search width */

  margin: 0 1.5rem; /* Balanced horizontal spacing */
}

.search-form {
  width: 100%;

  display: flex;
}

.search-input,
.product-search-form .form-control {
  flex: 1;

  border-radius: 25px 0 0 25px !important;

  border: 1px solid #ddd;

  border-right: none;

  height: 44px;

  padding: 10px 22px;

  font-size: 1rem;

  transition: all 0.3s ease;
}

.search-input:focus,
.product-search-form .form-control:focus {
  outline: none;

  box-shadow: 0 0 0 3px rgba(34, 84, 137, 0.2);

  border-color: #d72a2d;
}

.search-btn,
.product-search-form .btn {
  border-radius: 0 25px 25px 0 !important;

  padding: 0 25px;

  background: #d72a2d;

  border: 1px solid #d72a2d;

  height: 44px;

  color: white;

  font-weight: 500;

  transition: all 0.3s ease;
}

.search-btn:hover,
.product-search-form .btn:hover {
  background: #1a436b;

  border-color: #1a436b;
}

.search-btn i {
  font-size: 18px;
}

/* Navigation Menu */

.navbar-nav {
  display: flex;

  margin-left: 2rem; /* Space before menu starts */

  white-space: nowrap;

  align-items: center;
}

.navbar-nav .menu-item,
.navbar-nav .nav-item {
  padding: 0 0.7rem;

  position: relative;
}

.navbar-nav .menu-item a,
.navbar-nav .nav-link {
  color: #333;

  font-weight: 500;

  padding: 10px 15px;

  border-radius: 6px;

  transition: all 0.3s ease;

  display: block;

  text-decoration: none;
}

.navbar-nav .menu-item.current-menu-item a,
.navbar-nav .menu-item.current_page_item a,
.navbar-nav .menu-item.current-menu-ancestor a,
.navbar-nav .menu-item.current-menu-parent a,
.navbar-nav .current-menu-item .nav-link {
  background-color: #d72a2d;

  color: white !important;
}

.navbar-nav .menu-item a:hover,
.navbar-nav .nav-link:hover {
  background-color: white;

  color: #d72a2d !important;
}

/* Secondary Menu Styles */

.secondary-menu {
  padding: 10px 0;
}

.secondary-menu a {
  padding: 10px 15px;

  transition: all 0.3s ease;

  display: block;
}

.secondary-menu a:hover {
  background-color: white;

  color: #d72a2d !important;
}

/* Header Action Buttons */

.header-actions {
  margin-left: 1.5rem; /* Space between nav and actions */

  display: flex;

  gap: 1rem;

  align-items: center;
}

.header-actions .btn,
.account-toggler.btn-outline-secondary,
.cart-toggler.btn-outline-secondary {
  padding: 0.6rem 1rem;

  min-width: 44px;

  height: 44px;

  display: flex;

  align-items: center;

  justify-content: center;

  transition: all 0.3s ease;

  border-radius: 6px;

  font-weight: 500;
}

.account-toggler.btn-outline-secondary,
.cart-toggler.btn-outline-secondary {
  border: 1px solid #d72a2d;

  color: #d72a2d;

  background: transparent;
}

.account-toggler.btn-outline-secondary:hover,
.cart-toggler.btn-outline-secondary:hover {
  background-color: #d72a2d;

  color: white;

  border-color: #d72a2d;
}

/* Navbar Toggler */

.navbar-toggler {
  border: 1px solid #d72a2d;

  border-radius: 6px;

  padding: 0.6rem;

  transition: all 0.3s ease;

  display: flex;

  align-items: center;

  justify-content: center;

  background: transparent;
}

.navbar-toggler:focus {
  outline: none;

  box-shadow: 0 0 0 3px rgba(34, 84, 137, 0.3);
}

.navbar-toggler-icon {
  width: 1.5em;

  height: 1.5em;
}

/* ============================================= */

/* RESPONSIVE ADJUSTMENTS */

/* ============================================= */

@media (max-width: 1199.98px) {
  .navbar-brand {
    margin-right: 1.5rem;
  }

  .product-search-form {
    margin: 0 1rem;
  }

  .navbar-nav {
    margin-left: 1rem;
  }
}

@media (max-width: 991.98px) {
  .navbar {
    padding: 0.5rem 0;
  }

  .navbar-brand {
    margin-right: auto;

    min-width: auto;
  }

  .product-search-form {
    order: 3;

    width: 100%;

    max-width: 100%;

    margin: 1rem 0;

    padding: 0 15px;

    display: none;

    flex: 0 0 100%;
  }

  .search-visible .product-search-form {
    display: flex;
  }

  .navbar-nav {
    margin-left: 0;

    width: 100%;

    flex-direction: column;

    align-items: flex-start;
  }

  .navbar-nav .menu-item,
  .navbar-nav .nav-item {
    width: 100%;

    padding: 0;
  }

  .navbar-nav .menu-item a,
  .navbar-nav .nav-link {
    padding: 12px 15px;

    width: 100%;
  }

  .header-actions {
    margin-left: auto;

    gap: 0.75rem;
  }

  .secondary-menu {
    width: 100%;

    padding: 0;
  }
}

@media (max-width: 767.98px) {
  .navbar-brand img {
    height: 31px;
  }

  .search-input,
  .product-search-form .form-control {
    height: 40px;

    padding: 8px 18px;
  }

  .search-btn,
  .product-search-form .btn {
    height: 40px;

    padding: 0 18px;
  }

  .header-actions .btn,
  .account-toggler.btn-outline-secondary,
  .cart-toggler.btn-outline-secondary {
    padding: 0.5rem;

    min-width: 40px;

    height: 40px;
  }

  .navbar-toggler {
    padding: 0.5rem;
  }
}

@media (max-width: 575.98px) {
  .navbar-brand {
    margin-right: 0.5rem;
  }

  .header-actions {
    gap: 0.5rem;
  }

  .search-input,
  .product-search-form .form-control {
    padding: 8px 15px;
  }
}
