/* Navigation Layout */
.app-container {
    position: relative;
    min-height: 100vh;
}

.sidebar {
    width: var(--nav-width);
    background-color: var(--bg-color);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    padding: var(--spacing-md) var(--spacing-lg);
    z-index: 100;
    scrollbar-width: none;
}

.sidebar::-webkit-scrollbar {
    display: none;
}

/* Logo Area (Top) */
.logo-area {
    padding: var(--spacing-sm) 0 var(--spacing-sm) var(--spacing-xs);
    display: flex;
    align-items: center;
}

.sidebar-logo {
    font-size: 1.5rem;
    /* Smaller size as requested */
    color: var(--primary-color);
    text-decoration: none;
    padding: 4px 8px;
    /* Padding around it */
}

/* Nav Menu */
.nav-content {
    flex: 1;
    margin-top: 0;
}

/* Nav Search Bar */
.nav-search-container {
    position: relative;
    margin: 0px 0 20px 0;
    width: 100%;
}

.nav-search-bar {
    display: flex !important;
    align-items: center;
    background-color: var(--bg-color);
    box-shadow: none;
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 6px 14px;
    transition: border-color 0.3s ease;
}

.nav-search-bar:focus-within {
    border-color: var(--primary-color);
    box-shadow: none;
}

.nav-search-submit {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-search-icon {
    width: 16px;
    height: 16px;
    opacity: 0.5;
    transition: opacity 0.2s;
}

.nav-search-submit:hover .nav-search-icon {
    opacity: 1;
}

.nav-search-input {
    flex: 1;
    background: transparent !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    color: var(--font-color);
    font-size: 0.85rem;
    min-width: 0;
}

.nav-search-input::placeholder {
    color: var(--font-color-muted);
    opacity: 0.6;
}

.nav-search-clear {
    background: transparent !important;
    border: none !important;
    outline: none !important;
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.2s;
    display: none;
    padding: 4px;
    align-items: center;
    justify-content: center;
}

.nav-search-clear:hover {
    opacity: 1;
}

.nav-search-clear img {
    width: 14px;
    height: 14px;
}

/* Autocomplete Dropdown */
.nav-search-suggestions-dropdown {
    position: fixed;
    top: 130px;
    left: var(--spacing-lg);
    width: 350px;
    /* Overlap right panel */
    margin-top: 8px;
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
}

.nav-search-suggestions-dropdown.hidden {
    display: none;
}

.suggestion-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    text-decoration: none;
    color: var(--font-color);
    transition: background-color 0.15s;
    gap: 12px;
}

.suggestion-item:first-child {
    border-radius: 12px 12px 0 0;
}

.suggestion-item:last-child {
    border-radius: 0 0 12px 12px;
}

.suggestion-item:only-child {
    border-radius: 12px;
}

.suggestion-item:hover {
    background-color: var(--bg-hover);
}

.suggestion-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background-color: var(--bg-secondary);
}

.suggestion-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.suggestion-info {
    flex: 1;
    min-width: 0;
}

.suggestion-title {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

.suggestion-title mark {
    background: transparent;
    color: var(--primary-color);
    font-weight: 700;
}

.suggestion-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
}

.suggestion-type {
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.suggestion-url {
    color: var(--font-color-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-empty {
    padding: 20px;
    text-align: center;
    color: var(--font-color-muted);
    font-size: 0.9rem;
}

@media screen and (max-width: 768px) {
    .nav-search-suggestions-dropdown {
        position: fixed;
        left: 20px;
        right: 20px;
        width: auto;
        top: 70px;
        /* Below standard mobile header */
        max-height: 60vh;
    }
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: var(--spacing-xl);
    list-style: none;
    padding: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    border-radius: 9999px;
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--font-color);
    text-decoration: none;
    transition: background-color 0.2s, color 0.2s;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background-color: var(--bg-secondary);
    color: #000;
}

.nav-item.active {
    background-color: rgba(var(--primary-color-rgb), 0.15);
    color: var(--color-dark);
    font-weight: 700;
}

.nav-collapsible-item .nav-item {
    padding-left: 32px;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 1.25rem;
    width: 24px;
}

.nav-icon-img,
.nav-icon-img-sm {
    width: 24px;
    height: 24px;
    margin-right: 16px;
    object-fit: contain;
}

.nav-cart-badge {
    background-color: var(--primary-color);
    color: var(--color-dark);
    font-size: 0.75rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
}

.nav-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

/* Nav Footer Area */
.nav-footer {
    margin-top: auto;
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-lg);
    border-top: 1px solid transparent;
}

/* Nav Footer Area */
.nav-footer {
    margin-top: auto;
    padding-top: var(--spacing-md);
    padding-bottom: var(--spacing-lg);
    border-top: 1px solid transparent;
}

/* Language Selector */
.lang-selector {
    margin-bottom: var(--spacing-md);
}

/* Site Description */
.site-description {
    /* margin-bottom: var(--spacing-lg); */
}

.site-description p {
    font-size: 0.8rem;
    color: #777;
    line-height: 1.4;
    margin: 0;
}

/* Compact Footer Links */
.compact-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-bottom: var(--spacing-lg);
}

.footer-link {
    font-size: 0.8rem;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.footer-link:hover {
    color: var(--primary-color);
}

/* Social Links */
.social-links-text {
    display: flex;
    flex-wrap: wrap;
    column-gap: 12px;
    margin-bottom: var(--spacing-lg);
}

.social-links-text a {
    color: #888;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    transition: color 0.2s;
}

.social-links-text a:hover {
    color: var(--primary-color);
}

.copyright {
    font-size: 0.75rem;
    color: #999;
}

/* Main Content Layout with Sidebar */
.main-content {
    margin-left: var(--nav-width);
    width: auto;
    max-width: calc(100vw - var(--nav-width));
    padding: var(--spacing-md);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Mobile Layout */
.menu-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--font-color);
}

.menu-btn.mobile-only {
    display: none;
    /* Hidden on desktop */
}

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .menu-btn.mobile-only {
        display: block;
        position: absolute;
        top: 10px;
        left: 10px;
        z-index: 10;
        /* Above content */
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 200;
        background: var(--bg-color);
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .nav-content {
        margin-top: 0;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding-top: 56px;
    }
}