:root {
    --esh-ink: #172b3a;
    --esh-muted: #607180;
    --esh-line: #e3e9ed;
    --esh-accent: #e77a26;
    --esh-blue: #1675e8;
}

.offcanvas {
    z-index: 1060;
}

.offcanvas-backdrop {
    z-index: 1050;
    width: 100vw;
    min-height: 100vh;
}

.header_main {
    position: relative;
    z-index: 1020;
    background: #fff;
    border-bottom: 1px solid var(--esh-line);
}

.header_main > .container {
    max-width: 1260px;
}

.esh-header-row {
    display: grid;
    grid-template-areas: "logo search actions";
    grid-template-columns: minmax(160px, 220px) minmax(260px, 1fr) auto;
    align-items: center;
    gap: 24px;
    margin: 0;
    padding: 16px 0;
}

.esh-secondary-row {
    position: relative;
    z-index: 1020;
    border-top: 1px solid var(--esh-line);
}

.esh-logo-slot,
.esh-search-slot,
.esh-actions-slot {
    min-width: 0;
}

.esh-logo-slot { grid-area: logo; }
.esh-search-slot { grid-area: search; }
.esh-actions-slot { grid-area: actions; }

.logo_container,
.logo_container a {
    display: flex;
    align-items: center;
    min-width: 0;
}

.site-logo {
    display: block;
    width: min(100%, 250px);
    height: 72px;
    object-fit: contain;
    object-position: left center;
}

.header_search_form {
    display: flex;
    width: 100%;
    gap: 8px;
}

.header_search_form .form-control {
    min-width: 0;
    height: 46px;
    border: 1px solid #d8e0e6;
    border-radius: 8px;
    box-shadow: none;
}

.header_search_form .form-control:focus {
    border-color: var(--esh-blue);
    box-shadow: 0 0 0 3px rgb(22 117 232 / 12%);
}

.header_search_form .btn {
    display: inline-grid;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    place-items: center;
    margin: 0;
    border-radius: 8px;
}

.esh-actions-slot,
.wishlist_cart {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    white-space: nowrap;
}

.wishlist_cart > * { margin: 0 !important; }

.wishlist a,
.cart a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    color: var(--esh-ink);
    line-height: 1.2;
}

.wishlist_icon,
.cart_icon {
    position: relative;
    display: grid;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    place-items: center;
}

.wishlist_icon img,
.cart_icon img,
.cart_icon .navbar-icon {
    display: block;
    width: 27px;
    height: 27px;
    object-fit: contain;
}

.wishlist_content,
.cart_content {
    margin-left: 7px !important;
    font-size: 13px;
}

.wishlist_text,
.cart_text {
    color: var(--esh-ink);
    font-weight: 600;
}

.wishlist_count,
.cart_count {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    place-items: center;
    padding: 0 5px;
    border-radius: 99px;
    background: #edf4fb;
    color: var(--esh-ink);
    font-size: 11px;
    line-height: 1;
}

.wishlist_icon { position: relative; }

.wishlist_count {
    position: absolute;
    top: -5px;
    right: -5px;
    z-index: 2;
    border: 2px solid #fff;
    background: var(--esh-accent);
    color: #fff;
    transform: translate(15%, -15%);
}

.wishlist_count[hidden] { display: none !important; }

.cart_count {
    position: absolute;
    top: -3px;
    right: -5px;
    border: 2px solid #fff;
    background: var(--esh-accent);
    color: #fff;
}

.esh-profile-toggle {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 2px !important;
    border: 1px solid var(--esh-line);
    border-radius: 50%;
    color: var(--esh-ink);
}

.esh-profile-toggle::after { margin-left: 3px; }

.esh-profile-toggle img,
.esh-profile-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

.esh-profile-toggle img { object-fit: cover; }

.esh-profile-fallback {
    display: grid;
    place-items: center;
    background: #eaf2fa;
    color: var(--esh-blue);
    font-size: 18px;
}

.esh-actions-slot .dropdown-menu {
    z-index: 1090;
    min-width: 245px;
    margin-top: 10px;
    border: 1px solid var(--esh-line);
    border-radius: 8px;
    box-shadow: 0 12px 32px rgb(23 43 58 / 14%);
}

.esh-actions-slot .dropdown-menu .card-body { padding: 16px; }

.esh-actions-slot .dropdown-menu .dropdown-item {
    display: flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 5px;
    color: var(--esh-ink);
    text-decoration: none;
}

.esh-actions-slot .dropdown-menu .dropdown-item:hover,
.esh-actions-slot .dropdown-menu .dropdown-item:focus {
    background: #f1f6fa;
    color: var(--esh-blue);
}

.esh-notification-toggle {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    padding: 0;
    border: 1px solid var(--esh-line);
    border-radius: 50%;
    color: var(--esh-ink);
    font-size: 17px;
}

.esh-notification-badge {
    position: absolute;
    top: -4px;
    right: -5px;
    min-width: 18px;
    padding: 2px 4px;
    border: 2px solid #fff;
    border-radius: 99px;
    background: var(--esh-accent);
    color: #fff;
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
}

.esh-notification-menu {
    box-sizing: border-box;
    width: min(380px, calc(100vw - 24px));
    min-width: 0;
    max-width: calc(100vw - 16px);
    max-height: min(72vh, 520px);
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--esh-line);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgb(23 43 58 / 18%);
}

.esh-notification-list {
    max-height: min(62vh, 440px);
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.esh-notification-heading,
.esh-notification-view-all {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
}

.esh-notification-heading {
    border-bottom: 1px solid var(--esh-line);
}

.esh-notification-heading span,
.esh-notification-item small {
    color: var(--esh-muted);
    font-size: 12px;
}

.esh-notification-item {
    position: relative;
    min-width: 0;
    padding: 12px 16px;
    border-bottom: 1px solid var(--esh-line);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.esh-notification-item__content { min-width: 0; padding-right: 30px; }

.esh-notification-item__title,
.esh-notification-item__message {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.esh-notification-item__title {
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

.esh-notification-item__message {
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.esh-notification-item p { overflow-wrap: anywhere; }

.esh-notifications { position: relative; }
.esh-notifications .dropdown-menu { right: 0 !important; left: auto !important; }

@media (max-width: 480px) {
    .esh-notification-menu {
        position: fixed !important;
        top: 76px !important;
        right: 8px !important;
        left: 8px !important;
        width: auto;
        max-width: none;
        margin: 0;
    }
}

.esh-notification-more {
    position: absolute;
    top: 9px;
    right: 9px;
}

.esh-notification-more-toggle {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #576575;
}

.esh-notification-more-toggle:hover,
.esh-notification-more-toggle:focus-visible { background: #e7eef5; }

.esh-notification-actions-menu {
    position: absolute;
    z-index: 3;
    top: 30px;
    right: 0;
    display: none;
    width: 220px;
    padding: 5px;
    border: 1px solid var(--esh-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(23 43 58 / 18%);
}

.esh-notification-actions-menu ul { margin: 0; padding: 0; list-style: none; }
.esh-notification-actions-menu li { margin: 0; padding: 0; }
.esh-notification-actions-menu form { margin: 0; }

.esh-notification-more:hover .esh-notification-actions-menu,
.esh-notification-more:focus-within .esh-notification-actions-menu,
.esh-notification-more.is-open .esh-notification-actions-menu { display: block; }

.esh-notification-action {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 9px;
    padding: 8px 9px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--esh-ink);
    font: inherit;
    text-align: left;
}

.esh-notification-action:hover,
.esh-notification-action:focus-visible { background: #f1f6fa; }
.esh-notification-action.is-danger { color: #b42318; }

.esh-site-footer > .container:first-child > section:first-child {
    justify-content: flex-start !important;
    gap: 18px;
    border-color: rgb(255 255 255 / 24%) !important;
}

.esh-site-footer .esh-footer-social-link {
    display: inline-grid;
    width: 36px;
    height: 36px;
    place-items: center;
    margin-right: 8px;
    border: 1px solid rgb(255 255 255 / 42%);
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    text-decoration: none;
    transition: background-color .15s ease, transform .15s ease;
}

.esh-site-footer .esh-footer-social-link:hover {
    transform: translateY(-2px);
    background: rgb(255 255 255 / 16%);
    color: #fff;
}

.esh-site-footer .esh-footer-social-link.is-unavailable {
    opacity: .72;
}

.esh-notification-item.is-unread {
    background: #f1f6fa;
}

.esh-notification-item p {
    margin: 5px 0;
    color: var(--esh-muted);
}

.esh-unread-dot {
    flex: 0 0 8px;
    width: 8px;
    height: 8px;
    margin-top: 5px;
    border-radius: 50%;
    background: var(--esh-blue);
}

.esh-notification-empty {
    padding: 20px 16px;
    color: var(--esh-muted);
    font-size: 13px;
}

.esh-notification-view-all {
    justify-content: center;
    color: var(--esh-blue);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.esh-user-menu {
    width: min(320px, calc(100vw - 16px));
    overflow: hidden;
    padding: 8px 12px 10px !important;
    border: 1px solid #d0d7de !important;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 24px rgb(31 35 40 / 14%);
}

.esh-user-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 2px 14px;
    border-bottom: 1px solid var(--esh-line);
}

.esh-user-avatar {
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 50%;
    background: var(--esh-blue);
    color: #fff;
    object-fit: cover;
}

.esh-user-ident {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.esh-user-ident strong {
    overflow: hidden;
    color: var(--esh-ink);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.esh-user-ident > a {
    overflow: hidden;
    color: #0969da;
    font-size: .82rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.esh-user-ident > a:hover { text-decoration: underline; }

.esh-user-menu-links a,
.esh-user-submenu > summary {
    display: flex;
    min-height: 42px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #3d444d;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

.esh-user-menu-links a > i:first-child,
.esh-user-submenu > summary > i:first-child {
    width: 18px;
    color: #0969da;
    text-align: center;
}

.esh-user-menu-links a > span,
.esh-user-submenu > summary > span {
    min-width: 0;
    flex: 1;
}

.esh-user-menu-links a:hover,
.esh-user-menu-links a:focus-visible,
.esh-user-submenu > summary:hover,
.esh-user-submenu > summary:focus-visible {
    outline: none;
    background: #f6f8fa;
    color: #0969da;
}

.esh-user-chevron { margin-left: auto; color: #57606a; font-size: 12px; }

.esh-user-submenu > summary { list-style: none; }
.esh-user-submenu > summary::-webkit-details-marker { display: none; }
.esh-user-submenu[open] > summary .esh-user-chevron { transform: rotate(90deg); }

.esh-user-submenu__items {
    display: grid;
    gap: 2px;
    margin: 0 0 4px 28px;
    padding-left: 9px;
    border-left: 1px solid #d0d7de;
}

.esh-user-submenu__items a {
    min-height: 34px;
    padding: 6px 9px;
    font-size: 13px;
}

.esh-user-menu-links {
    display: grid;
    gap: 2px;
    padding: 8px 0;
    border-bottom: 1px solid var(--esh-line);
}

.esh-user-logout {
    display: flex;
    min-height: 40px;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--esh-ink);
    font-size: 14px;
    text-decoration: none;
}

.esh-user-logout {
    margin-top: 8px;
    color: #dc3545;
}

.esh-user-logout:hover,
.esh-user-logout:focus {
    background: #fff1f2;
    color: #b42332;
}

.esh-secondary-nav {
    min-height: 0;
    padding: 0;
    background: transparent;
}

.esh-secondary-nav > .container-fluid {
    max-width: 1260px;
    margin: 0 auto;
    padding: 0;
}

.esh-secondary-nav .navbar-toggler {
    margin: 7px 0;
    border-color: var(--esh-line);
}

.esh-secondary-nav .navbar-nav { gap: 0; }

.esh-secondary-nav .navbar-collapse {
    min-width: 0;
}

.esh-secondary-nav .esh-nav-links {
    flex-direction: row;
    justify-content: flex-end;
    white-space: nowrap;
}

.esh-secondary-nav .nav-link {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 7px;
    border-radius: 6px;
    color: var(--esh-ink) !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.esh-secondary-nav .nav-link:hover,
.esh-secondary-nav .nav-link:focus,
.esh-secondary-nav .show > .nav-link {
    background: #f1f6fa;
    color: var(--esh-blue) !important;
}

.esh-secondary-nav .nav-link i {
    width: 18px;
    color: var(--esh-accent);
    font-size: 15px;
    text-align: center;
}

.esh-secondary-nav .nav-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.esh-secondary-nav .nav-icon-sm {
    width: 16px;
    height: 16px;
    object-fit: contain;
}

.esh-secondary-nav .dropdown-menu {
    z-index: 1035;
    border: 1px solid var(--esh-line) !important;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgb(23 43 58 / 16%);
}

.header_main,
.esh-secondary-row,
.esh-secondary-nav,
.esh-secondary-nav .navbar-collapse {
    overflow: visible;
}

.esh-secondary-nav .dropdown-mega > .dropdown-menu {
    padding: 0;
    top: 100%;
    right: 0;
    left: 0;
    width: 100%;
    margin-top: 0;
    max-height: min(72vh, 620px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.esh-actions-slot .dropdown.show > .dropdown-menu,
.esh-secondary-nav .dropdown.show > .dropdown-menu {
    display: block;
}

.dropdown-menu.show {
    visibility: visible;
    opacity: 1;
}

.esh-secondary-nav .dropdown-menu h5 {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--esh-ink);
    font-size: 16px;
    font-weight: 700;
}

.esh-secondary-nav .list-group-item {
    border-color: #edf1f4;
    color: var(--esh-ink);
}

.esh-secondary-nav .list-group-item a,
.esh-secondary-nav .subcategory-link {
    color: var(--esh-ink);
    text-decoration: none;
}

.esh-secondary-nav .list-group-item a:hover,
.esh-secondary-nav .subcategory-link:hover {
    color: var(--esh-blue);
}

.esh-secondary-nav .esh-mega-grid {
    display: grid;
    grid-template-columns: minmax(185px, .85fr) minmax(210px, 1fr) minmax(300px, 1.45fr);
    gap: 20px;
    margin: 0;
}

.esh-secondary-nav .esh-mega-grid > [class*="col-"] {
    width: auto;
    max-width: none;
    padding: 0;
}

.esh-secondary-nav .esh-mega-heading-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-left: auto;
    color: #0969da;
    font-size: 11px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.esh-secondary-nav .esh-mega-heading-link:hover { text-decoration: underline; }

.esh-secondary-nav .category-list-item {
    position: relative;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.esh-secondary-nav .category-list-item:hover,
.esh-secondary-nav .category-list-item:focus-visible,
.esh-secondary-nav .category-list-item.is-active,
.esh-secondary-nav .subcategory-list-item.is-active {
    background: #eef5fb;
    color: var(--esh-blue);
    outline: none;
}

.esh-secondary-nav .category-list-item:focus-visible,
.esh-secondary-nav .subcategory-link:focus-visible {
    box-shadow: inset 0 0 0 2px #9cc8ed;
}

.esh-secondary-nav .subcategory-list-item {
    padding: 0;
    border-color: #edf1f4;
}

.esh-secondary-nav .subcategory-link {
    display: block;
    min-height: 42px;
    padding: 10px 12px;
}

.esh-secondary-nav .esh-mega-empty {
    padding: 12px;
    color: #72808a;
    font-size: 13px;
    list-style: none;
}

.esh-secondary-nav .unique-product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 10px;
    max-height: 390px;
    overflow-y: auto;
}

.esh-secondary-nav .esh-mega-product {
    display: flex;
    min-width: 0;
    min-height: 68px;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border: 1px solid #edf1f4;
    border-radius: 8px;
    background: #fff;
    color: var(--esh-ink);
    font-size: 13px;
    line-height: 1.35;
    text-decoration: none;
    transition: border-color .15s ease, background-color .15s ease, transform .15s ease;
}

.esh-secondary-nav .esh-mega-product:hover,
.esh-secondary-nav .esh-mega-product:focus-visible {
    transform: translateY(-1px);
    border-color: #c5ddef;
    background: #f7fbff;
    color: var(--esh-blue);
}

.esh-secondary-nav .esh-mega-product-art {
    display: grid;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    overflow: hidden;
    place-items: center;
    border-radius: 6px;
    background: #f1f5f7;
    color: var(--esh-blue);
}

.esh-secondary-nav .esh-mega-product-art img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.esh-secondary-nav .esh-mega-product-art.has-fallback img,
.esh-secondary-nav .esh-mega-product-art:not(.has-fallback) > i {
    display: none;
}

.esh-secondary-nav .esh-mega-product > span:last-child {
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
}

@media (max-width: 1199.98px) {
    .esh-header-row {
        grid-template-areas: "logo actions" "search search";
        grid-template-columns: minmax(140px, 1fr) auto;
        gap: 15px 18px;
        padding: 15px 0;
    }

    .site-logo { width: min(100%, 220px); height: 62px; }

    .esh-secondary-nav .navbar-collapse {
        padding: 6px 0 12px;
    }

    .esh-secondary-nav .navbar-nav { align-items: stretch !important; }

    .esh-secondary-nav .esh-nav-links { flex-direction: column; align-items: stretch !important; }

    .esh-secondary-nav .nav-link { min-height: 42px; }
}

@media (max-width: 767.98px) {
    .esh-secondary-nav .esh-mega-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .esh-secondary-nav .dropdown-mega > .dropdown-menu {
        max-height: 70vh;
    }

    .esh-secondary-nav .unique-product-list {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
        max-height: 240px;
    }
}

@media (max-width: 575.98px) {
    .header_main > .container,
    .esh-secondary-nav > .container-fluid { padding-right: 16px; padding-left: 16px; }

    .esh-header-row { gap: 12px; padding: 13px 0; }

    .site-logo { width: min(100%, 190px); height: 54px; }

    .esh-actions-slot,
    .wishlist_cart { gap: 10px; }

    .wishlist_content,
    .cart_content { display: none; }

    .wishlist_icon,
    .cart_icon { flex-basis: 32px; width: 32px; height: 32px; }

    .wishlist_icon img,
    .cart_icon img,
    .cart_icon .navbar-icon { width: 25px; height: 25px; }

    .esh-profile-toggle { width: 40px; height: 40px; }

    .esh-profile-toggle img,
    .esh-profile-fallback { width: 32px; height: 32px; }

    .esh-secondary-nav .dropdown-mega > .dropdown-menu {
        position: static;
        width: 100%;
        margin-top: 4px;
    }
}
