/* Sidebar Styles */
:root {
    --bg-primary: #020B2F;
    --text-primary: #ffffff;
    --border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    width: 255px;
    max-width: 255px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    overflow-y: auto;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.sidebar-header {
    padding: 33px 24px 32px;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    width: 104px;
    height: 32px;
    display: block;
}

.sidebar-nav {
    padding: 32px 24px;
    flex: 1;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 24px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    line-height: 1.4;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 8px;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-weight: 500;
}

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 17px 24px 16px;
    border-top: 1px solid var(--border-color);
}

.logout-button {
    display: flex;
    align-items: center;
    gap: 28px;
    text-decoration: none;
    color: inherit;
    font-size: 14px;
    line-height: 1.4;
    background: none;
    border: none;
    width: 100%;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logout-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

/* Main content with sidebar */
.main-content-with-sidebar {
    margin-left: 255px;
    min-height: 100vh;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
}

/* Body overflow control */
body.overflow-hidden {
    overflow: hidden;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block !important;
    }

    .sidebar-container {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar-container.active {
        transform: translateX(0);
    }

    .main-content-with-sidebar {
        margin-left: 0;
    }

    .mobile-sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }

    .mobile-sidebar-overlay.active {
        display: block;
    }

    .product-grid.list-view .product-card {
        padding: 0.1rem;
        margin-bottom: 0.25rem;
    }

    .product-grid.list-view .product-card .p-6 {
        padding: 0.5rem;
    }

    .product-grid.list-view .product-card .flex.gap-2 a,
    .product-grid.list-view .product-card .flex.gap-2 button {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }

    .product-grid.list-view .product-card .text-2xl {
        font-size: 0.875rem;
    }

    .product-grid.list-view .product-card .w-16 {
        width: 2rem;
        height: 2rem;
    }
}

/* Product grid list view styles */
/* List view styles */
.list-view {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    /* Reduced gap between items */
}

.list-view .product-card {
    display: flex;
    align-items: center;
    padding: 0.2rem;
    /* Reduced padding */
    min-height: 3rem;
    /* Smaller height for list view */
    max-height: 4.5rem;
    /* Constrain height */
    overflow: hidden;
}

.list-view .product-card>div {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 1rem;
}

.list-view .product-card .flex.items-center.gap-2.sm\:gap-4 {
    flex: 1;
    align-items: center;
}

.list-view .product-card .description-toggle,
.list-view .product-card .description-content {
    display: none;
    /* Hide description in list view to save space */
}

.list-view .list-view-hidden {
    display: none;
    /* Hide the full button in list view */
}

.list-view .explore-account-arrow {
    display: flex;
    /* Show the arrow in list view */
}

.list-view .list-product-name {
    max-width: 130px;
    font-size: 15px;
    /* Show the arrow in list view */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-grid.list-view .product-card {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    padding: 0.25rem;
    border-radius: 0.5rem;
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.product-grid.list-view .product-card .p-6 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.75rem;
}

.product-grid.list-view .product-card .w-16 {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
}

.product-grid.list-view .product-card .flex-1 {
    margin-left: 0.75rem;
    margin-right: 1rem;
}

.product-grid.list-view .product-card .text-2xl {
    font-size: 1rem;
    font-weight: 600;
}

.product-grid.list-view .product-card .description-toggle {
    display: none;
}

.product-grid.list-view .product-card .flex.gap-2 {
    flex-direction: row;
    align-items: center;
    flex-shrink: 0;
}

.product-grid.list-view .product-card .flex.gap-2 a,
.product-grid.list-view .product-card .flex.gap-2 button {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    white-space: nowrap;
}

/* Category title icon rotation animation */
.category-title svg {
    transition: transform 0.3s ease;
}

.category-title svg.rotate-180 {
    transform: rotate(180deg);
}

/* Improve hover effects for category headers */
.category-section .view-switch-btn:hover,
.category-section .view-all-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}