.navbar,
.navbar * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.navbar button:hover,
.navbar button:focus,
.navbar button:focus-visible,
.navbar button:active {
    outline: none;
    box-shadow: none;
    background: transparent;
}

html body .navbar {
    --color-primary-cta: #c52d1d;
    --color-primary-cta-hover: color-mix(in srgb, var(--color-primary-cta) 76%, black);
    --text-dark: #1f1f1f;
    --border-gray: #d1d5db;
    --background-color: #ffffff;
    width: 100%;
    height: 65px;
    background-color: var(--background-color);
    border-bottom: 1px solid #ebebeb;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0;
    
}

html body .navbar a {
    text-decoration: none;
}

body.admin-bar .navbar {
    top: 32px;
}

html body {
    padding-top: 65px;
}

/* --- Increased Max-Width to expand the content layout --- */
.nav-container {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    height: 100%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    position: relative;
    background-color: #ffffff;
    z-index: 1002;
}

/* ========================================================
   CONTAINER 1: LOGO
   ======================================================== */
.container-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 14px;
}

.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    align-items: center;
    justify-content: center;
}

.hamburger-btn svg {
    width: 30px;
    height: 30px;
    fill: #1f1f1f;
    display: block;
}

.hamburger-btn .icon-close {
    display: none;
}

.hamburger-btn.active .icon-hamburger {
    display: none;
}

.hamburger-btn.active .icon-close {
    display: block;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.brand-logo-desktop {
    height: 30px !important;
    width: auto;
    display: block;
}

.brand-logo-mobile,
.brand-logo-mobile-400 {
    display: none;
    width: auto;
}

.brand-logo-mobile {
    height: 25px !important;
}

/* ========================================================
   CONTAINER 2: MENU LINKS
   ======================================================== */
.container-menu {
    height: 100%;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.menu-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 38px;
    height: 100%;
}

.menu-item {
    position: relative;
    height: 100%;
}
/*
Learning Menu Item
*/
.learning-menu-item {
  --top-offset: 65px;
  --alive-time: 0.5s;
}

.learning-dropdown {
  position: fixed;
  top: var(--top-offset);
  left: 50%;
  transform: translateX(-50%);

  width: 100%;
  max-width: 900px;

  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);

  overflow: visible; 
  z-index: 1001;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity        0.2s ease   var(--alive-time),
              visibility     0.2s ease   var(--alive-time),
              pointer-events 0s   linear var(--alive-time);
}

.learning-dropdown::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
}

.learning-menu-item:hover .learning-dropdown,
.learning-dropdown:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
body.admin-bar .learning-dropdown {
    top: calc(var(--top-offset) + var(--wp-admin--admin-bar--height, 32px));
}

body:not(.admin-bar) .learning-dropdown {
    top: var(--top-offset);
}

/*
Tools Menu Item
*/

.tools-menu-item {
  --top-offset: 65px;
  --alive-time: 0.5s;
}

.tools-dropdown {
  position: fixed;
  top: var(--top-offset);
  left: 50%;
  transform: translateX(-50%);

  width: 100%;
  max-width: 900px;

  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);

  overflow: visible; 
  z-index: 1001;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;

  transition: opacity        0.2s ease   var(--alive-time),
              visibility     0.2s ease   var(--alive-time),
              pointer-events 0s   linear var(--alive-time);
}

.tools-dropdown::before {
  content: "";
  position: absolute;
  top: -20px;
  left: 0;
  right: 0;
  height: 20px;
}

.tools-menu-item:hover .tools-dropdown,
.tools-dropdown:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
body.admin-bar .tools-dropdown {
    top: calc(var(--top-offset) + var(--wp-admin--admin-bar--height, 32px));
}

body:not(.admin-bar) .tools-dropdown {
    top: var(--top-offset);
}

html body .menu-link {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 0;
    height: 100%;
    transition: color 0.2s ease;
}

.menu-link:hover {
    color: var(--color-primary-cta);
}

.arrow-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-dark);
    transition: transform 0.25s ease, fill 0.2s ease;
}

.menu-link:hover .arrow-icon {
    fill: var(--color-primary-cta);
}

.menu-item:hover .arrow-icon {
    transform: rotate(180deg);
}

/* ========================================================
   CONTAINER 3: SEARCH
   ======================================================== */
.container-search {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    max-width: 340px;
}

.search-form {
    position: relative;
    width: 100%;
}

html body .search-input {
    width: 100%;
    height: 42px;
    padding: 0 40px 0 14px;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--text-dark);
    border: 1px solid var(--border-gray);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s ease;
}

.search-input::placeholder {
    color: #9ca3af;
    font-size: 13.5px;
}

.search-input:focus {
    border-color: #4b5563;
}

.search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn svg {
    width: 15px;
    height: 15px;
    fill: #4b5563;
    transition: fill 0.15s ease;
}

.search-btn:hover svg {
    fill: var(--text-dark);
}

.mobile-search-btn {
    display: none;
    width: 38px;
    height: 38px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    background: #ffffff;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-search-btn svg {
    width: 16px;
    height: 16px;
    fill: #6b7280;
}

/* ========================================================
   CONTAINER 4: ACTIONS (Login/My Account, Join Now, Cart)
   ======================================================== */
.container-actions {
    display: flex;
    align-items: center;
    justify-content: start;
    max-width: 350px;
    gap: 40px;
    flex-grow: 1;
}

.login-btn {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 16px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.login-btn:hover {
    color: var(--color-primary-cta);
}

/* ========================================================
   MY ACCOUNT DROPDOWN
   ======================================================== */
.account-menu-item {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.account-btn {
  text-decoration: none;
  color: var(--text-dark, #1f1f1f);
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  padding: 10px 0;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.account-btn:hover {
  color: var(--color-primary-cta, #c52d1d);
}

.account-btn .arrow-icon {
  width: 20px;
  height: 20px;
  fill: var(--text-dark, #1f1f1f);
  transition: transform 0.25s ease, fill 0.2s ease;
}

.account-btn:hover .arrow-icon {
  fill: var(--color-primary-cta, #c52d1d);
}

.account-menu-item:hover .arrow-icon {
  transform: rotate(180deg);
}

.account-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: -30px;
  background: #ffffff;
  min-width: 210px;
  border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid #ebebeb;
  padding: 8px 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  z-index: 1005;
}

.account-dropdown::before {
  content: "";
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
}

.account-menu-item:hover .account-dropdown,
.account-dropdown:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.account-dropdown li a {
  display: block;
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text-dark);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.account-dropdown li a:hover {
  background-color: #f9fafb;
  color: var(--color-primary-cta, #c52d1d);
}

.account-dropdown li:last-child {
  border-top: 1px solid #f3f4f6;
  margin-top: 4px;
  padding-top: 4px;
}

@media (max-width: 767px) {
  .account-menu-item {
    display: none;
  }
}


html body .cta-btn {
    text-decoration: none;
    background-color: var(--color-primary-cta);
    color: #ffffff !important;
    font-size: 15.5px;
    font-weight: 700;
    padding: 10px;
    border-radius: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.cta-btn:hover {
    background-color: var(--color-primary-cta-hover);
}

.cart-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
    margin-left: 4px;
}

.cart-btn img {
    width: 24px;
    height: 24px;
    display: block;
}

.cart-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--color-primary-cta);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* ========================================================
   MOBILE SEARCH DROPDOWN & DRAWER
   ======================================================== */
.mobile-search-dropdown {
    display: none;
    position: fixed;         
    top: 0;        
    left: 0;
    width: 100%;
    background: #fff;
    padding: 12px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    border-bottom: 1px solid #ebebeb;
    z-index: 1001;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(.4,0,.2,1), opacity 0.25s ease;
}

.mobile-search-dropdown.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
}

.mobile-search-inner {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-search-field {
    position: relative;
    flex: 1;
}

.mobile-search-field input {
    width: 100%;
    height: 42px;
    padding: 0 36px 0 14px;
    border: 1px solid #707070;
    border-radius: 6px;
    font-size: 15px;
    color: #1f1f1f;
    outline: none;
    font-family: 'Open Sans', sans-serif;
}

.mobile-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    color: #4b5563;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.mobile-search-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #4b5563;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}

.mobile-drawer {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;

    max-height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: hidden;

    background-color: #ffffff;
    padding: 0px 20px;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid #ebebeb;

    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;

    transition:
        transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease;

    z-index: 999;

    box-sizing: border-box;
}

.mobile-drawer.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.mobile-drawer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

.mobile-drawer-links > li {
    border-bottom: 1px solid #ebebeb;
}

.mobile-drawer-links > li > a {
    text-decoration: none;
    font-size: 17px;
    font-weight: 600;
    color: var(--text-dark, #1f1f1f);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px 0;
}

.mobile-drawer-links .arrow-icon {
    width: 22px;
    height: 22px;
    fill: var(--text-dark, #1f1f1f);

    transition: transform 0.25s ease;
}

.mobile-drawer-links .has-dropdown.active .arrow-icon {
    transform: rotate(180deg);
}


.drawer-dropdown-content {
    display: grid;
    grid-template-rows: 0fr;

    overflow: hidden;

    opacity: 0;

    transition:
        grid-template-rows 0.3s ease,
        opacity 0.25s ease;
}


.drawer-dropdown-content > * {
    min-height: 0;
}

.has-dropdown.active .drawer-dropdown-content {
    grid-template-rows: 1fr;
    opacity: 1;
}

.mobile-account-dropdown {
    list-style: none;
    margin: 0;
    padding: 0;

    max-height: 0;
    overflow: hidden;
    opacity: 0;

    transition:
        max-height 0.35s ease,
        opacity 0.25s ease;
}

.has-dropdown.active .mobile-account-dropdown {
    max-height: 600px;
    opacity: 1;
}

.mobile-account-dropdown li {
    margin: 0;
    padding: 0;
}

.mobile-account-dropdown li a {
    display: block;
    padding: 12px 10px;

    color: var(--text-dark, #1f1f1f);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.mobile-account-dropdown li a:hover {
    color: var(--color-primary-cta, #c52d1d);
}

/*search */
.container-search {
    position: relative;
}

#desktop-search-results {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    z-index: 9999;
    display: none;
}
.mobile-search-dropdown {
    position: relative;
}

#mobile-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 9999;
    display: none;
}


.search-results-container {
    position: relative;
    min-height: 50px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #ebebeb;
}

.search-results-container::before {
    content: '';
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
}

.search-results-container::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #C9321A;
    background-image: radial-gradient(
        circle at 20px 10px,
        #FFFFFF 4px,
        transparent 5px
    );

    z-index: 101;
    transform: translate(-50%, -50%) rotate(0deg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
}

.search-results-container.loading::before,
.search-results-container.loading::after {
    opacity: 1;
    pointer-events: auto;
}

.search-results-container.loading::after {
    animation: searchLoaderSpinner 0.8s linear infinite;
}

@keyframes searchLoaderSpinner {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
/* ========================================================
   RESPONSIVE BREAKPOINTS
   ======================================================== */
@media (max-width: 1100px) {
    .nav-container {
        gap: 20px;
        padding: 0 20px;
    }

    .container-actions {
        flex-grow: 0;
    }

    .menu-links {
        gap: 24px;
    }

    .container-actions {
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .nav-container {
        height: 60px;
        padding: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }

    .container-logo {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .hamburger-btn {
        display: flex;
    }

    .brand-logo-desktop {
        display: none;
    }

    .brand-logo-mobile {
        display: block;
    }

    .container-menu {
        display: none;
    }

    .container-search {
        flex: initial;
        max-width: none;
        margin: 0;
    }

    .container-actions {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .login-btn {
        display: none;
    }

    .cta-btn {
        font-size: 14.5px;
        padding: 7px 16px;
    }

    .cart-btn {
        margin: 0;
        margin-right: 15px
    }

    .mobile-drawer {
        display: block;
    }
}

@media (max-width: 640px) {
    .search-form {
        display: none;
    }

    .mobile-search-btn {
        display: flex;
    }

    .mobile-search-dropdown {
        display: block;
    }
}

@media (max-width: 400px) {
    html body .brand-logo-mobile-400 {
        display: block;
        height: 40px;
    }

    .brand-logo-mobile {
        display: none;
    }
}