/* Anchor context */
.wc-category-megamenu {
    position: relative;
    width: 100%;
}

.wc-mega-top {
    display: flex;
    gap: 28px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wc-mega-top > li > a {
    text-decoration: none;
    font-weight: 400;
    padding: 12px 0;
    display: inline-block;
}


/* Dropdown */
.wc-mega-dropdown {
    position: absolute;
    left: 0;
    top: 100%;
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    background: #fff;
    padding: 32px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    display: none;
    z-index: 1000;
}

/* Masonry layout via columns */
.wc-mega-columns {
    column-count: 4;
    column-gap: 40px;
}

@media (max-width: 1200px) {
    .wc-mega-columns { column-count: 3; }
}
@media (max-width: 800px) {
    .wc-mega-columns { column-count: 2; }
}

/* Prevent column breaks inside groups */
.wc-mega-column {
    break-inside: avoid;
    margin-bottom: 24px;
}

/* Level 2 */
.wc-mega-parent {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    text-decoration: none;
    text-wrap: nowrap;
}

/* Level 3+ */
.wc-mega-sub {
    list-style: none;
    padding: 0;
    margin: 0;
    text-wrap: nowrap;
}


.wc-mega-sub li a {
    display: block;
    font-weight: 400;
    text-decoration: none;
    padding: 3px 0;
}

.wc-mega-parent:hover,
.wc-mega-sub li a:hover {
    color: var(--primary);
}


/* Base sub list */
.wc-mega-sub {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* Level 3+ */
.wc-mega-sub a {
    display: block;
    font-weight: 400;
    padding: 3px 0;
    text-decoration: none;
}

/* Optional visual indentation for deep levels */
.wc-mega-sub.level-4 a { padding-left: 10px; }
.wc-mega-sub.level-5 a { padding-left: 20px; }
.wc-mega-sub.level-6 a { padding-left: 30px; }

/* ---------- DASH PREFIXES ---------- */

.wc-mega-sub li {
    position: relative;
}

/* Level 3: single dash */
.wc-mega-sub.level-3 > li > a::before {
    content: "– ";
}

/* Level 4: double dash */
.wc-mega-sub.level-4 > li > a::before {
    content: "–– ";
}

/* Level 5+: auto-repeat dash visually */
.wc-mega-sub.level-5 > li > a::before {
    content: "––– ";
}
.wc-mega-sub.level-6 > li > a::before {
    content: "–––– ";
}

/* ---------- TOP LEVEL ACTIVE STATE ---------- */

/* Default state */
.wc-mega-item > a {
    border-top: 3px solid transparent;
    transition: border-color 0.2s ease;
}

/* Hover OR active (dropdown open) */
.wc-mega-item.wc-mega-active > a {
    border-top-color: var(--primary);
    color: var(--primary);
}


