/* ==========================================================
   JR MEGA HEADER - Professional Black & White Theme
   ========================================================== */

.jr-mh-wrapper * { box-sizing: border-box; }
.jr-mh-wrapper a { text-decoration: none; }
.jr-mh-wrapper ul { list-style: none; padding: 0; margin: 0; }
.jr-mh-wrapper button { background: none; border: none; cursor: pointer; padding: 0; font: inherit; }

/* ===== TOP BAR ===== */
.jr-mh-topbar {
    background-color: #000000;
    color: #ffffff;
    font-size: 13px;
    line-height: 1.4;
}
.jr-mh-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 8px 20px;
}
.jr-mh-topbar-left { flex: 1; }
.jr-mh-topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}
.jr-mh-tb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    transition: color .2s;
}
.jr-mh-tb-item i, .jr-mh-tb-item svg { font-size: 13px; }

/* ===== MAIN ROW ===== */
.jr-mh-main {
    background-color: #ffffff;
    position: relative;
}
.jr-mh-main-inner {
    display: flex;
    align-items: center;
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Logo */
.jr-mh-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.jr-mh-logo img {
    max-width: 160px;
    height: auto;
    display: block;
}
.jr-mh-logo-mobile { display: none; }

/* Search */
.jr-mh-search {
    flex: 1;
    max-width: 600px;
}
.jr-mh-search-form {
    display: flex;
    align-items: stretch;
    border: 2px solid #000000;
    border-radius: 4px;
    overflow: hidden;
    background: #ffffff;
    position: relative;
    height: 46px;
}
.jr-mh-search-cat {
    background: #f5f5f5;
    border: none;
    border-right: 1px solid #e0e0e0;
    padding: 0 12px;
    font-size: 14px;
    cursor: pointer;
    max-width: 160px;
    outline: none;
    color: #000;
}
.jr-mh-search-input {
    flex: 1;
    border: none;
    padding: 0 14px;
    font-size: 14px;
    outline: none;
    background: transparent;
    color: #000;
    min-width: 0;
}
.jr-mh-search-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 20px;
    background: #000000;
    color: #ffffff;
    font-weight: 600;
    transition: background .2s;
    font-size: 14px;
}
.jr-mh-search-btn:hover { background: #333333; }
.jr-mh-search-btn i { font-size: 14px; }

/* AJAX Results */
.jr-mh-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    max-height: 450px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 6px 20px rgba(0,0,0,.1);
}
.jr-mh-res-list { padding: 8px 0; }
.jr-mh-res-item a {
    display: flex;
    gap: 12px;
    padding: 10px 14px;
    align-items: center;
    color: #000;
    transition: background .2s;
}
.jr-mh-res-item a:hover { background: #f5f5f5; }
.jr-mh-res-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
}
.jr-mh-res-info { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.jr-mh-res-title { font-size: 14px; font-weight: 500; }
.jr-mh-res-price { font-size: 13px; color: #555; }
.jr-mh-res-price del { opacity: .6; margin-right: 6px; }
.jr-mh-res-all {
    display: block;
    text-align: center;
    padding: 12px;
    background: #000;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}
.jr-mh-no-res, .jr-mh-res-list:empty {
    padding: 20px;
    text-align: center;
    color: #888;
}

/* Quick Icons */
.jr-mh-qi-list {
    display: flex;
    align-items: center;
    gap: 22px;
    flex-shrink: 0;
}
.jr-mh-qi-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    color: #000000;
    transition: color .2s;
    position: relative;
}
.jr-mh-qi-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.jr-mh-qi-item i { font-size: 22px; }
.jr-mh-qi-item:hover { color: #666; }
.jr-mh-qi-label {
    font-size: 11px;
    font-weight: 500;
    line-height: 1;
}
.jr-mh-qi-badge {
    position: absolute;
    top: -6px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    background: #000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 50px;
    text-align: center;
    box-sizing: border-box;
}
.jr-mh-qi-badge[data-cart-count="0"]:empty,
.jr-mh-qi-badge:empty { display: none; }
.jr-mh-mobile-search-toggle { display: none; }

/* ===== BOTTOM NAV ===== */
.jr-mh-nav {
    background-color: #000000;
}
.jr-mh-nav-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}
.jr-mh-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #fff;
    padding: 14px 18px;
    font-weight: 600;
    background: rgba(255,255,255,.1);
}
.jr-mh-nav-wrap {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}
.jr-mh-nav-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.jr-mh-nav-menu > li { position: relative; }
.jr-mh-nav-menu > li > a {
    display: block;
    padding: 15px 18px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    transition: color .2s;
}
.jr-mh-nav-menu > li > a:hover,
.jr-mh-nav-menu > li.current-menu-item > a {
    color: #cccccc;
}
.jr-mh-nav-menu > li.menu-item-has-children > a::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
    margin-left: 6px;
}

/* Submenu */
.jr-mh-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
    z-index: 999;
}
.jr-mh-nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.jr-mh-nav-menu .sub-menu li { position: relative; }
.jr-mh-nav-menu .sub-menu a {
    display: block;
    padding: 12px 18px;
    color: #000;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: all .2s;
}
.jr-mh-nav-menu .sub-menu a:hover {
    background: #000;
    color: #fff;
}
.jr-mh-nav-menu .sub-menu li:last-child a { border-bottom: none; }
.jr-mh-nav-menu .sub-menu .sub-menu {
    top: 0;
    left: 100%;
}
.jr-mh-nav-menu .sub-menu li.menu-item-has-children > a::after {
    content: '\f054';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
    float: right;
}

/* ===== HAMBURGER ===== */
.jr-mh-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 30px;
    height: 30px;
    padding: 0;
}
.jr-mh-hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #000000;
    transition: all .3s;
}

/* ===== MOBILE EXPANDABLE SEARCH ===== */
.jr-mh-mobile-search-bar {
    display: none;
    padding: 10px 15px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}
.jr-mh-mobile-search-bar.active { display: block; }
.jr-mh-mobile-search-bar form {
    display: flex;
    border: 2px solid #000;
    border-radius: 4px;
    overflow: hidden;
    height: 42px;
}
.jr-mh-mobile-search-bar input {
    flex: 1;
    border: none;
    padding: 0 14px;
    outline: none;
    font-size: 14px;
}
.jr-mh-mobile-search-bar button {
    background: #000;
    color: #fff;
    padding: 0 18px;
}

/* ===== DRAWER ===== */
.jr-mh-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,.5);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}
.jr-mh-overlay.active {
    opacity: 1;
    visibility: visible;
}
.jr-mh-drawer {
    position: fixed;
    top: 0;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background: #ffffff;
    z-index: 99999;
    overflow-y: auto;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
    box-shadow: 0 0 30px rgba(0,0,0,.15);
}
.jr-mh-drawer-left .jr-mh-drawer { left: 0; transform: translateX(-100%); }
.jr-mh-drawer-right .jr-mh-drawer { right: 0; transform: translateX(100%); }
.jr-mh-drawer.active { transform: translateX(0); }

.jr-mh-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px;
    border-bottom: 1px solid #eee;
    background: #000;
}
.jr-mh-drawer-logo img { max-width: 120px; max-height: 50px; }
.jr-mh-drawer-close {
    color: #fff;
    font-size: 22px;
    padding: 6px;
}

.jr-mh-drawer-search {
    padding: 15px;
    border-bottom: 1px solid #eee;
}
.jr-mh-drawer-search form {
    display: flex;
    border: 2px solid #000;
    border-radius: 4px;
    overflow: hidden;
}
.jr-mh-drawer-search input {
    flex: 1;
    border: none;
    padding: 10px 12px;
    outline: none;
    font-size: 14px;
}
.jr-mh-drawer-search button {
    background: #000;
    color: #fff;
    padding: 0 16px;
}

.jr-mh-drawer-menu { padding: 10px 0; }
.jr-mh-drawer-menu-ul li { border-bottom: 1px solid #f0f0f0; }
.jr-mh-drawer-menu-ul a {
    display: block;
    padding: 14px 18px;
    color: #000;
    font-size: 15px;
    font-weight: 500;
    position: relative;
    transition: all .2s;
}
.jr-mh-drawer-menu-ul a:hover { background: #f5f5f5; }
.jr-mh-drawer-menu-ul .sub-menu {
    display: none;
    background: #f9f9f9;
}
.jr-mh-drawer-menu-ul li.jr-open > .sub-menu { display: block; }
.jr-mh-drawer-menu-ul .sub-menu a {
    padding-left: 36px;
    font-size: 14px;
    font-weight: 400;
}
.jr-mh-drawer-menu-ul .sub-menu .sub-menu a { padding-left: 54px; }
.jr-mh-drawer-menu-ul li.menu-item-has-children > a::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 11px;
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform .25s;
}
.jr-mh-drawer-menu-ul li.jr-open > a::after { transform: translateY(-50%) rotate(180deg); }

.jr-mh-drawer-contact {
    padding: 15px 18px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.jr-mh-drawer-contact-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #000;
    font-size: 14px;
}
.jr-mh-drawer-contact-item i { color: #555; }

/* Body scroll lock */
body.jr-mh-drawer-open { overflow: hidden; }

/* ===== STICKY ===== */
.jr-mh-sticky.jr-mh-is-sticky .jr-mh-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    animation: jrMhSlide .35s ease;
}
.jr-mh-sticky.jr-mh-is-sticky.jr-mh-sticky-main-only .jr-mh-topbar { display: none; }
.jr-mh-sticky.jr-mh-is-sticky.jr-mh-sticky-main-only .jr-mh-nav { display: none; }

.jr-mh-sticky.jr-mh-hide-sticky .jr-mh-header {
    transform: translateY(-100%);
}

@keyframes jrMhSlide {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* ==========================================================
   RESPONSIVE - MOBILE (≤1024 by default)
   ========================================================== */
@media (max-width: 1024px) {
    .jr-mh-bp-1024.jr-mh-tb-hide-mobile .jr-mh-topbar { display: none; }
    .jr-mh-bp-1024 .jr-mh-main-inner { gap: 12px; padding: 12px 15px; }
    .jr-mh-bp-1024 .jr-mh-hamburger { display: flex; }
    .jr-mh-bp-1024 .jr-mh-search { display: none; }
    .jr-mh-bp-1024 .jr-mh-nav { display: none; }
    .jr-mh-bp-1024 .jr-mh-qi-label { display: none; }
    .jr-mh-bp-1024 .jr-mh-mobile-search-toggle { display: inline-flex; }
    .jr-mh-bp-1024 .jr-mh-qi-list { gap: 16px; margin-left: auto; }
    .jr-mh-bp-1024 .jr-mh-logo { flex: 1; justify-content: center; }
    .jr-mh-bp-1024 .jr-mh-logo img { max-width: 110px; }
    .jr-mh-bp-1024.jr-mh-no-mobile-search .jr-mh-mobile-search-toggle { display: none; }
    .jr-mh-bp-1024.jr-mh-no-mobile-search .jr-mh-mobile-search-bar { display: none !important; }
}

@media (max-width: 767px) {
    .jr-mh-bp-767.jr-mh-tb-hide-mobile .jr-mh-topbar { display: none; }
    .jr-mh-bp-767 .jr-mh-main-inner { gap: 10px; padding: 12px 15px; }
    .jr-mh-bp-767 .jr-mh-hamburger { display: flex; }
    .jr-mh-bp-767 .jr-mh-search { display: none; }
    .jr-mh-bp-767 .jr-mh-nav { display: none; }
    .jr-mh-bp-767 .jr-mh-qi-label { display: none; }
    .jr-mh-bp-767 .jr-mh-mobile-search-toggle { display: inline-flex; }
    .jr-mh-bp-767 .jr-mh-qi-list { gap: 14px; margin-left: auto; }
    .jr-mh-bp-767 .jr-mh-logo { flex: 1; justify-content: center; }
    .jr-mh-bp-767 .jr-mh-logo img { max-width: 110px; }
    .jr-mh-bp-767.jr-mh-no-mobile-search .jr-mh-mobile-search-toggle { display: none; }
    .jr-mh-bp-767.jr-mh-no-mobile-search .jr-mh-mobile-search-bar { display: none !important; }

    .jr-mh-logo-desktop { display: none; }
    .jr-mh-logo-mobile { display: block; }
}

/* Editor preview fix */
.elementor-editor-active .jr-mh-sticky.jr-mh-is-sticky .jr-mh-header {
    position: relative !important;
}
.elementor-editor-active .jr-mh-overlay,
.elementor-editor-active .jr-mh-drawer { display: none !important; }

/* ==========================================================
   NEW LAYOUTS & FIXES
   ========================================================== */

/* Layout 2: Logo | Nav | Icons */
.jr-mh-layout-2 .jr-mh-search {
    display: none;
}
.jr-mh-nav-inline {
    flex: 1;
    display: flex;
    align-items: center;
}
.jr-mh-nav-inline .jr-mh-nav-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.jr-mh-nav-inline .jr-mh-nav-menu > li {
    position: relative;
}
.jr-mh-nav-inline .jr-mh-nav-menu > li > a {
    display: block;
    padding: 12px 18px;
    color: #000;
    font-size: 14px;
    font-weight: 500;
    transition: color .2s;
}
.jr-mh-nav-inline .jr-mh-nav-menu > li > a:hover {
    color: #666;
}
.jr-mh-nav-inline .jr-mh-nav-menu > li.menu-item-has-children > a::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 10px;
    margin-left: 6px;
}
.jr-mh-nav-inline .jr-mh-nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
    z-index: 999;
    list-style: none;
    padding: 0;
    margin: 0;
}
.jr-mh-nav-inline .jr-mh-nav-menu li:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.jr-mh-nav-inline .jr-mh-nav-menu .sub-menu a {
    display: block;
    padding: 12px 18px;
    color: #000;
    font-size: 14px;
    border-bottom: 1px solid #f0f0f0;
    transition: all .2s;
}
.jr-mh-nav-inline .jr-mh-nav-menu .sub-menu a:hover {
    background: #000;
    color: #fff;
}

/* Search grow control */
.jr-mh-search {
    flex: 1;
}
.jr-mh-search-no-grow .jr-mh-search {
    flex: 0 1 auto;
}

/* Quick Icons Wrapper (for mini cart positioning) */
.jr-mh-qi-wrapper {
    position: relative;
}

/* ==========================================================
   MINI CART DROPDOWN
   ========================================================== */
.jr-mh-minicart {
    position: absolute;
    top: 100%;
    right: 0;
    width: 340px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(0,0,0,.15);
    border: 1px solid #eee;
    padding: 18px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all .25s ease;
    margin-top: 10px;
}
.jr-mh-qi-wrapper:hover .jr-mh-minicart,
.jr-mh-minicart:hover,
.jr-mh-minicart.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Invisible bridge so hover doesn't break */
.jr-mh-qi-wrapper:has(.jr-mh-minicart)::after {
    content: '';
    position: absolute;
    top: 100%;
    right: 0;
    width: 340px;
    height: 15px;
    z-index: 9998;
}

/* WooCommerce mini cart styles */
.jr-mh-minicart .woocommerce-mini-cart {
    list-style: none;
    padding: 0;
    margin: 0 0 12px;
    max-height: 280px;
    overflow-y: auto;
}
.jr-mh-minicart .woocommerce-mini-cart-item,
.jr-mh-minicart .mini_cart_item {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0 !important;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}
.jr-mh-minicart .mini_cart_item img {
    width: 50px !important;
    height: 50px !important;
    object-fit: cover;
    border-radius: 4px;
    margin: 0 !important;
    float: none !important;
}
.jr-mh-minicart .mini_cart_item a:not(.remove) {
    color: #000;
    font-size: 13px;
    font-weight: 500;
    flex: 1;
    text-decoration: none;
}
.jr-mh-minicart .mini_cart_item .quantity {
    display: block;
    font-size: 12px;
    color: #555;
    margin-top: 4px;
}
.jr-mh-minicart .mini_cart_item .remove,
.jr-mh-minicart .mini_cart_item a.remove {
    position: absolute !important;
    top: 10px;
    right: 0;
    width: 18px;
    height: 18px;
    line-height: 18px;
    border-radius: 50%;
    background: #000;
    color: #fff !important;
    text-align: center;
    font-size: 12px;
    text-decoration: none;
    opacity: .6;
    transition: opacity .2s;
}
.jr-mh-minicart .mini_cart_item .remove:hover {
    opacity: 1;
}
.jr-mh-minicart .woocommerce-mini-cart__total,
.jr-mh-minicart .total {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-top: 2px solid #000;
    font-weight: 700;
    font-size: 14px;
    margin: 0 0 12px;
}
.jr-mh-minicart .woocommerce-mini-cart__buttons,
.jr-mh-minicart .buttons {
    display: flex;
    gap: 8px;
    margin: 0;
}
.jr-mh-minicart .woocommerce-mini-cart__buttons .button,
.jr-mh-minicart .buttons .button {
    flex: 1;
    text-align: center;
    padding: 10px 12px !important;
    background: #000;
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: background .2s;
    display: block;
    line-height: 1;
}
.jr-mh-minicart .woocommerce-mini-cart__buttons .button:hover,
.jr-mh-minicart .buttons .button:hover {
    background: #333;
}
.jr-mh-minicart .woocommerce-mini-cart__buttons .checkout,
.jr-mh-minicart .buttons .checkout {
    background: #FF8C00;
}
.jr-mh-minicart .woocommerce-mini-cart__empty-message,
.jr-mh-minicart .empty {
    text-align: center;
    padding: 20px 0;
    color: #888;
    font-size: 14px;
    margin: 0;
}

/* Hide mini cart on mobile */
@media (max-width: 1024px) {
    .jr-mh-bp-1024 .jr-mh-minicart { display: none !important; }
}
@media (max-width: 767px) {
    .jr-mh-bp-767 .jr-mh-minicart { display: none !important; }
}