/* Do not style level-0 links, buttons, SVGs, spacing or header wrappers. */
.kowal-hyva-navigation { position: relative; }
.kowal-hyva-root-item { position: static !important; }
.kowal-hyva-dropdown {
    box-sizing: border-box;
    position: absolute !important;
    top: var(--kowal-panel-top, 100%) !important;
    left: var(--kowal-panel-left, 0px) !important;
    right: auto !important;
    width: var(--kowal-panel-width, 960px);
    max-width: calc(100vw - 32px);
    min-width: 0 !important;
    margin: 0 !important;
    transform: none !important;
    /* Tailwind 4 uses an independent translate property for -translate-x-1/2. */
    translate: none !important;
    z-index: 40;
    text-align: start;
}
.kowal-hyva-panel { padding: 0 !important; }
.kowal-hyva-panel-shell { list-style: none; padding: 0; margin: 0; }
.kowal-hyva-panel .kowal-menu-panel { position: static; width: 100%; box-sizing: border-box; }
.kowal-hyva-panel .kowal-menu-column-links { position: static; box-shadow: none; }

/* Reset browser button defaults at zero specificity; native link utilities still win. */
:where(.kowal-hyva-products .kowal-products-toggle) {
    appearance: none; border: 0; background: none; font: inherit; text-align: inherit; cursor: pointer;
}
/* Products keeps the native top bar. Scope shared menu styling to its dropdown. */
.kowal-hyva-products-item { position: static !important; }
.kowal-hyva-products .kowal-products-categories {
    --kowal-category-width: 240px;
    position: absolute; width: var(--kowal-category-width); z-index: 40;
    list-style: none; margin: 0; padding: 0; color: #333; background: #fff;
    border: 1px solid #ddd; box-sizing: border-box; box-shadow: 0 8px 18px #0002;
}
.kowal-hyva-products .kowal-products-categories[hidden] { display: none !important; }
.kowal-hyva-products .kowal-menu-panel {
    width: calc(var(--kowal-products-width) - var(--kowal-category-width));
}

/* Occupy only the header space left between logo and search; keep native item styling. */
@media (min-width: 1024px) {
    .kowal-hyva-alignment-container { flex: 1 1 0%; min-width: 0; width: auto !important; margin-inline: 24px !important; }
    .kowal-hyva-alignment-inner { width: 100%; min-width: 0; box-sizing: border-box; }
    .kowal-hyva-aligned-list[data-kowal-alignment="center"] { justify-content: center; }
    .kowal-hyva-aligned-list[data-kowal-alignment="left"] { justify-content: flex-start; }
    .kowal-hyva-aligned-list[data-kowal-alignment="right"] { justify-content: flex-end; }
}
.kowal-products-arrow { display: inline-flex; align-items: center; padding: 4px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.kowal-products-arrow svg { width: 20px; height: 20px; }
