/* Sticky Top Navigation Bar (FAQ, Help, Phone, etc.) */
.top-nav {
  position: sticky !important;
  top: 0 !important;
  z-index: 101 !important;
  background-color: white !important;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
  font-size: 13px;
}

/* Global site header (logo + title) */
header {
  background-color: #004080;
  color: #ffffff;
  padding: 25px 20px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 15px;
  justify-content: flex-start;
  padding-left: 20px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  text-decoration: none;
  color: inherit;
}

.site-logo {
  height: 75px;
  width: auto;
}

.site-brand-text h1 {
  font-size: 28px;
  margin: 0 0 5px 0;
}

.site-brand-text p {
  font-size: 16px;
  margin: 0;
  opacity: 0.9;
}

/* Product detail pages */
body .product-detail {
  max-width: 1100px;
  margin: 30px auto 60px;
  padding: 24px 24px 32px;
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body .product-detail h2 {
  margin-top: 10px;
  margin-bottom: 10px;
  font-size: 26px;
  color: #004080;
}

body .product-detail .gallery {
  margin: 20px 0;
  justify-content: center;
}

body .product-detail .price {
  margin-top: 10px;
  margin-bottom: 6px;
  font-size: 24px;
  color: #0066cc;
}

body .product-detail .availability {
  margin-top: 4px;
}

.top-nav-left {
  display: flex;
  gap: 15px;
}

.top-nav-left a {
  color: #333;
  text-decoration: none;
  font-weight: 600;
}

.top-nav-left a:hover {
  color: #004080;
}

.top-nav-right {
  display: flex;
  gap: 15px;
  align-items: center;
}

.top-nav-right a,
.top-nav-right select {
  transition: all 0.3s;
  white-space: nowrap;
  color: #004080;
  border: 1px solid #004080;
  padding: 6px 12px;
  border-radius: 4px;
  background-color: white;
  font-weight: 600;
  cursor: pointer;
  font-size: 13px;
}

.top-nav-right a:hover,
.top-nav-right select:hover {
  background-color: #f0f0f0;
}

.top-nav-right a:last-of-type {
  background-color: #004080;
  color: white;
}

.top-nav-right a:last-of-type:hover {
  background-color: #003060;
}

/* Top-nav cart link and badge */
.top-nav-cart {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-nav-cart .cart-icon {
  font-size: 16px;
}

.cart-badge {
  display: inline-block;
  background-color: #e74c3c;
  color: #ffffff;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  text-align: center;
  line-height: 22px;
  font-size: 12px;
  font-weight: bold;
  margin-left: 2px;
}

/* Account dropdown */
.account-dropdown {
  position: relative;
  display: inline-block;
}

.account-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.3s;
  color: #004080;
  border: 1px solid #004080;
  padding: 6px 12px;
  border-radius: 4px;
  background-color: white;
  font-weight: 600;
  font-size: 13px;
}

.account-btn:hover {
  background-color: #f0f0f0;
}

.account-icon {
  font-size: 16px;
}

/* Logged-in account avatar + name in top nav */
.account-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.account-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 5px;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 6px;
  z-index: 1000;
  overflow: hidden;
}

.account-dropdown.open .account-menu {
  display: block;
}

.account-menu a {
  display: block;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  border: none;
  background-color: white;
  transition: background-color 0.2s;
}

.account-menu a:hover {
  background-color: #f5f5f5;
}

/* Sticky Main Navigation */
nav {
  position: sticky !important;
  top: 45px !important;
  z-index: 100 !important;
}

/* Shared nav styles for categories dropdown and search results */
.nav-search {
  position: relative;
}
.nav-search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}
.nav-search-input-wrapper input[type="text"] {
  padding: 10px 36px 10px 14px;
  border: none;
  border-radius: 25px;
  width: 280px;
  font-size: 14px;
  background-color: rgba(255,255,255,0.9);
  color: #004080;
}
.nav-search-input-wrapper input[type="text"]:focus {
  outline: none;
  box-shadow: 0 0 8px rgba(255,255,255,0.6);
}
.clear-search-btn {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  display: none;
}
.clear-search-btn:hover {
  color: #004080;
}
.nav-search-button {
  background-color: white;
  color: #004080;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 25px;
  font-weight: bold;
  transition: 0.3s;
  font-size: 14px;
}
.nav-search-button:hover {
  background-color: #e6f0ff;
  transform: scale(1.05);
}
.search-results {
  position: absolute;
  top: 44px;
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
  max-height: 280px;
  overflow-y: auto;
  display: none;
  z-index: 250;
  user-select: none;
  -webkit-user-select: none;
}
.search-results a,
.search-results .search-recent-item {
  display: block;
  padding: 10px 14px;
  color: #1f2d3d !important;
  text-decoration: none !important;
  border-bottom: none !important;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
}
.search-results a:hover,
.search-results .search-recent-item:hover,
.search-results .search-result-active {
  background: #f2f6ff;
  color: #004080 !important;
  border-bottom: none !important;
}
.search-results .search-empty,
.search-results .search-recent-header {
  padding: 12px 14px;
  color: #666;
  font-size: 14px;
}
.search-results .search-recent-header {
  font-weight: 600;
  border-bottom: 1px solid #eee;
}
.search-results .search-loading {
  padding: 10px 14px;
  font-size: 13px;
  color: #777;
}
@media (max-width: 768px) {
  /* Stack main nav content on smaller screens */
  nav {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px 16px !important;
    row-gap: 10px;
  }

  nav > div {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  #groupedCategoryLinks {
    margin-top: 8px;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .nav-search {
    flex: 1 1 100%;
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .nav-search-input-wrapper {
    flex: 1 1 100%;
  }

  .nav-search-input-wrapper input[type="text"],
  nav .nav-search input[type="text"] {
    width: 100%;
  }

  .nav-search-button {
    white-space: nowrap;
  }

  /* Make the thin top bar wrap nicely too */
  .top-nav {
    flex-wrap: wrap;
    row-gap: 8px;
  }

  .top-nav-right {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
}
.all-categories-btn {
  background-color: #0057b8;
  color: #ffffff !important;
  padding: 10px 18px;
  border-radius: 6px;
  font-weight: 700;
  border: 1px solid #0b4a8b;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  white-space: nowrap;
  font-size: 15px;
}
.all-categories-btn:hover {
  background-color: #0b4a8b;
  color: #ffffff !important;
}
.all-categories-btn::after {
  display: none;
}

/* Category Group Links (displayed in nav bar) */
.category-group-link {
  color: white !important;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 4px;
  transition: all 0.3s;
  border-bottom: 3px solid transparent;
  display: inline-block;
}

.category-group-link:hover {
  color: #e6f0ff !important;
  border-bottom: 3px solid white;
  background-color: rgba(255, 255, 255, 0.1);
}

.category-dropdown {
  position: relative;
}

.category-dropdown .category-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 260px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
  display: none;
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
}

.category-dropdown.open .category-menu {
  display: block;
}
.category-menu a {
  display: block;
  padding: 10px 16px;
  color: #1f2d3d;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
}
.category-menu a:hover {
  background: #f2f6ff;
  color: #004080 !important; /* keep strong contrast inside dropdown */
  border-bottom: none !important; /* avoid inherited nav underline */
}

/* Grouped Categories Styles */
.category-group {
  border-bottom: 1px solid #f0f0f0;
}

.category-group:last-child {
  border-bottom: none;
}

.category-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  color: #004080;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  background-color: #f8f9fa;
  transition: background-color 0.2s;
}

.category-group-header:hover {
  background-color: #e9ecef;
}

.category-arrow {
  font-size: 10px;
  color: #666;
  transition: transform 0.2s;
}

.category-group-items {
  display: none;
  background-color: #ffffff;
}

.category-group-items a {
  display: block;
  padding: 10px 16px 10px 30px;
  color: #1f2d3d;
  text-decoration: none;
  font-weight: 500;
  font-size: 13px;
  transition: all 0.2s;
  border-left: 3px solid transparent;
}

.category-group-items a:hover {
  background: #f2f6ff;
  color: #004080;
  border-left-color: #004080;
  padding-left: 32px;
}
/* Breadcrumbs Styling */
.breadcrumbs {
  background-color: #f8f9fa;
  padding: 12px 30px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 14px;
}

.breadcrumbs-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.breadcrumbs a {
  color: #0066cc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: #004080;
  text-decoration: underline;
}

.breadcrumbs .separator {
  color: #666;
  margin: 0 4px;
  user-select: none;
}

.breadcrumbs .current {
  color: #333;
  font-weight: 600;
}

/* Product gallery images: show full image without cropping */
.gallery img {
  height: 260px !important;
  object-fit: contain !important;
  background-color: #fff !important;
}