/* Shared header with visible primary links and secondary disclosure navigation. */
.header { padding: 0; background: #202a3e; box-shadow: 0 2px 8px #10182818; }
.header::after { display: none; }
.header .header-container { max-width: none; min-height: 104px; padding: 20px 28px; gap: 20px; justify-content: flex-start; }
.header .logo img { display: block; width: 64px; height: 64px; border-radius: 6px; filter: none; }
.header .header-content { text-align: left; padding: 0; flex-shrink: 0; }
.header .header-title-row { margin: 0; justify-content: flex-start; gap: 8px; }
.header .header-content .header-brand-title { font-size: 30px; line-height: 1.2; margin: 0; }
.header .tagline { margin: 4px 0 0; font-size: 12px; color: #bdc7d8; }
.header .header-search { flex: 0 1 520px; margin: 0 0 0 auto; gap: 0; border: 1px solid #637087; border-radius: 8px; background: #fff; overflow: hidden; }
.header .header-search-input { width: 100%; min-width: 0; border: 0; border-radius: 0; padding: 11px 14px; font-size: 14px; color: #202a3e; background: #fff; box-shadow: none; }
.header .header-search:focus-within { outline: 2px solid #93c5fd; outline-offset: 3px; }
.header .header-search-button { border: 0; border-left: 1px solid #e2e8f0; border-radius: 0; padding: 11px 16px; background: #edf2f7; color: #263650; font-size: 14px; }
.header .navbar { background: #192235; }
.header .nav-inner { max-width: none; padding: 16px 28px; gap: 24px; min-height: 80px; }
.header .nav-menu { justify-content: flex-start; flex-wrap: wrap; gap: 8px; padding: 0; min-width: 0; }
.header .nav-menu > li { position: relative; }
.header .nav-menu a, .header-dropdown > summary { padding: 12px 16px; border-radius: 6px; color: #e0e6ef; font-size: 16px; font-weight: 600; line-height: 20px; text-decoration: none; }
.header-dropdown { position: relative; }
.header-dropdown > summary { display: flex; align-items: center; gap: 12px; cursor: pointer; list-style: none; white-space: nowrap; }
.header-dropdown > summary::-webkit-details-marker { display: none; }
.header-dropdown > summary::after { content: ''; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.header-dropdown[open] > summary::after { transform: rotate(225deg); }
.header .nav-menu a:hover, .header-dropdown > summary:hover, .header-dropdown[open] > summary { background: #ffffff12; color: #fff; box-shadow: none; }
.header .nav-menu a.nav-link-active, .header-dropdown.is-active > summary { background: #30425e; color: #fff; box-shadow: inset 0 -2px #93b4e0; }
.header-dropdown-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 1100; min-width: 220px; padding: 6px; border: 1px solid #dce3ed; border-radius: 10px; background: #fff; box-shadow: 0 12px 32px #0f172a26; }
.header .header-dropdown-panel a, .header .header-dropdown-panel .header-logout-button { display: block; width: 100%; padding: 10px 12px; text-align: left; color: #334155; background: transparent; border: 0; border-radius: 5px; font-size: 14px; font-weight: 500; line-height: 20px; text-decoration: none; }
.header .header-dropdown-panel a:hover, .header .header-dropdown-panel .header-logout-button:hover { background: #f0f4f9; color: #172b49; box-shadow: none; }
.header .header-dropdown-panel a.nav-link-active { background: #eaf1fa; color: #233f65; box-shadow: none; }
.header .header-account { flex-shrink: 0; }
.header .header-account .header-dropdown-panel { left: auto; right: 0; }
.header .header-logout { margin: 4px 0 0; width: 100%; border-top: 1px solid #e2e8f0; padding-top: 4px; }
.header .nav-right { width: auto; flex-direction: column; align-items: stretch; gap: 10px; flex-shrink: 0; }
.header .nav-right .nav-cart { margin: 0; width: auto; order: 0; }
.header .nav-right .nav-cart a, .header .nav-right .notif-trigger { display: inline-flex; align-items: center; justify-content: center; width: auto; gap: 8px; min-height: 40px; padding: 8px 12px; font-size: 14px; line-height: 20px; border: 1px solid #ffffff24; border-radius: 6px; background: #ffffff08; color: #e0e6ef; box-shadow: none; transform: none; }
.header .nav-right .nav-cart a:hover, .header .nav-right .notif-trigger:hover { background: #ffffff16; }
.header .cart-link a .cart-icon { width: auto; height: auto; font-size: 16px; background: none; box-shadow: none; transform: none; }
.header .cart-count, .header .notif-count { position: static; min-width: 20px; padding: 0 5px; border-radius: 5px; background: #dbeafe; color: #243c60; font-size: 11px; }
.header .nav-notifications { margin: 0; }
.header .nav-right .notif-trigger { width: 100%; }
.header .notif-panel { z-index: 1200; }
.header summary:focus-visible, .header a:focus-visible, .header button:focus-visible { outline: 2px solid #93b4e0; outline-offset: 2px; }
/* Keep daily tasks readable and give the cart a dedicated visual anchor. */
.header .nav-primary-link > a { background: #ffffff0a; border: 1px solid #ffffff18; }
.header .nav-primary-link > a.nav-link-active { border-color: #93b4e0; }
.header .nav-right .nav-cart a { width: 100%; min-width: 164px; min-height: 52px; padding: 12px 18px; gap: 10px; background: #e2e8f0; border-color: #e2e8f0; color: #192235; font-size: 17px; font-weight: 700; }
.header .nav-right .nav-cart a:hover { background: #fff; }
.header .nav-right .nav-cart a:has(.cart-count) { background: #f6c65b; border-color: #ffe09a; color: #29200d; box-shadow: 0 0 0 3px #f6c65b24; }
.header .nav-right .nav-cart a:has(.cart-count):hover { background: #ffda80; }
.header .cart-link a .cart-icon { font-size: 22px; }
.header .cart-count { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 7px; background: #29200d; color: #fff; font-size: 14px; border-radius: 7px; }
/* Separate secondary tools without hiding the direct navigation links. */
.header .nav-menu > .nav-secondary-start { margin-left: 10px; padding-left: 18px; border-left: 1px solid #ffffff24; }
.header .header-icon { display: block; width: 22px; height: 22px; flex-shrink: 0; }
.header .cart-icon, .header .notif-icon { display: inline-flex; align-items: center; }
.header .header-account-label { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.header .header-account-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; font-weight: 400; color: #bdc7d8; }
.header .header-account-identity { padding: 10px 12px; border-bottom: 1px solid #e2e8f0; margin-bottom: 4px; color: #334155; font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.header .header-account .header-dropdown-panel { max-width: min(300px, calc(100vw - 32px)); }
@media (max-width: 1100px) {
    .header .nav-inner { gap: 8px; padding-inline: 16px; }
    .header .nav-menu a, .header-dropdown > summary { padding-inline: 9px; }
    .header .notif-label { display: none; }
}
@media (max-width: 900px) {
    .header .header-container { display: grid; grid-template-columns: 44px 1fr auto; grid-template-areas: 'logo title account' 'search search search'; padding: 12px 16px; gap: 12px; }
    .header .logo img { width: 44px; height: 44px; }
    .header .header-content .header-brand-title { font-size: 22px; }
    .header .tagline { font-size: 11px; }
    .header .header-account { grid-area: account; }
    .header .header-account-name { display: none; }
    .header .nav-menu > .nav-secondary-start { margin-left: 0; padding: 10px 0 0; border-left: 0; border-top: 1px solid #ffffff24; }
    .header .header-search { width: 100%; margin: 0; }
    .header .nav-inner { flex-wrap: wrap; }
    .header .nav-toggle { display: inline-flex; background: transparent; border-color: #ffffff24; padding: 9px 12px; }
    .header .nav-right { order: 0; margin-left: auto; flex-direction: row; align-items: center; }
    .header .nav-right .nav-cart a { min-width: 120px; min-height: 48px; padding: 10px 12px; }
    .header .nav-menu { display: none; order: 3; width: 100%; flex-basis: 100%; flex-direction: column; border-top: 1px solid #ffffff18; padding: 8px 0; }
    .nav-open .header .nav-menu { display: flex; }
    .header .nav-menu > li { width: 100%; text-align: left; }
    .header .nav-menu summary { justify-content: space-between; }
    .header .nav-menu .header-dropdown-panel { position: static; margin: 4px 0 8px; min-width: 0; box-shadow: none; }
    .header .nav-menu a { white-space: normal; }
    .header .notif-panel { position: fixed; top: 170px; left: 12px; right: 12px; width: auto; max-width: none; max-height: calc(100dvh - 182px); }
}

/* Open disclosures, current pages, and keyboard focus have distinct treatments. */
.header .header-dropdown:not(.is-active)[open] > summary { background: #354157; box-shadow: none; }
.header summary:focus:not(:focus-visible) { outline: none; }
.header summary:focus-visible, .header a:focus-visible, .header button:focus-visible { outline: 2px dashed #dbeafe; outline-offset: 3px; }
.header .header-search-icon { margin-left: 14px; color: #64748b; width: 18px; height: 18px; }
.header .header-search-input { padding-left: 10px; }
.header .header-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.header .header-search-clear { flex-shrink: 0; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 4px; background: transparent; color: #475569; font-size: 24px; line-height: 1; cursor: pointer; }
.header .header-search-clear[hidden] { display: none; }
.header .header-search-clear:hover { background: #edf2f7; }
.header .header-search-clear:focus-visible, .header .header-search-button:focus-visible { outline: 2px dashed #334155; outline-offset: -4px; }

/* Let navigation wrap beside the cart and keep narrow layouts within the viewport. */
@media (min-width: 901px) and (max-width: 1400px) {
    .header .nav-menu { flex: 1 1 0; align-items: center; row-gap: 10px; }
    .header .nav-right { align-self: flex-start; }
    .header .nav-menu > .nav-secondary-start { margin-left: 0; padding-left: 0; border-left: 0; }
}
@media (max-width: 900px) {
    .header .header-container { grid-template-columns: 44px minmax(0, 1fr) auto; }
    .header .header-content { min-width: 0; }
    .header .header-title-row { flex-wrap: wrap; }
    .header .nav-right { min-width: 0; }
    .header .notif-panel { overflow-y: auto; }
}
@media (max-width: 380px) {
    .header .header-container { column-gap: 8px; }
    .header .header-account > summary { padding-inline: 4px; gap: 6px; }
    .header .nav-inner { padding-inline: 12px; }
    .header .nav-right { gap: 6px; }
    .header .nav-right .nav-cart a { min-width: 0; padding-inline: 10px; gap: 6px; }
}
