/* === COLOR VARIABLES === */
:root {
  --main-color: #0E435E;
  --secondary-color: #F6A01A;
  --background-alt: #CCCCCC;
  --text-light: #FFFFFF;
  --text-dark: #3E3E3E;
  --user-nav-color: #3E3E3E;
  --user-nav-hover: #F6A01A;
}

/* === HEADER STYLING === */
h1, h2, h3, h4, h5, h6 {
  color: var(--main-color);
}

/* === NAVIGATION MENU === */
.nav-menu {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: nowrap;
}

.nav-menu li {
  position: relative;
  display: flex;
  align-items: center;
}

.nav-menu li a,
.nav-menu li #header-menu-container a,
.nav-menu li #cart button {
  padding: 5px 10px;
  color: var(--user-nav-color);
  text-decoration: none;
  font-size: 14px;
  background: none;
  border: none;
}

.nav-menu li a:hover,
.nav-menu li #header-menu-container a:hover,
.nav-menu li #cart button:hover {
  color: var(--user-nav-hover);
}

.nav-menu li:not(:last-child)::after {
  content: "|";
  position: absolute;
  right: -0.6rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--user-nav-color);
}

#header-menu-container,
#cart {
  display: flex;
  align-items: center;
}

/* === RESPONSIVE NAVIGATION === */
@media (max-width: 768px) {
  .nav-menu {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: nowrap;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu li:not(:last-child)::after {
    content: none;
  }

  #nav-login-cart-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* === SEARCH FORM CONTAINER === */
.search-form-container {
  background-color: #CCCCCC !important;
  padding: 20px;
  color: var(--text-dark);
  width: 100%;
}

/* === SEARCH FORM LAYOUT === */
.search-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* SEARCH INPUT AND ICON */
.search-box-wrapper {
  position: relative;
  flex: 1;
  min-width: 250px;
  display: flex;
}

.search-form .search-box {
  width: 100%;
  background-color: var(--text-light);
  color: var(--main-color);
  border-radius: 4px;
  height: 44px;
  border: 1px solid var(--main-color);
  padding-right: 40px;
}

.search-form .search-submit {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--secondary-color);
  cursor: pointer;
  padding: 0;
}

/* FILTER BUTTONS SECTION */
.search-form__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

/* HIDE REFINE DROPDOWN */
#search-refine-button--refine {
  display: none !important;
}

/* === RESPONSIVE: STACK SEARCH FORM ON SMALL SCREENS === */
@media (max-width: 500px) {
  .search-form {
    flex-direction: column;
    align-items: stretch;
  }

  .search-form__actions {
    justify-content: flex-end;
    width: 100%;
  }
}

/* Ensure the listings background is white */
#main.product-results,
#main.product-results .container,
#main.product-results .row {
  background-color: #ffffff !important;
}

/* Program Icon - gold */
.icon.icon-program {
  background-color: #88a2aa;
  color: #ffffff;
  padding: 10px;
  border-radius: 5px;
}

/* Course Icon - navy */
.icon.icon-course {
  background-color: #0e435e;
  padding: 10px;
  border-radius: 5px;
  color: var(--text-light);
}

/* === CUSTOM HEADING AND SUBTEXT STYLES === */
.browse-heading {
  font-size: 1.75rem;
  margin-top: 2rem;
  color: var(--main-color);
}

.browse-subtext {
  font-size: 1rem;
  color: var(--text-dark);
  margin-top: 0.25rem;
}

.browse-block {
  padding-left: 0;
  padding-right: 0;
}

/* Change the triangle flag color */
.product-tile .jqFlag {
  border-top-color: #f6a01a !important;
}

/* Change the "Free" banner background and text */
.product-tile .product-flag-free {
  background-color: #f6a01a !important;
  color: #ffffff !important; /* Keep the text white for contrast */
}

/* Keep background the same, change text and icon to main color on hover */
#search-refine-button--categories:hover {
  color: var(--main-color) !important;
}

#search-refine-button--categories:hover .icon {
  color: var(--main-color) !important;
}

.clear-search-btn {
  position: absolute;
  right: 50px; /* Moved left to avoid overlap with search icon */
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 20px;
  color: var(--main-color);
  cursor: pointer;
  display: none; /* Start hidden */
  padding: 0;
  line-height: 1;
}

/* === FIX: CATEGORY DROPDOWN TEXT COLOR ACCESSIBILITY === */
#search-refine-button--categories .search-refine-button__text {
  color: var(--main-color) !important;
}

#search-refine-button--categories:focus .search-refine-button__text,
#search-refine-button--categories[aria-pressed="true"] .search-refine-button__text,
#search-refine-button--categories[aria-expanded="true"] .search-refine-button__text {
  color: var(--main-color) !important;
}

#search-refine-button--categories .icon {
  color: var(--main-color) !important;
}

/* === CATEGORY HOVER STYLING === */
#search-refine-button--categories:hover {
  background-color: #b6465f !important;
  color: var(--text-light) !important;
}

#search-refine-button--categories:hover .search-refine-button__text,
#search-refine-button--categories:hover .icon {
  color: var(--text-light) !important;
}

.browse-block {
  width: 100%;
  flex-basis: 100%;
  flex-grow: 1;
  display: block;
}
