/* HEADER MUST NEVER BE AFFECTED BY PAGE LAYOUT */
.top-header {
    max-width: none;
}

/* =========================================================
   HEADER LAYER 1 — TOP UTILITY BAR
   ========================================================= */

.top-bar {
    width: 100%;
    background-color: #2b2b2b;
    color: #ffffff;
    font-family: "PT Sans", Helvetica Neue, Arial, sans-serif;
    font-size: 12px;
}

.top-bar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 5px 1px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Left: login */
.top-bar .top-left a {
    color: #ffffff;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Right: menu links */
.top-bar .top-right a {
    color: #ffffff;
    text-decoration: none;
    margin-left: 20px;
	text-transform: uppercase;
    white-space: nowrap;
}

/* Hover behavior */
.top-bar a:hover {
    color: #d4af37;
    text-decoration: none;
}

/* Enable dropdowns in top bar */
.top-bar .menu-item {
    position: relative;
}

.top-bar .menu-item:hover .submenu {
    display: block;
}

/* Optional: slightly smaller dropdown in top bar */
.top-bar .submenu a {
    font-size: 12px;
    padding: 6px 14px;
}

/* Fix top bar layout when using dropdown */
.top-bar .top-right {
    display: flex;
    align-items: center;
}

.top-bar .top-right .menu-item {
    display: inline-flex;
    align-items: center;
}

/* Fix text color inside top-bar dropdown */
.top-bar .submenu a {
    color: #282828;
}

/* LANGUAGE dropdown: align to right edge of trigger */
.top-bar .menu-item .submenu {
    left: auto;
    right: 0;
	margin-top: 0px;
}

/* Center text in top-bar (LANGUAGE) dropdown */
/* Top-bar dropdown should not inherit large submenu padding */
.top-bar .submenu {
    padding-left: 6px;
    padding-right: 16px;
    text-align: left;
}

/* Allow top-bar dropdowns to overflow container */
.top-bar,
.top-bar-inner {
    overflow: visible;
}

.top-bar .submenu a {
    padding-left: 16px;
    padding-right: 16px;
	text-align: left;
}

.top-bar .submenu a:hover {
    background-color: #f5f5f5;
    color: #000;
}

/* Make Language button align like other top-bar links */
.top-bar .top-right .menu-label {
    margin-left: 20px;
    text-transform: uppercase;
    font-family: "PT Sans", Helvetica Neue, Arial, sans-serif;
    font-size: 12px;
}

.top-bar .menu-label:hover {
    color: #d4af37;
}

/* =========================================================
   HEADER LAYER 2 — LOGO / SEARCH / CATALOG
   ========================================================= */

.main-header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    padding: 30px 40px;
}


/* LEFT — NUMISQUARE LOGO */
.header-left {
    flex: 0 0 auto;
}

.header-left .site-logo {
    width: 212px;
    height: 45px;
    display: block;
}

/* CENTER — SEARCH */
.header-search {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
}

.header-search form {
    display: flex;
    align-items: center;
    position: relative;
    max-width: 320px;
    width: 100%;
}

.header-search input[type="text"] {
    width: 280px;
    height: 40px;
    box-sizing: border-box;

    border: 0;
    border-bottom: 2px solid #000;

    padding-left: 8px;
    padding-right: 40px;
    padding-top: 10px;

    background: #fff;

    /* ENTERED TEXT */
    color: #000;
    font-style: normal;
    font-size: 14px;
    font-family: "PT Sans", Helvetica Neue, Arial, sans-serif;
    text-align: left;
}

.header-search input::placeholder {
    text-transform: none;
    font-size: 12px;
    font-style: italic;
    color: #b5b5b5;
    opacity: 1;
}

.header-search input:focus {
    outline: none;
    box-shadow: none;
    border-color: #000;
}

.header-search input:focus::placeholder {
    color: transparent;
}

/* SEARCH BUTTON (MAGNIFIER) */
.header-search button[type="submit"] {
    background: url("/media/magnifier.png") no-repeat center;
    background-size: 24px 24px;

    width: 40px;
    height: 40px;
	align-self: center;
    margin-bottom: 0px;
	position: relative;
    top: 6px;

    border: none;
    background-color: transparent;
    font-size: 0;
    cursor: pointer;
}

.search-error {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;

    margin-top: 4px;
    font-size: 12px;
    color: #c00;

    pointer-events: none;
}

.header-search input[name="website"] {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}


/* RIGHT — CATALOG LOGO */
.header-right {
    flex: 0 0 auto;
    margin-left: auto;
}

.header-right .site-logo {
    width: 180px;
    height: 25px;
    display: block;
}


/* =========================================================
   HEADER LAYER 3 — MAIN NAVIGATION
   ========================================================= */

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 36px;
    background: #ffffff;
    padding: 18px 0;
}

.main-nav a {
    position: relative;
    text-decoration: none;

    font-family: "PT Sans", Helvetica Neue, Arial, sans-serif;
    font-size: 13px;
    font-weight: 400;
    color: #282828;

    padding-bottom: 10px;
}

.main-nav .menu-item {
  position: relative;
}

.main-nav > .menu-item > a {
    font-family: "PT Sans", Helvetica Neue, Verdana, Arial, sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.35;
    text-transform: uppercase;
    color: #282828;
	  position: relative;
}

/* Down arrow for main menu items */
.main-nav > .menu-item > a::after {
    content: "";
    display: inline-block;

    width: 6px;
    height: 6px;

    margin-left: 6px;
    position: relative;
    top: -2px;

    border-right: 1.5px solid #282828;
    border-bottom: 1.5px solid #282828;

    transform: rotate(45deg);
}

/* Active underline — attach to menu-item, NOT the link */
.main-nav .menu-item.active::after {
    content: "";
    position: absolute;

    left: 0;
    right: 0;
    bottom: -16px;

    height: 3px;
    background-color: #d4af37;

    pointer-events: none;
}

/* SUBMENU */
.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  padding: 16px;
  width: max-content;
  padding-left: 40px;
  padding-right: 40px;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  z-index: 1000;
}

.menu-item:hover .submenu {
  display: block;
}

.submenu a {
  display: block;
  padding: 6px 0;
  color: #282828;
  text-decoration: none;
  font-size: 13px;
  text-align: center;
}

.submenu a:hover {
    background-color: #f5f5f5;
    text-decoration: none;
}

.top-header {
    border-bottom: 1px solid #d6d6d6;
}

