.top-nav-pc {
    position: relative;
    display: flex;
    padding: .5em;
    padding-bottom: .5;
    align-content: center;
    justify-content: space-between;
}

.top-nav-mobile {
    display: flex;
    padding: 1em;
    align-content: center;
    justify-content: space-between;
}

.nav-logo {
    width: 10em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-right: .5em;
    position: relative
}

@media screen and (max-width: 400px) {
    .nav-logo {
        width: 7em;
    }
}

.nav-logo-sub {
    position: absolute;
    bottom: 0;
    right: 0;
    font-size: .8em;
    color: #f16c5d;
    font-weight: bold;
    font-family: cursive;
}

@media screen and (max-width: 400px) {
    .nav-logo-sub {
        bottom: 0em;
    }
}

nav {
    color: #39393e;
}

.menu1 {
    display: flex;
    justify-content: space-around;
}

.menu1 a {
    color: #39393e;
    text-decoration: none;
    font-size: .8em;
    padding: .4em;
    display: inline-block;
}

.menu-mid {
    display: flex;
    flex-direction: column;
    height: fit-content;
}

/* menu 2 */
/* main menu bar */
.menu2 {
    display: flex;
    justify-content: space-around;
    background-color: #f8f8f8;
    border-bottom: 1px solid #999;
    padding-bottom: 0;
    position: relative;
    flex-wrap: wrap;
}

.menu2 a {
    text-decoration: none;
    color: #333;
    padding: 12px 8px 10px 8px;
    border-bottom: 3px solid transparent;
    transition: all 0.1s;
    font-size: 0.95rem;
    white-space: nowrap;
}

.menu2 a:hover {
    border-bottom-color: #f16c5d;
    color: #000;
}

.signin-text {
    text-decoration: none;
    color: #39393e;
    border: 1px solid #000;
    margin-left: 2em;
    margin-right: 2em;
    border-radius: .2em;
    padding: .2em .4em;
    font-size: .9em;
    padding-top: .3em;
    text-align: center;
    display: inline-block;
    transition: all 0.3s ease;
}



/* dropdown panel */
.category-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ddd;
    border-top: 1px solid #999;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    overflow: hidden;
}

/* cascading columns container */
.cascading-columns {
    display: flex;
    min-height: 350px;
    max-height: 500px;
    overflow: hidden;
}

/* individual column */
.menu-column {
    flex: 0 0 250px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    scroll-behavior: smooth;
}

.menu-column:last-child {
    border-right: none;
}

/* column header */
.column-header {
    padding: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #c44536;
    border-bottom: 1px solid #f0f0f0;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 5;
}

/* category items in columns */
.category-item {
    display: block;
    padding: 0.6rem 1rem 0.6rem 1.5rem;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.9rem;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.1s;
    position: relative;
}

.category-item:hover {
    background-color: #f8f8f8;
    border-left-color: #f16c5d;
}

.category-item.has-children {
    font-weight: 500;
}

.category-item.has-children::after {
    content: '›';
    position: absolute;
    right: 1rem;
    color: #999;
    font-size: 1.2rem;
}

.category-item.selected {
    background-color: #ffeeed;
    border-left-color: #f16c5d;
}

/* loading and error states */
.loading-message,
.error-message,
.empty-message {
    padding: 2rem;
    text-align: center;
    width: 100%;
}

.loading-message {
    color: #666;
    font-style: italic;
}

.error-message {
    color: #f16c5d;
    background-color: #ffeeed;
}

.empty-message {
    color: #999;
    font-style: italic;
}

/* Custom scrollbar styling */
.menu-column::-webkit-scrollbar {
    width: 8px;
}

.menu-column::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.menu-column::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.menu-column::-webkit-scrollbar-thumb:hover {
    background: #999;
}


/* menu mobile */
/* mobile menu bar */
/* mobile header */
.mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f8f8f8;
    padding: 1rem;
    border-bottom: 1px solid #999;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.menu-title {
    font-weight: bold;
    color: #333;
    font-size: 1.2rem;
}

/* hamburger button */
.hamburger-btn {
    background: none;
    border: solid 1px #89142f;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 44px;
    height: 44px;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    background-color: #fff;
    z-index: 999;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background-color: #89142f;
    border-radius: 3px;
    transition: all 0.3s;
}

.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* overlay */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}

/* sliding menu panel - FIXED POSITIONING */
.mobile-menu-panel {
    position: absolute;
    top: 0;
    left: -100%;
    width: 90%;
    max-width: 400px;
    height: 600px;
    background-color: white;
    z-index: 999;
    transition: left 0.3s ease-in-out;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    /* Ensure no other transforms interfere */
    transform: none !important;
}

/* When open, set left to 0 */
.mobile-menu-panel.open {
    left: 0 !important;
}

/* menu header with back button */
.menu-panel-header {
    display: flex;
    align-items: center;
    padding: 1rem;
    background-color: #f8f8f8;
    border-bottom: 1px solid #ddd;
    min-height: 60px;
}

.back-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    padding: 0.5rem 1rem 0.5rem 0;
    cursor: pointer;
    color: #f16c5d;
    display: none;
    align-items: center;
    font-weight: bold;
}

.back-btn.visible {
    display: flex !important;
}

.back-btn span {
    font-size: 1.2rem;
    margin-right: 5px;
}

.panel-title {
    font-weight: bold;
    color: #333;
    font-size: 1.1rem;
    flex-grow: 1;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    padding: 0 0.5rem;
    display: flex;
    align-items: center;
}

.close-btn:hover {
    color: #f16c5d;
}

/* columns container */
.mobile-columns-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    background-color: #fff;
    max-height: calc(100vh - 60px);
}

.columns-wrapper {
    display: flex;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.mobile-column {
    flex: 0 0 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0;
    background-color: #fff;
    border-right: 1px solid #e0e0e0;
    scroll-behavior: smooth;
}

/* column header */
.mobile-column-header {
    padding: 0.8rem 1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #c44536;
    border-bottom: 1px solid #f0f0f0;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    background-color: #fff;
    z-index: 5;
}

/* category items */
.mobile-category-item {
    display: block;
    padding: 1rem 1rem 1rem 1.5rem;
    color: #2c3e50;
    text-decoration: none;
    font-size: 1rem;
    cursor: pointer;
    border-left: 4px solid transparent;
    transition: all 0.1s;
    position: relative;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-category-item:active {
    background-color: #ffeeed;
}

.mobile-category-item.has-children {
    font-weight: 500;
    color: #f16c5d;
}

.mobile-category-item.has-children::after {
    content: '›';
    position: absolute;
    right: 1.5rem;
    color: #999;
    font-size: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.mobile-category-item.selected {
    background-color: #ffeeed;
    border-left-color: #f16c5d;
}

/* loading and error states */
.loading-message,
.error-message,
.empty-message {
    padding: 2rem;
    text-align: center;
    width: 100%;
}

.loading-message {
    color: #666;
    font-style: italic;
}

.error-message {
    color: #f16c5d;
    background-color: #ffeeed;
}

.empty-message {
    color: #999;
    font-style: italic;
}

/* scrollbar styling */
.mobile-column::-webkit-scrollbar {
    width: 6px;
}

.mobile-column::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.mobile-column::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.mobile-column::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* desktop menu - hidden on mobile */
.desktop-menu {
    display: none;
}

/* show desktop menu on larger screens */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }

    .desktop-menu {
        display: block;
    }

    .menu-overlay,
    .mobile-menu-panel {
        display: none;
    }
}