.woocommerce-sidebar,
#secondary {
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    align-self: flex-start;
}

/* Hide scrollbar but keep functionality */
.woocommerce-sidebar,
#secondary {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

.woocommerce-sidebar::-webkit-scrollbar,
#secondary::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

/* Custom Account Header Styles */
.custom-account-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0px !important;
}

.custom-account-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 20px !important;
    border-radius: 12px;
    margin-bottom: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
}

.welcome-section h1 {
    font-size: 32px;
    margin: 0 0 10px 0;
    color: white;
}

.welcome-section h1 .username {
    font-weight: 700;
}

.welcome-section p {
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 600px;
}

.logout-btn {
    background: white;
    color: #667eea;
    padding: 12px 30px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.logout-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Add margin top to archive section after custom header */
.woocommerce-products-header,
.woocommerce-result-count,
.woocommerce-ordering {
    margin-top: 20px;
}

.products {
    margin-top: 30px;
}

/* Remove all vertical lines/borders from sidebar */
.woocommerce-sidebar,
#secondary,
.woocommerce-sidebar *,
#secondary *,
.widget,
.widget-area {
    border-left: none !important;
    border-right: none !important;
}

/* Remove borders from breadcrumb or header */
.woocommerce-breadcrumb {
    border: none !important;
    border-bottom: none !important;
}

.woocommerce-products-header {
    border: none !important;
    border-bottom: none !important;
}

/* Remove any separator lines in sidebar */
.woocommerce-widget-layered-nav-list,
.woocommerce-widget-layered-nav-list li,
.widget_layered_nav,
.widget_price_filter {
    border: none !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .woocommerce-sidebar,
    #secondary {
        position: relative;
        top: 0;
        max-height: none;
    }
    
    .custom-account-header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
        padding: 30px 20px;
    }
    
    .welcome-section h1 {
        font-size: 24px;
    }
    
    .welcome-section p {
        max-width: 100%;
    }
}