
/* =========================================================
   MAHERA JEWELS - GLOBAL LAYOUT
   Header, navigation, search, mobile menu and footer
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--mj-background);
    color: var(--mj-text);
    font-family: var(--mj-font-body);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

body,
button,
input {
    font-family: var(--mj-font-body);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   ANNOUNCEMENT BAR
   ========================================================= */

.announcement-bar {
    min-height: 32px;
    padding: 6px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--mj-white);
    background: linear-gradient(
        105deg,
        var(--mj-primary),
        var(--mj-gold) 72%,
        var(--mj-announcement-end)
    );
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}

.announcement-divider {
    opacity: 0.75;
}

/* =========================================================
   STORE HEADER
   ========================================================= */

.store-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgb(255 255 255 / 98%);
    border-bottom: 1px solid var(--mj-header-border);
    backdrop-filter: blur(12px);
}

.store-header,
.store-header * {
    box-sizing: border-box;
}

.store-header .header-inner {
    width: min(100%, var(--mj-content-width));
    min-height: 76px;
    margin: 0 auto;
    padding: 10px clamp(16px, 2.5vw, 36px);

    display: grid;
    grid-template-columns: 100px minmax(0, 1fr) 225px auto;
    align-items: center;
    gap: clamp(12px, 1.5vw, 24px);
}

/* Logo */

.store-header .brand {
    grid-column: 1;
    grid-row: 1;

    display: inline-flex;
    align-items: center;
    justify-content: flex-start;

    width: 100%;
    min-width: 0;
    color: var(--mj-primary);
}

.store-header .brand-logo {
    width: 100%;
    max-width: 100px;
    height: 48px;
    object-fit: contain;
    object-position: left center;
}

.store-header .brand-wordmark {
    display: flex;
    flex-direction: column;
    align-items: center;

    font-family: var(--mj-font-display);
    font-size: 23px;
    line-height: 1;
    color: var(--mj-primary);
    white-space: nowrap;
}

.store-header .brand-wordmark small {
    margin-top: 3px;
    font-family: var(--mj-font-body);
    font-size: 8px;
    letter-spacing: 1.5px;
}

/* Desktop navigation */

.store-header .desktop-nav {
    grid-column: 2;
    grid-row: 1;

    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: clamp(10px, 1.15vw, 18px);

    min-width: 0;
    overflow: visible;
}

.store-header .desktop-nav > a,
.store-header .nav-category > .nav-category-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;

    min-height: 42px;
    flex: 0 0 auto;

    color: var(--mj-text);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    white-space: nowrap;

    transition: color var(--mj-transition);
}

.store-header .desktop-nav > a:hover,
.store-header .nav-category > .nav-category-link:hover,
.store-header .nav-category:focus-within > .nav-category-link {
    color: var(--mj-primary);
}

.store-header .nav-category {
    position: relative;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    min-width: 0;
}

.store-header .nav-chevron {
    display: inline-block;
    font-size: 13px;
    line-height: 1;
    color: var(--mj-primary);
}

/* Mega menu: absolutely positioned, not part of nav row */

.store-header .category-mega-menu {
    position: absolute;
    top: calc(100% - 1px);
    left: 0;
    z-index: 120;

    display: block;
    width: 290px;
    max-width: min(340px, 90vw);
    padding: 18px;

    background: var(--mj-white);
    border: 1px solid var(--mj-header-border);
    box-shadow: 0 12px 30px rgb(45 0 25 / 12%);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(8px);

    transition:
        opacity 160ms ease,
        transform 160ms ease,
        visibility 160ms ease;
}

.store-header .nav-category:hover > .category-mega-menu,
.store-header .nav-category:focus-within > .category-mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.store-header .category-mega-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;

    padding-bottom: 12px;
    border-bottom: 1px solid var(--mj-border);

    color: var(--mj-primary);
    font-family: var(--mj-font-display);
    font-size: 18px;
}

.store-header .category-mega-heading a {
    color: var(--mj-primary);
    font-family: var(--mj-font-body);
    font-size: 10px;
    font-weight: 700;
    white-space: nowrap;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.store-header .category-mega-links {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
    padding-top: 8px;
}

.store-header .category-mega-links a {
    display: block;
    padding: 10px 2px;

    color: var(--mj-text);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    text-transform: none;
    white-space: normal;

    border-bottom: 1px solid var(--mj-soft-border);
    transition: color 160ms ease, padding-left 160ms ease;
}

.store-header .category-mega-links a:last-child {
    border-bottom: 0;
}

.store-header .category-mega-links a:hover {
    padding-left: 7px;
    color: var(--mj-primary);
}

/* =========================================================
   HEADER SEARCH
   ========================================================= */

.store-header .header-search-wrap {
    position: relative;
    grid-column: 3;
    grid-row: 1;

    width: 100%;
    min-width: 0;
}

.store-header .header-search {
    width: 100%;
    height: 40px;
    padding: 0 11px 0 14px;

    display: flex;
    align-items: center;
    gap: 8px;

    border: 1px solid var(--mj-search-border);
    border-radius: 30px;
    background: var(--mj-search-background);
}

.store-header .header-search:focus-within {
    border-color: var(--mj-primary);
}

.store-header .header-search input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0;

    border: 0;
    outline: 0;
    background: transparent;
    color: var(--mj-text);
    font-size: 12px;
}

.store-header .header-search input::placeholder {
    color: var(--mj-search-placeholder);
}

.store-header .header-search button {
    flex: 0 0 25px;
    width: 25px;
    height: 30px;

    display: grid;
    place-items: center;

    padding: 3px;
    border: 0;
    background: transparent;
    color: var(--mj-primary);
}

.store-header .header-search svg,
.store-header .header-action svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Live search suggestions */

.store-header .search-suggestions {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    z-index: 150;

    max-height: 420px;
    overflow-y: auto;
    padding: 8px;

    border: 1px solid var(--mj-header-border);
    background: var(--mj-white);
    box-shadow: 0 12px 30px rgb(45 0 25 / 12%);
}

.store-header .search-suggestion-group + .search-suggestion-group {
    margin-top: 8px;
    border-top: 1px solid var(--mj-border);
}

.store-header .search-suggestion-title {
    padding: 9px 10px 5px;
    color: var(--mj-primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.store-header .search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px;

    color: var(--mj-text);
    font-size: 12px;
}

.store-header .search-suggestion-item:hover,
.store-header .search-suggestion-item:focus {
    outline: 0;
    background: var(--mj-soft-border);
}

.store-header .search-suggestion-image {
    flex: 0 0 42px;
    width: 42px;
    height: 46px;
    object-fit: cover;
    background: var(--mj-background);
}

.store-header .search-suggestion-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.store-header .search-suggestion-name {
    font-weight: 600;
}

.store-header .search-suggestion-price {
    color: var(--mj-primary);
    font-weight: 600;
}

.store-header .search-suggestion-empty {
    padding: 16px 10px;
    color: var(--mj-muted);
    font-size: 12px;
}

/* =========================================================
   HEADER ACTIONS AND CART BADGE
   ========================================================= */

.store-header .header-actions {
    grid-column: 4;
    grid-row: 1;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(10px, 1.2vw, 18px);

    min-width: 0;
}

.store-header .header-action {
    position: relative;

    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;

    min-width: 32px;
    color: var(--mj-text);
    font-size: 10px;
    line-height: 1.3;
    white-space: nowrap;
}

.store-header .header-action:hover {
    color: var(--mj-primary);
}

.store-header .header-action-icon {
    position: relative;
    width: 24px;
    height: 24px;

    display: grid;
    place-items: center;
}

.store-header .header-action-icon svg {
    width: 21px;
    height: 21px;
}

.store-header .cart-icon-wrap {
    position: relative;
}

.store-header .cart-count-badge {
    position: absolute;
    top: -7px;
    right: -9px;

    min-width: 17px;
    height: 17px;
    padding: 0 4px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--mj-white);
    border-radius: 20px;
    background: var(--mj-primary);
    color: var(--mj-white);

    font-size: 9px;
    font-weight: 700;
    line-height: 1;
}

.store-header .cart-count-badge[hidden] {
    display: none !important;
}

/* =========================================================
   MOBILE MENU
   ========================================================= */

.store-header .mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 4px;

    width: 36px;
    height: 36px;
    padding: 7px;

    border: 1px solid var(--mj-border);
    border-radius: var(--mj-radius-sm);
    background: var(--mj-white);
    color: var(--mj-primary);
}

.store-header .mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    transition: transform 160ms ease, opacity 160ms ease;
}

.store-header .mobile-menu-toggle[aria-expanded="true"] span:first-child {
    transform: translateY(5.5px) rotate(45deg);
}

.store-header .mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.store-header .mobile-menu-toggle[aria-expanded="true"] span:last-child {
    transform: translateY(-5.5px) rotate(-45deg);
}

.store-header .mobile-nav {
    display: none;
    padding: 8px 18px 16px;
    border-top: 1px solid var(--mj-border);
    background: var(--mj-white);
}

.store-header .mobile-nav:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.store-header .mobile-nav > a,
.store-header .mobile-category-row > a {
    padding: 11px 4px;
    color: var(--mj-text);
    font-size: 13px;
}

.store-header .mobile-nav > a {
    display: block;
    border-bottom: 1px solid var(--mj-soft-border);
}

.store-header .mobile-category {
    border-bottom: 1px solid var(--mj-soft-border);
}

.store-header .mobile-category-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.store-header .mobile-category-row > a {
    flex: 1;
}

.store-header .mobile-category-row button {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;

    border: 0;
    background: transparent;
    color: var(--mj-primary);
    font-size: 20px;
}

.store-header .mobile-category-children {
    padding: 0 0 9px 15px;
}

.store-header .mobile-category-children a {
    display: block;
    padding: 9px 0;
    color: var(--mj-muted);
    font-size: 12px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.store-footer {
    margin-top: 52px;
    padding: 40px clamp(20px, 3vw, 48px) 0;
    background: var(--mj-footer-background);
    border-top: 1px solid var(--mj-footer-border);
}

.footer-grid {
    max-width: var(--mj-content-width);
    margin: auto;

    display: grid;
    grid-template-columns: 1.25fr repeat(4, 1fr);
    gap: 34px;
}

.footer-brand-block p {
    max-width: 230px;
    color: var(--mj-muted);
    font-size: 12px;
}

.footer-brand {
    justify-content: flex-start;
    margin-bottom: 12px;
}

.footer-grid h2 {
    margin: 3px 0 16px;
    color: var(--mj-primary);
    font-size: 13px;
}

.footer-grid > div:not(:first-child) h2::after {
    display: block;
    width: 25px;
    height: 2px;
    margin-top: 8px;
    background: var(--mj-gold);
    content: "";
}

.footer-grid > div > a:not(.brand) {
    display: block;
    margin: 10px 0;
    color: var(--mj-muted);
    font-size: 12px;
}

.footer-grid > div > a:hover {
    color: var(--mj-primary);
}

.footer-bottom {
    max-width: var(--mj-content-width);
    margin: 30px auto 0;
    padding: 15px 0;
    border-top: 1px solid var(--mj-border);

    display: flex;
    justify-content: space-between;
    gap: 16px;

    color: var(--mj-muted);
    font-size: 11px;
}

/* =========================================================
   LAPTOPS
   ========================================================= */

@media (max-width: 1350px) {
    .store-header .header-inner {
        grid-template-columns: 88px minmax(0, 1fr) 195px auto;
        gap: 12px;
        padding-inline: 20px;
    }

    .store-header .brand-logo {
        max-width: 88px;
    }

    .store-header .desktop-nav {
        gap: 10px;
    }

    .store-header .desktop-nav > a,
    .store-header .nav-category > .nav-category-link {
        font-size: 9px;
    }

    .store-header .header-actions {
        gap: 9px;
    }

    .store-header .header-action {
        font-size: 9px;
    }
}

/* =========================================================
   TABLETS
   ========================================================= */

@media (max-width: 1024px) {
    .store-header .header-inner {
        grid-template-columns: 90px minmax(0, 1fr) auto;
        min-height: 66px;
        gap: 14px;
        padding: 9px 20px;
    }

    .store-header .brand {
        grid-column: 1;
        grid-row: 1;
    }

    .store-header .brand-logo {
        max-width: 90px;
    }

    .store-header .desktop-nav {
        display: none;
    }

    .store-header .header-search-wrap {
        grid-column: 2;
        grid-row: 1;
    }

    .store-header .header-actions {
        grid-column: 3;
        grid-row: 1;
        gap: 12px;
    }

    .store-header .mobile-menu-toggle {
        display: none;
    }

    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {
    .announcement-bar {
        min-height: 28px;
        padding: 5px 8px;
        gap: 6px;
        font-size: 10px;
    }

    .store-header .header-inner {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        min-height: 0;
        gap: 10px;
        padding: 10px 14px;
    }

    .store-header .mobile-menu-toggle {
        grid-column: 1;
        grid-row: 1;
        display: flex;
    }

    .store-header .brand {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
        min-width: 0;
    }

    .store-header .brand-logo {
        width: auto;
        max-width: 115px;
        height: 38px;
        object-position: left center;
    }

    .store-header .brand-wordmark {
        font-size: 21px;
    }

    .store-header .header-actions {
        grid-column: 3;
        grid-row: 1;
        gap: 12px;
    }

    .store-header .header-action {
        min-width: 24px;
    }

    .store-header .header-action-label {
        display: none;
    }

    .store-header .header-action-icon {
        width: 23px;
        height: 23px;
    }

    .store-header .header-action-icon svg {
        width: 21px;
        height: 21px;
    }

    .store-header .header-search-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        margin: 0;
    }

    .store-header .header-search {
        height: 37px;
    }

    .store-header .category-mega-menu {
        display: none;
    }

    .store-header .mobile-nav {
        padding-inline: 16px;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 18px;
    }

    .footer-brand-block {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 5px;
    }

    .store-footer {
        margin-top: 35px;
        padding-top: 30px;
    }
}

/* =========================================================
   SMALL PHONES
   ========================================================= */

@media (max-width: 380px) {
    .store-header .header-inner {
        padding-inline: 10px;
        gap: 7px;
    }

    .store-header .brand-logo {
        max-width: 94px;
    }

    .store-header .header-actions {
        gap: 8px;
    }

    .store-header .mobile-menu-toggle {
        width: 32px;
        height: 34px;
    }

    .announcement-bar {
        font-size: 9px;
    }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== Mahera Jewels: header and mega menu corrections ===== */

.store-header {
    position: sticky;
    top: 0;
    z-index: 500;
    isolation: isolate;
    background: #fff;
}

.store-header .header-inner {
    position: relative;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr) minmax(210px, 30%) auto;
    align-items: center;
    gap: clamp(12px, 1.5vw, 22px);
    min-height: 64px;
}

.store-header .desktop-nav {
    display: flex;
    align-items: center;
    min-width: 0;
    overflow: visible;
    gap: clamp(10px, 1.25vw, 19px);
}

.store-header .desktop-nav > a,
.store-header .desktop-nav > .nav-category-trigger {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--mj-text);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.4;
    text-transform: uppercase;
    white-space: nowrap;
}

.store-header .nav-category-trigger:hover,
.store-header .nav-category-trigger[aria-expanded="true"] {
    color: var(--mj-primary);
}

/* Full-width shared category popup */
.store-header .category-mega-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 600;
    width: 100%;
    padding: 26px clamp(24px, 5vw, 80px) 32px;
    background: #fff;
    border-top: 1px solid var(--mj-border);
    box-shadow: 0 12px 28px rgb(40 0 20 / 12%);
}

.store-header .category-mega-menu[hidden],
.store-header .search-suggestions[hidden],
.store-header .mobile-nav[hidden] {
    display: none !important;
}

.store-header .mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 30px;
    width: 100%;
    max-width: var(--mj-content-width);
    margin: 0 auto;
}

.store-header .mega-menu-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.store-header .mega-menu-title {
    margin-bottom: 14px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--mj-primary);
    color: var(--mj-text);
    font-size: 12px;
    font-weight: 700;
}

.store-header .mega-menu-link {
    display: block;
    padding: 7px 0;
    color: var(--mj-muted);
    font-size: 12px;
    line-height: 1.5;
}

.store-header .mega-menu-title:hover,
.store-header .mega-menu-link:hover {
    color: var(--mj-primary);
}

/* Search dropdown */
.store-header .header-search-wrap {
    position: relative;
    min-width: 0;
    width: 100%;
}

.store-header .search-suggestions {
    position: absolute;
    top: calc(100% + 7px);
    left: 0;
    right: 0;
    z-index: 700;
    max-height: 420px;
    overflow-y: auto;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--mj-border);
    box-shadow: 0 10px 25px rgb(40 0 20 / 12%);
}

.store-header .search-suggestion-group + .search-suggestion-group {
    margin-top: 8px;
    border-top: 1px solid var(--mj-border);
}

.store-header .search-suggestion-title {
    padding: 9px 10px 5px;
    color: var(--mj-primary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.store-header .search-suggestion-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    color: var(--mj-text);
    font-size: 12px;
}

.store-header .search-suggestion-item:hover {
    background: var(--mj-background);
}

.store-header .search-suggestion-image {
    flex: 0 0 42px;
    width: 42px;
    height: 46px;
    object-fit: cover;
}

.store-header .search-suggestion-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.store-header .search-suggestion-name {
    font-weight: 600;
}

.store-header .search-suggestion-price {
    color: var(--mj-primary);
    font-weight: 600;
}

.store-header .search-suggestion-empty {
    padding: 14px 10px;
    color: var(--mj-muted);
    font-size: 12px;
}

/* Tablet and mobile */
@media (max-width: 1024px) {
    .store-header .header-inner {
        grid-template-columns: 36px minmax(0, 1fr) auto;
        gap: 12px;
        padding: 10px 18px;
    }

    .store-header .mobile-menu-toggle {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        width: 34px;
        height: 34px;
        border: 1px solid var(--mj-border);
        background: #fff;
    }

    .store-header .brand {
        grid-column: 2;
        grid-row: 1;
    }

    .store-header .desktop-nav {
        display: none;
    }

    .store-header .header-actions {
        grid-column: 3;
        grid-row: 1;
        gap: 12px;
    }

    .store-header .header-action-label {
        display: none;
    }

    .store-header .header-search-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .store-header .category-mega-menu {
        display: none !important;
    }

    .store-header .mobile-nav:not([hidden]) {
        display: flex;
        flex-direction: column;
        padding: 8px 18px 16px;
        background: #fff;
        border-top: 1px solid var(--mj-border);
    }

    .store-header .mobile-nav > a {
        display: block;
        padding: 11px 4px;
        border-bottom: 1px solid var(--mj-soft-border);
        font-size: 13px;
    }
}

@media (max-width: 380px) {
    .store-header .header-inner {
        gap: 8px;
        padding-inline: 10px;
    }

    .store-header .header-actions {
        gap: 8px;
    }
}

/* FIX: Category popup visibility and hover bridge */
.store-header {
    position: sticky;
    isolation: isolate;
    z-index: 500;
}

.store-header .header-inner {
    position: relative;
    z-index: 2;
    overflow: visible !important;
}

.store-header .desktop-nav {
    overflow: visible !important;
}

.store-header .category-mega-menu:not([hidden]) {
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 600 !important;
    width: 100% !important;
    min-height: 170px;
    padding: 26px 5vw 32px;
    background: #fff !important;
    box-shadow: 0 12px 28px rgb(40 0 20 / 12%);
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: none !important;
}

.store-header .category-mega-menu[hidden] {
    display: none !important;
}

.store-header .mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 30px;
    max-width: var(--mj-content-width);
    margin: 0 auto;
}

.store-header .mega-menu-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.store-header .mega-menu-title {
    margin-bottom: 14px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--mj-primary);
    font-size: 12px;
    font-weight: 700;
}

.store-header .mega-menu-link {
    padding: 7px 0;
    font-size: 12px;
    color: var(--mj-muted);
}

.store-header .mega-menu-link:hover {
    color: var(--mj-primary);
}

@media (max-width: 1024px) {
    .store-header .category-mega-menu:not([hidden]) {
        display: none !important;
    }
}

/* ===== Mega menu: reference-style full width ===== */

.store-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    isolation: isolate;
}

.store-header .header-inner {
    position: relative;
    overflow: visible !important;
}

.store-header .category-mega-menu:not([hidden]) {
    display: block !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    min-height: 185px;
    padding: 30px 0 34px !important;
    background: #fff !important;
    box-shadow: 0 12px 24px rgb(40 0 20 / 10%);
    z-index: 1001 !important;
}

.store-header .mega-menu-inner {
    display: grid !important;
    grid-template-columns: repeat(5, minmax(130px, 1fr)) !important;
    gap: 36px !important;
    width: min(100% - 80px, 1120px) !important;
    max-width: 1120px !important;
    margin: 0 auto !important;
    align-items: start !important;
}

.store-header .mega-menu-column {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    min-width: 0 !important;
    width: auto !important;
}

.store-header .mega-menu-title {
    display: inline-block !important;
    width: fit-content !important;
    max-width: 100%;
    margin: 0 0 12px !important;
    padding: 0 0 8px !important;
    border-bottom: 2px solid var(--mj-primary) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

.store-header .mega-menu-link {
    display: block !important;
    width: auto !important;
    max-width: 100%;
    padding: 7px 0 !important;
    font-size: 12px !important;
    line-height: 1.5 !important;
    white-space: normal !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
}

.store-header .mega-menu-title:hover,
.store-header .mega-menu-link:hover {
    color: var(--mj-primary) !important;
}

.store-header .category-mega-menu[hidden] {
    display: none !important;
}

@media (max-width: 1024px) {
    .store-header .category-mega-menu:not([hidden]) {
        display: none !important;
    }

    .store-header .mega-menu-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* =========================================================
   MAHERA JEWELS - FINAL FULL WIDTH CATEGORY MEGA MENU
========================================================= */

.store-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    isolation: isolate;
    overflow: visible;
}

.store-header .header-inner {
    position: relative;
    overflow: visible;
}

.store-header .desktop-nav {
    overflow: visible;
}

.store-header .nav-category-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--mj-text);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
}

.store-header .nav-category-trigger:hover,
.store-header .nav-category-trigger[aria-expanded="true"] {
    color: var(--mj-primary);
}

/* Hidden state */
.store-header .category-mega-menu[hidden] {
    display: none !important;
}

/* Full viewport panel */
.store-header .category-mega-menu:not([hidden]) {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;

    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 100vw !important;

    margin: 0 !important;
    padding: 30px 0 34px !important;

    background: #fff !important;
    border-top: 1px solid var(--mj-header-border);
    box-shadow: 0 12px 28px rgb(40 0 20 / 10%);

    z-index: 2000 !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;

    max-height: min(65vh, 520px);
    overflow-y: auto !important;
}

/* All real categories */
.store-header .mega-menu-inner {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;

    width: min(1200px, calc(100% - 80px)) !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 !important;

    gap: 28px 42px !important;
    align-items: start !important;
}

.store-header .mega-menu-column {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;

    width: 100% !important;
    min-width: 0 !important;
}

.store-header .mega-menu-title {
    display: inline-block !important;
    width: fit-content !important;
    max-width: 100%;

    margin: 0 0 14px !important;
    padding: 0 0 8px !important;

    border-bottom: 2px solid var(--mj-primary) !important;

    color: var(--mj-text) !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    overflow-wrap: break-word;
}

.store-header .mega-menu-link {
    display: block !important;
    width: 100% !important;

    padding: 7px 0 !important;

    color: var(--mj-muted) !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;

    white-space: normal !important;
    overflow-wrap: break-word;
    word-break: normal !important;
}

.store-header .mega-menu-title:hover,
.store-header .mega-menu-link:hover {
    color: var(--mj-primary) !important;
}

.store-header .mega-menu-empty {
    grid-column: 1 / -1;
    color: var(--mj-muted);
    font-size: 13px;
}

/* No desktop mega menu on tablet/mobile */
@media (max-width: 1024px) {
    .store-header .category-mega-menu:not([hidden]) {
        display: none !important;
    }
}



/* =========================================================
   MAHERA MOBILE HEADER ONLY
   Desktop rules above this block are intentionally untouched.
   ========================================================= */

.store-header .mobile-search-link {
    display: none;
}

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 1024px) {
    .store-header .header-inner {
        grid-template-columns: 36px minmax(0, 1fr) 36px auto;
        min-height: 62px;
        gap: 10px;
        padding: 9px 16px;
    }

    .store-header .mobile-menu-toggle {
        grid-column: 1;
        grid-row: 1;
        display: flex;
        width: 36px;
        height: 36px;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        gap: 4px;
        padding: 7px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--mj-primary);
    }

    .store-header .mobile-menu-toggle span {
        width: 21px;
        height: 1.7px;
        background: currentColor;
    }

    .store-header .brand {
        grid-column: 2;
        grid-row: 1;
        justify-self: start;
        min-width: 0;
    }

    .store-header .brand-logo {
        width: auto;
        max-width: 112px;
        height: 39px;
        object-position: left center;
    }

    .store-header .desktop-nav {
        display: none;
    }

    /* Mobile search is a link to the dedicated search page, not the desktop suggestion box. */
    .store-header .mobile-search-link {
        grid-column: 3;
        grid-row: 1;
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        color: var(--mj-primary);
    }

    .store-header .mobile-search-link svg {
        width: 21px;
        height: 21px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .store-header .header-search-wrap {
        display: none !important;
    }

    .store-header .header-actions {
        grid-column: 4;
        grid-row: 1;
        gap: 12px;
    }

    .store-header .header-profile-action,
    .store-header .header-action-label {
        display: none;
    }

    .store-header .header-action {
        min-width: 25px;
    }

    .store-header .header-action-icon {
        width: 24px;
        height: 24px;
    }

    .store-header .header-action-icon svg {
        width: 22px;
        height: 22px;
    }

    /* Desktop popup must never open on touch/tablet layout. */
    .store-header .category-mega-menu {
        display: none !important;
    }

    .store-header .mobile-nav:not([hidden]) {
        display: flex;
        flex-direction: column;
        max-height: calc(100dvh - 145px);
        overflow-y: auto;
        padding: 8px 18px 18px;
        background: var(--mj-white);
        border-top: 1px solid var(--mj-border);
        box-shadow: 0 14px 24px rgb(45 0 25 / 10%);
    }

    .store-header .mobile-nav-simple-link,
    .store-header .mobile-category-row > a {
        display: block;
        padding: 13px 3px;
        color: var(--mj-text);
        font-size: 13px;
        font-weight: 600;
        border-bottom: 1px solid var(--mj-soft-border);
    }

    .store-header .mobile-nav-section-label {
        padding: 16px 3px 7px;
        color: var(--mj-primary);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .12em;
        text-transform: uppercase;
    }

    .store-header .mobile-category {
        border-bottom: 1px solid var(--mj-soft-border);
    }

    .store-header .mobile-category-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .store-header .mobile-category-row > a {
        flex: 1;
        border-bottom: 0;
    }

    .store-header .mobile-category-row button {
        display: grid;
        place-items: center;
        flex: 0 0 36px;
        width: 36px;
        height: 36px;
        border: 0;
        background: transparent;
        color: var(--mj-primary);
        font-size: 23px;
    }

    .store-header .mobile-category-children {
        padding: 0 0 10px 15px;
    }

    .store-header .mobile-category-children a {
        display: block;
        padding: 9px 0;
        color: var(--mj-muted);
        font-size: 12px;
    }

    .mobile-bottom-nav {
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 1100;
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        min-height: 60px;
        padding: 6px 5px max(6px, env(safe-area-inset-bottom));
        background: var(--mj-white);
        border-top: 1px solid var(--mj-header-border);
        box-shadow: 0 -5px 18px rgb(45 0 25 / 7%);
    }

    .mobile-bottom-nav-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        padding: 2px;
        border: 0;
        background: transparent;
        color: var(--mj-muted);
        font-size: 10px;
        line-height: 1.2;
    }

    .mobile-bottom-nav-item svg {
        width: 20px;
        height: 20px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.6;
        stroke-linecap: round;
        stroke-linejoin: round;
    }

    .mobile-bottom-nav-item.is-active,
    .mobile-bottom-nav-item:focus-visible {
        color: var(--mj-primary);
    }

    .mobile-bottom-cart-icon {
        position: relative;
        display: inline-flex;
    }

    .mobile-bottom-cart-count {
        position: absolute;
        top: -6px;
        right: -9px;
        min-width: 15px;
        height: 15px;
        padding: 0 3px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 20px;
        background: var(--mj-primary);
        color: var(--mj-white);
        font-size: 8px;
        font-weight: 700;
    }

    .mobile-bottom-cart-count[hidden] {
        display: none !important;
    }

    body {
        padding-bottom: calc(68px + env(safe-area-inset-bottom));
    }
}

@media (max-width: 700px) {
    .announcement-bar {
        min-height: 28px;
        padding: 5px 8px;
        gap: 6px;
        font-size: 9px;
    }

    .store-header .header-inner {
        grid-template-columns: 34px minmax(0, 1fr) 32px auto;
        min-height: 58px;
        gap: 7px;
        padding: 8px 12px;
    }

    .store-header .brand-logo {
        max-width: 108px;
        height: 36px;
    }

    .store-header .brand-wordmark {
        font-size: 21px;
    }

    .store-header .header-actions {
        gap: 10px;
    }

    .store-header .header-action-icon {
        width: 22px;
        height: 22px;
    }

    .store-header .header-action-icon svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 380px) {
    .store-header .header-inner {
        grid-template-columns: 32px minmax(0, 1fr) 30px auto;
        gap: 5px;
        padding-inline: 9px;
    }

    .store-header .brand-logo {
        max-width: 94px;
    }

    .store-header .header-actions {
        gap: 7px;
    }

    .announcement-bar {
        font-size: 8px;
    }
}



/* Desktop mega-menu content: keep category columns compact and grouped.
   The full-width popup and desktop header layout remain unchanged. */
@media (min-width: 1025px) {
    .store-header .category-mega-menu:not([hidden]) {
        padding: 22px 0 24px !important;
    }

    .store-header .mega-menu-inner {
        grid-template-columns: repeat(auto-fit, minmax(180px, 220px)) !important;
        justify-content: start !important;
        align-content: start !important;
        gap: 22px 56px !important;
        width: min(1200px, calc(100% - 80px)) !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
    }

    .store-header .mega-menu-column {
        width: 100% !important;
        min-width: 0 !important;
    }
}
.mobile-back-button {
    display: none;
}

.mobile-back-button svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 1024px) {
    .mobile-back-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}