#products-panel {
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    transform-origin: top;
    box-shadow: rgb(170, 170, 170) 0px 3px 6px 0px;
    position: absolute;
    margin-top: 109px;
}

#products-panel.collapsed {
    height: 0;
}

#products-panel.expanded {
    height: 800px;
}

:is(.catItemHover, .catItemPreselected) {
    background-color: var(--primaryColor);
    border: none;
    margin: 0;
}

.catItem a {
    min-width: 0;
    min-height: 0;
    position: relative;
    display: block;
    border: 0;
    padding: 0;
    background-color: transparent;
    cursor: pointer;
}

.catDetails {
    background-repeat: no-repeat !important;
    background-size: 40% !important;
    background-position: right bottom !important;
    background-image: url("/graphic/birds.png") !important;
}

.catItem a {
    font-family: 'Graphik';
    font-size: 12pt;
    color: rgb(0, 0, 0);
    font-weight: 500;
    font-style: normal;
    text-align: left;
    padding: 5px 20px;
    width: 100%;
}

:is(.catItemHover, .catItemPreselected) a {
    font-family: 'Graphik';
    font-size: 12pt;
    color: rgb(255, 255, 255);
    font-weight: 500;
    font-style: normal;
    text-align: left;
    padding: 5px 20px;
}

.catList {
    padding: 0;
    height: 100%;
}

.treeList {
    background: var(--main-color);
}

.catDetailGridSection {
    text-align: left;
    margin: 0 0 10px 10px;
}

.catDetailGridSection a {
    display: block;
    box-sizing: border-box;
    color: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    font-family: 'Graphik';
    font-size: 12px;
    font-weight: 500;
    line-height: 21px;
    margin-bottom: 0;
    margin-top: 0;
    text-align: start;
}

.catDetailGridSection h3 {
    margin: 15px 0 5px 0;
}

.catDetailGridSection h3.single {
    margin: 15px 0 -10px 0;
}

.catDetailGridSection h3 a {
    box-sizing: border-box;
    color: rgb(0, 0, 0);
    cursor: pointer;
    font-family: 'Graphik';
    font-size: 12pt;
    font-weight: 500;
    line-height: 19.2px;
    margin-bottom: 0;
    margin-top: 0;
    text-align: start;
}

.tab-active {
    height: 5px;
    border-radius: 2px;
    background-color: var(--main-color);
    margin: 0 auto;
    position: unset;
    width: 100%;
}

.catDetailGridSection a {
    text-decoration: none;
    color: inherit;
    position: relative;
}

.catDetailGridSection a .material-icons-outlined {
    opacity: 0;
    vertical-align: middle;
    transition: opacity 0.2s ease-in-out;
}

.catDetailGridSection a:hover .material-icons-outlined {
    opacity: 1;
}

.catDetailGridSection .catDetailGridSectionLinkPreselected::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    background-color: var(--main-color);
    bottom: 1px;
    left: 0;
    transform: scaleX(0);
    transition: visibility 0s linear 0.3s, transform 0.3s;
    visibility: visible;
    transform: scaleX(1);
    transition-delay: 0s;
}

.overlay {
    display: none !important;
}

.treeTypeSection {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.treeTypeSection .treeTypeBtn {
    text-align: center;
    font-family: 'Graphik';
    font-size: 11pt;
    color: rgb(0, 0, 0);
    font-weight: 500;
    font-style: normal;
    width: 100%;
    min-width: 0;
    min-height: 0;
    position: relative;
    display: inline-block;
    border: 0;
    padding: 0;
    background-color: transparent;
    padding-top: 10px;
    padding-bottom: 10px;
    cursor: pointer;
    align-self: center;
}

.treeTypeSection .treeTypeBtn.treeTypeBtnHover {
    font-family: 'Graphik';
    font-size: 11pt;
    color: rgb(255, 255, 255);
    font-weight: 500;
    font-style: normal;
    background-color: var(--primaryColor);
    border: none;
    margin: 0;
}

.tree-type-text-content {
    position: relative;
}

.treeTypeBtn.treeTypeBtnHover .tree-type-text-content::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 100%;
    height: 2px;
    background-color: var(--main-color);
    border-radius: 2px;
}

#products-panel {
    width: 100% !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: row !important;
    background: #ffffff;
    height: 0;
    overflow: hidden;
    transition: height 0.3s ease;
    border: none;
    box-shadow: none;
}

body:has(header.header) #products-panel {
    max-width: 1600px !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
}

body:not(:has(header.header)) #products-panel {
    max-width: none !important;
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
}

#products-panel.collapsed {
    height: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

#products-panel.expanded {
    height: 70vh !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 10px 10px -5px rgba(0, 0, 0, 0.06) !important;
}

#products-panel > div:first-child {
    width: 280px !important;
    min-width: 280px !important;
    flex-shrink: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    background: #f5f5f5 !important;
    border-right: 1px solid #e5e7eb !important;
    overflow-x: hidden !important;
    overflow-y: hidden !important;
    transition: overflow-y 0s 0s;
}

#products-panel.expanded > div:first-child {
    overflow-y: auto !important;
    transition: overflow-y 0s 0.3s;
}

.treeList {
    background: #f5f5f5 !important;
}

.treeTypeSection {
    background: #f5f5f5;
    border-bottom: 1px solid #e5e7eb;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.treeTypeSection .treeTypeBtn {
    font-size: 0.8125rem !important;
    color: #505050 !important;
    padding: 0.625rem 0.5rem !important;
    background-color: #f5f5f5 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
}

.treeTypeSection .treeTypeBtn.treeTypeBtnHover {
    background-color: #f5f5f5 !important;
    color: #323232 !important;
}

.treeTypeBtn.treeTypeBtnHover .tree-type-text-content::after {
    background-color: #fcde06 !important;
    bottom: -4px;
}

.catList {
    background: #f5f5f5 !important;
    padding: 0.5rem !important;
    flex: 1;
    overflow-y: hidden;
    overflow-x: hidden;
    transition: overflow-y 0s 0s;
}

#products-panel.expanded .catList {
    overflow-y: auto;
    transition: overflow-y 0s 0.3s;
}

.catItem {
    border-radius: 0.375rem;
    transition: background-color 0.15s;
}

.catItem:hover {
    background-color: #fcde06 !important;
}

.catItem a {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #323232 !important;
    padding: 0.5rem 0.75rem !important;
    box-sizing: border-box !important;
    width: 100% !important;
    background-color: transparent !important;
    border-radius: 0 !important;
}

:is(.catItemHover, .catItemPreselected) {
    background-color: #fcde06 !important;
    border-radius: 0.375rem !important;
}

:is(.catItemHover, .catItemPreselected) a {
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: #323232 !important;
    padding: 0.5rem 0.75rem !important;
}

.catDetails {
    flex: 1 1 0 !important;
    grid-column: unset !important;
    background: #ffffff !important;
    background-image: none !important;
    overflow-y: hidden !important;
    padding: 1.5rem !important;
    transition: overflow-y 0s 0s;
}

#products-panel.expanded .catDetails {
    overflow-y: auto !important;
    transition: overflow-y 0s 0.3s;
}

.catDetailsGrid {
    margin: 0 !important;
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2rem 1.5rem !important;
}

.catDetailGridSection {
    margin: 0 0 0.5rem 0 !important;
}

.catDetailGridSection h3 {
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    color: #323232 !important;
    margin: 0 0 0.5rem 0 !important;
}

.catDetailGridSection h3.single {
    margin: 0 0 0.5rem 0 !important;
}

.catDetailGridSection h3 a {
    font-size: 0.9375rem !important;
    font-weight: 700 !important;
    color: #323232 !important;
    line-height: 1.4 !important;
}

.catDetailGridSection a {
    font-size: 0.8125rem !important;
    color: #505050 !important;
    line-height: 1.75 !important;
    font-weight: 400 !important;
}

.catDetailGridSection a:hover {
    color: #323232 !important;
}

.catDetailGridSection a .material-icons-outlined {
    font-size: 0.875rem !important;
    vertical-align: text-bottom;
}

.catDetailGridSection .catDetailGridSectionLinkPreselected::after {
    background-color: #fcde06 !important;
}

/* ===================================================================
   RESPONSIVE — added 2026-07-29. See docs/mobile/main-page-responsive.md

   The mega-menu is fundamentally a DESKTOP interaction: its right-hand pane only
   reveals sub-categories on HOVER, which does not exist on touch. Restyling it for
   phones produced a panel that floated over the page content and listed only the ten
   top-level categories with no way to drill down.

   So below the compact-header breakpoint it is hidden outright and replaced by the
   in-place category accordion inside the hamburger panel (markup in Menu.cshtml,
   built by tree-popup.js, styled in menu.css).

   The breakpoint matches menu.css's compact header (1129px), because that is where
   Produkter moves into the hamburger. !important is required: the rule above sets
   `#products-panel { display: flex !important }`.
   =================================================================== */
@media (max-width: 1129px) {
    #products-panel,
    .overlay {
        display: none !important;
    }
}
