/* High Performance Header Plugin Styles */

body {
    overflow-x: hidden;
}

body.hp-menu-open {
    overflow: hidden;
}

.hp-header {
    position: relative;
    z-index: 1001;
    background: #fff;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 0;
    box-sizing: border-box;
    left: 0;
    right: 0;
}

/* Override any parent container constraints */
body .hp-header,
body .hp-header * {
    box-sizing: border-box;
}

/* Announcement Bar */
.hp-announcement-bar {
    background: linear-gradient(to bottom, #061B5D, #113FA2);
    color: #ffffff;
    padding: 10px 0;
    text-align: center;
    width: 100%;
    margin: 0;
}

.hp-announcement-bar .hp-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.hp-marquee-wrapper {
    max-width: 800px;
    width: 100%;
    margin: 0 auto;
    overflow: hidden !important;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Add padding for arrows */
    padding: 0 40px;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

.hp-marquee-list {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.hp-marquee-arrow {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    cursor: pointer;
    padding: 5px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    z-index: 10;
    position: absolute;
    height: 100%;
    backdrop-filter: blur(4px);
    outline: none !important;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

.hp-marquee-arrow-left {
    left: 0;
    border-radius: 0;
}

.hp-marquee-arrow-right {
    right: 0;
    border-radius: 0;
}

.hp-marquee-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.hp-marquee-arrow:active {
    background: rgba(17, 63, 162, 0.3) !important;
    outline: none !important;
}

.hp-marquee-arrow:focus {
    background: rgba(17, 63, 162, 0.2) !important;
    outline: none !important;
}

.hp-marquee-arrow:focus-visible {
    background: rgba(17, 63, 162, 0.2) !important;
    outline: none !important;
}

.hp-marquee-arrow::-moz-focus-inner {
    border: 0 !important;
}

.hp-marquee-arrow svg {
    width: 16px;
    height: 16px;
    stroke: #ffffff;
    fill: none;
    pointer-events: none;
}

.hp-marquee-list {
    flex: 1;
    overflow: hidden;
    position: relative;
    width: 100%;
    /* No need for flex display here */
}

.hp-marquee-track {
    display: grid;
    width: 100%;
    /* Remove transform logic */
    transform: none !important;
    transition: none !important;
}

.hp-announcement-slide {
    grid-area: 1 / 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    box-sizing: border-box;
    text-align: center;
    position: relative;

    /* Fade Transition */
    opacity: 0;
    transition: opacity 500ms ease;
    z-index: 1;
    pointer-events: none;
    /* Prevent clicking hidden items */
}

.hp-announcement-slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
}




/* Ensure items flow smoothly from right to left */
.hp-announcement-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* Duplicate items are hidden by overflow and only visible during seamless transition */

.hp-announcement-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hp-announcement-icon svg {
    width: 18px;
    height: 18px;
    stroke: #ffffff;
    fill: none;
    transform: scaleX(-1);
}

.hp-announcement-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

.hp-announcement-text {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    color: #ffffff;
    white-space: nowrap;
    display: inline-block;
    text-align: center;
}

/* Main Header */
.hp-main-header {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 15px 0;
    width: 100%;
    margin: 0;
}

.hp-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

/* Header Left - Logo */
.hp-header-left {
    flex: 0 0 auto;
}

.hp-logo img {
    max-height: 60px;
    width: auto;
    display: block;
}

.hp-logo a {
    display: inline-block;
    text-decoration: none;
}

/* Header Center - Navigation */
.hp-header-center {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hp-main-nav {
    display: flex;
    align-items: center;
}

.hp-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
    align-items: center;
}

.hp-nav-menu li {
    margin: 0;
    padding: 0;
}

.hp-nav-menu a {
    color: #1a3a5f;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hp-nav-menu a:hover {
    color: #2a5a8f;
}

.hp-nav-menu li {
    position: relative;
}

.hp-nav-menu .sub-menu {
    display: none;
    position: absolute;
    background: #fff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    margin: 0;
    padding: 10px 0;
    min-width: 200px;
    top: 100%;
    left: 0;
    z-index: 999;
}

.hp-nav-menu li:hover>.sub-menu:not(.hp-mega-menu-links .sub-menu) {
    display: block;
}

/* Show dropdown on hover of menu item - hover on entire li, not just the link */
.hp-nav-menu li.menu-item-has-children:hover .hp-mega-menu-wrapper,
.hp-nav-menu li.menu-item-has-children:hover>.hp-mega-menu-wrapper,
.hp-nav-menu li.menu-item-has-children .hp-mega-menu-wrapper:hover {
    display: block !important;
}

/* Keep dropdown open when hovering over dropdown itself */
.hp-mega-menu-wrapper:hover {
    display: block !important;
}

.hp-nav-menu .sub-menu li {
    margin: 0;
    padding: 0;
}

.hp-nav-menu .sub-menu a {
    padding: 10px 20px;
    display: block;
}

/* Mega Menu Styles */
.hp-mega-menu-wrapper {
    display: none;
    position: fixed;
    left: 0;
    right: 0;
    top: 100%;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 999;
    padding: 0;
    margin: 0;
}

.hp-mega-menu-wrapper:hover {
    display: block !important;
}

/* Bridge gap between menu and dropdown to prevent disappearing */
.hp-mega-menu-wrapper::before {
    content: '';
    display: block;
    position: absolute;
    top: -40px;
    left: 0;
    width: 100%;
    height: 40px;
    background: transparent;
    pointer-events: auto;
    z-index: 1000;
}

/* Ensure the entire li area maintains hover state */
.hp-nav-menu li.menu-item-has-children {
    padding-bottom: 0;
}

.hp-mega-menu-content {
    display: flex;
    padding: 40px;
    gap: 0;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    box-sizing: border-box;
}

.hp-mega-menu-links {
    flex: 1;
    margin-right: 10px;
}

.hp-condition-title {
    font-size: 18px;
    font-weight: 800;
    color: #333;
    margin: 0 0 20px 0;
    text-transform: none;
}

.hp-mega-menu-links .sub-menu {
    position: static;
    display: grid !important;
    grid-template-rows: repeat(4, auto) !important;
    grid-auto-flow: column !important;
    justify-content: start !important;
    grid-auto-columns: 1fr !important;
    align-content: start !important;
    align-items: start !important;
    row-gap: 0 !important;
    column-gap: 60px !important;
    width: 100% !important;
    box-shadow: none !important;
    padding: 0 !important;
    min-width: auto;
    margin: 0 0 20px 0;
    background: transparent;
    list-style: none !important;
}

.hp-mega-menu-links .sub-menu li {
    margin: 0 !important;
    padding: 0;
    border-bottom: none;
}

.hp-mega-menu-links .sub-menu a {
    padding: 4px 0;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    display: inline-block;
    border-bottom: none;
    transition: color 0.3s ease;
}

.hp-mega-menu-links .sub-menu a:hover {
    color: #1a3a5f;
    background: transparent;
}


/* Shop By Condition Button */
.hp-shop-condition-btn {
    display: inline-block;
    padding: 12px 24px;
    background: linear-gradient(to bottom, #061B5D, #113FA2);
    color: #ffffff !important;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    border-radius: 4px;
    transition: opacity 0.3s ease;
    margin-top: 10px;
    width: auto;
    max-width: fit-content;
}

.hp-shop-condition-btn:hover {
    opacity: 0.9;
    color: #ffffff !important;
}

/* Featured Product Section */
.hp-mega-menu-featured {
    flex: 0 0 300px;
    border-left: 1px solid #e5e5e5;
    padding-left: 10px;
    margin-left: 0;
}

.hp-featured-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 20px 0;
    text-transform: none;
}

.hp-featured-image {
    display: block;
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 4px;
}

.hp-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.hp-featured-image:hover img {
    transform: scale(1.05);
}

.hp-featured-product-name {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 10px 0;
}

.hp-featured-product-name a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.hp-featured-product-name a:hover {
    color: #1a3a5f;
}

.hp-featured-description {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Header Right - Icons */
.hp-header-right {
    flex: 0 0 auto;
}

.hp-header-icons {
    display: flex;
    align-items: center;
    gap: 25px;
}

.hp-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #061B5D;
    position: relative;
    transition: color 0.3s ease;
}

.hp-icon-link:hover {
    color: #113FA2;
}

.hp-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: currentColor;
    margin-bottom: 4px;
    display: block;
}

.hp-icon-link svg,
.hp-mobile-icon-link svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: currentColor;
    display: block;
    flex-shrink: 0;
}

.hp-icon-link svg path,
.hp-mobile-icon-link svg path {
    stroke: currentColor;
    fill: currentColor;
}

.hp-icon-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Cart Count Badge */
.hp-cart-count {
    position: absolute;
    top: -5px;
    right: -8px;
    background: linear-gradient(to bottom, #061B5D, #113FA2);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.hp-cart-count:empty {
    display: none;
}

/* Search Overlay */
.hp-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(6, 27, 93, 0.95), rgba(17, 63, 162, 0.95));
    backdrop-filter: blur(8px);
    z-index: 9999;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
}

.hp-search-overlay.active {
    display: flex;
}

.hp-search-container {
    width: 90%;
    max-width: 700px;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hp-search-form {
    display: flex;
    align-items: center;
    background: #ffffff;
    border-radius: 12px;
    padding: 8px 8px 8px 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(6, 27, 93, 0.3);
    transition: all 0.3s ease;
}

.hp-search-form:focus-within {
    border-color: rgba(6, 27, 93, 0.6);
    box-shadow: 0 10px 40px rgba(6, 27, 93, 0.2), 0 0 0 4px rgba(6, 27, 93, 0.1);
    transform: translateY(-2px);
}

.hp-search-input {
    flex: 1;
    border: none;
    outline: none;
    padding: 18px 15px;
    font-size: 18px;
    background: transparent;
    color: #061B5D;
    font-weight: 500;
}

.hp-search-input::placeholder {
    color: #999;
    font-weight: 400;
}

.hp-search-submit {
    background: linear-gradient(to bottom, #061B5D, #113FA2);
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-left: 8px;
}

.hp-search-submit:hover {
    background: linear-gradient(to bottom, #113FA2, #061B5D);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(6, 27, 93, 0.4);
}

.hp-search-submit svg {
    width: 24px;
    height: 24px;
    color: #ffffff;
}

.hp-search-submit svg circle,
.hp-search-submit svg path {
    stroke: currentColor;
    fill: none;
}

/* Mobile Menu Toggle Button */
.hp-mobile-menu-toggle {
    display: none;
    background: none !important;
    border: none !important;
    cursor: pointer;
    padding: 8px;
    margin-left: 15px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    outline: none !important;
    box-shadow: none !important;
}

.hp-mobile-menu-toggle:focus,
.hp-mobile-menu-toggle:active,
.hp-mobile-menu-toggle:hover,
.hp-mobile-menu-toggle:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
    border: none !important;
    background-color: transparent !important;
}

.hp-mobile-menu-toggle:focus-visible {
    outline: 2px solid #1a3a5f !important;
    outline-offset: 2px;
    border-radius: 4px;
}

.hp-burger-icon {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.hp-burger-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background: #1a3a5f !important;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hp-mobile-menu-toggle:hover .hp-burger-icon span,
.hp-mobile-menu-toggle:focus .hp-burger-icon span,
.hp-mobile-menu-toggle:active .hp-burger-icon span {
    background: #1a3a5f !important;
}

.hp-mobile-menu-toggle.active .hp-burger-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hp-mobile-menu-toggle.active .hp-burger-icon span:nth-child(2) {
    opacity: 0;
}

.hp-mobile-menu-toggle.active .hp-burger-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu */
.hp-mobile-menu {
    display: none !important;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
}

.hp-mobile-menu.active {
    display: block !important;
    max-height: 1000px;
    opacity: 1;
    visibility: visible;
}

.hp-mobile-nav {
    padding: 20px;
}

.hp-mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hp-mobile-nav-menu li {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.hp-mobile-nav-menu li:last-child {
    border-bottom: none;
}

.hp-mobile-nav-menu a {
    display: block;
    padding: 15px 0;
    color: #1a3a5f;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: color 0.3s ease;
}

.hp-mobile-nav-menu a:hover {
    color: #2a5a8f;
}

.hp-mobile-nav-menu .sub-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 0 0 0 20px;
    background: #f9f9f9;
}



.hp-mobile-nav-menu .sub-menu li {
    border-bottom: 1px solid #e5e5e5;
}

.hp-mobile-nav-menu .sub-menu a {
    padding: 12px 0;
    font-size: 14px;
    color: #666;
}

.hp-mobile-nav-menu .menu-item-has-children>a::after {
    content: '+';
    float: right;
    font-size: 20px;
    font-weight: 300;
}

.hp-mobile-nav-menu .menu-item-has-children.active>a::after {
    content: '−';
}

/* Mobile Icons */
.hp-mobile-icons {
    display: flex;
    justify-content: space-around;
    padding: 20px;
    border-top: 1px solid #e5e5e5;
    background: #f9f9f9;
}

.hp-mobile-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #1a3a5f;
    gap: 8px;
    position: relative;
    flex: 1;
}

.hp-mobile-icon-link .hp-icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    fill: none;
}

.hp-mobile-icon-link span {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hp-mobile-icon-link .hp-cart-count {
    position: absolute;
    top: -5px;
    right: 20%;
    background: linear-gradient(to bottom, #061B5D, #113FA2);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

/* Responsive Design */
@media (max-width: 1440px) {
    .hp-logo img {
        max-height: 50px;
    }
}

@media (max-width: 1024px) {
    .hp-header-center {
        display: none;
    }

    .hp-header-icons {
        display: none;
    }

    .hp-mobile-menu-toggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .hp-header {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .hp-container {
        padding: 0 20px;
    }

    .hp-announcement-bar .hp-container {
        padding: 0 20px;
        gap: 10px;
    }

    .hp-marquee-arrow {
        padding: 5px;
    }

    .hp-marquee-arrow svg {
        width: 14px;
        height: 14px;
    }

    .hp-header-center {
        display: none;
    }

    .hp-header-icons {
        display: none;
    }

    .hp-mobile-menu-toggle {
        display: flex;
    }

    .hp-announcement-text {
        font-size: 12px;
    }


    .hp-logo img {
        max-height: 45px;
    }
}

@media (max-width: 480px) {
    .hp-logo img {
        max-height: 35px;
    }

    .hp-header-icons {
        gap: 10px;
    }

    .hp-icon {
        width: 20px;
        height: 20px;
    }

    .hp-icon-label {
        font-size: 9px;
    }
}